/* =========================================================================
   BUSHY MAN -- bushyman.com
   Warm storybook / cartoon-sticker look: beige paper, thick mahogany
   outlines, hard offset shadows (no blur) so everything reads as a cut-out.
   ========================================================================= */

/* ===== VARIABLES ===== */
:root {
    /* Core palette */
    --green: #5ed153;
    --green-deep: #3d9c37;
    --green-dark: #2a6b26;
    --green-soft: #b9e6b2;

    --brown: #7d5518;
    --brown-deep: #5a3c10;
    --brown-soft: #c8a26a;

    --beige: #e9d9bb;
    --beige-light: #f6ecd9;
    --beige-dark: #d8c39d;

    --black: #100b00;
    --mahogany: #230007;

    /* Roles */
    --ink: #2c1c08;
    --ink-soft: #5a4526;
    --paper: var(--beige);
    --paper-raised: var(--beige-light);
    --outline: var(--brown-deep);

    --purple: #8b4fd1;
    --purple-glow: #c48cff;

    /* Berries in the bush dividers -- warm red reads against the green
       without introducing a colour that fights the green/brown palette. */
    --berry: #e0574f;
    --berry-dark: #a83b34;

    --discord: #5865f2;
    --discord-light: #737ff5;

    --font-display: 'Bungee', Impact, 'Arial Black', sans-serif;
    --font-body: 'Fredoka', 'Trebuchet MS', Arial, sans-serif;

    /* Hard cartoon shadows -- offset, zero blur */
    --pop-sm: 3px 3px 0 var(--outline);
    --pop-md: 6px 6px 0 var(--outline);
    --pop-lg: 10px 10px 0 var(--outline);

    --radius: 18px;
    --radius-lg: 28px;
    --nav-h: 76px;
}

/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.65;
    overflow-x: hidden;
    /* Subtle paper grain so the flat beige doesn't read as an empty div */
    background-image:
        radial-gradient(circle at 20% 30%, rgba(125, 85, 24, 0.05) 0 2px, transparent 2px),
        radial-gradient(circle at 70% 65%, rgba(125, 85, 24, 0.04) 0 2px, transparent 2px);
    background-size: 90px 90px, 130px 130px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

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

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ===== TYPE ===== */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.05; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 3.5rem; }

.section-title {
    font-size: clamp(2rem, 5vw, 3.4rem);
    color: var(--green-deep);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 4px 4px 0 var(--outline);
    margin-bottom: 1rem;
}

.section-sub { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--ink-soft); }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.9rem 1.9rem;
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 999px;
    border: 3px solid var(--outline);
    box-shadow: var(--pop-md);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.2s ease;
}

.btn:hover { transform: translate(-2px, -2px); box-shadow: var(--pop-lg); }
.btn:active { transform: translate(3px, 3px); box-shadow: var(--pop-sm); }

.btn-primary { background: var(--green); color: var(--mahogany); }
.btn-primary:hover { background: var(--green-soft); }

.btn-steam { background: var(--green); color: var(--mahogany); }
.btn-steam:hover { background: #78e26d; }

/* Discord blurple, kept as its own token -- it's a brand colour, not part of
   the Bushy Man palette, so nothing else should reach for it. */
.btn-discord { background: var(--discord); color: #fff; }
.btn-discord:hover { background: var(--discord-light); }

/* Shown until an invite link is set in data/site.js. */
.btn-discord.is-placeholder { opacity: 0.55; cursor: not-allowed; }
.btn-discord.is-placeholder:hover { transform: none; box-shadow: var(--pop-md); background: var(--discord); }

.btn-ghost {
    background: transparent;
    color: var(--brown);
    box-shadow: none;
    border-color: var(--brown);
}
.btn-ghost:hover { background: var(--brown); color: var(--beige-light); box-shadow: var(--pop-sm); }

.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.78rem; border-width: 2px; box-shadow: var(--pop-sm); }
.btn-lg { padding: 1.1rem 2.6rem; font-size: 1.15rem; }
.btn-xl { padding: 1.4rem 3.4rem; font-size: clamp(1.2rem, 3vw, 1.7rem); border-width: 4px; }

.icon-steam,
.icon-discord { width: 1.25em; height: 1.25em; flex-shrink: 0; }

.btn-bounce { animation: btnBounce 2.4s ease-in-out infinite; }
@keyframes btnBounce {
    0%, 88%, 100% { transform: translateY(0); }
    92% { transform: translateY(-7px); }
    96% { transform: translateY(-3px); }
}

/* ===== NAVBAR (hides on scroll-down, drops back in on scroll-up) ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    background: var(--brown-deep);
    border-bottom: 3px solid var(--black);
    transform: translateY(0);
    transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.32s ease;
}

.navbar.is-hidden { transform: translateY(-100%); }
.navbar.at-top { background: transparent; border-bottom-color: transparent; }
.navbar.at-top .nav-logo img { filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6)); }

.nav-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

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

.nav-menu { display: flex; align-items: center; gap: 0.4rem; list-style: none; }

.nav-link {
    display: block;
    padding: 0.5rem 0.95rem;
    font-weight: 600;
    color: var(--beige);
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.nav-link:hover { background: var(--green); color: var(--mahogany); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--beige);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-h) + 3rem) 0 5rem;
}

/* Clipping lives on the background layer, not the section -- the section has
   to let the bush divider overhang past its bottom edge. */
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }

