/* Shared layer: animated aurora, logo watermark, liquid-glass navbar + surfaces. */

body {
    position: relative;
    overflow-x: hidden;
}

/* ---------- animated aurora background ---------- */
body::before {
    content: '';
    position: fixed;
    inset: -40%;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(38% 30% at 24% 30%, rgba(64, 105, 148, 0.34), transparent 70%),
        radial-gradient(34% 28% at 78% 22%, rgba(56, 118, 115, 0.28), transparent 70%),
        radial-gradient(30% 26% at 60% 78%, rgba(96, 84, 148, 0.22), transparent 70%);
    filter: blur(70px);
    animation: aurora 26s ease-in-out infinite alternate;
}

@keyframes aurora {
    0%   { transform: translate3d(-4%, -2%, 0) rotate(0deg) scale(1); }
    50%  { transform: translate3d(3%, 4%, 0) rotate(4deg) scale(1.08); }
    100% { transform: translate3d(6%, -3%, 0) rotate(-3deg) scale(1.02); }
}

/* ---------- faint logo watermark ---------- */
body::after {
    content: '';
    position: fixed;
    left: 50%;
    bottom: -22vh;
    transform: translateX(-50%);
    width: min(520px, 90vw);
    aspect-ratio: 730 / 774;
    z-index: -1;
    pointer-events: none;
    opacity: 0.04;
    background-image: url('/logo-trim.png');
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: contain;
}

@media (prefers-reduced-motion: reduce) {
    body::before { animation: none; }
}

/* ---------- liquid-glass navbar (docksys-style scroll shrink) ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    padding: 18px 16px;
    pointer-events: none;
}

.nav-inner {
    pointer-events: auto;
    width: 100%;
    max-width: 1080px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 22px;
    border-radius: 18px;
    border: 1px solid transparent;
    background: transparent;
    transition:
        max-width 0.55s cubic-bezier(0.4, 0, 0.2, 1),
        padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        border-radius 0.4s ease,
        background 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

.nav-inner.scrolled {
    max-width: 840px;
    padding: 9px 12px 9px 20px;
    border-radius: 999px;
    background: rgba(18, 21, 26, 0.55);
    border-color: rgba(255, 255, 255, 0.10);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text, #e7e9ec);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.nav-logo img {
    width: 26px;
    height: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a {
    color: var(--muted, #8a9099);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    padding: 7px 13px;
    border-radius: 10px;
    transition: color 0.15s ease, background 0.15s ease;
}

.nav-links a:hover {
    color: var(--text, #e7e9ec);
    background: rgba(255, 255, 255, 0.06);
}

.nav-links a.nav-cta {
    color: #fff;
    background: rgba(88, 101, 242, 0.9);
}

.nav-links a.nav-cta:hover {
    background: rgba(88, 101, 242, 1);
}

@media (max-width: 560px) {
    .nav { padding: 12px 10px; }
    .nav-logo span { display: none; }
    .nav-links a { padding: 6px 10px; font-size: 12.5px; }
    .nav-inner,
    .nav-inner.scrolled { max-width: none; }
}

/* ---------- liquid-glass surface ---------- */
.glass {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
}

/* ---------- light theme ----------
   Scoped to html[data-theme="light"] so it outranks each page's :root tokens. */
html[data-theme="light"] {
    --bg: #eef1f6;
    --panel: #ffffff;
    --border: #dfe3ea;
    --border-strong: #cdd3dd;
    --text: #1a1d23;
    --muted: #5a616d;
    --faint: #8b93a1;
}

html[data-theme="light"] body { background: var(--bg); color: var(--text); }

html[data-theme="light"] body::before {
    opacity: 0.72;
    background:
        radial-gradient(38% 30% at 24% 30%, rgba(90, 140, 200, 0.30), transparent 70%),
        radial-gradient(34% 28% at 78% 22%, rgba(80, 165, 160, 0.24), transparent 70%),
        radial-gradient(30% 26% at 60% 78%, rgba(150, 130, 205, 0.20), transparent 70%);
}

