/* =========================================
   THE ROYAL SUMMIT
   Secret chamber • Antique gold • Nine crowns
========================================= */

:root {
    color-scheme: dark;

    --summit-black: #08090b;
    --summit-deep: #040507;
    --summit-panel: rgba(13, 14, 17, 0.91);

    --gold: #c5a96b;
    --gold-bright: #e3cc92;
    --gold-muted: #a18a5b;

    --white: #e9e5dc;
    --muted: #b1aca2;
    --dim: #77746d;

    --border: rgba(194, 169, 111, 0.2);
    --gold-glow: rgba(199, 167, 94, 0.09);
}

/* RESET */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;

    background: var(--summit-deep);
    color: var(--white);

    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.75;
}

/* =========================================
   FIXED BACKGROUND IMAGE
========================================= */

.summit-background {
    position: fixed;
    inset: 0;
    z-index: -2;

    overflow: hidden;
    pointer-events: none;

    background-color: #08090b;

    background-image:
        linear-gradient(
            180deg,
            rgba(5, 6, 8, 0.63),
            rgba(5, 6, 8, 0.76) 48%,
            rgba(3, 4, 5, 0.94)
        ),
        url("../images/royal-summit-background.png");

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.background-shade {
    position: absolute;
    inset: 0;

    background:
        radial-gradient(
            ellipse at 50% 30%,
            transparent 0%,
            rgba(0, 0, 0, 0.18) 55%,
            rgba(0, 0, 0, 0.5) 100%
        ),
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.25),
            transparent 32%,
            transparent 68%,
            rgba(0, 0, 0, 0.25)
        );
}

/* GOLDEN ATMOSPHERE */

.golden-haze {
    position: absolute;
    top: -12%;
    left: 50%;

    width: min(1000px, 140vw);
    height: 700px;

    transform: translateX(-50%);
    border-radius: 50%;

    background: radial-gradient(
        ellipse,
        rgba(194, 159, 83, 0.075),
        transparent 68%
    );

    filter: blur(75px);
}

/* DUST IN THE CHAMBER */

.summit-dust {
    position: absolute;
    inset: -10%;

    opacity: 0.15;

    background-image:
        radial-gradient(
            circle,
            rgba(233, 211, 158, 0.55) 0 1px,
            transparent 1.5px
        ),
        radial-gradient(
            circle,
            rgba(191, 176, 143, 0.3) 0 1px,
            transparent 1.5px
        );

    background-size: 137px 151px, 193px 177px;
    background-position: 0 0, 61px 43px;

    animation: summit-drift 95s linear infinite;
}

@keyframes summit-drift {
    from {
        transform: translate3d(0, -2%, 0);
    }

    to {
        transform: translate3d(1%, 4%, 0);
    }
}

/* =========================================
   PAGE LAYOUT
========================================= */

.page-container {
    position: relative;

    width: min(1120px, calc(100% - 36px));
    margin: 0 auto;
    padding-bottom: 30px;
}

/* =========================================
   NAVIGATION
========================================= */

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    padding: 22px 0;

    border-bottom: 1px solid rgba(203, 182, 135, 0.15);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    color: #d1c3a3;
    text-decoration: none;

    font-family: Arial, sans-serif;
    font-size: 0.63rem;
    letter-spacing: 0.12em;

    transition: color 0.25s ease;
}

.back-link:hover {
    color: #fff1cc;
}

.back-link span:first-child {
    font-size: 1.1rem;
}

.record-label {
    color: #a89978;

    font-family: Arial, sans-serif;
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    text-align: right;
}

/* =========================================
   FLOATING PANELS
========================================= */

.floating-panel {
    position: relative;
    overflow: hidden;

    border: 1px solid var(--border);

    background:
        linear-gradient(
            145deg,
            rgba(22, 22, 22, 0.92),
            rgba(7, 8, 10, 0.95)
        );

    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.floating-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;

    width: 80%;
    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(226, 200, 141, 0.35),
        transparent
    );

    pointer-events: none;
}

/* =========================================
   HERO
========================================= */

