/* ==========================================================================
   DeadlyMinds – public guild website
   Dark, cinematic Horde look: crimson, ember and bronze on near-black.
   The admin area has its own stylesheet (admin.css).
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font License – see /fonts) ---------- */
@font-face {
    font-family: "Cinzel";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("/fonts/cinzel-latin-wght-normal.woff2") format("woff2-variations"),
         url("/fonts/cinzel-latin-wght-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations"),
         url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
    --bg: #08070a;
    --bg-2: #0e0b0d;
    --bg-3: #141013;
    --panel: #151114;
    --panel-2: #1c161a;
    --panel-3: #251c20;

    --line: rgba(232, 202, 160, 0.1);
    --line-2: rgba(232, 202, 160, 0.18);
    --line-3: rgba(232, 202, 160, 0.3);

    --text: #e9e0d5;
    --text-strong: #fbf4ea;
    --text-2: #c2b4a5;
    --muted: #8e8073;

    --blood: #b3121b;
    --blood-bright: #e0262f;
    --blood-deep: #5c080d;
    --blood-glow: rgba(214, 28, 38, 0.55);
    --ember: #ff6a1a;
    --ember-soft: #ffa15c;
    --gold: #d4ae5c;
    --gold-bright: #f3d894;
    --gold-deep: #8b6a2c;

    --ok: #58c27d;
    --warn: #f0b04a;

    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 22px;
    --radius-pill: 999px;

    --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 60px -30px rgba(0, 0, 0, 0.9);
    --shadow-lg: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 40px 90px -40px rgba(0, 0, 0, 0.95);

    --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

    --container: 1240px;
    --container-narrow: 820px;
    --gutter: clamp(1rem, 4vw, 2.5rem);
    --section-space: clamp(4.5rem, 9vw, 7.5rem);
    --header-h: 76px;

    --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .9 0 0 0 0 .8 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

    color-scheme: dark;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
    background: var(--bg);
}

body {
    position: relative;
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    background-image: var(--noise);
    opacity: 0.55;
    mix-blend-mode: overlay;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: var(--gold-bright);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: #fff;
}

[tabindex="-1"]:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
    border-radius: 4px;
}

::selection {
    background: var(--blood);
    color: #fff;
}

h1, h2, h3, h4 {
    margin: 0;
    color: var(--text-strong);
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.01em;
    text-wrap: balance;
}

p {
    margin: 0 0 1em;
}

main:focus {
    outline: none;
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 200;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    background: var(--gold);
    color: #140c06;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 1rem;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.container--narrow {
    max-width: var(--container-narrow);
}

.muted {
    color: var(--muted);
}

/* ---------- Icons ---------- */
.icon {
    flex-shrink: 0;
}

/* ---------- Buttons ---------- */
.btn {
    --btn-fg: var(--text-strong);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 3rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--btn-fg);
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    isolation: isolate;
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease),
                background-color 0.35s var(--ease), color 0.35s var(--ease);
}

.btn .icon {
    transition: transform 0.35s var(--ease);
}

.btn:hover .icon:last-child:not(:first-child) {
    transform: translateX(3px);
}

.btn--primary {
    border-color: rgba(255, 170, 120, 0.35);
    background: linear-gradient(180deg, #d61f28 0%, #a3121a 55%, #7d0c12 100%);
    box-shadow: inset 0 1px 0 rgba(255, 220, 200, 0.35), inset 0 -2px 0 rgba(0, 0, 0, 0.25),
                0 12px 32px -12px var(--blood-glow);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
}

.btn--primary::after {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    background: radial-gradient(120% 140% at 50% 120%, rgba(255, 140, 60, 0.55), transparent 60%);
    opacity: 0;
    transition: opacity 0.35s var(--ease);
}

.btn--primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: inset 0 1px 0 rgba(255, 220, 200, 0.4), inset 0 -2px 0 rgba(0, 0, 0, 0.25),
                0 18px 40px -12px rgba(230, 40, 40, 0.75);
}

.btn--primary:hover::after {
    opacity: 1;
}

.btn--ghost {
    border-color: var(--line-3);
    background: rgba(20, 14, 16, 0.45);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.btn--ghost:hover {
    border-color: var(--gold);
    color: var(--gold-bright);
    background: rgba(212, 174, 92, 0.08);
    transform: translateY(-2px);
}

.btn--sm {
    min-height: 2.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.78rem;
}

.btn--lg {
    min-height: 3.5rem;
    padding: 0.9rem 1.9rem;
    font-size: 0.98rem;
}

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.55;
    pointer-events: none;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.icon-link:hover {
    color: var(--gold-bright);
    background: rgba(255, 255, 255, 0.04);
}

.icon-link__label {
    display: none;
}

/* ---------- Tags, pills ---------- */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-pill);
    color: var(--gold-bright);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tag--accent {
    border-color: rgba(224, 38, 47, 0.5);
    background: rgba(179, 18, 27, 0.18);
    color: #ffb0a8;
}

.tag--muted {
    color: var(--muted);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding: 0.45rem 0.95rem;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-pill);
    background: rgba(12, 9, 11, 0.6);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: var(--text-2);
    font-size: 0.86rem;
    line-height: 1.3;
}

.status-pill strong {
    color: var(--text-strong);
    font-weight: 600;
}

.status-pill__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--muted);
}

.status-pill--open {
    border-color: rgba(88, 194, 125, 0.4);
    color: #bff0cf;
}

.status-pill--open .status-pill__dot {
    background: var(--ok);
    box-shadow: 0 0 0 0 rgba(88, 194, 125, 0.6);
    animation: pulse 2.2s infinite;
}

.status-pill--closed {
    border-color: rgba(224, 38, 47, 0.4);
    color: #ffc2bc;
}

.status-pill--closed .status-pill__dot {
    background: var(--blood-bright);
}

.status-pill--lg {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(88, 194, 125, 0.55); }
    70% { box-shadow: 0 0 0 10px rgba(88, 194, 125, 0); }
    100% { box-shadow: 0 0 0 0 rgba(88, 194, 125, 0); }
}

.notice-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 2rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--line-2);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius-sm);
    background: rgba(212, 174, 92, 0.06);
    color: var(--text-2);
}

.notice-banner--error {
    border-left-color: var(--blood-bright);
    background: rgba(179, 18, 27, 0.12);
    color: #ffd0cb;
}

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 60;
    transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
    border-bottom: 1px solid transparent;
}