/* Key art is 3840x1240 -- a centre crop frames the duo left of the logo and
   Fevil right of it, which is why this isn't shifted off-centre. */
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.hero-bg-wash {
    position: absolute;
    inset: 0;
    /* Just enough darkening for the text on top -- no beige fade at the bottom,
       the art runs clean to the edge of the section. */
    background:
        radial-gradient(ellipse at 50% 42%, transparent 30%, rgba(16, 11, 0, 0.45) 100%),
        linear-gradient(180deg, rgba(16, 11, 0, 0.34) 0%, rgba(16, 11, 0, 0.12) 38%, rgba(16, 11, 0, 0) 70%);
}

.hero-inner { position: relative; z-index: 1; text-align: center; }

.hero-logo { margin: 0 auto 1rem; max-width: 640px; }
.hero-logo img { width: 100%; filter: drop-shadow(0 8px 0 rgba(16, 11, 0, 0.35)); }

.hero-tagline {
    font-family: var(--font-display);
    font-size: clamp(0.85rem, 2.2vw, 1.15rem);
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--beige-light);
    text-shadow: 2px 2px 0 var(--mahogany);
    margin-bottom: 2.2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.1rem;
    margin: 2rem 0 1.6rem;
}

.hero-socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    list-style: none;
}
.hero-socials a {
    display: inline-block;
    padding: 0.4rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 999px;
    background: rgba(233, 217, 187, 0.9);
    border: 2px solid var(--outline);
    color: var(--brown-deep);
    transition: background-color 0.2s ease, transform 0.15s ease;
}
.hero-socials a:hover { background: var(--green); transform: translateY(-2px); }

.hero-scroll-hint {
    position: absolute;
    bottom: 1.6rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 2px 2px 0 var(--mahogany), 0 0 12px rgba(16, 11, 0, 0.6);
}
.scroll-arrow {
    width: 12px;
    height: 12px;
    margin: 6px auto 0;
    border-right: 3px solid #fff;
    border-bottom: 3px solid #fff;
    filter: drop-shadow(2px 2px 0 var(--mahogany));
    transform: rotate(45deg);
    animation: scrollNudge 1.8s ease-in-out infinite;
}
@keyframes scrollNudge {
    0%, 100% { transform: rotate(45deg) translate(0, 0); }
    50% { transform: rotate(45deg) translate(4px, 4px); }
}

/* ===== BUSH DIVIDER (section transition) ===== */
.bush-divider {
    --bush-h: clamp(72px, 10vw, 124px);
    /* How far the band hangs past the section edge onto the next one.
       Capped at 20%: the SVG is only solid full-width below y=78 of 100, so a
       deeper overhang drops the section edge into the lobes and the page shows
       through the gaps between them. */
    --bush-overhang: calc(var(--bush-h) * 0.2);

    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(var(--bush-overhang) * -1);
    z-index: 2;
    height: var(--bush-h);
    border-bottom: 4px solid var(--outline);
    pointer-events: none;
}

.bush-divider svg { display: block; width: 100%; height: 100%; }