.hero-panel {
    position: relative;
    overflow: hidden;

    margin-top: 32px;
    padding: clamp(37px, 7vw, 75px) 22px;

    text-align: center;

    border: 1px solid rgba(202, 174, 111, 0.3);

    background:
        radial-gradient(
            ellipse at 50% 0%,
            rgba(181, 146, 73, 0.12),
            transparent 58%
        ),
        linear-gradient(
            145deg,
            rgba(19, 19, 19, 0.92),
            rgba(5, 6, 8, 0.96)
        );

    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.hero-panel::after {
    content: "";
    position: absolute;
    inset: 10px;

    border: 1px solid rgba(204, 180, 125, 0.06);

    pointer-events: none;
}

.royal-seal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.seal-line {
    width: 55px;
    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        var(--gold-muted)
    );
}

.seal-line:last-child {
    transform: rotate(180deg);
}

.seal-diamond {
    color: var(--gold-bright);
    font-size: 1.65rem;
    line-height: 1;
}

.hero-pretitle {
    margin-top: 28px;

    color: #b8a77e;

    font-family: Arial, sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.24em;
}

.hero-panel h1 {
    margin-top: 17px;

    color: #f0e8d7;

    font-size: clamp(2.8rem, 9vw, 6.4rem);
    font-weight: 400;
    letter-spacing: 0.035em;
    line-height: 1.14;

    text-shadow: 0 5px 35px rgba(0, 0, 0, 0.5);
}

.hero-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    width: min(310px, 80%);
    margin: 24px auto 17px;
}

.hero-divider span {
    flex: 1;
    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(199, 170, 107, 0.65)
    );
}

.hero-divider span:last-child {
    transform: rotate(180deg);
}

.hero-divider i {
    width: 7px;
    height: 7px;

    transform: rotate(45deg);

    border: 1px solid var(--gold);
}

.hero-subtitle {
    color: #c8c0af;

    font-size: clamp(0.94rem, 2.5vw, 1.12rem);
    font-style: italic;
}

/* HERO QUOTE */

.hero-quote {
    max-width: 690px;
    margin: 34px auto 0;
    padding: 23px 22px;

    border-top: 1px solid rgba(197, 169, 107, 0.24);
    border-bottom: 1px solid rgba(197, 169, 107, 0.24);

    background: rgba(0, 0, 0, 0.2);

    color: #e1d7c2;

    font-size: clamp(1rem, 2.8vw, 1.32rem);
    font-style: italic;
    line-height: 1.9;
}

/* FOUNDING STATUS */

.hero-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;

    width: min(440px, 100%);
    margin: 30px auto 0;
    padding: 16px;

    border: 1px solid rgba(201, 175, 116, 0.19);
    background: rgba(0, 0, 0, 0.22);
}

.hero-status > span:first-child {
    color: #b4a177;

    font-family: Arial, sans-serif;
    font-size: 0.54rem;
    letter-spacing: 0.16em;
}

.hero-status strong {
    color: #e7dcc4;
    font-size: 1rem;
    font-weight: 400;
}

.status-note {
    color: #9c9587;
    font-size: 0.76rem;
    font-style: italic;
}

/* =========================================
   SECTION HEADINGS
========================================= */

.section-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 17px;

    margin-bottom: 25px;
    text-align: center;
}

.heading-line {
    flex: 1;
    max-width: 110px;
    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(199, 169, 104, 0.48)
    );
}

.heading-line:last-child {
    transform: rotate(180deg);
}

.section-kicker {
    color: #b5a071;

    font-family: Arial, sans-serif;
    font-size: 0.56rem;
    letter-spacing: 0.2em;
}

.section-heading h2 {
    margin-top: 6px;

    color: #e9e1d1;
    font-size: clamp(1.4rem, 4.2vw, 2.1rem);
    font-weight: 400;
}

.section-intro {
    max-width: 540px;
    margin: 12px auto 0;

    color: #b0a99a;
    font-size: 0.87rem;
    line-height: 1.9;
}

/* =========================================
   PURPOSE
========================================= */

.purpose-panel {
    margin-top: 25px;
    padding: clamp(28px, 5.5vw, 46px);

    text-align: center;
}

.purpose-panel > .section-kicker {
    text-align: center;
}