.site-header[data-scrolled],
.nav-open .site-header {
    border-bottom-color: var(--line);
    background: rgba(9, 7, 9, 0.82);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    box-shadow: 0 20px 40px -30px rgba(0, 0, 0, 0.9);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: calc(var(--container) + 120px);
    min-height: var(--header-h);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-strong);
    text-decoration: none;
}

.brand:hover {
    color: #fff;
}

.brand__mark {
    width: 40px;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
    transition: transform 0.5s var(--ease);
}

.brand:hover .brand__mark {
    transform: rotate(-6deg) scale(1.06);
}

.brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand__name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.brand__tagline {
    color: var(--gold);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 1.5rem;
}

.site-nav__list {
    display: flex;
    gap: 0.25rem;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.site-nav__list a {
    position: relative;
    display: block;
    padding: 0.5rem 0.8rem;
    color: var(--text-2);
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.25s var(--ease);
}

.site-nav__list a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0.2rem;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    transition: width 0.35s var(--ease), left 0.35s var(--ease);
}

.site-nav__list a:hover {
    color: var(--text-strong);
}

.site-nav__list a:hover::after {
    left: 15%;
    width: 70%;
}

.site-nav__aside {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lang-switch {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-pill);
}

.lang-switch a {
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-pill);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
}

.lang-switch a[aria-current="true"] {
    background: rgba(212, 174, 92, 0.16);
    color: var(--gold-bright);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    padding: 0.6rem;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-sm);
    background: rgba(12, 9, 11, 0.6);
    color: var(--text-strong);
    cursor: pointer;
}

.nav-toggle__bars {
    display: grid;
    gap: 5px;
    width: 22px;
}

.nav-toggle__bars span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}

[data-nav-open] .nav-toggle__bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
[data-nav-open] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
[data-nav-open] .nav-toggle__bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1100px) {
    .site-nav__list a {
        padding-inline: 0.55rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 1023px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: fixed;
        inset: var(--header-h) 0 auto;
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
        max-height: calc(100dvh - var(--header-h));
        padding: 1.5rem var(--gutter) 2rem;
        overflow-y: auto;
        border-bottom: 1px solid var(--line);
        background: #09070a;
        box-shadow: 0 40px 60px -20px rgba(0, 0, 0, 0.9);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
    }

    [data-nav-open] .site-nav {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .site-nav__list {
        flex-direction: column;
        margin: 0;
    }

    .site-nav__list a {
        padding: 0.85rem 0.25rem;
        border-bottom: 1px solid var(--line);
        font-size: 1rem;
    }

    .site-nav__aside {
        flex-wrap: wrap;
    }

    .icon-link__label {
        display: inline;
    }

    .nav-open {
        overflow: hidden;
    }
}

/* ---------- Section scaffolding ---------- */
.section {
    position: relative;
    padding-block: var(--section-space);
}

.section + .section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: min(760px, 80%);
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, var(--line-3), transparent);
}

.section + .section::after {
    content: "";
    position: absolute;
    top: -5px;
    left: 50%;
    width: 10px;
    height: 10px;
    transform: translateX(-50%) rotate(45deg);
    border: 1px solid var(--gold-deep);
    background: var(--bg);
}

.section-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem 2rem;
    margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.section-row .section-heading {
    margin-bottom: 0;
}

.section-heading {
    max-width: 720px;
    margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.section-heading--center {
    margin-inline: auto;
    text-align: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0 0 1rem;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.eyebrow__mark {
    position: relative;
    width: 36px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold));
}

.eyebrow__mark::after {
    content: "";
    position: absolute;
    right: -3px;
    top: -3px;
    width: 7px;
    height: 7px;
    transform: rotate(45deg);
    background: var(--blood-bright);
    box-shadow: 0 0 10px var(--blood-glow);
}

.section-title {
    font-size: clamp(2rem, 4.4vw, 3.4rem);
    font-weight: 800;
    background: linear-gradient(180deg, #fff8ec 20%, #d9b56a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
}

.section-lead {
    margin: 1.1rem 0 0;
    color: var(--text-2);
    font-size: clamp(1.02rem, 1.4vw, 1.15rem);
}

.prose p {
    color: var(--text-2);
}

.prose h2 {
    margin: 2rem 0 0.75rem;
    font-size: 1.35rem;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: max(720px, 100svh);
    padding: calc(var(--header-h) + 3rem) 0 2.5rem;
    overflow: hidden;
    isolation: isolate;
}

.hero__scene {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.hero__sky {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 50% at 72% 34%, rgba(122, 16, 22, 0.55), transparent 70%),
        radial-gradient(90% 70% at 30% 0%, rgba(60, 10, 14, 0.6), transparent 70%),
        linear-gradient(180deg, #0b0709 0%, #170a0d 45%, #0c0709 100%);
}

.hero__photo {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: saturate(0.9) brightness(0.55);
    transform: scale(1.04);
}

.hero__moon {
    position: absolute;
    top: 12%;
    right: 12%;
    width: clamp(220px, 30vw, 460px);
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle at 38% 36%, rgba(255, 200, 170, 0.35), transparent 42%),
        radial-gradient(circle at 50% 50%, #c4262b 0%, #7e1016 48%, #3b070b 70%, transparent 71%);
    box-shadow: 0 0 120px 40px rgba(200, 30, 36, 0.28), 0 0 300px 80px rgba(160, 20, 28, 0.18);
    opacity: 0.85;
}

.hero__moon::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 60%, rgba(0, 0, 0, 0.18) 0 8%, transparent 9%),
        radial-gradient(circle at 62% 30%, rgba(0, 0, 0, 0.14) 0 6%, transparent 7%),
        radial-gradient(circle at 58% 68%, rgba(0, 0, 0, 0.12) 0 11%, transparent 12%);
    mix-blend-mode: multiply;
}

.hero__ridge {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: max(100%, 1400px);
    max-width: none;
    height: auto;
    transform: translateX(-50%);
    pointer-events: none;
}

.hero__ridge--far {
    bottom: 7%;
    opacity: 0.9;
}

.hero__ridge--near {
    bottom: -2%;
}

