/* ===================================================================
   TwistcasterLive Media
   Dark, photographic theme: black + warm brown, tan accents,
   serif display headings.
   =================================================================== */

:root {
    --black: #000;
    --brown: #1e130c;
    --brown-2: #120b07;
    --card: rgba(255, 255, 255, 0.035);
    --tan: #b59a7f;
    --tan-light: #d2b99c;
    --text: #f4eee8;
    --muted: #b8ada2;
    --line: rgba(181, 154, 127, 0.35);
    --red: #e0352b;

    --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --sans: 'Roboto', 'Segoe UI', system-ui, sans-serif;

    --wrap: 1140px;
    --gutter: clamp(16px, 4vw, 40px);

    --section-bg: linear-gradient(180deg, var(--brown) 0%, var(--brown-2) 55%, var(--black) 100%);

    /* Tan cusp that sits on divider lines */
    --notch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 22'%3E%3Cpath d='M0 22C14 22 20 16 22 0C24 16 30 22 44 22Z' fill='%23b59a7f'/%3E%3C/svg%3E");
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--sans);
    font-size: 17px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text);
    background: var(--black);
    -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

h1, h2, h3, p { margin: 0; }

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

a { color: inherit; }

strong { font-weight: 500; }

a:focus-visible, button:focus-visible {
    outline: 2px solid var(--tan-light);
    outline-offset: 3px;
}

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

/* ---------------------------------------------------------------
   Type helpers
   --------------------------------------------------------------- */
.serif {
    font-family: var(--serif);
    font-weight: 700;
    letter-spacing: 0.005em;
    line-height: 1.15;
}

h2.serif {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 20px;
}

.caps {
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.tan { color: var(--tan-light); }
.muted { color: var(--muted); }
.center { text-align: center; }

.lead {
    font-size: 1.12rem;
    color: var(--text);
    margin-bottom: 30px;
}

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.wrap.narrow { max-width: 760px; }
.wrap + .wrap { margin-top: 80px; }

/* ---------------------------------------------------------------
   Buttons — outlined, tan, spaced caps
   --------------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 14px 40px;
    border: 2px solid var(--tan);
    color: var(--tan-light);
    background: transparent;
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.btn:hover {
    background: var(--tan);
    color: var(--black);
}

/* ---------------------------------------------------------------
   Top bar
   --------------------------------------------------------------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--black);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 var(--gutter);
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand img {
    height: 46px;
    width: auto;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
    font-family: var(--sans);
    font-size: 0.86rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
    background: none;
    border: 0;
    cursor: pointer;
    transition: color 0.15s;
}

.nav-link:hover,
.nav-link.active { color: var(--red); }

.caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--red);
    margin-left: 2px;
}

.has-menu { position: relative; }

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 210px;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    background: #0d0907;
    border: 1px solid var(--line);
    border-top: 2px solid var(--tan);
}

.has-menu:hover .submenu,
.has-menu:focus-within .submenu,
.has-menu.open .submenu { display: block; }

.submenu a {
    display: block;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
}

.submenu a:hover,
.submenu a.active { color: var(--red); }

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 24px;
    height: 2px;
    margin: 0 auto;
    background: var(--text);
    transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }

.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------------------------------------------------
   Panels
   --------------------------------------------------------------- */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ---------------------------------------------------------------
   Hero (home) + page heroes
   --------------------------------------------------------------- */
.hero,
.page-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 var(--gutter);
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.25) 45%, rgba(30, 19, 12, 0.95) 100%),
        var(--bg, none) center / cover no-repeat,
        var(--brown);
}

.hero {
    min-height: min(92vh, 860px);
    padding-top: 60px;
    padding-bottom: 140px;
}

.page-hero {
    flex-direction: column;
    min-height: 360px;
    padding-top: 80px;
    padding-bottom: 70px;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(1.75rem, 7.4vw, 4.6rem);
    line-height: 1.05;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
}

.page-hero .hero-title { font-size: clamp(2rem, 5.5vw, 3.6rem); }

.hero-sub {
    margin-top: 18px;
    font-family: var(--sans);
    font-size: clamp(0.85rem, 1.6vw, 1.1rem);
    font-weight: 700;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}

.hero-rule {
    display: block;
    width: 140px;
    height: 3px;
    margin: 30px 0 28px;
    background: var(--tan);
}

.hero-note {
    margin-top: 26px;
    font-size: 1.05rem;
    font-weight: 400;
    color: #fff;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
}

/* Round white social buttons */
.socials {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.socials a {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    transition: background 0.2s, color 0.2s;
}

.socials a:hover {
    background: var(--tan);
}

.socials svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.socials.small a { width: 40px; height: 40px; }
.socials.small svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------
   Divider line with a tan cusp in the middle
   --------------------------------------------------------------- */
.notch-rule {
    position: relative;
    height: 3px;
    background: var(--tan);
}

.notch-rule::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 1px;
    width: 44px;
    height: 22px;
    transform: translateX(-50%);
    background: var(--notch) center / contain no-repeat;
}

.notch-rule.inline {
    width: 220px;
    height: 2px;
    margin: 56px auto 34px;
}

/* ---------------------------------------------------------------
   Mission (home)
   --------------------------------------------------------------- */
.mission {
    background: var(--section-bg);
}

.mission-inner {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gutter) 90px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 5vw, 72px);
    align-items: start;
}

.mission-copy {
    text-align: center;
    padding-top: 80px;
}

.mission-copy p {
    font-size: 1.08rem;
    margin-bottom: 34px;
}

.mission-photo {
    margin: -110px 0 0;
    position: relative;
    z-index: 1;
}

.mission-photo img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0 0 0 60px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