.purpose-panel h2 {
    margin-top: 12px;

    color: #e9e1d1;
    font-size: clamp(1.6rem, 4.6vw, 2.55rem);
    font-weight: 400;
    line-height: 1.45;
}

.purpose-panel > p:not(.section-kicker) {
    max-width: 740px;
    margin: 17px auto 0;

    color: #bcb5a7;
    font-size: 0.91rem;
    line-height: 2;
}

.purpose-emphasis {
    display: flex;
    flex-direction: column;
    gap: 7px;

    max-width: 690px;
    margin: 27px auto 0;
    padding: 19px;

    border: 1px solid rgba(202, 174, 111, 0.2);
    background: rgba(0, 0, 0, 0.23);
}

.purpose-emphasis span {
    color: #b8a174;

    font-family: Arial, sans-serif;
    font-size: 0.54rem;
    letter-spacing: 0.17em;
}

.purpose-emphasis strong {
    color: #e1d5bb;
    font-size: 0.97rem;
    font-weight: 400;
    line-height: 1.9;
}

/* =========================================
   RULES
========================================= */

.rules-section {
    margin-top: 60px;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.rule-card {
    min-height: 190px;
    padding: 23px;

    transition:
        border-color 0.25s ease,
        transform 0.25s ease;
}

.rule-card:hover {
    transform: translateY(-2px);
    border-color: rgba(211, 184, 122, 0.36);
}

.rule-number {
    color: #c3a96f;

    font-family: Arial, sans-serif;
    font-size: 0.59rem;
    letter-spacing: 0.15em;
}

.rule-card h3 {
    margin-top: 13px;

    color: #e5ddcd;
    font-size: 1.16rem;
    font-weight: 400;
    line-height: 1.5;
}

.rule-card p {
    margin-top: 9px;

    color: #b3ac9e;
    font-size: 0.86rem;
    line-height: 1.95;
}

.rule-wide {
    grid-column: 1 / -1;
    min-height: auto;
}

/* =========================================
   THE NINE KINGS
========================================= */

.kings-section {
    margin-top: 65px;
}

.kings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
}

/* CARD BASE */

.king-card {
    --king-accent: #c5a96b;
    --king-glow: rgba(197, 169, 107, 0.07);

    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;

    min-width: 0;
    min-height: 280px;
    padding: 23px 13px 18px;

    overflow: hidden;

    border: 1px solid rgba(193, 170, 119, 0.22);

    background:
        radial-gradient(
            ellipse at 50% 0%,
            var(--king-glow),
            transparent 65%
        ),
        linear-gradient(
            145deg,
            rgba(21, 21, 20, 0.95),
            rgba(6, 7, 8, 0.97)
        );

    color: inherit;
    text-align: center;
    text-decoration: none;
    font: inherit;

    cursor: pointer;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.king-card::before {
    content: "";
    position: absolute;
    inset: 7px;

    border: 1px solid rgba(206, 183, 128, 0.055);

    pointer-events: none;
}

.king-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 15%;

    width: 70%;
    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        var(--king-accent),
        transparent
    );

    opacity: 0.75;
}

.king-card:hover,
.king-card:focus-visible {
    transform: translateY(-4px);

    border-color: var(--king-accent);

    box-shadow:
        0 14px 38px rgba(0, 0, 0, 0.34),
        0 0 22px var(--king-glow);

    outline: none;
}

.king-number {
    align-self: flex-start;

    color: #9c927f;

    font-family: Arial, sans-serif;
    font-size: 0.54rem;
    letter-spacing: 0.13em;
}

.king-nation {
    margin-top: 8px;

    color: var(--king-accent);

    font-family: Arial, sans-serif;
    font-size: 0.53rem;
    letter-spacing: 0.12em;
    line-height: 1.7;
}

.king-crown {
    display: grid;
    place-items: center;

    width: 56px;
    height: 56px;
    margin-top: 18px;

    border: 1px solid color-mix(
        in srgb,
        var(--king-accent) 40%,
        transparent
    );

    border-radius: 50%;

    color: var(--king-accent);
    font-size: 2rem;
    line-height: 1;

    text-shadow: 0 0 15px var(--king-glow);
}