.hero__fog {
    position: absolute;
    inset: auto -20% 0;
    height: 55%;
    background:
        radial-gradient(40% 60% at 20% 70%, rgba(120, 30, 34, 0.35), transparent 70%),
        radial-gradient(35% 50% at 70% 80%, rgba(90, 20, 24, 0.35), transparent 70%),
        radial-gradient(50% 60% at 50% 100%, rgba(30, 10, 12, 0.9), transparent 70%);
    filter: blur(20px);
    animation: fog-drift 26s var(--ease-in-out) infinite alternate;
}

@keyframes fog-drift {
    from { transform: translateX(-4%); }
    to { transform: translateX(4%); }
}

.hero__embers span {
    --x: calc(var(--i) * 3.61%);
    position: absolute;
    left: var(--x);
    bottom: -10px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--ember-soft);
    box-shadow: 0 0 6px 2px rgba(255, 106, 26, 0.75);
    opacity: 0;
    animation: ember calc(9s + (var(--i) * 0.37s)) linear infinite;
    animation-delay: calc(var(--i) * -0.83s);
}

.hero__embers span:nth-child(3n) {
    width: 2px;
    height: 2px;
}

.hero__embers span:nth-child(4n + 1) {
    width: 4px;
    height: 4px;
    background: #ffd08a;
}

@keyframes ember {
    0% { transform: translate3d(0, 0, 0); opacity: 0; }
    10% { opacity: 1; }
    50% { transform: translate3d(40px, -45vh, 0); opacity: 0.9; }
    80% { opacity: 0.5; }
    100% { transform: translate3d(-20px, -95vh, 0); opacity: 0; }
}

.hero__vignette {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.75) 100%),
        linear-gradient(180deg, rgba(8, 7, 10, 0.4) 0%, transparent 20%, transparent 70%, var(--bg) 100%);
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
}

.hero__copy {
    max-width: 680px;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.4rem;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: clamp(0.72rem, 1.2vw, 0.85rem);
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    animation: rise 1s var(--ease) both;
}

.hero__rune {
    width: 10px;
    height: 10px;
    transform: rotate(45deg);
    border: 1px solid var(--gold);
    background: var(--blood);
    box-shadow: 0 0 14px var(--blood-glow);
}

.hero__title {
    margin: 0;
    font-size: clamp(2.9rem, 7.2vw, 6.2rem);
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: -0.005em;
    background: linear-gradient(180deg, #fffaf0 10%, #f2d79a 55%, #b8873c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 6px 30px rgba(180, 20, 28, 0.45));
    animation: rise 1s 0.1s var(--ease) both;
}

.hero__support {
    max-width: 580px;
    margin: 1.6rem 0 0;
    color: var(--text-2);
    font-size: clamp(1.05rem, 1.6vw, 1.22rem);
    line-height: 1.65;
    animation: rise 1s 0.2s var(--ease) both;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 2.2rem;
    animation: rise 1s 0.3s var(--ease) both;
}

.hero__status {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
    animation: rise 1s 0.4s var(--ease) both;
}

.hero__crest {
    position: relative;
    display: grid;
    place-items: center;
    animation: crest-in 1.4s 0.2s var(--ease) both;
}

.hero__halo {
    position: absolute;
    width: 92%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(214, 28, 38, 0.35) 0%, rgba(214, 28, 38, 0.08) 45%, transparent 68%);
    filter: blur(8px);
    animation: breathe 5s var(--ease-in-out) infinite;
}