.bush-back { fill: var(--green-dark); }
.bush-front { fill: var(--green); }
.bush-outline { fill: none; stroke: var(--outline); stroke-width: 4; stroke-linecap: round; }

/* Berries. Circles here rather than in the SVG, which stretches horizontally
   with preserveAspectRatio="none" and would flatten them into ellipses. */
.bush-berries { position: absolute; inset: 0; }

.berry {
    position: absolute;
    width: clamp(8px, 1vw, 12px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--berry);
    border: 2px solid var(--outline);
    box-shadow: inset -1px -2px 0 var(--berry-dark);
}

.berry:nth-child(1)  { left: 4.5%;  bottom: 42%; }
.berry:nth-child(2)  { left: 10%;   bottom: 56%; }
.berry:nth-child(3)  { left: 13%;   bottom: 47%; }
.berry:nth-child(4)  { left: 18.5%; bottom: 31%; }
.berry:nth-child(5)  { left: 25%;   bottom: 51%; }
.berry:nth-child(6)  { left: 28%;   bottom: 39%; }
.berry:nth-child(7)  { left: 33%;   bottom: 37%; }
.berry:nth-child(8)  { left: 39%;   bottom: 61%; }
.berry:nth-child(9)  { left: 42.5%; bottom: 52%; }
.berry:nth-child(10) { left: 48%;   bottom: 33%; }
.berry:nth-child(11) { left: 55%;   bottom: 46%; }
.berry:nth-child(12) { left: 63%;   bottom: 51%; }
.berry:nth-child(13) { left: 70%;   bottom: 35%; }
.berry:nth-child(14) { left: 77.5%; bottom: 56%; }
.berry:nth-child(15) { left: 86%;   bottom: 43%; }
.berry:nth-child(16) { left: 92%;   bottom: 30%; }

/* Mirrored copy bracketing the other end of the page: same foliage flipped
   over, hanging up onto the section above the footer. */
.bush-divider--footer {
    top: calc(var(--bush-overhang) * -1);
    bottom: auto;
    transform: scaleY(-1);
    z-index: 1;
}

/* Lifts the scroll hint clear of the foliage so it sits on the art, where the
   white reads, rather than on top of the green. */
.hero-scroll-hint { bottom: clamp(96px, 13vw, 148px); }

/* ===== TRAILER ===== */
.trailer { max-width: 880px; margin: 0 auto; }
.trailer--story { margin-bottom: 3.5rem; }

.trailer-frame {
    position: relative;
    border: 5px solid var(--outline);
    border-radius: var(--radius-lg);
    background: var(--black);
    box-shadow: var(--pop-lg);
    overflow: hidden;
}

.trailer-poster { position: relative; aspect-ratio: 16 / 9; cursor: pointer; }
.trailer-poster img { width: 100%; height: 100%; object-fit: cover; }
.trailer-poster::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(16, 11, 0, 0.2);
    transition: background-color 0.25s ease;
}
.trailer-poster:hover::after { background: rgba(16, 11, 0, 0.05); }

.trailer-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: var(--green);
    border: 4px solid var(--outline);
    box-shadow: var(--pop-md);
    transition: transform 0.15s ease, background-color 0.2s ease;
}
.trailer-poster:hover .trailer-play { transform: translate(-50%, -50%) scale(1.09); background: #7ce271; }

.trailer-play-tri {
    width: 0;
    height: 0;
    margin-left: 8px;
    border-left: 26px solid var(--mahogany);
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
}

.trailer-frame iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: none; }

.trailer-caption {
    margin-top: 0.9rem;
    text-align: center;
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--brown);
}
.trailer--hero .trailer-caption { color: var(--beige-light); text-shadow: 2px 2px 0 var(--mahogany); }
.trailer-hint { opacity: 0.7; }

/* ===== DUO SWITCHER ===== */
/* Extra top padding clears the bush band overhanging from the hero. */
.duo-section {
    padding: clamp(7rem, 12vw, 9rem) 0 5rem;
    /* Clips the oversized art at the section edge -- the character reads as
       too big for the frame, which is the whole point. */
    overflow: hidden;
}

.duo {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: clamp(480px, 68vh, 760px);
}

