/* Lasso Round-Up website
   One stylesheet for every page. Sections:
   1. Tokens & base   2. Nav   3. Hero scene   4. Sprites   5. Night sections
   6. Showcase device  7. Features  8. Tally  9. Herd  10. Ranchers  11. Promise
   12. Finale  13. Footer  14. Sub pages (press, support, privacy)  15. Motion & responsive */

/* 1. Tokens & base ---------------------------------------------------------- */
:root {
    --night: #1c110b;
    --night-2: #24160e;
    --night-3: #2f1d12;
    --line: rgba(255, 228, 190, 0.12);
    --cream: #fbefdc;
    --muted: #c7b199;
    --sand: #f4a460;
    --dust: #e8894a;
    --rust: #b7410e;
    --gold: #ffd34d;
    --gold-2: #f2b632;
    --rope: #e3c08a;
    --rope-dark: #5c2e0e;
    --sage: #87a96b;
    --sky: #87ceeb;
    --ink: #2a170c;

    --display: 'Rye', 'Georgia', serif;
    --text: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, sans-serif;

    --radius: 22px;
    --gutter: clamp(16px, 4vw, 40px);
    --maxw: 1180px;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--text);
    font-size: 17px;
    line-height: 1.55;
    color: var(--cream);
    background: var(--night);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 820px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 14px;
}
.display {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(34px, 5.4vw, 64px);
    line-height: 1.08;
    letter-spacing: .005em;
    color: var(--cream);
    text-wrap: balance;
}
.display--sm { font-size: clamp(28px, 3.4vw, 42px); }
.lede {
    font-size: clamp(18px, 1.6vw, 21px);
    color: var(--muted);
    max-width: 640px;
    text-wrap: pretty;
}
.section-head { text-align: center; margin: 0 auto clamp(40px, 6vw, 72px); max-width: 820px; }
.section-head .lede { margin: 18px auto 0; }

.pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f39a55, #d2691e);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 18px rgba(210, 105, 30, .35);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.pill:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 24px rgba(210, 105, 30, .45); }

/* Japanese and Korean pages: the game's own display faces (Rye has no CJK), system text faces. */
html:lang(ja) {
    --display: 'Dela Gothic One', 'Rye', sans-serif;
    --text: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic', Meiryo, sans-serif;
    line-break: strict;
}
html:lang(ko) {
    --display: 'Black Han Sans', 'Rye', sans-serif;
    --text: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    word-break: keep-all;
}
html:lang(ja) :is(h1, h2, h3, .display) { word-break: auto-phrase; }

/* 2. Nav --------------------------------------------------------------------- */
.header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    padding-top: env(safe-area-inset-top);
    transition: background .35s var(--ease), box-shadow .35s var(--ease), backdrop-filter .35s;
}
.header.is-solid,
body:not(.home) .header {
    background: rgba(28, 17, 11, .72);
    backdrop-filter: saturate(160%) blur(18px);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    box-shadow: 0 1px 0 var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav__logo img { height: 38px; width: auto; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .25)); }
.home .header:not(.is-solid) .nav__logo { opacity: 0; pointer-events: none; }
.nav__logo { transition: opacity .3s; }
.nav__menu { display: flex; align-items: center; gap: 6px; }
.nav__menu a:not(.pill) {
    display: block;
    padding: 8px 14px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 999px;
    transition: background .2s;
}
.nav__menu a:not(.pill):hover { background: rgba(255, 255, 255, .12); }
.home .header:not(.is-solid) .nav__menu a:not(.pill) { color: var(--ink); }
.home .header:not(.is-solid) .nav__menu a:not(.pill):hover { background: rgba(255, 255, 255, .45); }
.nav__cta { margin-left: 8px; }
/* Language: a globe and code over an invisible native select, so phones get their own picker. */
.lang-pick {
    position: relative; display: flex; align-items: center; gap: 6px;
    padding: 8px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; letter-spacing: .04em;
    cursor: pointer; transition: background .2s;
}
.lang-pick:hover, .lang-pick:focus-within { background: rgba(255, 255, 255, .12); }
.lang-pick svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang-pick select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.home .header:not(.is-solid) .lang-pick { color: var(--ink); }
.home .header:not(.is-solid) .lang-pick:hover { background: rgba(255, 255, 255, .45); }
.nav__toggle { display: none; width: 44px; height: 44px; position: relative; }
.nav__toggle span {
    position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px;
    background: currentColor; transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 25px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }
