/* Snack Pack Studio: site layer on top of the Codrops foundation (base.css).
   Tokens from claude/snack-pack-site-visual-reference.md. */

@font-face { font-family: "Bricolage"; src: url(../fonts/bricolage-grotesque-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url(../fonts/bricolage-grotesque-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Geist"; src: url(../fonts/geist-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url(../fonts/geist-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
	--bg: #F8F7F4;
	--surface: #FFFFFF;
	--ink: #0A0A0F;
	--muted: #5A5A66;
	--line: #E4E2DC;
	--red: #A3231B;
	--red-deep: #7E1A14;
	--gold: #B8893B;
	--on-red: #F8F7F4;
	--display: "Bricolage", "Geist", -apple-system, sans-serif;
	--radius: 14px;
	--gutter: clamp(16px, 4vw, 48px);
	--max: 1240px;
}

html { scroll-behavior: auto; }
body { font-size: 1rem; line-height: 1.6; }
img, video { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.02; margin: 0; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 999; border-radius: 8px; }
.skip:focus { left: 8px; }

/* Buttons and links */
.btn { display: inline-flex; align-items: center; gap: 0.5em; font: 500 0.95rem/1 "Geist", sans-serif; padding: 1rem 1.4rem; border-radius: 999px; border: 0; cursor: pointer; transition: background-color 0.2s ease-out, color 0.2s ease-out; }
.btn--red { background: var(--red); color: var(--on-red); }
.btn--red:hover { background: var(--red-deep); color: var(--on-red); }
.btn--ink { background: var(--ink); color: var(--bg); }
.btn--ink:hover { background: #24242c; color: var(--bg); }
.textlink { color: var(--ink); border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.textlink:hover { color: var(--red); }

/* AI label: required on every presenter image and clip */
.ai-tag { position: absolute; top: 10px; left: 10px; z-index: 5; font: 500 0.62rem/1 "Geist", sans-serif; letter-spacing: 0.06em; text-transform: uppercase; background: rgba(10,10,15,0.72); color: #F8F7F4; padding: 5px 7px; border-radius: 6px; pointer-events: none; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 200; background: rgba(248,247,244,0.92); border-bottom: 1px solid transparent; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; color: var(--ink); display: inline-flex; align-items: center; gap: 10px; }
.wordmark:hover { color: var(--ink); }
.wordmark__mark { width: 26px; height: 26px; flex: none; }
.nav__links { display: none; gap: 28px; font-size: 0.9rem; }
.nav__links a { color: var(--ink); }
.nav__links a:hover { color: var(--red); }
.nav .btn { padding: 0.75rem 1.1rem; font-size: 0.85rem; }

/* Hero */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 120px); }
.hero .wrap { display: grid; gap: clamp(40px, 6vw, 80px); align-items: center; }
.hero__title { font-size: clamp(2.5rem, 7.2vw, 5.4rem); }
.hero__title span { display: block; }
.hero__title .red { color: var(--red); }
.hero__sub { margin-top: 24px; font-size: 1.1rem; color: var(--muted); max-width: 34ch; }
.hero__actions { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.hero__note { margin-top: 28px; font-size: 0.85rem; color: var(--muted); }

/* The 3-pack tray (static in round 1; Three.js replaces it in round 2) */
.tray { position: relative; background: var(--red); border-radius: 28px; padding: clamp(18px, 3vw, 32px); padding-top: clamp(40px, 5vw, 56px); }
.tray__label { position: absolute; top: 26px; right: clamp(18px, 3vw, 32px); font: 500 0.7rem/1 "Geist", sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(248,247,244,0.8); }
.tray__phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 2vw, 22px); }
.phone { position: relative; margin: 0; }
.phone__screen { position: relative; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: var(--ink); border: 4px solid var(--ink); box-shadow: 0 18px 40px rgba(60, 8, 4, 0.35); }
.phone__screen video, .phone__screen img { width: 100%; height: 100%; object-fit: cover; }
.phone figcaption { margin-top: 12px; color: var(--on-red); font-size: 0.8rem; line-height: 1.3; }
.phone figcaption b { display: block; font-family: var(--display); font-weight: 600; font-size: 1rem; }

/* Foundation intro pour */
.project__name, .project__date { font-weight: 500; }
.project__title { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; }
.project__title-line { display: block; }
.project__title-line--red { color: var(--red); }

/* Media inside foundation gallery items */
.gallery__item { overflow: hidden; }
.gallery__item > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery--row .caption p { font-family: var(--display); font-weight: 600; line-height: 1.15; }
.hook { position: absolute; left: 8%; right: 8%; top: 12%; font-family: var(--display); font-weight: 800; font-size: clamp(0.8rem, 1.6vw, 1.35rem); line-height: 1.1; color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,0.55); text-align: center; }
.gallery--stack .caption h2 { font-size: clamp(1.8rem, 4vw, 3.2rem); color: var(--ink); margin-bottom: 14px; }
.gallery--stack .caption p { color: var(--muted); max-width: 46ch; }

/* Sections */
.section { padding: clamp(72px, 10vw, 140px) 0; }
.section__head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); max-width: 760px; }
.section__head h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
.section__head p { color: var(--muted); font-size: 1.05rem; max-width: 56ch; }