/* --- the characters --- */
.duo-art {
    position: absolute;
    bottom: 0;
    height: 100%;
    width: min(58%, 660px);
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

.duo-art-inner {
    display: block;
    width: 100%;
    height: 100%;
    transition:
        opacity 0.45s ease,
        transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
        filter 0.45s ease;
}

.duo-art img { width: 100%; height: 100%; object-fit: contain; object-position: bottom center; }

/* Bleed past the container so the active character crowds the edge. */
.duo-art--bushy-man { left: -6%; }
.duo-art--bushy-man .duo-art-inner { transform-origin: left bottom; }
.duo-art--bag-boy { right: -6%; }
.duo-art--bag-boy .duo-art-inner { transform-origin: right bottom; }

/*
 * PLACEHOLDER CROPS. Both entries load the same shared render (Bag Boy is
 * drawn riding on Bushy Man's back), so each side zooms in on its own
 * character. Delete these two rules once separate PNGs exist.
 */
.duo-art--bushy-man img { transform-origin: 46% 58%; transform: scale(1.22); }
.duo-art--bag-boy img { transform-origin: 68% 34%; transform: scale(2.45); }

/* active */
.duo[data-active="bushy-man"] .duo-art--bushy-man,
.duo[data-active="bag-boy"] .duo-art--bag-boy { z-index: 3; cursor: default; }

.duo[data-active="bushy-man"] .duo-art--bushy-man .duo-art-inner,
.duo[data-active="bag-boy"] .duo-art--bag-boy .duo-art-inner {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(14px 14px 0 rgba(35, 0, 7, 0.18));
}

/* dimmed -- shrunk back toward its own edge, waiting to be clicked */
.duo[data-active="bag-boy"] .duo-art--bushy-man,
.duo[data-active="bushy-man"] .duo-art--bag-boy { z-index: 1; }

.duo[data-active="bag-boy"] .duo-art--bushy-man .duo-art-inner {
    opacity: 0.28;
    transform: scale(0.52) translateX(-22%);
    filter: grayscale(0.45);
}
.duo[data-active="bushy-man"] .duo-art--bag-boy .duo-art-inner {
    opacity: 0.28;
    transform: scale(0.52) translateX(22%);
    filter: grayscale(0.45);
}

.duo[data-active="bag-boy"] .duo-art--bushy-man:hover .duo-art-inner,
.duo[data-active="bushy-man"] .duo-art--bag-boy:hover .duo-art-inner {
    opacity: 0.6;
    filter: grayscale(0);
}
.duo[data-active="bag-boy"] .duo-art--bushy-man:hover .duo-art-inner { transform: scale(0.58) translateX(-19%); }
.duo[data-active="bushy-man"] .duo-art--bag-boy:hover .duo-art-inner { transform: scale(0.58) translateX(19%); }

/* --- click cue: only on the inactive side --- */
.duo-cue {
    position: absolute;
    bottom: 8%;
    left: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    white-space: nowrap;
    font-family: var(--font-display);
    font-size: clamp(0.7rem, 1.1vw, 0.85rem);
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--mahogany);
    background: var(--green);
    border: 3px solid var(--outline);
    border-radius: 999px;
    box-shadow: var(--pop-sm);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 10px);
    transition: opacity 0.35s ease, transform 0.35s ease, background-color 0.2s ease;
}

/* Left-hand character: chevron sits before the label and points left. */
.duo-art--bushy-man .duo-cue { flex-direction: row-reverse; }

.duo-cue-chevron {
    width: 9px;
    height: 9px;
    border-top: 3px solid var(--mahogany);
    border-right: 3px solid var(--mahogany);
    transform: rotate(45deg);
}
.duo-art--bushy-man .duo-cue-chevron { transform: rotate(-135deg); }

.duo[data-active="bag-boy"] .duo-art--bushy-man .duo-cue,
.duo[data-active="bushy-man"] .duo-art--bag-boy .duo-cue {
    opacity: 1;
    transform: translate(-50%, 0);
    animation: cueNudge 2.4s ease-in-out infinite;
}

.duo-art:hover .duo-cue { background: #7ce271; box-shadow: var(--pop-md); }

@keyframes cueNudge {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -6px); }
}

/* --- the copy --- */
.duo-copies { position: absolute; inset: 0; }