.home .header:not(.is-solid) .nav__toggle { color: var(--ink); }

/* 3. Hero scene -------------------------------------------------------------- */
.hero {
    --ground: 40%;
    --hills: clamp(70px, 10vw, 150px);
    position: relative;
    height: clamp(640px, 100svh, 1000px);
    overflow: hidden;
    isolation: isolate;
    color: var(--ink);
}
.scene, .scene > * { position: absolute; }
.scene { inset: 0; z-index: -1; }
.scene__sky {
    inset: 0;
    background: linear-gradient(180deg, #7cc6ea 0%, #a9dbef 30%, #d9ecee 52%, #f6e3c6 62%);
}
.cloud { width: auto; opacity: .95; will-change: transform; animation: drift linear infinite; left: 0; }
.cloud--1 { top: 13%; height: clamp(46px, 6vw, 84px); animation-duration: 95s; animation-delay: -30s; }
.cloud--2 { top: 6%; height: clamp(56px, 7vw, 104px); animation-duration: 130s; animation-delay: -95s; }
.cloud--3 { top: 24%; height: clamp(34px, 4vw, 58px); animation-duration: 80s; animation-delay: -12s; opacity: .85; }
@keyframes drift { from { transform: translateX(105vw); } to { transform: translateX(-320px); } }

.layer { left: 0; right: 0; overflow: hidden; }
.layer > div {
    position: absolute; top: 0; bottom: 0; left: 0;
    width: calc(100% + var(--tile));
    background-repeat: repeat-x;
    background-size: auto 100%;
    will-change: transform;
    animation: scroll linear infinite;
}
@keyframes scroll { to { transform: translate3d(calc(-1 * var(--tile)), 0, 0); } }
.layer--mountains {
    --h: calc(var(--hills) * .95);
    --tile: calc(var(--h) * 9.153);
    height: var(--h);
    bottom: calc(var(--ground) + var(--hills) * .3);
}
.layer--mountains > div { background-image: url(../images/scene/mountains.webp); animation-duration: 110s; }
.layer--hills {
    --tile: calc(var(--hills) * 7.212);
    height: var(--hills);
    bottom: calc(var(--ground) - 2px);
}
.layer--hills > div { background-image: url(../images/scene/hills.webp); animation-duration: 34s; }
.layer--ground {
    --tile: clamp(260px, 30vw, 420px);
    bottom: 0;
    height: var(--ground);
}
.layer--ground > div {
    background-image: url(../images/scene/ground.webp);
    background-size: var(--tile) var(--tile);
    background-repeat: repeat;
    animation-duration: 1.7s;
}

.prop { bottom: 0; left: 0; will-change: transform; animation: pass linear infinite; }
.prop img { width: 100%; }
.prop--shrub { width: clamp(70px, 8vw, 120px); bottom: calc(var(--ground) * .72); animation-duration: 5.2s; animation-delay: -1.5s; }
.prop--rock { width: clamp(56px, 6vw, 92px); bottom: calc(var(--ground) * .06); animation-duration: 3.4s; animation-delay: -2.6s; }
@keyframes pass { from { transform: translateX(110vw); } to { transform: translateX(-200px); } }

.scene__dust {
    left: 0; right: 0; bottom: 0; height: 22%;
    background: linear-gradient(180deg, rgba(28, 17, 11, 0) 0%, rgba(28, 17, 11, .5) 55%, var(--night) 100%);
    z-index: 3;
}

/* The rider, the roped cow and the herd share one box so the rope stays on them at any size. */
.troupe {
    left: 50%;
    bottom: 7%;
    height: min(44%, 46vw);
    aspect-ratio: 100 / 40;
    transform: translateX(-46%);
    z-index: 2;
}
.actor { position: absolute; }
.actor .sprite { width: 100%; }
.actor::after {
    content: ""; position: absolute; left: 14%; right: 14%; bottom: -1%; height: 9%;
    background: radial-gradient(closest-side, rgba(70, 30, 8, .35), transparent);
    z-index: -1;
}
.actor--rider { left: 4%; bottom: 0; width: 30%; animation: bob .29s ease-in-out infinite alternate; }
.actor--cow { left: 52%; bottom: 1%; width: 24%; animation: tug 2.4s ease-in-out infinite; }
.actor--goat { left: -6%; bottom: 42%; width: 12%; animation: roam 9s ease-in-out infinite; }
.actor--sheep { left: 34%; bottom: 52%; width: 9%; animation: roam 7s ease-in-out infinite reverse; }
.actor--bull { left: 82%; bottom: 30%; width: 22%; animation: roam 11s ease-in-out infinite; animation-delay: -4s; }
@keyframes bob { to { transform: translateY(-1.2%); } }
@keyframes tug { 50% { transform: translateX(-1.5%); } }
@keyframes roam { 50% { transform: translateX(14%); } }

.rope { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.rope__line { fill: none; stroke: var(--rope); stroke-width: .34; stroke-linecap: round; }
.rope__line--back { stroke: var(--rope-dark); stroke-width: .62; }
.rope__loop { fill: none; stroke: var(--rope); stroke-width: .34; }
.rope__loop--back { stroke: var(--rope-dark); stroke-width: .62; }

.hero__content {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: calc(76px + env(safe-area-inset-top));
}
.hero__logo {
    width: min(620px, 82vw);
    filter: drop-shadow(0 10px 20px rgba(92, 46, 14, .28));
    animation: rise 1s var(--ease) both;
}
.hero__tagline {
    margin-top: clamp(4px, 1vw, 12px);
    font-family: var(--display);
    font-size: clamp(22px, 2.6vw, 34px);
    color: #6b2f0c;
    animation: rise 1s .12s var(--ease) both;
}
.hero__sub {
    margin-top: 6px;
    font-size: clamp(15px, 1.4vw, 18px);
    font-weight: 500;
    color: rgba(42, 23, 12, .78);
    animation: rise 1s .2s var(--ease) both;
}
.hero__cta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: clamp(16px, 2.2vw, 26px);
    animation: rise 1s .28s var(--ease) both;
}
.appstore img { height: 52px; width: auto; transition: transform .2s var(--ease); }
.appstore:hover img { transform: scale(1.04); }
.hero__soon {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #6b2f0c;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.hero__scroll {
    position: absolute; left: 50%; bottom: 22px; z-index: 5;
    width: 26px; height: 42px; margin-left: -13px;
    border: 2px solid rgba(251, 239, 220, .7); border-radius: 14px;
}
.hero__scroll span {
    position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
    border-radius: 2px; background: var(--cream);
    animation: wheel 1.8s var(--ease) infinite;
}
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* 4. Sprites ------------------------------------------------------------------
   Each sheet is one row of equal frames (marketing/tools/build_website_assets.py). The element
   keeps a frame's aspect ratio; steps(n, jump-none) lands on each of the n frames in turn. */
.sprite {
    --n: 7;
    background-repeat: no-repeat;
    background-size: calc(var(--n) * 100%) 100%;
    animation: frames var(--t, .6s) steps(var(--n), jump-none) infinite;
}
@keyframes frames { from { background-position: 0 0; } to { background-position: 100% 0; } }
.sprite--rookie   { background-image: url(../images/sprites/rookie.webp);   aspect-ratio: 418 / 383; --t: .56s; }
.sprite--wrangler { background-image: url(../images/sprites/wrangler.webp); aspect-ratio: 415 / 382; --t: .6s; }
.sprite--outrider { background-image: url(../images/sprites/outrider.webp); aspect-ratio: 426 / 389; --t: .5s; }
.sprite--legend   { background-image: url(../images/sprites/legend.webp);   aspect-ratio: 423 / 391; --t: .56s; }
.sprite--sheep    { background-image: url(../images/sprites/sheep.webp);    aspect-ratio: 231 / 146; --t: .5s; }
.sprite--cow      { background-image: url(../images/sprites/cow.webp);      aspect-ratio: 368 / 191; --t: .56s; }
.sprite--bull     { background-image: url(../images/sprites/bull.webp);     aspect-ratio: 485 / 236; --t: 1.2s; --n: 15; }
.sprite--goat     { background-image: url(../images/sprites/goat.webp);     aspect-ratio: 313 / 225; --t: 1.2s; --n: 15; }

/* 5. Night sections ---------------------------------------------------------- */
.night { position: relative; padding: clamp(80px, 11vw, 150px) 0; }
.night + .night { padding-top: 0; }

/* 6. Showcase device --------------------------------------------------------- */
.showcase { padding-top: clamp(40px, 6vw, 80px); }
.device { position: relative; max-width: 1060px; margin: 0 auto; }
.device__frame {
    position: relative;
    padding: 1.15%;
    border-radius: clamp(26px, 5vw, 58px);
    background: linear-gradient(145deg, #6b5a4c, #2b221c 30%, #120d0a 60%, #4a3c31);
    box-shadow:
        inset 0 0 0 1.5px rgba(255, 255, 255, .14),
        0 40px 90px -20px rgba(0, 0, 0, .7),
        0 0 0 1px rgba(0, 0, 0, .6);
}
.device__screen {
    position: relative;
    aspect-ratio: 2868 / 1320;
    border-radius: clamp(20px, 4.2vw, 48px);
    overflow: hidden;
    background: #000;
    box-shadow: 0 0 0 clamp(4px, .7vw, 8px) #050505;
}
.device__screen img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transform: scale(1.03);
    transition: opacity .9s var(--ease), transform 4.5s linear;
}
.device__screen img.is-active { opacity: 1; transform: scale(1); }
.device__island {
    position: absolute; z-index: 2;
    left: calc(1.15% + clamp(4px, .7vw, 8px) + 1.1%);
    top: 50%; width: 1.9%; height: 15%; transform: translateY(-50%);
    border-radius: 999px; background: #000;
}
.device__glow {
    position: absolute; inset: 12% 8% -8%; z-index: -1;
    background: radial-gradient(closest-side, rgba(244, 164, 96, .35), transparent);
    filter: blur(40px);
}

.tabs {
    display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 28px;
    margin: clamp(28px, 4vw, 44px) auto 0; max-width: 980px;
}
.tabs button {
    font-size: 15px; font-weight: 600; color: var(--muted);
    padding: 12px 2px 4px; text-align: left; transition: color .2s;
}
.tabs button:hover, .tabs button.is-active { color: var(--cream); }
.tabs__bar { display: block; height: 3px; width: 100%; border-radius: 3px; background: rgba(255, 255, 255, .14); overflow: hidden; margin-bottom: 10px; }
.tabs__bar i { display: block; height: 100%; width: 0; background: var(--gold); border-radius: 3px; }
.tabs button.is-active .tabs__bar i { width: 100%; }
.tabs.is-playing button.is-active .tabs__bar i { animation: fill var(--slide, 5s) linear both; }
@keyframes fill { from { width: 0; } to { width: 100%; } }

/* 7. Features ---------------------------------------------------------------- */
.features .container { display: grid; gap: clamp(72px, 10vw, 140px); }
.feature { display: grid; grid-template-columns: 7fr 5fr; align-items: center; gap: clamp(28px, 5vw, 72px); }
.feature--flip { grid-template-columns: 5fr 7fr; }
/* Long words in some languages mustn't widen the row past a narrow phone. */
.feature > * { min-width: 0; }
h1, h2, h3, .display { overflow-wrap: break-word; }
.feature--flip .feature__media { order: 2; }
.feature__media {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .75), 0 0 0 1px var(--line);
    aspect-ratio: 16 / 10;
    background: var(--night-3);
}
.feature__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.feature:hover .feature__media img { transform: scale(1.035); }
.feature__text p:not(.eyebrow) { margin-top: 18px; color: var(--muted); font-size: 18px; max-width: 460px; }