.hero__halo::before {
    content: "";
    position: absolute;
    inset: 6%;
    border-radius: 50%;
    border: 1px solid rgba(212, 174, 92, 0.18);
    -webkit-mask: conic-gradient(from 0deg, #000 0 20%, transparent 25% 45%, #000 50% 70%, transparent 75%);
    mask: conic-gradient(from 0deg, #000 0 20%, transparent 25% 45%, #000 50% 70%, transparent 75%);
    animation: spin 40s linear infinite;
}

.hero__emblem {
    position: relative;
    width: min(100%, 460px);
    height: auto;
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 40px rgba(200, 30, 36, 0.25));
    animation: float 7s var(--ease-in-out) infinite;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
}

@keyframes crest-in {
    from { opacity: 0; transform: scale(0.92) translateY(20px); filter: blur(6px); }
    to { opacity: 1; transform: none; filter: none; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes breathe {
    0%, 100% { opacity: 0.75; transform: scale(0.97); }
    50% { opacity: 1; transform: scale(1.03); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hero__footer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: stretch;
    gap: 1rem;
    margin-top: clamp(2.5rem, 6vh, 4.5rem);
    animation: rise 1s 0.55s var(--ease) both;
}

.hero__footer > :only-child {
    grid-column: 1 / -1;
}

.countdown {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem 1.5rem;
    padding: 1rem 1.4rem;
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(30, 20, 24, 0.75), rgba(14, 10, 12, 0.75));
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.countdown__label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.countdown__units {
    display: flex;
    gap: 0.5rem;
}

.countdown__unit {
    display: grid;
    justify-items: center;
    min-width: 62px;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.35);
}

.countdown__value {
    color: var(--text-strong);
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.countdown__name {
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero__facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(12, 9, 11, 0.55);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.hero__fact {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 1.3rem;
    border-left: 1px solid var(--line);
}

.hero__fact:first-child {
    border-left: 0;
}

.hero__fact dt {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero__fact dd {
    margin: 0.2rem 0 0;
    color: var(--text-strong);
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 700;
}

@media (max-width: 900px) {
    .hero {
        min-height: auto;
        padding-top: calc(var(--header-h) + 2rem);
    }

    .hero__grid {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .hero__crest {
        order: -1;
        justify-self: start;
    }

    .hero__emblem {
        width: clamp(150px, 42vw, 230px);
    }

    .hero__halo {
        width: 130%;
    }

    .hero__footer {
        grid-template-columns: 1fr;
    }

    .hero__facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero__fact {
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .hero__fact:nth-child(-n + 2) {
        border-top: 0;
    }

    .hero__fact:nth-child(even) {
        border-left: 1px solid var(--line);
    }
}

@media (max-width: 520px) {
    .hero__actions .btn {
        width: 100%;
    }

    .countdown {
        width: 100%;
    }

    .countdown__units {
        width: 100%;
        justify-content: space-between;
    }

    .countdown__unit {
        flex: 1;
        min-width: 0;
    }
}

/* ---------- Card base ---------- */
.card,
.news-card,
.pillar,
.raid,
.class-card,
.member,
.rule,
.recruit-list,
.timeline__card,
.faq-item,
.apply-aside__card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008)),
        var(--panel);
    box-shadow: var(--shadow);
}

/* ---------- News ---------- */
.news-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.25rem;
}

.news-card {
    overflow: hidden;
    transition: transform 0.45s var(--ease), border-color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.news-card:hover {
    transform: translateY(-4px);
    border-color: var(--line-3);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(212, 174, 92, 0.08), 0 30px 60px -40px var(--blood-glow);
}

.news-card--featured {
    grid-row: span 2;
}

.news-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.news-card:not(.news-card--featured) .news-card__link {
    flex-direction: row;
}

.news-card__media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--panel-2);
}

.news-card:not(.news-card--featured) .news-card__media {
    flex: 0 0 38%;
    aspect-ratio: auto;
    min-height: 100%;
}

.news-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease);
}

.news-card:hover .news-card__media img {
    transform: scale(1.05);
}

.news-card__art {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(34% 44% at 72% 38%, rgba(196, 38, 43, 0.55), transparent 70%),
        radial-gradient(80% 90% at 50% 110%, rgba(179, 18, 27, 0.4), transparent 60%),
        linear-gradient(180deg, #1d0f13, #0c080a);
}

.news-card__art::after {
    content: "";
    position: absolute;
    inset: auto -10% 0;
    height: 55%;
    background: url("/images/art/ridge-near.svg") center bottom / cover no-repeat;
    opacity: 0.95;
}

.news-card:nth-child(2) .news-card__art {
    background:
        radial-gradient(40% 50% at 30% 30%, rgba(212, 174, 92, 0.3), transparent 70%),
        radial-gradient(80% 90% at 50% 110%, rgba(120, 18, 24, 0.45), transparent 60%),
        linear-gradient(180deg, #1a1210, #0b0809);
}

.news-card:nth-child(3) .news-card__art {
    background:
        radial-gradient(40% 50% at 60% 30%, rgba(255, 106, 26, 0.3), transparent 70%),
        radial-gradient(80% 90% at 50% 110%, rgba(179, 18, 27, 0.4), transparent 60%),
        linear-gradient(180deg, #1c0e10, #0b0809);
}

.news-card__art img {
    position: relative;
    z-index: 1;
    width: 26%;
    max-width: 140px;
    height: auto;
    margin-bottom: 8%;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.8));
    transition: transform 0.8s var(--ease);
}

.news-card:not(.news-card--featured) .news-card__art img {
    width: 44%;
}

.news-card:hover .news-card__art img {
    transform: translateY(-4px) scale(1.04);
}

.news-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.4rem 1.5rem 1.5rem;
}

.news-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin: 0 0 0.8rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.news-card__title {
    font-size: 1.2rem;
    line-height: 1.3;
}

.news-card--featured .news-card__title {
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.news-card__summary {
    margin: 0.7rem 0 0;
    color: var(--text-2);
    font-size: 0.97rem;
}

.news-card:not(.news-card--featured) .news-card__summary {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 1rem;
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

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

    .news-card--featured {
        grid-row: auto;
    }
}

@media (max-width: 560px) {
    .news-card:not(.news-card--featured) .news-card__link {
        flex-direction: column;
    }

    .news-card:not(.news-card--featured) .news-card__media {
        flex: none;
        min-height: 0;
        aspect-ratio: 16 / 7;
    }
}

/* ---------- About ---------- */
.about {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: center;
    gap: clamp(2rem, 6vw, 6rem);
}

.about__lead {
    margin: -1rem 0 1.5rem;
    padding-left: 1.1rem;
    border-left: 2px solid var(--blood-bright);
    color: var(--text-strong);
    font-size: clamp(1.15rem, 1.8vw, 1.35rem);
    font-weight: 500;
    line-height: 1.55;
}

.about__art {
    margin: 0;
}

.about__frame {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 5;
    padding: 12%;
    border: 1px solid var(--line-2);
    border-radius: 200px 200px var(--radius) var(--radius);
    background:
        radial-gradient(70% 55% at 50% 55%, rgba(179, 18, 27, 0.35), transparent 70%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 6px),
        linear-gradient(180deg, #1a1215, #0c0809);
    box-shadow: var(--shadow-lg), inset 0 0 80px rgba(0, 0, 0, 0.6);
}

.about__frame::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(212, 174, 92, 0.16);
    border-radius: 190px 190px 8px 8px;
    pointer-events: none;
}

.about__frame img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 25px 40px rgba(0, 0, 0, 0.75));
}

.about__caption {
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-align: center;
    text-transform: uppercase;
}

.pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.25rem;
    margin: clamp(3.5rem, 7vw, 5.5rem) 0 0;
    padding: 0;
    list-style: none;
}

.pillar {
    padding: 1.8rem 1.6rem;
    transition: transform 0.45s var(--ease), border-color 0.45s var(--ease);
}

.pillar::before {
    content: "";
    position: absolute;
    inset: 0 20% auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.5;
}

.pillar:hover {
    transform: translateY(-4px);
    border-color: var(--line-3);
}

.pillar__icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(224, 38, 47, 0.45);
    border-radius: 14px;
    background: radial-gradient(circle at 50% 30%, rgba(224, 38, 47, 0.35), rgba(80, 8, 12, 0.4));
    color: #ffd7c4;
    box-shadow: 0 10px 30px -12px var(--blood-glow), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform: rotate(45deg);
}

.pillar__icon .icon {
    transform: rotate(-45deg);
}

.pillar__title {
    font-size: 1.15rem;
}

.pillar__text {
    margin: 0.6rem 0 0;
    color: var(--text-2);
    font-size: 0.95rem;
}

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

    .about__art {
        max-width: 320px;
    }
}

/* ---------- Legacy timeline ---------- */
.timeline {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, transparent, var(--gold-deep) 8%, var(--blood) 60%, transparent);
}

.timeline__item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    padding-bottom: 2.5rem;
}

.timeline__item:nth-child(odd) .timeline__card {
    grid-column: 1;
    text-align: right;
}

.timeline__item:nth-child(even) .timeline__card {
    grid-column: 2;
}

.timeline__marker {
    position: absolute;
    top: 1.6rem;
    left: 50%;
    width: 16px;
    height: 16px;
    transform: translateX(-50%) rotate(45deg);
    border: 2px solid var(--gold);
    background: var(--bg);
}