.duo-copy {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: min(46%, 500px);
    transform: translateY(-50%);
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Copy always sits opposite the active character. */
.duo-copy--bushy-man { right: 24px; }
.duo-copy--bag-boy { left: 24px; }

.duo[data-active="bushy-man"] .duo-copy--bag-boy {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(-28px);
}
.duo[data-active="bag-boy"] .duo-copy--bushy-man {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(28px);
}

.duo-role {
    display: inline-block;
    padding: 0.3rem 1rem;
    margin-bottom: 0.9rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 999px;
    background: var(--green);
    border: 2px solid var(--outline);
    box-shadow: var(--pop-sm);
    color: var(--mahogany);
}
.duo-role--brown { background: var(--brown-soft); }

.duo-name {
    font-size: clamp(2.6rem, 7.5vw, 5.5rem);
    line-height: 0.95;
    color: var(--brown-deep);
    text-transform: uppercase;
    text-shadow: 5px 5px 0 var(--beige-dark);
    margin-bottom: 1.1rem;
}

.duo-desc { font-size: clamp(1rem, 1.5vw, 1.15rem); color: var(--ink-soft); }

/* ===== STORY SECTION ===== */
.story-section {
    position: relative;
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--beige-dark), var(--beige));
    border-top: 4px solid var(--outline);
    border-bottom: 4px solid var(--outline);
}

.story-glow {
    position: absolute;
    top: -12%;
    left: 50%;
    transform: translateX(-50%);
    width: min(900px, 90vw);
    height: 420px;
    background: radial-gradient(ellipse at center, rgba(94, 209, 83, 0.35), transparent 70%);
    pointer-events: none;
}

.story-copy { max-width: 760px; margin: 0 auto; text-align: center; }
.story-copy p { font-size: 1.1rem; color: var(--ink-soft); margin-bottom: 1.2rem; }
.story-wink { font-size: 1.2em; }

.story-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 2.5rem;
    list-style: none;
}
.story-facts li {
    padding: 1rem;
    background: var(--paper-raised);
    border: 3px solid var(--outline);
    border-radius: var(--radius);
    box-shadow: var(--pop-sm);
}
.story-facts strong {
    display: block;
    font-family: var(--font-display);
    font-size: 0.72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--green-dark);
    margin-bottom: 0.25rem;
}
.story-facts span { font-weight: 600; color: var(--brown-deep); }

/* ===== CAST SECTION ===== */
.cast-section { position: relative; padding: 6rem 0 7rem; }

.cast-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 2.5rem;
    align-items: stretch;
}

.cast-display {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: linear-gradient(160deg, var(--green-soft), var(--beige-dark));
    border: 4px solid var(--outline);
    border-radius: var(--radius-lg);
    box-shadow: var(--pop-lg);
    transition: background 0.4s ease;
}
.cast-display[data-theme="brown"] { background: linear-gradient(160deg, var(--brown-soft), var(--beige-dark)); }
.cast-display[data-theme="evil"] { background: linear-gradient(160deg, #4b2a63, var(--mahogany)); }

.cast-stage { flex: 1; min-width: 0; }

.cast-portrait { position: relative; aspect-ratio: 3 / 4; }
.cast-portrait img { width: 100%; height: 100%; object-fit: contain; }
.cast-portrait.is-swapping { animation: castSwap 0.35s ease; }
@keyframes castSwap {
    0% { opacity: 0; transform: translateY(14px) scale(0.97); }
    100% { opacity: 1; transform: none; }
}

.cast-portrait-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    height: 100%;
    border: 3px dashed rgba(35, 0, 7, 0.35);
    border-radius: var(--radius);
    background: rgba(246, 236, 217, 0.55);
}
.cast-initial {
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 7rem);
    color: var(--brown-deep);
    text-shadow: 5px 5px 0 rgba(255, 255, 255, 0.5);
}
.cast-placeholder-note {
    font-size: 0.72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.cast-display[data-theme="evil"] .cast-portrait-placeholder { background: rgba(16, 11, 0, 0.45); }
.cast-display[data-theme="evil"] .cast-initial { color: var(--purple-glow); text-shadow: 5px 5px 0 rgba(0, 0, 0, 0.6); }
.cast-display[data-theme="evil"] .cast-placeholder-note { color: var(--beige-dark); }

.cast-nav {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    font-size: 1.3rem;
    border-radius: 50%;
    background: var(--beige-light);
    border: 3px solid var(--outline);
    box-shadow: var(--pop-sm);
    color: var(--brown-deep);
    transition: transform 0.15s ease, background-color 0.2s ease;
}
.cast-nav:hover { background: var(--green); transform: scale(1.08); }

.cast-info { display: flex; flex-direction: column; justify-content: center; }

.cast-title {
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--green-dark);
    margin-bottom: 0.5rem;
}