/* ---------------------------------------------------------------
   Photo strip (home)
   --------------------------------------------------------------- */
.strip {
    padding: clamp(140px, 20vw, 260px) var(--gutter) 70px;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.55) 100%),
        var(--bg) center / cover no-repeat;
}

.strip-photos {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 880px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.strip-photos img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border: 9px solid #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* ---------------------------------------------------------------
   Generic dark section
   --------------------------------------------------------------- */
.dark-section {
    background: var(--section-bg);
    padding: clamp(64px, 9vw, 110px) 0;
}

.section-label {
    color: var(--tan-light);
    padding-bottom: 14px;
    margin: 0 0 26px;
    border-bottom: 1px solid var(--line);
}

.cards + .section-label { margin-top: 70px; }

/* Counties */
.counties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    max-width: 760px;
    margin: 36px auto 54px;
}

.counties h3 {
    color: var(--tan-light);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--tan);
    text-align: center;
}

.counties ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.counties li {
    padding: 12px 0;
    text-align: center;
    border-bottom: 1px solid var(--line);
}

/* ---------------------------------------------------------------
   Cards (team, sponsors, shows)
   --------------------------------------------------------------- */
.cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    padding: 28px 26px;
    background: var(--card);
    border: 1px solid var(--line);
    border-top: 3px solid var(--tan);
    color: var(--muted);
    text-decoration: none;
}

.card .serif {
    font-size: 1.4rem;
    color: var(--text);
    margin-bottom: 4px;
}

.card .caps { font-size: 0.72rem; }

.sponsors { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.sponsor { transition: border-color 0.2s, background 0.2s; }
.sponsor:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--tan); }

.sponsor-logo {
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    background: #fff;
    margin-bottom: 18px;
}

.sponsor-logo.on-dark { background: #000; }

.sponsor-logo img {
    position: absolute;
    inset: 20px;
    width: calc(100% - 40px);
    height: calc(100% - 40px);
    object-fit: contain;
}

/* ---------------------------------------------------------------
   Split layout, features, figure, quote, panel
   --------------------------------------------------------------- */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: center;
}

.features {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: f;
}

.features li {
    counter-increment: f;
    position: relative;
    padding: 22px 0 22px 64px;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: column;
}

.features li:first-child { border-top: 1px solid var(--line); }

.features li::before {
    content: counter(f, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 16px;
    font-family: var(--serif);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--tan);
    line-height: 1.2;
}

.features strong {
    font-size: 1.1rem;
    color: var(--text);
}

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

.features.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
}

.features.grid li:first-child { border-top: 0; }

.framed { margin: 0; }

.framed img {
    width: 100%;
    border: 9px solid #fff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.framed figcaption {
    margin-top: 14px;
    font-size: 0.88rem;
    color: var(--muted);
    text-align: center;
}

.quote {
    margin: 80px auto 50px;
    max-width: 820px;
    text-align: center;
}

.quote p {
    font-family: var(--serif);
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    font-weight: 700;
    line-height: 1.4;
}

.quote cite {
    display: block;
    margin-top: 20px;
    font-style: normal;
    color: var(--tan-light);
}

.panel {
    margin: 50px 0 40px;
    padding: 34px;
    border: 2px solid var(--tan);
    text-align: center;
}

.panel h3 {
    font-size: 1.6rem;
    margin-bottom: 14px;
}

.panel p + p { margin-top: 8px; }

/* Sports widget sits on a white card so it stays readable */
.scoreboard {
    background: #fff;
    padding: 12px;
}

.scoreboard iframe {
    display: block;
    width: 100%;
    min-height: 220px;
    border: 0;
}

/* New Year countdown */
.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 820px;
    margin: 0 auto 30px;
}

.countdown div {
    padding: 28px 12px;
    text-align: center;
    border: 1px solid var(--line);
    border-top: 3px solid var(--tan);
}

.countdown span {
    display: block;
    font-family: var(--serif);
    font-size: clamp(2.2rem, 6vw, 3.6rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.countdown small {
    display: block;
    margin-top: 12px;
    color: var(--tan-light);
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
.footer { background: var(--black); }

.footer-inner {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 56px var(--gutter) 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
}

.footer-inner img {
    height: 90px;
    width: auto;
}

.fine {
    font-size: 0.82rem;
    color: var(--muted);
}

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */
@media (max-width: 960px) {
    .nav-toggle { display: block; }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--black);
        border-bottom: 2px solid var(--tan);
        max-height: calc(100vh - 72px);
        overflow-y: auto;
    }

    .nav-open .nav { display: block; }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px var(--gutter) 16px;
    }

    .nav-link {
        width: 100%;
        padding: 14px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    /* On mobile every sub-link is listed under its heading */
    .has-menu > .nav-link {
        color: var(--tan-light);
        cursor: default;
        pointer-events: none;
    }

    .caret { display: none; }

    .submenu,
    .has-menu:hover .submenu {
        display: block;
        position: static;
        min-width: 0;
        padding: 4px 0 8px;
        background: none;
        border: 0;
    }

    .submenu a { padding: 12px 0 12px 16px; }

    .mission-inner,
    .split {
        grid-template-columns: 1fr;
    }

    .mission-photo { margin-top: -80px; order: -1; }
    .mission-copy { padding-top: 0; }

    .strip-photos { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    body { font-size: 16px; }

    .hero { padding-bottom: 120px; }

    .btn { padding: 13px 26px; letter-spacing: 0.2em; }

    .counties { grid-template-columns: 1fr; gap: 36px; }

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

    .hero-title { letter-spacing: 0.03em; }
    .hero-sub { letter-spacing: 0.22em; }

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

    .strip-photos img { border-width: 6px; }
    .strip-photos { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