.timeline__item--highlight .timeline__marker {
    border-color: var(--ember-soft);
    background: var(--blood-bright);
    box-shadow: 0 0 0 6px rgba(224, 38, 47, 0.15), 0 0 24px var(--blood-glow);
}

.timeline__card {
    padding: 1.4rem 1.6rem;
}

.timeline__item--highlight .timeline__card {
    border-color: rgba(224, 38, 47, 0.35);
    background:
        radial-gradient(100% 140% at 50% 0%, rgba(179, 18, 27, 0.16), transparent 70%),
        var(--panel);
}

.timeline__when {
    margin: 0 0 0.35rem;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.timeline__title {
    font-size: 1.2rem;
}

.timeline__text {
    margin: 0.5rem 0 0;
    color: var(--text-2);
    font-size: 0.95rem;
}

@media (max-width: 720px) {
    .timeline::before {
        left: 8px;
    }

    .timeline__item {
        grid-template-columns: 1fr;
        gap: 0;
        padding-left: 2.25rem;
    }

    .timeline__item:nth-child(odd) .timeline__card,
    .timeline__item:nth-child(even) .timeline__card {
        grid-column: 1;
        text-align: left;
    }

    .timeline__marker {
        left: 9px;
    }
}

/* ---------- Progress ---------- */
.raids {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.raid {
    overflow: hidden;
    min-height: 250px;
    transition: transform 0.45s var(--ease), border-color 0.45s var(--ease);
}

.raid:hover {
    transform: translateY(-4px);
    border-color: var(--line-3);
}

.raid__bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    opacity: 0.35;
    transition: transform 1s var(--ease), opacity 0.6s var(--ease);
}

.raid:hover .raid__bg {
    transform: scale(1.06);
    opacity: 0.45;
}

.raid::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 20%, rgba(8, 7, 10, 0.92) 100%);
    pointer-events: none;
}

.raid--current {
    border-color: rgba(224, 38, 47, 0.45);
    box-shadow: var(--shadow-lg), 0 0 60px -30px var(--blood-glow);
}

.raid--current::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 80% at 100% 0%, rgba(179, 18, 27, 0.25), transparent 60%);
}

.raid__glyph {
    position: absolute;
    right: -0.5rem;
    bottom: -2.5rem;
    z-index: 0;
    color: rgba(255, 255, 255, 0.035);
    font-family: var(--font-display);
    font-size: 12rem;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
    transition: color 0.6s var(--ease), transform 0.8s var(--ease);
}

.raid--current .raid__glyph {
    color: rgba(224, 38, 47, 0.08);
}

.raid:hover .raid__glyph {
    transform: translateY(-6px);
}

.raid__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
}

.raid__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: auto;
}

.raid__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.65rem;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-pill);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text-2);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.raid--cleared .raid__badge {
    border-color: rgba(212, 174, 92, 0.55);
    color: var(--gold-bright);
}

.raid--progress .raid__badge {
    border-color: rgba(255, 106, 26, 0.5);
    color: var(--ember-soft);
}

.raid__current {
    color: #ff9e95;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.raid__name {
    margin-top: 2.5rem;
    font-size: 1.45rem;
}

.raid__count {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    margin: 0.4rem 0 0.8rem;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
}

.raid__count strong {
    color: var(--text-strong);
    font-size: 2.6rem;
    font-weight: 900;
    line-height: 1;
}

.raid--cleared .raid__count strong {
    color: var(--gold-bright);
}

.raid__bar {
    position: relative;
    height: 8px;
    overflow: hidden;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-pill);
    background: rgba(0, 0, 0, 0.5);
}

.raid__bar span {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blood-deep), var(--blood-bright), var(--ember));
    box-shadow: 0 0 14px rgba(255, 80, 40, 0.6);
    transition: width 1.4s var(--ease);
}

.raid--cleared .raid__bar span {
    background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-bright));
    box-shadow: 0 0 14px rgba(240, 200, 120, 0.55);
}

.raid__meta {
    margin: 0.7rem 0 0;
    color: var(--muted);
    font-size: 0.85rem;
}

/* ---------- Raid schedule ---------- */
.week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.week__day {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 220px;
    padding: 1rem 0.9rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.015);
}

.week__name {
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.week__rest {
    margin: auto;
    color: rgba(255, 255, 255, 0.12);
    font-size: 1.6rem;
}

.week__day--raid {
    border-color: rgba(224, 38, 47, 0.35);
    background:
        radial-gradient(120% 70% at 50% 0%, rgba(179, 18, 27, 0.28), transparent 70%),
        var(--panel);
    box-shadow: var(--shadow);
}

.week__day--raid .week__name {
    color: var(--gold-bright);
}

.week__day--optional {
    border-color: var(--line-2);
    border-style: dashed;
    background: rgba(255, 255, 255, 0.02);
}

.week__day--next {
    border-color: rgba(255, 140, 80, 0.7);
    box-shadow: 0 0 0 1px rgba(255, 106, 26, 0.3), 0 20px 50px -20px rgba(255, 80, 30, 0.55);
}

.week__raid {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.week__next {
    align-self: flex-start;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--blood), var(--ember));
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.week__title {
    color: var(--text-strong);
    font-family: var(--font-display);
    font-size: 1rem;
    line-height: 1.25;
}

.week__time {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-2);
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.week__note {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

.week__raid .tag {
    align-self: flex-start;
    margin-top: 0.25rem;
}

@media (max-width: 1000px) {
    .week {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .week__day {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        min-height: 0;
        padding: 0.9rem 1.1rem;
    }

    .week__name {
        min-width: 3.5rem;
    }

    .week__rest {
        margin: 0;
        font-size: 1rem;
    }

    .week__raid {
        flex: 1;
    }
}

/* ---------- Recruitment ---------- */
.class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.9rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.class-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.1rem;
    overflow: hidden;
    transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

.class-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--class);
    box-shadow: 0 0 18px var(--class);
}

.class-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(90% 120% at 0% 50%, color-mix(in srgb, var(--class) 16%, transparent), transparent 60%);
    pointer-events: none;
}

.class-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--class) 45%, transparent);
}

.class-card__icon {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    flex: 0 0 52px;
    height: 52px;
    border: 1px solid color-mix(in srgb, var(--class) 50%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--class) 12%, #0d0a0c);
    color: var(--class);
}