.cast-name {
    font-size: clamp(2rem, 4.5vw, 3rem);
    color: var(--brown-deep);
    text-transform: uppercase;
    text-shadow: 3px 3px 0 var(--beige-dark);
    margin-bottom: 1rem;
}

.cast-desc { font-size: 1.05rem; color: var(--ink-soft); min-height: 7.5rem; }

/* Names the icon row as a control -- the tiles alone read as decoration. */
.cast-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.8rem;
    font-family: var(--font-display);
    font-size: 0.72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--green-dark);
}
.cast-hint-chevron {
    width: 8px;
    height: 8px;
    border-top: 3px solid var(--green-dark);
    border-right: 3px solid var(--green-dark);
    transform: rotate(135deg);
    animation: scrollNudge 1.8s ease-in-out infinite;
}

.cast-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 0.7rem;
    list-style: none;
}

.cast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    overflow: hidden;
    background: var(--green-soft);
    border: 3px solid var(--outline);
    border-radius: 14px;
    box-shadow: var(--pop-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease;
}
.cast-icon--brown { background: var(--brown-soft); }
.cast-icon--evil { background: #6b3f8c; }

.cast-icon img { width: 100%; height: 100%; object-fit: cover; }

.cast-icon-initial {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--brown-deep);
}
.cast-icon--evil .cast-icon-initial { color: var(--beige-light); }

.cast-icon:hover { transform: translate(-2px, -2px); box-shadow: var(--pop-md); }
.cast-icon.is-active {
    transform: translate(-3px, -3px);
    box-shadow: var(--pop-md);
    outline: 3px solid var(--green-deep);
    outline-offset: 2px;
}
.cast-icon--evil.is-active { outline-color: var(--purple-glow); }

/* Fevil's secret. Sits off to the side and only exists once he's selected. */
.secret-crystal {
    position: absolute;
    right: clamp(8px, 4vw, 60px);
    bottom: -40px;
    z-index: 3;
    display: none;
    width: 46px;
    height: 74px;
}
.secret-crystal.is-revealed { display: block; animation: crystalFadeIn 1.2s ease forwards; }

.crystal-shape {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, var(--purple-glow), var(--purple) 55%, #4b2a63);
    clip-path: polygon(50% 0%, 100% 32%, 78% 100%, 22% 100%, 0% 32%);
    filter: drop-shadow(0 0 14px rgba(196, 140, 255, 0.75));
    animation: crystalFloat 3.2s ease-in-out infinite;
}
.secret-crystal:hover .crystal-shape { filter: drop-shadow(0 0 26px rgba(196, 140, 255, 1)); }

@keyframes crystalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes crystalFloat {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-12px) rotate(3deg); }
}

/* ===== CTA ===== */
.cta-section {
    padding: 6rem 0;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(94, 209, 83, 0.25), rgba(125, 85, 24, 0.2)),
        var(--beige);
    border-top: 4px solid var(--outline);
}

.cta-title {
    font-size: clamp(2.6rem, 9vw, 5.5rem);
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 6px 6px 0 var(--outline);
    margin-bottom: 0.8rem;
}

.cta-sub { font-size: 1.15rem; color: var(--ink-soft); margin-bottom: 2.5rem; }
.cta-note { margin-top: 1.6rem; font-size: 0.85rem; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-soft); }

/* ===== NEWS PAGE ===== */
.news-hero {
    padding: calc(var(--nav-h) + 5rem) 0 3.5rem;
    text-align: center;
    background: linear-gradient(180deg, var(--brown-deep), var(--beige));
    border-bottom: 4px solid var(--outline);
}