/* 8. Tally ------------------------------------------------------------------- */
.tally__grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
    padding: clamp(28px, 4vw, 44px) 0;
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    text-align: center;
}
.tally strong {
    display: block;
    font-family: var(--display); font-weight: 400;
    font-size: clamp(48px, 7vw, 92px); line-height: 1;
    background: linear-gradient(180deg, #ffe58a, var(--gold-2) 60%, #c47f17);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    font-variant-numeric: tabular-nums;
}
.tally span { display: block; margin-top: 10px; color: var(--muted); font-size: 15px; font-weight: 600; }

/* 9. Herd -------------------------------------------------------------------- */
.herd__grid, .ranchers__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.critter, .rancher {
    position: relative;
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--night-3), var(--night-2));
    box-shadow: inset 0 0 0 1px var(--line);
    overflow: hidden;
    transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.critter:hover, .rancher:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 1px rgba(255, 211, 77, .35), 0 24px 50px -20px rgba(0, 0, 0, .8); }
.critter__stage, .rancher__stage {
    position: relative;
    display: flex; align-items: flex-end; justify-content: center;
    background:
        linear-gradient(180deg, transparent 62%, rgba(28, 17, 11, .25)),
        url(../images/scene/hills.webp) 0 24% / auto 26% repeat-x,
        linear-gradient(180deg, #8fd0ec 0%, #d6ecef 30%, #f6e3c6 44%) 0 0 / 100% 44% no-repeat,
        url(../images/scene/ground.webp) 0 0 / 220px 220px;
    animation: ground-run 1.3s linear infinite;
    animation-play-state: paused;
}
.critter__stage { aspect-ratio: 16 / 11; padding: 0 12% 7%; }
.critter:hover .critter__stage, .rancher:hover .rancher__stage, .is-live .critter__stage, .is-live .rancher__stage { animation-play-state: running; }
@keyframes ground-run { to { background-position: 0 0, -120px 24%, 0 0, -220px 0; } }
.critter__stage .sprite { width: 100%; filter: drop-shadow(0 8px 6px rgba(70, 30, 8, .3)); }
.critter:nth-child(1) .critter__stage .sprite { width: 62%; }
.critter:nth-child(3) .critter__stage .sprite { width: 76%; }
.critter__body { padding: 20px 22px 24px; }
.critter h3, .rancher h3 { font-family: var(--display); font-weight: 400; font-size: clamp(20px, 1.9vw, 24px); letter-spacing: .01em; text-wrap: balance; }
.critter p { margin-top: 6px; color: var(--muted); font-size: 15px; }
.critter__pts {
    position: absolute; top: 14px; right: 14px;
    display: flex; align-items: baseline; gap: 3px;
    padding: 4px 11px 5px; border-radius: 999px;
    background: rgba(28, 17, 11, .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    font-weight: 800; font-size: 16px; color: var(--gold);
}
.critter__pts small { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.critter--prize { box-shadow: inset 0 0 0 1px rgba(255, 211, 77, .3); }

/* 10. Ranchers --------------------------------------------------------------- */
.rancher { padding-bottom: 24px; }
.rancher__stage { aspect-ratio: 1 / .92; padding: 0 9% 2%; }
.rancher__stage .sprite { width: 100%; filter: drop-shadow(0 10px 8px rgba(70, 30, 8, .3)); }
.rancher__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 20px 22px 0; }
.rancher__tag { padding: 4px 22px 0; color: var(--muted); font-size: 15px; }
.rancher__unlock {
    position: absolute; top: 14px; right: 14px;
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 13px; font-weight: 800; color: var(--gold);
    padding: 4px 11px 5px; border-radius: 999px;
    background: rgba(28, 17, 11, .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.rancher__unlock img { width: 16px; height: 16px; }
.rancher__unlock--open { color: #b5d69a; }
/* One grid for all four rows, so the bars line up however long the language's labels run. */
.stats { padding: 16px 22px 0; display: grid; grid-template-columns: minmax(108px, max-content) 1fr; align-items: center; gap: 10px; }
.stats div { display: contents; }
.stats dt { white-space: nowrap; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stats dd { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.stats i {
    display: block; height: 100%; border-radius: 6px; background: var(--accent);
    width: calc(var(--v) * 100%); transform-origin: left; transform: scaleX(0);
    transition: transform 1.1s var(--ease);
}
.rancher.is-in .stats i { transform: scaleX(1); }
.rancher.is-in .stats div:nth-child(2) i { transition-delay: .08s; }
.rancher.is-in .stats div:nth-child(3) i { transition-delay: .16s; }
.rancher.is-in .stats div:nth-child(4) i { transition-delay: .24s; }

/* 11. Promise ---------------------------------------------------------------- */
.promise__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.promise__grid li {
    padding: 28px 24px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .035);
    box-shadow: inset 0 0 0 1px var(--line);
}
.promise svg { width: 34px; height: 34px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.promise h3 { margin-top: 16px; font-size: 19px; font-weight: 700; }
.promise p { margin-top: 6px; color: var(--muted); font-size: 15px; }

/* 12. Finale ----------------------------------------------------------------- */
.finale {
    position: relative; isolation: isolate;
    min-height: clamp(560px, 80vh, 820px);
    display: flex; align-items: center;
    padding: 120px 0 100px;
    text-align: center;
    overflow: hidden;
}
.finale__art {
    position: absolute; inset: 0; z-index: -1;
    background: url(../images/hero-art.webp) center 60% / cover no-repeat;
    filter: blur(3px) saturate(1.1);
    transform: scale(1.04);
}
.finale__art::after {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(48% 46% at 50% 52%, rgba(28, 17, 11, .62), rgba(28, 17, 11, 0)),
        linear-gradient(180deg, var(--night) 0%, rgba(28, 17, 11, .45) 26%, rgba(28, 17, 11, .3) 60%, rgba(28, 17, 11, .9) 100%);
}
.finale__content { display: flex; flex-direction: column; align-items: center; }
.finale__icon {
    width: clamp(96px, 11vw, 128px); height: auto;
    border-radius: 22.5%;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .12);
    margin-bottom: 26px;
}
.finale .display { text-shadow: 0 4px 30px rgba(0, 0, 0, .5); }
.finale .lede { margin-top: 14px; color: var(--cream); text-shadow: 0 2px 16px rgba(0, 0, 0, .6); }
.finale .hero__cta { animation: none; }
.finale__fine { margin-top: 22px; font-size: 14px; color: rgba(251, 239, 220, .82); text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }

/* 13. Footer ----------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); background: var(--night); }
.footer__inner { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 20px 32px; }
.footer__brand img { height: 34px; width: auto; }
.footer__links { display: flex; justify-content: flex-end; gap: 26px; font-size: 15px; font-weight: 600; color: var(--muted); }
.footer__links a:hover { color: var(--cream); }
.footer__langs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.footer__langs a:hover, .footer__langs a[aria-current] { color: var(--cream); }
.footer__langs a[aria-current] { font-weight: 700; }
.footer__copy { grid-column: 1 / -1; font-size: 13px; color: rgba(199, 177, 153, .7); }

/* 14. Sub pages -------------------------------------------------------------- */
.page-header {
    position: relative; isolation: isolate; overflow: hidden;
    padding: calc(140px + env(safe-area-inset-top)) 0 64px;
    text-align: center;
}
.page-header::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: url(../images/hero-art.webp) center 55% / cover no-repeat;
    opacity: .35;
    mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
}
.page-header__title { font-family: var(--display); font-weight: 400; font-size: clamp(38px, 6vw, 64px); line-height: 1.1; }
.page-header__subtitle { margin-top: 12px; font-size: 19px; color: var(--muted); }

.legal { padding: 8px 0 110px; }
.legal__content {
    padding: clamp(28px, 5vw, 56px);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .035);
    box-shadow: inset 0 0 0 1px var(--line);
    color: #eadbc6;
}
.legal__content h2 { font-family: var(--display); font-weight: 400; font-size: 28px; color: var(--cream); margin: 44px 0 14px; }
.legal__content h2:first-of-type { margin-top: 28px; }
.legal__content h3 { font-size: 19px; color: var(--cream); margin: 26px 0 8px; }
.legal__content p { margin-bottom: 14px; }
.legal__content ul { list-style: none; margin: 0 0 16px; display: grid; gap: 8px; }
.legal__content ul li { position: relative; padding-left: 22px; }
.legal__content ul li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--dust); }
.legal__content a { color: var(--gold); text-decoration: underline; text-decoration-color: rgba(255, 211, 77, .4); text-underline-offset: 3px; }
.legal__content a:hover { text-decoration-color: var(--gold); }
.legal__content strong { color: var(--cream); }
.legal__updated { color: var(--muted); font-size: 15px; }

.press-shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 8px 0 18px; }
.press-shots a { display: block; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); transition: transform .3s var(--ease); }
.press-shots a:hover { transform: translateY(-3px); }
.legal__content .press-shots a { text-decoration: none; }