.class-card__text {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.class-card__name {
    color: var(--class);
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 800;
}

.class-card__specs {
    color: var(--text-2);
    font-size: 0.84rem;
    line-height: 1.4;
}

.class-card__text .priority {
    align-self: flex-start;
    margin-top: 0.5rem;
}

.priority {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.class-card--high .priority {
    background: linear-gradient(90deg, var(--blood), var(--blood-bright));
    color: #fff;
    box-shadow: 0 0 18px var(--blood-glow);
}

.class-card--medium .priority {
    border: 1px solid rgba(240, 176, 74, 0.55);
    color: var(--warn);
}

.class-card--low .priority {
    border: 1px solid var(--line-2);
    color: var(--text-2);
}

.class-card--closed {
    opacity: 0.5;
    filter: saturate(0.3);
}

.class-card--closed .priority {
    border: 1px solid var(--line);
    color: var(--muted);
}

.recruit-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 2.5rem;
}

.recruit-list {
    padding: 1.6rem 1.7rem;
}

.recruit-list__title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    color: var(--gold-bright);
    font-size: 1.1rem;
}

.recruit-list ul {
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.recruit-list li {
    display: flex;
    gap: 0.7rem;
    color: var(--text-2);
}

.recruit-list li .icon {
    margin-top: 0.3rem;
    color: var(--blood-bright);
}

.recruit-list--offers li .icon {
    color: var(--ok);
}

.recruit-cta {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

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

/* ---------- Roster ---------- */
.roster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.member {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.8rem 1.25rem 1.5rem;
    text-align: center;
    transition: transform 0.45s var(--ease), border-color 0.45s var(--ease);
}

.member::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 90px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: radial-gradient(80% 100% at 50% 0%, color-mix(in srgb, var(--class) 22%, transparent), transparent 75%);
    pointer-events: none;
}

.member:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--class) 40%, transparent);
}

.member__avatar {
    position: relative;
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    margin-bottom: 1rem;
    border: 2px solid var(--class);
    border-radius: 50%;
    background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--class) 30%, #120d10), #0b080a 70%);
    color: var(--class);
    box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.45), 0 0 30px -6px var(--class);
}

.member__name {
    color: var(--text-strong);
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
}

.member__rank {
    margin-top: 0.1rem;
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.member__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 0.8rem;
    margin-top: 0.75rem;
    color: var(--text-2);
    font-size: 0.82rem;
}

.member__class {
    color: var(--class);
    font-weight: 600;
}

.member__role {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.member__note {
    margin-top: 0.6rem;
    color: var(--muted);
    font-size: 0.82rem;
}

/* ---------- Rules ---------- */
.rules {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
}

.rules__intro {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
}

.loot-note {
    display: flex;
    gap: 1rem;
    padding: 1.4rem 1.5rem;
    border: 1px solid rgba(212, 174, 92, 0.3);
    border-radius: var(--radius);
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(212, 174, 92, 0.12), transparent 60%),
        var(--panel);
}

.loot-note__icon {
    flex-shrink: 0;
    color: var(--gold);
}

.loot-note__title {
    margin-bottom: 0.35rem;
    color: var(--gold-bright);
    font-size: 1.05rem;
}

.loot-note p {
    margin: 0;
    color: var(--text-2);
    font-size: 0.95rem;
}

.rule-list {
    display: grid;
    gap: 0.9rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rule {
    display: flex;
    gap: 1.25rem;
    padding: 1.4rem 1.5rem;
}

.rule__number {
    flex: 0 0 3rem;
    color: var(--blood-bright);
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    text-shadow: 0 0 20px var(--blood-glow);
}

.rule__title {
    font-size: 1.12rem;
}

.rule__text {
    margin: 0.4rem 0 0;
    color: var(--text-2);
    font-size: 0.95rem;
}

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

    .rules__intro {
        position: static;
    }
}

/* ---------- Gallery ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    grid-auto-rows: 200px;
    gap: 0.9rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gallery-grid__item:nth-child(5n + 1) {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-grid__link {
    position: relative;
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.gallery-grid__link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s var(--ease), filter 0.5s var(--ease);
    filter: saturate(0.9);
}

.gallery-grid__link:hover img {
    transform: scale(1.06);
    filter: saturate(1.1);
}

.gallery-grid__caption {
    position: absolute;
    inset: auto 0 0;
    padding: 2rem 1rem 0.8rem;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.8));
    color: var(--text-strong);
    font-size: 0.88rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.gallery-grid__link:hover .gallery-grid__caption,
.gallery-grid__link:focus-visible .gallery-grid__caption {
    opacity: 1;
    transform: none;
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 140px;
    }
}

.lightbox {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(5, 4, 6, 0.94);
    color: var(--text);
}

.lightbox::backdrop {
    background: rgba(0, 0, 0, 0.7);
}

.lightbox__figure {
    display: grid;
    place-items: center;
    gap: 1rem;
    height: 100%;
    margin: 0;
    padding: 4rem 5rem;
}

.lightbox__image {
    max-width: 100%;
    max-height: calc(100dvh - 10rem);
    border-radius: var(--radius-sm);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}

.lightbox__caption {
    color: var(--text-2);
    text-align: center;
}

.lightbox__btn {
    position: absolute;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--line-2);
    border-radius: 50%;
    background: rgba(20, 14, 16, 0.8);
    color: var(--text-strong);
    cursor: pointer;
}

.lightbox__btn:hover {
    border-color: var(--gold);
    color: var(--gold-bright);
}

.lightbox__btn--close { top: 1.25rem; right: 1.25rem; }
.lightbox__btn--prev { top: 50%; left: 1.25rem; transform: translateY(-50%); }
.lightbox__btn--next { top: 50%; right: 1.25rem; transform: translateY(-50%); }

@media (max-width: 600px) {
    .lightbox__figure {
        padding: 4rem 1rem;
    }

    .lightbox__btn--prev,
    .lightbox__btn--next {
        top: auto;
        bottom: 1.25rem;
        transform: none;
    }
}

/* ---------- FAQ ---------- */
.faq {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
}

.faq__intro .section-heading {
    margin-bottom: 1.5rem;
}

.faq__list {
    display: grid;
    gap: 0.75rem;
}

.faq-item {
    overflow: hidden;
    transition: border-color 0.3s var(--ease);
}

.faq-item[open] {
    border-color: var(--line-3);
}