html[data-theme="light"] body::after { filter: invert(1); opacity: 0.05; }

/* black logo in light mode (the mark is white artwork on transparency) */
html[data-theme="light"] .nav-logo img { filter: invert(1); }

html[data-theme="light"] .glass {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow:
        0 16px 48px rgba(30, 45, 80, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
}

html[data-theme="light"] .nav-inner.scrolled {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow:
        0 8px 32px rgba(30, 45, 80, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(26px) saturate(180%);
    -webkit-backdrop-filter: blur(26px) saturate(180%);
}

html[data-theme="light"] .nav-links a:hover { background: rgba(0, 0, 0, 0.05); }

/* primary (inverted) button: keep light text on the dark fill in light mode */
html[data-theme="light"] .btn { color: #f5f7fa; }
html[data-theme="light"] .btn:not(.btn-discord):hover { background: #2a2f38; }

/* ============================================================
   Shared content components (landing, departments, rules)
   ============================================================ */

.wrap {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 22px;
}

.hero {
    text-align: center;
    padding: 40px 0 12px;
}

.hero .eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted, #8a9099);
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 22px;
}

html[data-theme="light"] .hero .eyebrow { border-color: rgba(0, 0, 0, 0.10); }

.hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
}

.hero p {
    max-width: 560px;
    margin: 0 auto 30px;
    color: var(--muted, #8a9099);
    font-size: clamp(15px, 2.2vw, 17px);
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.section { padding: 46px 0; }

.section-head { text-align: center; margin-bottom: 34px; }

.section-head .kicker {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--faint, #5c6169);
    margin-bottom: 10px;
}

.section-head h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: clamp(24px, 4vw, 32px);
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.section-head p {
    max-width: 560px;
    margin: 0 auto;
    color: var(--muted, #8a9099);
    font-size: 15px;
    line-height: 1.6;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}

.tile {
    border-radius: 18px;
    padding: 24px;
}

.tile .tile-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    font-size: 20px;
}

html[data-theme="light"] .tile .tile-icon { background: rgba(0, 0, 0, 0.04); border-color: rgba(0, 0, 0, 0.08); }

.tile h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 16.5px;
    margin-bottom: 7px;
}

.tile p { color: var(--muted, #8a9099); font-size: 13.5px; line-height: 1.6; }

.badge {
    display: inline-block;
    margin-top: 14px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #7fb794;
    background: rgba(127, 183, 148, 0.12);
    border: 1px solid rgba(127, 183, 148, 0.28);
    padding: 4px 10px;
    border-radius: 999px;
}

/* rules */
.rules-group { margin-bottom: 34px; }
.rules-group > h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 20px;
    margin-bottom: 4px;
}
.rules-group > .rg-sub { color: var(--muted, #8a9099); font-size: 14px; line-height: 1.6; margin-bottom: 18px; }

.rule {
    display: flex;
    gap: 16px;
    padding: 18px;
    border-radius: 16px;
    margin-bottom: 12px;
}

.rule .num {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: var(--text, #e7e9ec);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

html[data-theme="light"] .rule .num { background: rgba(0, 0, 0, 0.04); border-color: rgba(0, 0, 0, 0.08); }

.rule h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 5px;
}
.rule p { color: var(--muted, #8a9099); font-size: 13.5px; line-height: 1.6; }
.rule p b { color: var(--text, #e7e9ec); font-weight: 500; }

.section-note {
    border-radius: 16px;
    padding: 18px 20px;
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--muted, #8a9099);
}
.section-note b { color: var(--text, #e7e9ec); font-weight: 500; }

.page-footer {
    text-align: center;
    padding: 40px 22px 60px;
    color: var(--faint, #5c6169);
    font-size: 12.5px;
    line-height: 1.9;
}
.page-footer a { color: var(--muted, #8a9099); text-decoration: none; }
.page-footer a:hover { color: var(--text, #e7e9ec); }
.page-footer .fine { display: block; margin-top: 6px; opacity: 0.8; }

/* shared button used by the new content pages */
.btn-lg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 22px;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    color: #101215;
    background: var(--text, #e7e9ec);
    transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.btn-lg:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32); }
html[data-theme="light"] .btn-lg { color: #f5f7fa; }

.btn-lg.ghost {
    color: var(--text, #e7e9ec);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.btn-lg.ghost:hover { background: rgba(255, 255, 255, 0.1); }
html[data-theme="light"] .btn-lg.ghost { color: var(--text); background: rgba(0, 0, 0, 0.04); border-color: rgba(0, 0, 0, 0.1); }

.btn-lg.discord { color: #fff; background: #5865f2; }
.btn-lg.discord:hover { background: #4c59e0; }

/* ============================================================
   Motion system — scroll-reveal, nav user chip, marquee
   ============================================================ */

/* scroll-reveal: elements ease up + fade as they enter the viewport */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.07s; }
.reveal[data-d="2"] { transition-delay: 0.14s; }
.reveal[data-d="3"] { transition-delay: 0.21s; }
.reveal[data-d="4"] { transition-delay: 0.28s; }
.reveal[data-d="5"] { transition-delay: 0.35s; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .marquee-track { animation: none !important; }
}

/* signed-in chip that replaces the Profile nav link */
.nav-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text, #e7e9ec);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.nav-user:hover { background: rgba(255, 255, 255, 0.1); }
.nav-user img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.nav-user .nu-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme="light"] .nav-user { border-color: rgba(0, 0, 0, 0.1); background: rgba(0, 0, 0, 0.04); }
html[data-theme="light"] .nav-user:hover { background: rgba(0, 0, 0, 0.07); }
@media (max-width: 560px) { .nav-user .nu-name { display: none; } .nav-user { padding: 5px; } }

/* horizontal motion strip */
.marquee {
    overflow: hidden;
    white-space: nowrap;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    padding: 6px 0;
}
.marquee-track {
    display: inline-flex;
    gap: 40px;
    padding-left: 40px;
    animation: marquee 34s linear infinite;
}
.marquee-track span {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: clamp(26px, 4.5vw, 48px);
    letter-spacing: -0.01em;
    color: var(--text, #e7e9ec);
    opacity: 0.14;
    display: inline-flex;
    align-items: center;
    gap: 40px;
}
.marquee-track span::after {
    content: '';
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--copper, #e8944a); opacity: 0.6;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* oversized display heading for the air-style hero */
.display {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: clamp(44px, 9vw, 104px);
    line-height: 0.98;
    letter-spacing: -0.03em;
}

/* thin rule used between big sections */
.hr {
    height: 1px;
    border: none;
    background: var(--border, #23262d);
    margin: 0;
}

/* ============================================================
   Department detail pages
   ============================================================ */
.dept-hero {
    max-width: 980px;
    margin: 0 auto;
    padding: 140px 24px 50px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.dept-hero .badge-ico {
    width: 66px; height: 66px; border-radius: 18px;
    display: grid; place-items: center; margin-bottom: 26px;
    color: var(--text, #e7e9ec);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
}
html[data-theme="light"] .dept-hero .badge-ico { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); }
.dept-kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--copper, #e8944a); margin-bottom: 16px; }
.dept-name {
    font-family: 'Space Grotesk', sans-serif; font-weight: 600;
    font-size: clamp(38px, 7vw, 76px); line-height: 1.0; letter-spacing: -0.02em;
    max-width: 12ch;
}
.dept-desc { max-width: 620px; margin: 24px 0 32px; color: var(--muted, #8a9099); font-size: clamp(15px, 2vw, 18px); line-height: 1.6; }
.dept-desc b { color: var(--text, #e7e9ec); font-weight: 500; }
.dept-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.dept-section { max-width: 980px; margin: 0 auto; padding: 70px 24px; }
.dept-section h2 { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: clamp(24px, 4vw, 36px); letter-spacing: -0.01em; margin-bottom: 8px; }
.dept-section .sub { color: var(--muted, #8a9099); font-size: 15px; line-height: 1.6; max-width: 560px; margin-bottom: 34px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.shot {
    border-radius: 18px; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    aspect-ratio: 16 / 10; background: rgba(255,255,255,0.03);
}
html[data-theme="light"] .shot { border-color: rgba(0,0,0,0.08); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.shot:hover img { transform: scale(1.05); }
.shot.feature { grid-column: 1 / -1; aspect-ratio: 21 / 9; }

.resp-list { list-style: none; display: grid; gap: 12px; }
.resp-list li { display: flex; gap: 12px; color: var(--muted, #8a9099); font-size: 15px; line-height: 1.55; }
.resp-list li::before {
    content: ''; flex: none; margin-top: 7px;
    width: 7px; height: 7px; border-radius: 50%; background: var(--copper, #e8944a);
}
.resp-list b { color: var(--text, #e7e9ec); font-weight: 500; }

.back-link { display: inline-flex; align-items: center; gap: 7px; color: var(--muted, #8a9099); text-decoration: none; font-size: 13.5px; font-weight: 600; margin-bottom: 20px; }
.back-link:hover { color: var(--text, #e7e9ec); }

/* ============================================================
   Liquid-glass buttons + components
   ============================================================ */
.btn-lg, .btn, .btn-sm, .dept a.start, .tab-switch a {
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
}
/* glassy sheen on solid buttons */
.btn-lg:not(.ghost), .btn:not(.btn-sm) {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 6px 20px rgba(0,0,0,0.22);
}
.btn-lg.discord, .btn-discord { box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 8px 24px rgba(88,101,242,0.32); }
/* ghost / secondary buttons become true glass */
.btn-lg.ghost, .btn-sm, .dept a.start, .tab-switch a {
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 6px 18px rgba(0,0,0,0.18) !important;
}
.btn-lg.ghost:hover, .btn-sm:hover, .dept a.start:hover { background: rgba(255,255,255,0.1) !important; }
html[data-theme="light"] .btn-lg.ghost, html[data-theme="light"] .btn-sm,
html[data-theme="light"] .dept a.start, html[data-theme="light"] .tab-switch a {
    background: rgba(255,255,255,0.42) !important;
    border-color: rgba(255,255,255,0.6) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 6px 18px rgba(30,45,80,0.08) !important;
}

/* ============================================================
   Multi-column site footer
   ============================================================ */
.site-footer {
    position: relative;
    margin-top: 60px;
    border-top: 1px solid var(--border, #23262d);
    background: rgba(255,255,255,0.02);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
}
html[data-theme="light"] .site-footer { background: rgba(255,255,255,0.32); border-color: rgba(255,255,255,0.5); }
.sf-inner { max-width: 1120px; margin: 0 auto; padding: 60px 28px 40px; }
.sf-cols { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 36px 28px; }
.sf-brand .sf-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text, #e7e9ec); font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 16px; }
.sf-brand .sf-logo img { width: 28px; height: auto; }
html[data-theme="light"] .sf-brand .sf-logo img { filter: invert(1); }
.sf-brand p { color: var(--muted, #8a9099); font-size: 13.5px; line-height: 1.6; margin: 16px 0 20px; max-width: 260px; }
.sf-col h4 { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint, #5c6169); margin-bottom: 16px; }
.sf-col a { display: block; color: var(--muted, #8a9099); text-decoration: none; font-size: 14px; padding: 5px 0; transition: color 0.14s ease; }
.sf-col a:hover { color: var(--text, #e7e9ec); }
.sf-bottom {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    max-width: 1120px; margin: 0 auto; padding: 22px 28px 40px; margin-top: 24px;
    border-top: 1px solid var(--border, #23262d);
}
.sf-legal { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; }
.sf-legal a { color: var(--muted, #8a9099); text-decoration: none; }
.sf-legal a:hover { color: var(--text, #e7e9ec); }
.sf-copy { font-size: 12.5px; color: var(--faint, #5c6169); }
.sf-social { display: flex; gap: 8px; }
.sf-social a {
    width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
    color: var(--muted, #8a9099); background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    transition: color 0.14s ease, background 0.14s ease;
}
.sf-social a:hover { color: var(--text, #e7e9ec); background: rgba(255,255,255,0.1); }
html[data-theme="light"] .sf-social a { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); }
@media (max-width: 860px) {
    .sf-cols { grid-template-columns: 1fr 1fr; }
    .sf-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    .sf-cols { grid-template-columns: 1fr; }
    .sf-bottom { flex-direction: column; align-items: flex-start; }
}

/* footer spans full width even inside flex-centered pages */
.site-footer { align-self: stretch; }

/* ============================================================
   Footer gap — keep the footer below the fold with breathing room
   ============================================================ */
.site-footer { margin-top: 22vh; }
/* short content pages fill the viewport so the footer sits below it */
.wrap, .rules-wrap { min-height: calc(100dvh - 210px); }

/* ============================================================
   Department image carousel (auto-cycling with progress bars)
   ============================================================ */
.carousel {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    aspect-ratio: 16 / 9;
    background: rgba(255,255,255,0.03);
}
html[data-theme="light"] .carousel { border-color: rgba(0,0,0,0.08); }
.carousel .cslide {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transition: opacity 0.7s ease;
}
.carousel .cslide.active { opacity: 1; }
.carousel .cshade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,0.35), transparent 30%, transparent 70%, rgba(0,0,0,0.25)); }

.carousel .cbars { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; gap: 6px; z-index: 3; }
.carousel .cbar { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,0.28); overflow: hidden; }
.carousel .cbar > i { display: block; height: 100%; width: 0; background: #fff; border-radius: 3px; }
.carousel .cbar.done > i { width: 100%; }
.carousel .cbar.active > i { animation: cbarfill linear forwards; animation-duration: var(--cdur, 5s); }
@keyframes cbarfill { from { width: 0; } to { width: 100%; } }

.carousel .cnav {
    position: absolute; bottom: 14px; right: 14px; z-index: 3; display: flex; gap: 8px;
}
.carousel .cbtn {
    width: 38px; height: 38px; border-radius: 11px; border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.35); color: #fff; display: grid; place-items: center; cursor: pointer;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: background 0.14s ease;
}
.carousel .cbtn:hover { background: rgba(0,0,0,0.55); }
.carousel .ccount {
    position: absolute; bottom: 20px; left: 16px; z-index: 3;
    font-size: 12px; font-weight: 600; color: #fff; letter-spacing: 0.03em;
    padding: 5px 11px; border-radius: 999px; background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
@media (prefers-reduced-motion: reduce) {
    .carousel .cbar.active > i { animation: none; width: 100%; }
}

/* ============================================================
   Cookie consent banner
   ============================================================ */
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    z-index: 200;
    width: min(560px, calc(100vw - 32px));
    border-radius: 18px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(18, 21, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    animation: cookie-in 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
html[data-theme="light"] .cookie-banner {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(255, 255, 255, 0.65);
    box-shadow: 0 16px 48px rgba(30, 45, 80, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
@keyframes cookie-in { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
.cookie-banner.leaving { opacity: 0; transform: translate(-50%, 16px); transition: opacity 0.3s ease, transform 0.3s ease; }
.cookie-banner p { flex: 1; margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted, #8a9099); }
.cookie-banner p b { color: var(--text, #e7e9ec); font-weight: 600; }
.cookie-banner p a { color: var(--text, #e7e9ec); }
.cookie-banner .ck-accept {
    flex: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    padding: 11px 18px;
    border-radius: 11px;
    color: #101215;
    background: var(--text, #e7e9ec);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 20px rgba(0, 0, 0, 0.22);
    transition: transform 0.12s ease, filter 0.12s ease;
}
.cookie-banner .ck-accept:hover { transform: translateY(-1px); filter: brightness(1.05); }
html[data-theme="light"] .cookie-banner .ck-accept { color: #f5f7fa; }
@media (max-width: 480px) { .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; } }
