/* Page frame: stage (max 2560px), header/navigation, footer. */

/* The whole composition lives on a centred stage. Wider screens (ultrawide) show plain page background around it. */
.site-stage {
    position: relative;
    max-width: var(--stage-width);
    margin-inline: auto;
    overflow-x: clip;
}
.site-header, .site-main, .site-footer {
    width: var(--content-width);
    margin-inline: auto;
}

/* ---------- header / navigation ---------- */
.site-header {
    position: relative;
    z-index: 3;
    margin-top: 34px;
    /* The spiked end caps of nav-bar.png are drawn 150px wide (inner face starts ~116px in) — keep links clear. */
    padding: 12px 124px 4px; /* 4px lower: Cinzel caps sit optically high in their line box */
}
.navigation {
    display: flex;
    align-items: center;
    gap: 12px 20px;
}
.nav-main {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.nav-list {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
}
.nav-list--left {
    justify-content: space-between;
}
.nav-list--right {
    justify-content: flex-start;
    gap: 6px;
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.nav-right .header-account {
    margin-left: auto;
}
.nav-list a, .header-account a, .link-button {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 6px 10px;
    color: #e9d3ae;
    font: 500 .8rem/1.2 var(--heading-font);
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: 2px;
    background: transparent;
    text-shadow: 0 1px 2px #000;
}
.nav-list .icon, .header-account .icon {
    flex-shrink: 0;
    color: #c99b62;
}
/* Glowing ember line under the hovered / current item. */
.nav-list a::after, .header-account a::after {
    content: '';
    position: absolute;
    left: 14%;
    right: 14%;
    bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, #ff8a4a, transparent);
    box-shadow: 0 0 8px #ff5a1f;
    opacity: 0;
    transition: opacity .15s ease;
}
.nav-list a:hover, .header-account a:hover, .link-button:hover {
    color: #fff0cf;
    text-decoration: none;
}
.nav-list a:hover::after, .header-account a:hover::after {
    opacity: .55;
}
/* Current page: no box — just the glowing ember line and a warm glow on the label. */
.nav-list a[aria-current='page'], .header-account a[aria-current='page'] {
    color: #ffe6b8;
    text-shadow: 0 1px 2px #000, 0 0 10px #ff7a3a99;
}
.nav-list a[aria-current='page']::after, .header-account a[aria-current='page']::after {
    left: 8%;
    right: 8%;
    height: 3px;
    opacity: 1;
    background: linear-gradient(90deg, transparent, #ff9d5c 20%, #ffd08e 50%, #ff9d5c 80%, transparent);
    box-shadow: 0 0 10px #ff5a1f, 0 0 20px #ff5a1f66;
}
.nav-list a[aria-current='page'] .icon, .header-account a[aria-current='page'] .icon {
    color: #ffd08e;
    filter: drop-shadow(0 0 5px #ff7a3a);
}
/* Emblem sits on the bar, splitting the two groups (like the concept). */
.nav-emblem {
    position: relative;
    display: block;
    width: 78px;
    height: 78px;
    margin: -26px 84px -26px;
    filter: drop-shadow(0 4px 6px #000);
}
/* Raised spiked centre mount (A-001) behind the emblem; its round recess is ~60% of its height. */
.nav-emblem::before {
    content: '';
    position: absolute;
    z-index: -1;
    left: 50%;
    top: 50%;
    width: 264px;
    height: 110px;
    transform: translate(-50%, -50%);
    background: url('../assets/borders/nav-center.png') center / contain no-repeat;
    pointer-events: none;
}
.nav-emblem img {
    position: relative;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px #a01e0a55);
    transition: transform .2s ease;
}
.nav-emblem:hover img {
    transform: scale(1.06);
}
.header-account {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    padding-left: 12px;
    border-left: 1px solid #6b4b3166;
}
.header-account a, .link-button {
    font-size: .74rem;
    padding-inline: 9px;
}
.header-account__name span {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: none;
    font-size: .9rem;
    letter-spacing: .02em;
}
.header-account .link-button {
    color: #c9b391;
    font-size: .68rem;
}
.header-account .count-badge {
    margin-left: 0;
}
.header-account form {
    margin: 0;
}
.link-button {
    background: transparent;
    cursor: pointer;
}
.mobile-heading {
    display: none;
}

/* ---------- footer ---------- */
.site-footer {
    position: relative;
    margin-top: 56px;
    padding-bottom: 150px;
}
/* Fire strip under the footer, spanning the stage (not the viewport). */
.site-footer::after {
    content: '';
    position: absolute;
    z-index: -1;
    left: 50%;
    bottom: 0;
    width: min(100vw, var(--stage-width));
    height: 260px;
    transform: translateX(-50%);
    background: url('../assets/backgrounds/footer-fire.png') center bottom / auto 260px repeat-x;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    pointer-events: none;
}
.footer-band {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px 28px;
    min-height: 92px;
    padding: 22px 84px 18px;
    border: 0;
    border-image: url('../assets/borders/nav-frame.png') 24 160 fill / 18px 72px / 10px stretch;
    background: #0b0b0ae6;
    box-shadow: 0 10px 30px #000c;
    color: var(--gold);
    font: 500 .7rem/1.6 var(--heading-font);
    text-transform: uppercase;
    letter-spacing: .1em;
    text-shadow: 0 2px 3px #000;
}
.footer-emblem {
    position: absolute;
    top: -40px;
    left: 50%;
    width: 64px;
    height: 64px;
    transform: translateX(-50%);
    filter: drop-shadow(0 4px 6px #000);
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-brand img {
    width: 28px;
    height: 28px;
}
.footer-motto {
    text-align: center;
    letter-spacing: .18em;
    color: #f0cf9c;
}
.footer-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px 10px;
}
.footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-inline: 4px;
}
.footer-icon {
    color: #c99b62;
    margin-right: 8px;
}
.site-footer .sep {
    margin-inline: 10px;
    color: #a0553a;
}

/* ---------- misc ---------- */
.message-page {
    text-align: center;
    max-width: 780px;
    margin: 80px auto;
    padding: clamp(24px, 6vw, 72px);
}
.message-page h1 {
    margin: 16px 0;
}
.message-page .button {
    margin-top: 28px;
}

/* ---------- responsive ---------- */
@media (max-width: 1500px) {
    .site-header {
        padding-inline: 116px;
    }
    .nav-list a {
        padding-inline: 8px;
        gap: 6px;
        font-size: .74rem;
        letter-spacing: .03em;
    }
    .nav-main {
        gap: 8px;
    }
    .header-account__name span {
        max-width: 130px;
    }
    .nav-emblem {
        width: 64px;
        height: 64px;
        margin: -20px 72px;
    }
    .nav-emblem::before {
        width: 220px;
        height: 92px;
    }
}
@media (max-width: 1500px) {
    .nav-list .icon {
        display: none;
    }
}
@media (min-width: 768px) and (max-width: 1099px) {
    .navigation {
        flex-wrap: wrap;
        justify-content: center;
    }
    .nav-main {
        flex-basis: 100%;
    }
    .nav-list .icon {
        display: block;
    }
    .nav-list a span {
        display: none;
    }
    .nav-list a {
        padding: 10px 14px;
    }
    .nav-list a .icon {
        width: 22px;
        height: 22px;
    }
    .header-account {
        border-left: 0;
        padding-left: 0;
    }
    .footer-band {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        padding-top: 34px;
    }
    .footer-links {
        justify-content: center;
    }
}
@media (max-width: 767px) {
    .site-header {
        margin-top: 14px;
        padding: 8px 14px;
        border-image-width: 12px 28px;
    }
    .mobile-heading {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }
    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 44px;
        font: 600 .82rem/1.3 var(--heading-font);
        text-transform: uppercase;
        letter-spacing: .05em;
    }
    .mobile-brand img {
        width: 36px;
        height: 36px;
    }
    .nav-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        min-height: 44px;
        padding: 8px 12px;
        color: var(--gold);
        background: #251411;
        border: 1px solid var(--bronze);
        font: 500 .8rem var(--heading-font);
        text-transform: uppercase;
    }
    .navigation {
        display: block;
        padding: 12px 0 6px;
    }
    .nav-main {
        display: block;
    }
    .nav-emblem {
        display: none;
    }
    .nav-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
    }
    .nav-list--right {
        margin-top: 4px;
    }
    .nav-right {
        display: block;
    }
    .nav-list .icon {
        display: block;
    }
    .nav-list a {
        font-size: .78rem;
        padding-inline: 10px;
    }
    .header-account {
        justify-content: space-between;
        margin-top: 10px;
        padding: 10px 0 0;
        border-left: 0;
        border-top: 1px solid #6b4b3166;
    }
    .site-footer {
        margin-top: 40px;
        padding-bottom: 110px;
    }
    .site-footer::after {
        height: 180px;
        background-size: auto 180px;
    }
    .footer-band {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        padding: 36px 20px 16px;
        border-image-width: 14px 28px;
    }
    .footer-motto {
        letter-spacing: .1em;
        font-size: .64rem;
    }
    .footer-links {
        justify-content: center;
    }
    .message-page {
        margin-block: 40px;
    }
}
.message-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 28px;
}
.message-actions .button {
    margin-top: 0;
    min-width: 170px;
}
/* More specific than .panel (artwork.css sets padding: 12px) so the content clears the frame. */
.panel.message-page {
    padding: 44px 64px 52px;
}