.faq-item__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.4rem;
    color: var(--text-strong);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}

.faq-item__question::-webkit-details-marker {
    display: none;
}

.faq-item__icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 1px solid var(--line-2);
    border-radius: 50%;
    color: var(--gold);
    transition: transform 0.35s var(--ease), background-color 0.35s var(--ease);
}

.faq-item[open] .faq-item__icon {
    transform: rotate(45deg);
    background: rgba(179, 18, 27, 0.3);
}

.faq-item__answer {
    padding: 0 1.4rem 1.2rem;
    color: var(--text-2);
}

.faq-item__answer p:last-child {
    margin-bottom: 0;
}

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

/* ---------- Discord band ---------- */
.discord-band {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
    padding: clamp(2rem, 5vw, 3.5rem);
    overflow: hidden;
    border: 1px solid rgba(224, 38, 47, 0.35);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(60% 120% at 100% 50%, rgba(179, 18, 27, 0.35), transparent 70%),
        radial-gradient(50% 100% at 0% 0%, rgba(212, 174, 92, 0.12), transparent 70%),
        linear-gradient(135deg, #1b1114, #0e0a0c);
    box-shadow: var(--shadow-lg);
}

.discord-band__glow {
    position: absolute;
    right: -10%;
    top: -60%;
    width: 60%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 90, 40, 0.18), transparent 65%);
    animation: breathe 6s var(--ease-in-out) infinite;
}

.discord-band__icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border: 1px solid rgba(212, 174, 92, 0.4);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(212, 174, 92, 0.18), rgba(212, 174, 92, 0.04));
    color: var(--gold-bright);
    transform: rotate(-6deg);
}

.discord-band__copy {
    position: relative;
}

.discord-band__copy .eyebrow {
    margin-bottom: 0.5rem;
}

.discord-band__title {
    font-size: clamp(1.7rem, 3.4vw, 2.6rem);
}

.discord-band__lead {
    max-width: 560px;
    margin: 0.75rem 0 0;
    color: var(--text-2);
}