.page-title {
    font-size: clamp(2.2rem, 6vw, 4rem);
    color: var(--green);
    text-transform: uppercase;
    text-shadow: 5px 5px 0 var(--mahogany);
    margin-bottom: 1rem;
}
.page-sub { max-width: 640px; margin: 0 auto; color: var(--ink-soft); }
.page-sub a { color: var(--green-dark); font-weight: 600; text-decoration: underline; }

.news-section { padding: 4rem 0 6rem; }

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.news-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--paper-raised);
    border: 4px solid var(--outline);
    border-radius: var(--radius-lg);
    box-shadow: var(--pop-md);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.news-card:hover { transform: translate(-3px, -3px); box-shadow: var(--pop-lg); }

.news-card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 3px solid var(--outline); }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.news-card:hover .news-card-img img { transform: scale(1.05); }

.news-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem; }

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.8rem;
    font-size: 0.78rem;
    color: var(--ink-soft);
}

.news-tag {
    padding: 0.2rem 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 999px;
    background: var(--green);
    border: 2px solid var(--outline);
    color: var(--mahogany);
}
.news-tag--steam { background: var(--brown-soft); }

.news-card-title { font-size: 1.3rem; line-height: 1.2; color: var(--brown-deep); margin-bottom: 0.7rem; }
.news-card-title a:hover { color: var(--green-dark); }

.news-card-excerpt { flex: 1; color: var(--ink-soft); margin-bottom: 1.2rem; }

.news-card-link { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase; color: var(--green-dark); }
.news-card-link:hover { color: var(--brown); }

.news-empty {
    max-width: 520px;
    margin: 2rem auto;
    padding: 3rem 2rem;
    text-align: center;
    background: var(--paper-raised);
    border: 4px dashed var(--outline);
    border-radius: var(--radius-lg);
}
.news-empty h2 { font-size: 1.6rem; color: var(--brown-deep); margin-bottom: 0.8rem; }
.news-empty p { color: var(--ink-soft); margin-bottom: 1.6rem; }

.news-status { margin-top: 2rem; text-align: center; font-size: 0.85rem; color: var(--ink-soft); }

/* ===== THE LAIR (secret page) ===== */
.page-dark { background: var(--black); color: var(--beige-dark); background-image: none; }
.page-dark .navbar { background: var(--mahogany); }

.lair-hero {
    position: relative;
    padding: calc(var(--nav-h) + 6rem) 0 4rem;
    text-align: center;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 0%, #351035, var(--black) 70%);
}

.lair-fog {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 40%, rgba(139, 79, 209, 0.18), transparent 55%),
                radial-gradient(circle at 72% 60%, rgba(139, 79, 209, 0.12), transparent 50%);
    animation: fogDrift 14s ease-in-out infinite alternate;
}
@keyframes fogDrift {
    from { transform: translate3d(-2%, 0, 0) scale(1); }
    to { transform: translate3d(2%, -3%, 0) scale(1.08); }
}

.lair-eyebrow {
    position: relative;
    font-size: 0.8rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--purple-glow);
    margin-bottom: 1rem;
}

.lair-title {
    position: relative;
    font-size: clamp(2rem, 6vw, 4rem);
    color: var(--beige-light);
    text-transform: uppercase;
    text-shadow: 4px 4px 0 var(--purple), 0 0 30px rgba(139, 79, 209, 0.6);
    margin-bottom: 1.2rem;
}

.lair-sub { position: relative; max-width: 600px; margin: 0 auto; color: var(--beige-dark); }

.lair-section { padding: 2rem 0 6rem; text-align: center; }

.lair-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.lair-card {
    padding: 2rem 1.5rem;
    background: rgba(35, 0, 7, 0.7);
    border: 3px solid rgba(139, 79, 209, 0.5);
    border-radius: var(--radius-lg);
}