.king-name {
    display: block;

    margin-top: 16px;

    color: #eee8dc;
    font-size: clamp(0.98rem, 2.2vw, 1.3rem);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.king-role {
    margin-top: 9px;

    color: #b2a68e;

    font-family: Arial, sans-serif;
    font-size: 0.53rem;
    letter-spacing: 0.1em;
}

.king-action {
    display: block;

    margin-top: auto;
    padding-top: 18px;

    color: var(--king-accent);

    font-family: Arial, sans-serif;
    font-size: 0.49rem;
    letter-spacing: 0.06em;
    line-height: 1.8;
}

/* NATION COLORS: RESTRAINED, NOT BRIGHT */

.king-white {
    --king-accent: #e1e0d7;
    --king-glow: rgba(222, 220, 207, 0.08);
}

.king-red {
    --king-accent: #bc5b60;
    --king-glow: rgba(153, 35, 44, 0.11);
}

.king-orange {
    --king-accent: #ca8954;
    --king-glow: rgba(172, 90, 35, 0.1);
}

.king-yellow {
    --king-accent: #d2b96b;
    --king-glow: rgba(180, 147, 48, 0.1);
}

.king-green {
    --king-accent: #8ea77e;
    --king-glow: rgba(73, 115, 61, 0.1);
}

.king-blue {
    --king-accent: #83a9cf;
    --king-glow: rgba(53, 105, 160, 0.11);
}

.king-violet {
    --king-accent: #b29acb;
    --king-glow: rgba(116, 75, 155, 0.12);
}

.king-indigo {
    --king-accent: #898fc5;
    --king-glow: rgba(70, 72, 147, 0.12);
}

.king-black {
    --king-accent: #a6a1a8;
    --king-glow: rgba(120, 113, 128, 0.08);
}

.kings-note {
    margin-top: 22px;

    color: #a49a88;
    font-size: 0.81rem;
    font-style: italic;
    text-align: center;
}

/* =========================================
   CLOSING PANEL
========================================= */

.closing-panel {
    margin-top: 65px;
    padding: clamp(30px, 6vw, 50px) 22px;

    text-align: center;
}

.closing-symbol {
    color: var(--gold-bright);
    font-size: 1.7rem;
}

.closing-panel h2 {
    margin-top: 11px;

    color: #e8dfcc;
    font-size: clamp(1.7rem, 5vw, 2.7rem);
    font-weight: 400;
    line-height: 1.5;
}

.closing-panel > p:not(.section-kicker) {
    max-width: 590px;
    margin: 14px auto 0;

    color: #b0a897;
    font-size: 0.89rem;
    line-height: 1.95;
}

.closing-seal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;

    margin-top: 26px;

    color: #c0a975;

    font-family: Arial, sans-serif;
    font-size: 0.56rem;
    letter-spacing: 0.16em;
}

.closing-seal span {
    width: 30px;
    height: 1px;

    background: rgba(200, 170, 102, 0.55);
}

/* =========================================
   FOOTER
========================================= */

.page-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;

    padding: 24px 0 10px;

    border-top: 1px solid rgba(194, 169, 111, 0.15);

    color: #968a72;

    font-family: Arial, sans-serif;
    font-size: 0.54rem;
    letter-spacing: 0.1em;
}

.page-footer a {
    color: #c2b28f;
    text-decoration: none;
}

.page-footer a:hover {
    color: #fff0cb;
}

/* =========================================
   KING MESSAGE MODAL
========================================= */

.king-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;

    display: grid;
    place-items: center;

    padding: 20px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.king-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.86);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-panel {
    position: relative;
    z-index: 1;

    width: min(470px, 100%);
    max-height: 90vh;
    overflow-y: auto;

    padding: 39px 25px 29px;

    border: 1px solid rgba(198, 170, 106, 0.38);

    background:
        radial-gradient(
            ellipse at 50% 0%,
            rgba(154, 121, 57, 0.13),
            transparent 62%
        ),
        linear-gradient(
            145deg,
            #15130f,
            #060708 85%
        );

    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8);

    text-align: center;

    transform: translateY(12px) scale(0.98);

    transition: transform 0.25s ease;
}

