:root {
    --bg: #1a0808;
    --bg-soft: #231010;
    --surface: #1b1010;
    --surface-2: #241515;
    --surface-strong: #312020;
    --ink: #f0e3db;
    --muted: #c9ada2;
    --primary: #f5e8df;
    --primary-2: #e1c5b8;
    --accent: #d78469;
    --accent-soft: #b78c7e;
    --line: rgba(245, 242, 235, 0.1);
    --shadow: 0 24px 60px rgba(14, 0, 0, 0.45);
    --radius: 22px;
    --header-offset: 92px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: #110505;
    scroll-padding-top: calc(var(--header-offset) + env(safe-area-inset-top, 0px));
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Open Sans", "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        repeating-linear-gradient(
            135deg,
            rgba(255, 235, 225, 0.035) 0,
            rgba(255, 235, 225, 0.035) 1px,
            transparent 1px,
            transparent 34px
        ),
        repeating-linear-gradient(
            135deg,
            rgba(164, 92, 76, 0.08) 0,
            rgba(164, 92, 76, 0.08) 2px,
            transparent 2px,
            transparent 140px
        ),
        linear-gradient(135deg, rgba(255, 215, 198, 0.03) 0%, transparent 36%, transparent 62%, rgba(255, 244, 238, 0.018) 100%),
        radial-gradient(circle at top right, rgba(203, 85, 63, 0.2), transparent 30%),
        radial-gradient(circle at 18% 18%, rgba(130, 33, 33, 0.22), transparent 26%),
        radial-gradient(circle at 50% 100%, rgba(89, 15, 15, 0.16), transparent 42%),
        linear-gradient(180deg, #130606 0%, #1c0909 36%, var(--bg) 70%, #110505 100%);
    background-attachment: fixed;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

button,
input,
select,
textarea {
    font: inherit;
}

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

a {
    color: inherit;
}

iframe {
    width: 100%;
    min-height: 420px;
    border: 0;
    border-radius: 18px;
    background: #fff;
}

.site-shell {
    width: min(1180px, calc(100% - 24px));
    margin: 0 auto;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    backdrop-filter: blur(18px);
    background: rgba(24, 8, 8, 0.82);
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-lockup > div {
    min-width: 0;
}

.brand-mark {
    width: 62px;
    height: 62px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 6px;
}

.brand-mark img {
    width: 100%;
    height: 100%;
}

.brand-lockup h1,
.hero-copy h2,
.section-heading h2 {
    margin: 0;
    font-family: "Montserrat", "Open Sans", "Segoe UI", sans-serif;
    font-weight: 800;
    line-height: 1;
}

.brand-lockup h1 {
    font-size: clamp(1.5rem, 7vw, 2.2rem);
    overflow-wrap: anywhere;
}

.eyebrow {
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    color: var(--accent-soft);
    font-weight: 700;
}

.nav-toggle,
.button,
.install-button {
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.nav-toggle {
    min-width: 62px;
    height: 46px;
    padding: 10px 12px;
    background: var(--surface-2);
    color: var(--ink);
    border: 1px solid var(--line);
    margin-right: 0;
    justify-self: end;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.nav-toggle-label {
    display: none;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nav-toggle-icon {
    width: 24px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.nav-toggle-icon span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.main-nav {
    grid-column: 1 / -1;
    display: none;
    flex-direction: column;
    gap: 10px;
    background: rgba(18, 18, 18, 0.96);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 14px;
    box-shadow: var(--shadow);
}

.main-nav.open {
    display: flex;
}

.main-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
}

.main-nav a:hover {
    background: var(--surface-strong);
}

.hero {
    display: grid;
    gap: 20px;
    padding: 24px 0 16px;
}

.hero-copy,
.hero-media,
.stats-strip article,
.info-card,
.embed-card,
.timeline-item,
.timeline-group,
.sponsor-card,
.faq-item {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.hero-copy {
    padding: 24px;
}

.hero-copy h2 {
    font-size: clamp(2.4rem, 7vw, 4.6rem);
    margin-bottom: 16px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 14px;
    color: var(--muted);
    font-weight: 700;
}

.hero-tagline {
    font-size: 1.1rem;
    margin: 0 0 10px;
    color: var(--primary-2);
    font-weight: 700;
}

.hero-summary {
    margin: 0 0 20px;
    line-height: 1.7;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    gap: 12px;
}

.button,
.install-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 12px 18px;
    font-weight: 800;
}

.button-primary,
.install-button {
    background: var(--primary);
    color: #050505;
}

.button-secondary {
    background: var(--surface-strong);
    color: var(--ink);
}

.button:hover,
.install-button:hover,
.nav-toggle:hover {
    transform: translateY(-1px);
}

.hero-media {
    overflow: hidden;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-media img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.stats-strip {
    display: grid;
    gap: 12px;
    margin: 16px 0 20px;
}

.stats-strip article {
    padding: 18px;
}

.stats-strip span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.content-section {
    padding: 34px 0;
}

.alt-section {
    position: relative;
}

.alt-section::before {
    content: "";
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245, 242, 235, 0.22), transparent);
    margin-bottom: 30px;
}

.section-heading {
    margin-bottom: 18px;
}

.section-heading h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
}

.rich-text {
    line-height: 1.8;
    color: var(--muted);
}

.rich-text p:first-child {
    margin-top: 0;
}

.rich-cards,
.card-grid,
.category-grid,
.contact-grid,
.rules-layout,
.sponsor-grid {
    display: grid;
    gap: 16px;
}

.rich-cards article,
.info-card,
.sponsor-card {
    padding: 18px;
}

.info-card h3,
.sponsor-card h3,
.timeline-content h3 {
    margin-top: 0;
}

.timeline {
    display: grid;
    gap: 14px;
}

.timeline-group {
    padding: 16px;
    display: grid;
    gap: 14px;
}

.timeline-group-date {
    color: var(--primary);
    font-weight: 800;
    font-size: 1.1rem;
}

.timeline-group-date span {
    display: block;
    margin-bottom: 4px;
    color: var(--accent-soft);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.timeline-group-items {
    display: grid;
    gap: 12px;
}

.timeline-item {
    padding: 14px;
    display: grid;
    gap: 10px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 18px;
}

.timeline-date {
    color: var(--primary-2);
    font-weight: 800;
}

.timeline-date span {
    display: block;
    color: var(--muted);
}

.timeline-location {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.timeline-location-link {
    flex: 0 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--surface-strong);
    color: var(--primary);
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.timeline-location-link:hover {
    transform: translateY(-1px);
    background: var(--accent);
    color: #050505;
}

.timeline-location-link svg {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.embed-card {
    padding: 12px;
    margin-top: 18px;
}

.rules-layout {
    margin-top: 18px;
}

.rules-preview {
    margin-top: 0;
}

.rules-preview iframe {
    min-height: 240px;
    max-height: 320px;
}

.rules-button {
    justify-self: end;
}

.registration-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 18px;
}

.registration-button {
    min-width: min(100%, 220px);
}

.faq-list {
    display: grid;
    gap: 12px;
}

.faq-item {
    overflow: hidden;
}

.faq-question {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--ink);
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    font: inherit;
    cursor: pointer;
    font-weight: 700;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 18px;
    color: var(--muted);
    transition: max-height 0.38s ease, padding 0.32s ease;
}

.faq-item.open .faq-answer {
    max-height: 700px;
    padding: 0 18px 18px;
}

.faq-question {
    transition: color 0.25s ease;
}

.faq-question > span:last-child {
    transition: transform 0.32s ease;
    display: inline-block;
    line-height: 1;
}

.faq-item.open .faq-question {
    color: var(--accent);
}

.faq-item.open .faq-question > span:last-child {
    transform: rotate(45deg);
}

.category-card p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.7;
}

.category-card {
    display: flex;
    flex-direction: column;
}

.category-registration-button {
    align-self: flex-end;
    margin-top: 16px;
    min-height: 40px;
    padding: 9px 14px;
    font-size: 0.9rem;
}

.sponsor-card {
    text-align: center;
}

.sponsor-card img {
    max-height: 64px;
    object-fit: contain;
    margin: 0 auto 14px;
}

.site-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 30px 0 24px;
    color: var(--muted);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-brand img {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
}

.footer-brand p {
    margin: 6px 0 0;
}

.footer-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.hidden {
    display: none !important;
}

@media (max-width: 759px) {
    .brand-lockup {
        gap: 10px;
    }

    .brand-mark {
        width: 52px;
        height: 52px;
    }

    .brand-lockup h1 {
        font-size: clamp(1.1rem, 5.4vw, 1.55rem);
        line-height: 1.05;
    }

    .eyebrow {
        font-size: 0.64rem;
        letter-spacing: 0.12em;
    }
}

@media (min-width: 760px) {
    :root {
        --header-offset: 88px;
    }

    .site-shell {
        width: min(1200px, calc(100% - 48px));
        padding-bottom: 40px;
    }

    .site-header {
        grid-template-columns: auto 1fr;
        gap: 20px;
    }

    .nav-toggle {
        padding-inline: 16px;
    }

    .nav-toggle-label {
        display: inline;
    }

    .main-nav {
        justify-self: end;
    }

    .hero {
        grid-template-columns: 1.05fr 0.95fr;
        align-items: stretch;
        padding-top: 30px;
    }

    .stats-strip {
        grid-template-columns: repeat(3, 1fr);
    }

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

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

    .timeline-group {
        grid-template-columns: 110px 1fr;
        align-items: start;
    }

    .timeline-item {
        grid-template-columns: 130px 1fr;
        align-items: start;
    }

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

    .sponsor-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .rich-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

}

@media (min-width: 760px) and (max-width: 1023px) {
    .site-header {
        position: sticky;
    }

    .main-nav {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        z-index: 30;
        max-height: min(70vh, 560px);
        overflow-y: auto;
    }
}

/* ─── keyframes ────────────────────────────────────────────────────── */
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

/* ─── hero image float ──────────────────────────────────────────────── */
.hero-media img {
    animation: floatY 5.5s ease-in-out infinite;
}

/* ─── scroll-entrance helpers (JS adds classes) ─────────────────────── */
.anim-ready {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.52s ease, transform 0.52s ease;
    will-change: opacity, transform;
}

.anim-ready.anim-in {
    opacity: 1;
    transform: translateY(0);
}

.anim-stagger > * {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.42s ease, transform 0.42s ease;
    will-change: opacity, transform;
}

.anim-stagger.anim-in > * {
    opacity: 1;
    transform: translateY(0);
}

.anim-stagger.anim-in > *:nth-child(1) { transition-delay: 0s; }
.anim-stagger.anim-in > *:nth-child(2) { transition-delay: 0.07s; }
.anim-stagger.anim-in > *:nth-child(3) { transition-delay: 0.14s; }
.anim-stagger.anim-in > *:nth-child(4) { transition-delay: 0.21s; }
.anim-stagger.anim-in > *:nth-child(5) { transition-delay: 0.28s; }
.anim-stagger.anim-in > *:nth-child(6) { transition-delay: 0.35s; }
.anim-stagger.anim-in > *:nth-child(n+7) { transition-delay: 0.42s; }

@media (prefers-reduced-motion: reduce) {
    .anim-ready,
    .anim-stagger > * {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        will-change: auto;
    }

    .hero-media img {
        animation: none;
    }

    .faq-answer {
        transition: none;
    }

    .faq-question > span:last-child {
        transition: none;
    }
}

/* ─── section heading accent ────────────────────────────────────────── */
.section-heading h2::after {
    content: '';
    display: block;
    width: 38px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    border-radius: 2px;
    margin-top: 10px;
}

/* ─── card hover lift + glow ────────────────────────────────────────── */
.info-card,
.sponsor-card,
.timeline-item {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.info-card:hover,
.sponsor-card:hover {
    transform: translateY(-4px);
    border-color: rgba(215, 132, 105, 0.3);
    box-shadow: 0 32px 72px rgba(14, 0, 0, 0.55);
}

.timeline-item:hover {
    transform: translateY(-2px);
    border-color: rgba(215, 132, 105, 0.2);
}

/* ─── button hover glow ─────────────────────────────────────────────── */
.button-primary:hover,
.install-button:hover {
    box-shadow: 0 8px 28px rgba(215, 132, 105, 0.38);
}

/* ─── active nav link ───────────────────────────────────────────────── */
.main-nav a.nav-active {
    color: var(--accent);
    background: var(--surface-strong);
}

/* ─── stats strip value emphasis ────────────────────────────────────── */
.stats-strip article strong {
    display: block;
    font-size: 1.12rem;
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    color: var(--primary);
    margin-top: 2px;
}

@media (min-width: 1024px) {
    :root {
        --header-offset: 76px;
    }

    .site-header {
        grid-template-columns: 1fr;
        align-items: start;
        justify-items: center;
    }

    .nav-toggle {
        display: none;
        margin-right: 0;
    }

    .brand-lockup {
        justify-content: center;
        text-align: center;
    }

    .brand-lockup > div {
        display: grid;
        justify-items: center;
    }

    .main-nav {
        display: flex;
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        gap: 8px;
        width: 100%;
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 6px 12px 0;
        overflow-x: auto;
        scrollbar-width: none;
        white-space: nowrap;
    }

    .main-nav::-webkit-scrollbar {
        display: none;
    }

    .main-nav a {
        flex: 0 0 auto;
    }
}