/* 15. Motion & responsive ---------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
.scene.is-paused *, .scene.is-paused { animation-play-state: paused !important; }

@media (max-width: 1020px) {
    .herd__grid, .ranchers__grid, .promise__grid { grid-template-columns: repeat(2, 1fr); }
    .feature, .feature--flip { grid-template-columns: 1fr; }
    .feature--flip .feature__media { order: 0; }
    .feature__text p:not(.eyebrow) { max-width: 620px; }
}

@media (max-width: 760px) {
    body { font-size: 16px; }
    .nav__toggle { display: block; }
    .nav__menu {
        position: absolute; top: 100%; left: 12px; right: 12px;
        flex-direction: column; align-items: stretch; gap: 2px;
        padding: 10px;
        border-radius: 20px;
        background: #24160e;
        backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
        box-shadow: 0 20px 50px rgba(0, 0, 0, .45), inset 0 0 0 1px var(--line);
        opacity: 0; transform: translateY(-8px) scale(.98); pointer-events: none;
        transition: opacity .25s var(--ease), transform .25s var(--ease);
    }
    .nav__menu.is-open { opacity: 1; transform: none; pointer-events: auto; }
    .home .header:not(.is-solid) .nav__menu a:not(.pill) { color: var(--cream); }
    .nav__menu a:not(.pill) { padding: 12px 14px; font-size: 17px; }
    .nav__cta { margin: 6px 0 0; }
    .lang-pick { padding: 12px 14px; font-size: 17px; }
    .home .header:not(.is-solid) .lang-pick { color: var(--cream); }
    .nav__cta .pill { display: flex; justify-content: center; padding: 12px; font-size: 16px; }

    .hero { --ground: 42%; height: clamp(600px, 100svh, 860px); }
    .troupe { height: min(30%, 52vw); transform: translateX(-41%); bottom: 9%; }
    .hero__scroll { display: none; }
    .tally__grid { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
    .tabs { gap: 4px 18px; }
    .tabs button { font-size: 13px; }
    .footer__inner { grid-template-columns: 1fr; }
    .footer__links { justify-content: flex-start; }
    .press-shots { grid-template-columns: 1fr; }

    /* Ranchers become a swipeable row. */
    .ranchers__grid {
        grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(78vw, 320px);
        overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
        margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 10px;
        scroll-padding: 0 var(--gutter);
    }
    .ranchers__grid::-webkit-scrollbar { display: none; }
    .rancher { scroll-snap-align: start; }
    .rancher:hover { transform: none; }
}

@media (max-width: 520px) {
    .herd__grid, .promise__grid { grid-template-columns: 1fr; }
    .critter { display: grid; grid-template-columns: 42% 1fr; align-items: center; }
    .critter__stage { aspect-ratio: 1 / 1; height: 100%; padding: 0 8% 12%; }
    .critter__body { padding: 16px 16px 16px 18px; }
    .critter__pts { top: auto; bottom: 10px; left: 10px; right: auto; }
    .tabs button { flex: 1 1 40%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
    .sprite { animation: none !important; }
    .reveal { opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}