.discord-band__actions {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (max-width: 900px) {
    .discord-band {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .discord-band__actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* ---------- Footer ---------- */
.site-footer {
    position: relative;
    margin-top: 2rem;
    padding: 4.5rem 0 2rem;
    border-top: 1px solid var(--line);
    background:
        radial-gradient(60% 100% at 50% 0%, rgba(120, 14, 20, 0.2), transparent 70%),
        #060507;
}

.site-footer__ornament {
    position: absolute;
    top: -1px;
    left: 50%;
    width: 180px;
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.site-footer__ornament::after {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    width: 12px;
    height: 12px;
    transform: translateX(-50%) rotate(45deg);
    border: 1px solid var(--gold);
    background: var(--blood);
}

.site-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
    gap: 2.5rem;
}

.brand--footer .brand__mark {
    width: 52px;
}

.site-footer__claim {
    max-width: 420px;
    margin: 1.2rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.site-footer__heading {
    margin-bottom: 1rem;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.site-footer__col ul {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__col a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-2);
    font-size: 0.93rem;
    text-decoration: none;
}

.site-footer__col a:hover {
    color: var(--gold-bright);
}

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.85rem;
}

.site-footer__bottom p {
    margin: 0;
}

.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.site-footer__legal a {
    color: var(--muted);
    text-decoration: none;
}

.site-footer__legal a:hover {
    color: var(--gold-bright);
}

.site-footer__disclaimer {
    margin: 1.25rem auto 0;
    color: rgba(142, 128, 115, 0.7);
    font-size: 0.75rem;
}

@media (max-width: 760px) {
    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }

    .site-footer__brand {
        grid-column: 1 / -1;
    }
}

/* ---------- Sub pages ---------- */
.page-hero {
    position: relative;
    isolation: isolate;
    padding: calc(var(--header-h) + clamp(3rem, 8vw, 6rem)) 0 clamp(3rem, 6vw, 4.5rem);
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.page-hero--compact {
    padding-bottom: 2.5rem;
}

.page-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(50% 90% at 80% 0%, rgba(150, 18, 26, 0.35), transparent 70%),
        radial-gradient(40% 80% at 10% 100%, rgba(212, 174, 92, 0.06), transparent 70%),
        linear-gradient(180deg, #120a0d, var(--bg));
}

.page-hero__bg::after {
    content: "";
    position: absolute;
    right: 4%;
    bottom: -30%;
    width: min(420px, 50vw);
    aspect-ratio: 560 / 600;
    background: url("/images/brand/emblem.svg") center / contain no-repeat;
    opacity: 0.07;
    filter: grayscale(0.4);
}

.page-hero__back {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1.75rem;
    color: var(--muted);
    font-size: 0.88rem;
    text-decoration: none;
}

.page-hero__back:hover {
    color: var(--gold-bright);
}

.page-hero__title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    background: linear-gradient(180deg, #fff8ec 20%, #d9b56a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.page-hero__lead {
    max-width: 640px;
    margin: 1rem 0 0;
    color: var(--text-2);
    font-size: 1.12rem;
}

.page__body {
    padding-block: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.empty-state {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    border: 1px dashed var(--line-2);
    border-radius: var(--radius);
    color: var(--text-2);
}

.news-list {
    display: grid;
    gap: 3.5rem;
}

.news-entry {
    padding-bottom: 3.5rem;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: calc(var(--header-h) + 2rem);
}

.news-entry:last-child {
    border-bottom: 0;
}

.news-entry:target .news-entry__title {
    color: var(--gold-bright);
}

.news-entry__image {
    width: 100%;
    max-height: 420px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    object-fit: cover;
}

.news-entry__title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.news-entry__summary {
    margin: 0.9rem 0 1.25rem;
    color: var(--text-strong);
    font-size: 1.12rem;
}

.prose--legal p {
    white-space: normal;
}

.prose--legal p:first-line {
    color: var(--text-strong);
    font-weight: 600;
}

/* ---------- Apply ---------- */
.apply-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr);
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: start;
}

.apply-form {
    display: grid;
    gap: 1.4rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border: 1px solid var(--line-2);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(100% 60% at 0% 0%, rgba(179, 18, 27, 0.12), transparent 60%),
        var(--panel);
    box-shadow: var(--shadow-lg);
}

.apply-form .notice-banner {
    margin: 0;
}

.apply-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.form-field {
    display: grid;
    gap: 0.4rem;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.form-field > label,
.form-field > legend {
    padding: 0;
    color: var(--text-strong);
    font-size: 0.9rem;
    font-weight: 600;
}

.form-field small,
.check__text small {
    color: var(--muted);
    font-size: 0.8rem;
}

.req {
    color: var(--blood-bright);
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    min-height: 3rem;
    padding: 0.75rem 0.95rem;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text-strong);
    font: inherit;
    font-size: 1rem;
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s var(--ease);
}

.form-field textarea {
    min-height: 0;
    resize: vertical;
    line-height: 1.55;
}

.form-field select {
    appearance: none;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%23d4ae5c' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 18px;
}

.form-field select option {
    background: #151114;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: rgba(142, 128, 115, 0.7);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(212, 174, 92, 0.15);
}

.form-field--invalid input,
.form-field--invalid select,
.form-field--invalid textarea {
    border-color: var(--blood-bright);
}

.form-field__error {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #ff8f86;
    font-size: 0.82rem;
    font-weight: 500;
}

.role-picker {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 0.25rem;
}

.role-option {
    position: relative;
    cursor: pointer;
}

.role-option input {
    position: absolute;
    opacity: 0;
}

.role-option__box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    padding: 0.9rem 0.5rem;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-2);
    font-size: 0.86rem;
    font-weight: 600;
    text-align: center;
    transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.role-option:hover .role-option__box {
    border-color: var(--line-3);
    color: var(--text-strong);
}

.role-option input:checked + .role-option__box {
    border-color: var(--blood-bright);
    background: radial-gradient(100% 100% at 50% 0%, rgba(224, 38, 47, 0.3), rgba(90, 8, 12, 0.3));
    color: #fff;
    box-shadow: 0 0 24px -8px var(--blood-glow);
}

.role-option input:focus-visible + .role-option__box {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.check {
    position: relative;
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    cursor: pointer;
}

.check input {
    position: absolute;
    opacity: 0;
}

.check__box {
    display: grid;
    place-items: center;
    flex: 0 0 22px;
    height: 22px;
    margin-top: 0.1rem;
    border: 1px solid var(--line-3);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.35);
    color: transparent;
    transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.check input:checked + .check__box {
    border-color: var(--blood-bright);
    background: var(--blood);
    color: #fff;
}

.check input:focus-visible + .check__box {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.check__text {
    display: flex;
    flex-direction: column;
    color: var(--text-2);
    font-size: 0.93rem;
    line-height: 1.5;
}

.check__text strong {
    color: var(--text-strong);
    font-weight: 600;
}

.check__text a {
    display: inline;
}

.check__text--inline {
    display: block;
}

.form-field--invalid .check__box {
    border-color: var(--blood-bright);
}

.hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.apply-form__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.apply-form__required {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.apply-aside {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    display: grid;
    gap: 1.25rem;
}

.apply-aside__card {
    padding: 1.6rem;
}

.apply-aside__title {
    margin-bottom: 1.2rem;
    color: var(--gold-bright);
    font-size: 1.05rem;
}

.steps {
    display: grid;
    gap: 1.1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.steps li {
    display: flex;
    gap: 0.9rem;
}

.steps__n {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    height: 34px;
    border: 1px solid rgba(224, 38, 47, 0.5);
    border-radius: 50%;
    background: rgba(179, 18, 27, 0.2);
    color: #ffc6bf;
    font-family: var(--font-display);
    font-weight: 800;
}

.steps strong {
    display: block;
    color: var(--text-strong);
    font-size: 0.95rem;
}

.steps p {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.87rem;
    line-height: 1.5;
}

.mini-classes {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mini-classes li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid color-mix(in srgb, var(--class) 30%, transparent);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--class) 8%, transparent);
    color: var(--class);
}

.mini-classes span {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.mini-classes strong {
    font-size: 0.92rem;
}

.mini-classes small {
    color: var(--text-2);
    font-size: 0.78rem;
}

.apply-success {
    max-width: 640px;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3.5rem);
    border: 1px solid rgba(88, 194, 125, 0.35);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(100% 70% at 50% 0%, rgba(88, 194, 125, 0.12), transparent 60%),
        var(--panel);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.apply-success__icon {
    display: inline-grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(88, 194, 125, 0.5);
    border-radius: 50%;
    background: rgba(88, 194, 125, 0.15);
    color: #9ff0bb;
}

.apply-success__title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.apply-success__text {
    margin: 1rem 0 0;
    color: var(--text-2);
}

.apply-success__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

@media (max-width: 960px) {
    .apply-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .apply-aside {
        position: static;
    }
}

@media (max-width: 600px) {
    .apply-form__grid {
        grid-template-columns: 1fr;
    }

    .role-picker {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .apply-form__footer .btn {
        width: 100%;
    }
}

/* ---------- Status pages ---------- */
.status-page {
    display: grid;
    min-height: 70vh;
    place-items: center;
    padding: calc(var(--header-h) + 3rem) 0 3rem;
    text-align: center;
}

.status-page__inner {
    display: grid;
    justify-items: center;
    gap: 1rem;
}

.status-page__code {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(5rem, 16vw, 9rem);
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(180deg, var(--blood-bright), var(--blood-deep));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 40px var(--blood-glow));
}

.status-page__code .icon {
    color: var(--blood-bright);
}

.status-page__title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.status-page__text {
    max-width: 480px;
    color: var(--text-2);
}

/* ---------- Reveal on scroll ---------- */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

/* ---------- Blazor error UI ---------- */
#blazor-error-ui {
    position: fixed;
    inset: auto 1rem 1rem;
    z-index: 1000;
    display: none;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.2rem;
    border: 1px solid rgba(224, 38, 47, 0.5);
    border-radius: var(--radius-sm);
    background: #1a0d10;
    color: var(--text);
    box-shadow: var(--shadow-lg);
}

#blazor-error-ui .reload {
    color: var(--gold-bright);
}

#blazor-error-ui .dismiss {
    margin-left: auto;
    border: 0;
    background: none;
    color: var(--text);
    font-size: 1.3rem;
    cursor: pointer;
}

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

    .hero__embers {
        display: none;
    }

    .js [data-reveal] {
        opacity: 1;
        transform: none;
    }
}

@media print {
    body::before,
    .site-header,
    .hero__scene,
    .site-footer {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }
}