/* Roster */
.roster { display: grid; gap: 20px; grid-template-columns: 1fr; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; }
.card__media { position: relative; aspect-ratio: 3 / 4; background: #ece9e2; }
.card__media img, .card__media video { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 18px 18px 20px; display: grid; gap: 6px; }
.card__name { font-family: var(--display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; }
.card__cat { color: var(--muted); font-size: 0.92rem; }
.card__status { justify-self: start; margin-top: 8px; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; background: #f1ede6; color: var(--ink); }
.card__status--open { background: var(--red); color: var(--on-red); }
.card__thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 0 18px 18px; }
.card__thumbs img { aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; width: 100%; }

/* Formats */
.formats { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.format { display: grid; grid-template-columns: 3rem 1fr; gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.format__n { font-family: var(--display); font-weight: 600; color: var(--red); }
.format h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.format p { color: var(--muted); font-size: 0.95rem; margin-top: 4px; }

/* Compare */
.compare { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 18px 16px; border-bottom: 1px solid var(--line); }
.compare thead th { font-family: var(--display); font-weight: 600; font-size: 1.05rem; border-bottom: 2px solid var(--ink); }
.compare thead th.us { color: var(--red); }
.compare tbody th { font-weight: 500; width: 18%; }
.compare td.them { color: var(--muted); width: 32%; }
.compare td.us { background: rgba(163,35,27,0.05); }
.compare-note { margin-top: 24px; font-family: var(--display); font-weight: 600; font-size: clamp(1.2rem, 2.4vw, 1.6rem); max-width: 30ch; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; counter-increment: step; display: grid; gap: 10px; align-content: start; }
.step::before { content: counter(step); font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--red); }
.step h3 { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; }
.step__meta { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.step p { color: var(--muted); }

/* Pricing */
.prices { display: grid; gap: 20px; grid-template-columns: 1fr; }
.price { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.price--main { background: var(--red); color: var(--on-red); border-color: var(--red); }
.price h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
.price__amt { font-family: var(--display); font-weight: 800; font-size: 3rem; letter-spacing: -0.03em; line-height: 1; }
.price__amt small { font-family: "Geist", sans-serif; font-weight: 400; font-size: 0.95rem; letter-spacing: 0; opacity: 0.8; }
.price ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: 0.95rem; }
.price li { padding-left: 1.2em; position: relative; }
.price li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.price--main li::before { background: var(--gold); }
.price--main p, .price--main li { color: var(--on-red); }
.price__foot { margin-top: auto; padding-top: 10px; font-size: 0.85rem; opacity: 0.85; }
.scarcity { margin-top: 26px; font-size: 0.9rem; color: var(--muted); }
.scarcity b { color: var(--red); font-weight: 500; }

/* Disclosure block: red as system */
.safe { background: var(--red); color: var(--on-red); }
.safe .section__head p, .safe p { color: rgba(248,247,244,0.86); }
.safe h2 { color: var(--on-red); }
.safe__grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
.safe__item h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.safe__item { border-top: 1px solid rgba(248,247,244,0.3); padding-top: 18px; }
.safe a { color: var(--on-red); border-bottom: 1px solid rgba(248,247,244,0.6); }
.safe a:hover { color: #fff; }

/* Founder */
.founder { display: grid; gap: 28px; align-items: center; grid-template-columns: 1fr; }
.founder__avatar { width: 160px; height: 160px; border-radius: 50%; background: var(--red); color: var(--on-red); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 4rem; position: relative; }
.founder__avatar small { position: absolute; bottom: -26px; left: 0; right: 0; text-align: center; font: 400 0.72rem/1 "Geist", sans-serif; color: var(--muted); }
.founder h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.founder p { color: var(--muted); margin-top: 12px; max-width: 58ch; }

/* FAQ */
.faq { border-top: 1px solid var(--line); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 40px 22px 0; position: relative; font-family: var(--display); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 18px; font-size: 1.6rem; font-weight: 400; color: var(--red); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding: 0 0 22px; max-width: 70ch; }

/* Contact */
.contact { background: var(--ink); color: var(--bg); }
.contact .section__head p { color: #b9b9c2; }
.contact h2 { color: var(--bg); }
.contact__grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 0.85rem; color: #c9c9d1; }
.form input, .form select, .form textarea { font: 400 1rem/1.4 "Geist", sans-serif; color: var(--ink); background: var(--bg); border: 1px solid transparent; border-radius: 10px; padding: 14px; width: 100%; }
.form textarea { min-height: 110px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.form .btn { justify-self: start; margin-top: 6px; }
.form__fine { font-size: 0.8rem; color: #9a9aa4; }
.form__fine a { color: #d8d8de; border-bottom: 1px solid currentColor; }
.form__status { font-size: 0.95rem; min-height: 1.4em; color: #e8e8ec; }
.hp { display: none; }
.direct { display: grid; gap: 16px; align-content: start; }
.direct__email { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-family: var(--display); font-weight: 600; font-size: clamp(1.2rem, 2.4vw, 1.6rem); }
.copy { font: 500 0.8rem/1 "Geist", sans-serif; background: transparent; color: var(--bg); border: 1px solid #55555f; border-radius: 999px; padding: 8px 12px; cursor: pointer; }
.copy:hover { border-color: var(--bg); }
.direct p { color: #b9b9c2; font-size: 0.95rem; }

/* Footer */
.footer { padding: 48px 0 56px; font-size: 0.88rem; color: var(--muted); }
.footer .wrap { display: grid; gap: 22px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.footer__links a { color: var(--ink); }
.footer__links a:hover { color: var(--red); }

/* Legal pages */
.legal { padding: clamp(40px, 6vw, 80px) 0 100px; }
.legal .wrap { max-width: 780px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 10px; }
.legal h2 { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; margin: 40px 0 10px; }
.legal p, .legal li { color: #2b2b33; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 1.2em; display: grid; gap: 6px; }
.legal .updated { color: var(--muted); font-size: 0.9rem; }
.legal a { color: var(--red); border-bottom: 1px solid currentColor; }

/* Breakpoints */
@media (min-width: 720px) {
	.roster { grid-template-columns: repeat(2, 1fr); }
	.steps { grid-template-columns: repeat(3, 1fr); }
	.prices { grid-template-columns: 1.15fr 1fr 1fr; }
	.safe__grid { grid-template-columns: repeat(2, 1fr); }
	.founder { grid-template-columns: auto 1fr; gap: 48px; }
	.contact__grid { grid-template-columns: 1.3fr 1fr; gap: 72px; }
	.formats { grid-template-columns: repeat(2, 1fr); column-gap: 48px; }
}
@media (min-width: 980px) {
	.nav__links { display: flex; }
	.hero .wrap { grid-template-columns: 1fr 1.05fr; }
	.roster { grid-template-columns: repeat(4, 1fr); }
	.safe__grid { grid-template-columns: repeat(4, 1fr); }
	.formats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 719px) {
	.compare thead { display: none; }
	.compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100% !important; }
	.compare tr { border-bottom: 1px solid var(--line); padding: 14px 0; }
	.compare th, .compare td { border: 0; padding: 6px 0; }
	.compare td.them::before { content: "DIY AI tool: "; font-weight: 500; color: var(--ink); }
	.compare td.us { padding: 10px 12px; border-radius: 10px; }
	.compare td.us::before { content: "Snack Pack: "; font-weight: 500; color: var(--red); }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; }
}

/* Round 1 QA fixes */
.wordmark, .nav .btn { white-space: nowrap; }
.project__mission p + p { margin-top: 1em; }
@media (min-width: 53em) { .project__mission p + p { margin-top: 0; } }
@media (min-width: 980px) {
	.hero .wrap { grid-template-columns: 0.95fr 1.05fr; }
	.hero__title { font-size: clamp(3rem, 5.4vw, 4.8rem); }
}
@media (max-width: 719px) {
	.nav .wrap { gap: 12px; }
	.wordmark { font-size: 1rem; gap: 8px; }
	.nav .btn { padding: 0.65rem 0.9rem; font-size: 0.8rem; }
	.gallery--stack .gallery__item { width: 44vw; height: 66vw; border-radius: 3vw; }
	.hook { font-size: 0.82rem; }
}

/* ---------- Round 2: motion ---------- */
.hero { position: relative; }
.hero .wrap { position: relative; z-index: 1; }
.hero__stage { position: absolute; inset: 0; z-index: 0; pointer-events: none; display: none; }
.hero__stage canvas { display: block; width: 100%; height: 100%; }
.webgl .hero__stage { display: block; opacity: 0; transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.hero3d-ready .hero__stage { opacity: 1; }
/* The DOM tray stays in layout as the measuring frame and the fallback; the 3D scene draws over it. */
.webgl .tray { background: transparent; }
.webgl .phone__screen { opacity: 0; }
.webgl .tray__label, .webgl .tray figcaption { opacity: 0; }
@media (min-width: 980px) {
	.webgl .hero { min-height: calc(100vh - 68px); display: flex; align-items: center; }
}
/* Headline word reveal on first paint: pre-split in the markup, pure CSS, so it never waits on JS. */
.hero__title .w { display: inline-block; }
.motion .hero__title .w { animation: sps-word 0.8s cubic-bezier(0.22, 1, 0.36, 1) backwards; animation-delay: calc(var(--i) * 60ms + 60ms); }
@keyframes sps-word { from { opacity: 0; transform: translateY(16px); } }
/* Expanded clip in the ad strip: no scrim over footage (visual reference). Caption carries its own shadow. */
.gallery--switch .gallery__item--center { filter: brightness(1); }
.gallery--row .caption p { text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55); }

/* ---------- Round 3: polish ---------- */
/* No orphaned last words in display type; nicer rag in body copy. */
h1, h2, h3, .hero__title span, .project__title-line, .compare-note { text-wrap: balance; }
p, li, td { text-wrap: pretty; }
/* Ad strip at phone width: the xl clip filled the screen and hid the strip. Smaller row so neighbors show. */
@media (max-width: 719px) {
	.gallery--row { --item-height: 10vh; }
}

/* Custom presenter card (Oct 5): red card in the roster; full-width strip on tablet and up. */
.card--custom { background: var(--red); border-color: var(--red); color: var(--on-red); justify-content: flex-end; }
.card--custom .card__body { gap: 10px; padding: 24px; }
.card--custom .card__kicker { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(248, 247, 244, 0.75); }
.card--custom .card__cat { color: var(--on-red); }
.card--custom .textlink { color: var(--on-red); justify-self: start; }
@media (min-width: 720px) {
	.card--custom { grid-column: 1 / -1; }
	.card--custom .card__body { grid-template-columns: auto 1fr auto; align-items: center; column-gap: 32px; padding: 26px 28px; }
	.card--custom .card__kicker { grid-row: 1 / 3; }
	.card--custom .card__cat { grid-column: 2; max-width: 60ch; }
	.card--custom .textlink { grid-column: 3; grid-row: 1 / 3; }
}
/* Phones: roster becomes a horizontal swipe row, one screen tall. */
@media (max-width: 719px) {
	.roster { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 6px; scroll-padding-left: var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain; }
	.roster::-webkit-scrollbar { display: none; }
	.roster .card { flex: 0 0 78%; scroll-snap-align: start; }
	.roster .card__media { aspect-ratio: 4 / 5; }
	.card--custom { min-height: 100%; }
}

/* Oct 5 trim: visuals first, few words. */
.section--tight { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 72px); }
.formats-title { font-size: clamp(1.75rem, 3.6vw, 2.6rem); margin-bottom: 20px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { font-family: var(--display); font-weight: 600; font-size: clamp(1rem, 1.8vw, 1.25rem); padding: 10px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.offer { background: var(--red); color: var(--on-red); }
.offer .eyebrow { color: rgba(248, 247, 244, 0.75); }
.offer h2 { color: var(--on-red); font-size: clamp(2.4rem, 6vw, 4.5rem); margin: 8px 0 16px; }
.offer__line { font-size: 1.15rem; max-width: 40ch; }
.offer__line--small { margin-top: 10px; font-size: 0.95rem; opacity: 0.85; }
.muted-note { color: var(--muted); }
@media (max-width: 719px) {
	.gallery-wrap { margin: 12vh auto; }
	.gallery-wrap--dense { margin: 0; }
}