.king-modal.is-open .modal-panel {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 13px;

    width: 35px;
    height: 35px;

    border: 1px solid rgba(194, 169, 111, 0.2);
    background: rgba(0, 0, 0, 0.25);

    color: #d0c3a5;
    font-size: 1.6rem;
    line-height: 1;

    cursor: pointer;
}

.modal-close:hover {
    color: white;
    border-color: var(--gold);
}

.modal-crown {
    display: grid;
    place-items: center;

    width: 62px;
    height: 62px;
    margin: 0 auto 21px;

    border: 1px solid rgba(201, 174, 111, 0.4);
    border-radius: 50%;

    color: var(--gold-bright);
    font-size: 2rem;
}

.modal-kicker {
    color: #b79b60;

    font-family: Arial, sans-serif;
    font-size: 0.55rem;
    letter-spacing: 0.18em;
}

.modal-panel h2 {
    margin-top: 10px;

    color: #eee4d0;
    font-size: clamp(1.35rem, 4.5vw, 1.8rem);
    font-weight: 400;
    line-height: 1.5;
}

.modal-divider {
    width: 65px;
    height: 1px;
    margin: 19px auto;

    background: var(--gold-muted);
}

.modal-message {
    max-width: 370px;
    margin: 0 auto;

    color: #c8bfac;
    font-size: 1rem;
    font-style: italic;
    line-height: 2;
}

.modal-warning {
    margin-top: 23px;

    color: #94866c;

    font-family: Arial, sans-serif;
    font-size: 0.52rem;
    letter-spacing: 0.12em;
}

.modal-return {
    margin-top: 24px;
    padding: 12px 17px;

    border: 1px solid rgba(198, 170, 106, 0.4);
    background: rgba(102, 79, 35, 0.17);

    color: #e1d2af;

    font-family: Arial, sans-serif;
    font-size: 0.56rem;
    letter-spacing: 0.1em;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.modal-return:hover {
    background: rgba(125, 96, 42, 0.3);
    border-color: rgba(225, 199, 137, 0.7);
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 700px) {
    .page-container {
        width: calc(100% - 24px);
    }

    .top-bar {
        padding: 18px 0;
    }

    .back-link {
        font-size: 0.54rem;
        letter-spacing: 0.07em;
    }

    .record-label {
        font-size: 0.47rem;
        letter-spacing: 0.05em;
    }

    .summit-background {
        background-attachment: scroll;
        background-position: center center;
    }

    .hero-panel {
        margin-top: 22px;
        padding: 35px 15px;
    }

    .hero-pretitle {
        font-size: 0.49rem;
        letter-spacing: 0.14em;
    }

    .hero-panel h1 {
        font-size: clamp(2.35rem, 10.5vw, 4rem);
        letter-spacing: 0.01em;
    }

    .hero-quote {
        margin-top: 26px;
        padding: 19px 13px;
    }

    .purpose-panel {
        margin-top: 18px;
        padding: 25px 17px;
    }

    .rules-section,
    .kings-section {
        margin-top: 45px;
    }

    .section-heading {
        gap: 9px;
        margin-bottom: 20px;
    }

    .heading-line {
        max-width: 30px;
    }

    .section-heading h2 {
        font-size: 1.32rem;
    }

    .rules-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .rule-card {
        min-height: auto;
        padding: 21px;
    }

    .rule-wide {
        grid-column: auto;
    }

    .kings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .king-card {
        min-height: 255px;
        padding: 18px 9px 15px;
    }

    .king-crown {
        width: 49px;
        height: 49px;
        font-size: 1.75rem;
    }

    .king-name {
        font-size: clamp(0.9rem, 3.4vw, 1.15rem);
    }

    .king-nation {
        font-size: 0.48rem;
        letter-spacing: 0.07em;
    }

    .king-action {
        font-size: 0.44rem;
        letter-spacing: 0.025em;
    }

    .closing-panel {
        margin-top: 45px;
        padding: 30px 15px;
    }

    .page-footer {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 360px) {
    .kings-grid {
        grid-template-columns: 1fr;
    }

    .king-card {
        min-height: 245px;
    }
}

/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}