.lair-card-art {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    margin-bottom: 1.2rem;
    border-radius: var(--radius);
    background: linear-gradient(160deg, #2a0f3a, var(--black));
    border: 2px dashed rgba(196, 140, 255, 0.35);
}
.lair-card-art span { font-family: var(--font-display); font-size: 4rem; color: var(--purple-glow); }

.lair-card-name { font-size: 1.5rem; color: var(--purple-glow); margin-bottom: 0.7rem; }
.lair-card-desc { color: var(--beige-dark); font-size: 0.98rem; }

.lair-footnote { margin-bottom: 2rem; color: var(--ink-soft); }
.lair-footnote a { color: var(--purple-glow); text-decoration: underline; }
.page-dark .btn-ghost { color: var(--purple-glow); border-color: var(--purple); }
.page-dark .btn-ghost:hover { background: var(--purple); color: var(--beige-light); }

/* ===== 404 ===== */
.error-page { padding: calc(var(--nav-h) + 7rem) 0 8rem; text-align: center; }
.error-code {
    font-family: var(--font-display);
    font-size: clamp(5rem, 20vw, 11rem);
    line-height: 1;
    color: var(--green);
    text-shadow: 8px 8px 0 var(--outline);
}
.error-title { font-size: clamp(1.6rem, 4vw, 2.6rem); color: var(--brown-deep); margin: 1rem 0; text-transform: uppercase; }
.error-sub { max-width: 480px; margin: 0 auto 2.5rem; color: var(--ink-soft); }
.error-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* ===== FOOTER ===== */
.site-footer {
    position: relative;
    /* Top padding clears the mirrored bush row overlapping the edge. */
    padding: clamp(6rem, 11vw, 9rem) 0 2.5rem;
    background: var(--brown-deep);
    color: var(--beige);
}

.footer-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 2.5rem;
}

.footer-logo { max-width: 200px; margin-bottom: 1rem; }
.footer-tagline { font-size: 0.95rem; color: var(--beige-dark); }

/* Bottom bar: game copyright on one side, site credit on the other, kept
   apart from the Credits column so the two don't read as one list. */
.footer-bottom {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem 1.5rem;
    margin-top: 3rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(233, 217, 187, 0.18);
}

.footer-copy,
.footer-made { font-size: 0.8rem; color: rgba(233, 217, 187, 0.6); }

/* Near-white rather than green: green on the brown footer only clears ~5:1,
   which is thin for text this small. This is ~8.5:1. */
.footer-made a {
    color: var(--beige-light);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(246, 236, 217, 0.45);
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.footer-made a:hover { color: var(--green); text-decoration-color: var(--green); }

.footer-heading {
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 1rem;
}

.footer-list, .footer-socials { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; font-size: 0.92rem; }
.footer-list a:hover, .footer-socials a:hover { color: var(--green); }
.footer-note { font-size: 0.9rem; color: rgba(233, 217, 187, 0.6); }

/* ===== SCROLL REVEAL ===== */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .cast-layout { grid-template-columns: 1fr; }
    .cast-portrait { aspect-ratio: 4 / 3; }
    .cast-desc { min-height: 0; }
    .footer-grid { grid-template-columns: 1fr 1fr; }

    /* Duo stacks: art band on top, copy flowing underneath it. */
    .duo { min-height: 0; padding-top: clamp(300px, 62vw, 430px); }
    .duo-art { top: 0; bottom: auto; height: clamp(290px, 60vw, 420px); width: 66%; }
    .duo-copies { position: static; }
    .duo-copy { position: static; width: 100%; text-align: center; transform: none; }
    .duo[data-active="bushy-man"] .duo-copy--bag-boy,
    .duo[data-active="bag-boy"] .duo-copy--bushy-man { display: none; }
    .duo-name { text-shadow: 3px 3px 0 var(--beige-dark); }
}

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

    .nav-menu {
        position: absolute;
        top: var(--nav-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 1rem;
        background: var(--brown-deep);
        border-bottom: 3px solid var(--black);
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s ease, transform 0.22s ease;
    }
    .nav-menu.is-open { transform: none; opacity: 1; pointer-events: auto; }
    .nav-menu .btn { margin-top: 0.6rem; }
    .navbar.at-top { background: var(--brown-deep); border-bottom-color: var(--black); }

    .trailer-play { width: 66px; height: 66px; }
    .trailer-play-tri { border-left-width: 19px; border-top-width: 12px; border-bottom-width: 12px; margin-left: 6px; }

    .duo-section, .story-section, .cast-section, .cta-section { padding: 4rem 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { justify-content: center; text-align: center; }
    .secret-crystal { right: 16px; bottom: -20px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    [data-reveal] { opacity: 1; transform: none; }
}
