/* Layout: phone-first single column; template pages put the creator box above the fold.
   Visual idea: a "video booth" — phone frames with a moving colour field stand in for sample clips. */
:root {
  --bg: #f4f5fa; --surface: #ffffff; --ink: #14141c; --muted: #5c5f72; --line: #e2e4ee;
  --accent: #ff2d55; --accent-ink: #ffffff; --accent-soft: #ffe3ea; --cool: #2563ff;
  --ok: #16a36a; --bad: #d92d4a;
  --f-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d14; --surface: #171722; --ink: #f2f2f7; --muted: #a0a3b8; --line: #2a2a3a;
    --accent: #ff4d6d; --accent-ink: #12020a; --accent-soft: #3a1220; --cool: #6d8dff;
    --ok: #3fd18f; --bad: #ff6b81; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--f-body); }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.08; letter-spacing: -0.01em; text-wrap: balance; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); font-weight: 800; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.narrow { max-width: 760px; }
.section { padding-block: 40px; }
.muted { color: var(--muted); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 58ch; }
.eyebrow { font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .6em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--cool); outline-offset: 2px; border-radius: 6px; }

/* header / footer */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 800 1.05rem var(--f-display); text-decoration: none; }
.logo-mark { width: 26px; height: 26px; border-radius: 8px; background: conic-gradient(from 200deg, var(--accent), var(--cool), var(--accent)); }
.nav { display: flex; gap: 18px; font-weight: 600; font-size: .95rem; overflow-x: auto; }
.nav a { text-decoration: none; color: var(--muted); white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.foot { border-top: 1px solid var(--line); margin-top: 40px; padding-block: 36px; font-size: .93rem; }
.foot-in { display: grid; gap: 24px; grid-template-columns: 2fr 1fr 1fr 1fr; }
.foot-links { display: flex; flex-direction: column; gap: 6px; }
.foot-links a { text-decoration: none; color: var(--muted); }
.logo { white-space: nowrap; }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr 1fr; } .foot-in > :first-child { grid-column: 1 / -1; } .nav { gap: 14px; font-size: .9rem; } }
/* On phones keep the two links people need; the rest live in the footer. */
@media (max-width: 560px) { .nav a[href="/how-it-works"], .nav a[href="/faq"] { display: none; } }

/* buttons, pills */
.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 14px 24px; background: var(--accent); color: var(--accent-ink); font: 700 1rem var(--f-body); text-decoration: none; cursor: pointer; }
.btn:hover, button:hover { filter: brightness(1.06); }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .8rem; }
.price { font: 800 1.6rem var(--f-display); }
.price small { font: 500 .9rem var(--f-body); color: var(--muted); }
.price.big { font-size: 3.4rem; }

/* hero */
.hero { padding-block: 36px 24px; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.hero-meta span { border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: .9rem; }
.hero-stack { position: relative; height: 470px; }
.hero-stack > div { position: absolute; }
.stack-0 { left: 22%; top: 0; z-index: 3; }
.stack-1 { left: 0; top: 70px; transform: rotate(-8deg); z-index: 2; }
.stack-2 { right: 0; top: 80px; transform: rotate(8deg); z-index: 1; }
@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-stack { height: 330px; }
  .stack-0 { left: 50%; transform: translateX(-50%); }
  .stack-1 { left: 4%; top: 50px; } .stack-2 { right: 4%; top: 60px; }
}

/* phone mockup standing in for sample clips */
.phone { --h: 330; width: 170px; aspect-ratio: 9 / 18; border-radius: 30px; padding: 8px; background: #111; box-shadow: 0 24px 50px -20px rgb(0 0 0 / .45); max-width: 100%; }
.phone-big { width: 230px; }
.phone-screen { position: relative; height: 100%; border-radius: 23px; overflow: hidden; background: hsl(var(--h) 70% 18%); }
.blob { position: absolute; inset: -30%; background: radial-gradient(circle at 30% 30%, hsl(var(--h) 95% 62%), transparent 55%), radial-gradient(circle at 70% 65%, hsl(calc(var(--h) + 60) 95% 58%), transparent 50%); animation: drift 7s ease-in-out infinite alternate; }
.figure { position: absolute; left: 50%; bottom: 14%; width: 34%; height: 46%; transform: translateX(-50%); background: rgb(255 255 255 / .9); border-radius: 46% 46% 18% 18% / 30% 30% 14% 14%; animation: bob 1.1s ease-in-out infinite alternate; }
.figure::before { content: ""; position: absolute; left: 50%; top: -30%; width: 66%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: inherit; }
.figure::after { content: ""; position: absolute; left: -38%; right: -38%; top: 16%; height: 16%; border-radius: 999px; background: inherit; transform: rotate(-14deg); }
.phone-label { position: absolute; left: 10px; right: 10px; bottom: 10px; color: #fff; font: 700 .78rem var(--f-body); text-shadow: 0 1px 4px rgb(0 0 0 / .5); }
@keyframes drift { to { transform: translate(8%, -6%) rotate(25deg); } }
@keyframes bob { to { transform: translateX(-50%) translateY(-6%) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .blob, .figure { animation: none; } }

/* cards */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 20px; }
.card { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; }
.card .phone { width: 96px; border-radius: 20px; padding: 5px; }
.card .phone-screen { border-radius: 16px; }
.card .phone-label { display: none; }
.card-body { min-width: 0; }
.card-body p { font-size: .93rem; margin-bottom: .6em; }
.card-cta { font-weight: 700; color: var(--accent); font-size: .93rem; }
.card:hover { border-color: var(--accent); }

/* creator box */
.creator { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-top: 20px; box-shadow: 0 10px 30px -18px rgb(20 20 40 / .35); }
.creator-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.mini-steps { margin: 0 0 12px; padding-left: 20px; font-weight: 600; }
.waitlist { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.waitlist .form-msg { grid-column: 1 / -1; }
input, select, textarea { width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 500 1rem var(--f-body); }
.form-msg { margin: 4px 0 0; font-weight: 600; font-size: .93rem; min-height: 1.2em; }
.form-msg.ok { color: var(--ok); } .form-msg.err { color: var(--bad); }
@media (max-width: 480px) { .waitlist { grid-template-columns: 1fr; } }

/* template page */
.crumbs { display: flex; gap: 8px; padding-top: 18px; font-size: .9rem; color: var(--muted); }
.crumbs a { text-decoration: none; }
.t-hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: start; padding-block: 18px 12px; }
.t-visual { display: flex; justify-content: center; padding-top: 12px; }
.quick { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; }
.quick span { font-size: .8rem; color: var(--muted); font-weight: 600; }
/* Phones: the creator box matters more than the mockup, so the mockup goes away. */
@media (max-width: 860px) { .t-hero { grid-template-columns: 1fr; } .t-visual { display: none; } }
.prose { max-width: 68ch; font-size: 1.05rem; }
.beats { list-style: none; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.beats li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; font-weight: 600; display: flex; gap: 12px; align-items: flex-start; }
.beat-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.steps { padding-left: 22px; display: grid; gap: 10px; }
.checks, .crosses { list-style: none; padding: 0; display: grid; gap: 8px; }
.checks li::before { content: "✓"; color: var(--ok); font-weight: 800; margin-right: 10px; }
.crosses li::before { content: "✕"; color: var(--bad); font-weight: 800; margin-right: 10px; }

/* faq */
details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; margin-bottom: 8px; }
summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
details p { color: var(--muted); }

/* pricing, legal, forms */
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: grid; gap: 6px; margin-bottom: 24px; }
.legal h2 { font-size: 1.25rem; margin-top: 1.4em; }
.report { display: grid; gap: 10px; max-width: 520px; }
.report label { font-weight: 600; }
.report button { justify-self: start; }

/* searchable home: search box + filter chips over the template grid */
.hero-search { padding-block: 34px 8px; }
.hero-search h1 { max-width: 14ch; }
.search { margin-top: 18px; max-width: 720px; display: grid; gap: 12px; }
.search input { padding: 16px 18px; font-size: 1.05rem; border-radius: 16px; background: var(--surface); box-shadow: 0 10px 30px -20px rgb(20 20 40 / .4); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 14px; border-radius: 999px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); font-weight: 600; font-size: .9rem; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.grid-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.badge { font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.badge-hot { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge-new { background: color-mix(in srgb, var(--cool) 14%, transparent); color: var(--cool); border-color: transparent; }
.badge:empty { display: none; }
.card[hidden] { display: none; }
.empty { padding: 12px 0; }

/* template page: intro + mockup on the left, this template's uploader on the right (first on phones) */
.t-hero { grid-template-columns: .9fr 1.1fr; }
.t-intro .t-visual { justify-content: flex-start; padding-top: 18px; }
.t-make { display: grid; gap: 14px; }
.uploader { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px; display: grid; gap: 14px; box-shadow: 0 18px 40px -26px rgb(20 20 40 / .5); }
.uploader-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 1.05rem; }
.drops { display: grid; gap: 10px; }
.drops-2 { grid-template-columns: 1fr 1fr; }
.drop { position: relative; display: grid; place-items: center; min-height: 200px; border: 2px dashed var(--line); border-radius: 16px; background: var(--bg); cursor: pointer; overflow: hidden; text-align: center; }
.drops-1 .drop { min-height: 240px; }
.drop:hover, .drop:focus-within { border-color: var(--accent); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-empty { display: grid; gap: 4px; justify-items: center; padding: 16px; pointer-events: none; }
.drop-plus { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 800 1.6rem/1 var(--f-display); margin-bottom: 4px; }
.drop-empty small { color: var(--muted); }
.drop-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.drop-change { position: absolute; right: 8px; bottom: 8px; background: rgb(0 0 0 / .65); color: #fff; font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; pointer-events: none; }
.drop.has-img .drop-empty { visibility: hidden; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.consent input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--accent); }
.create { width: 100%; padding: 16px; font-size: 1.05rem; }
.create:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.uploader-note { font-size: .85rem; margin: 0; }
.uploader .form-msg:empty { display: none; }
.soon { background: var(--accent-soft); border-radius: 18px; padding: 16px; }
.soon p { margin-bottom: 10px; }
@media (max-width: 860px) {
  .t-hero { grid-template-columns: 1fr; gap: 16px; }
  .t-intro .t-visual { display: none; }
  .drop { min-height: 170px; }
  .drops-1 .drop { min-height: 200px; }
}

/* ---------- shared sections: pricing tiers, timeline, uses, closing ---------- */
.tiers { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-top: 8px; }
.tier { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 4px; align-content: start; }
.tier-pop { border: 2px solid var(--accent); box-shadow: 0 16px 34px -24px var(--accent); }
.tier-label { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tier-pop .tier-label { color: var(--accent); }
.tier-n { font-size: 1.05rem; }
.tiers-note { font-size: .9rem; margin-top: 10px; }
.timeline { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.timeline li { padding: 16px; display: grid; gap: 6px; border-right: 1px solid var(--line); position: relative; }
.timeline li:last-child { border-right: 0; }
.tl-time { font: 800 .85rem var(--f-display); color: var(--accent); font-variant-numeric: tabular-nums; }
.tl-text { font-weight: 600; }
.uses { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.uses li { padding: 10px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; }
.closing { text-align: center; padding-block: 48px; }
.closing .muted { margin-bottom: 18px; }
@media (max-width: 700px) {
  .timeline { grid-template-columns: 1fr; }
  .timeline li { border-right: 0; border-bottom: 1px solid var(--line); grid-template-columns: 64px 1fr; align-items: baseline; }
  .timeline li:last-child { border-bottom: 0; }
}

/* ---------- layout: stage (centered headline, wide uploader) ---------- */
.stage-hero { text-align: center; padding-block: 28px 8px; }
.stage-hero h1 { max-width: 18ch; margin-inline: auto; }
.stage-hero .lede { margin-inline: auto; }
.stage-make { max-width: 640px; margin: 22px auto 0; text-align: left; }
.stage-make .drops-1 .drop { min-height: 300px; }
.stage-make .drops-2 .drop { min-height: 260px; }

/* ---------- layout: story (timeline beside the mockup, then the uploader) ---------- */
.story-hero { padding-block: 26px 0; }
.story-grid { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; padding-block: 18px; }
.story-line .timeline { grid-template-columns: 1fr; }
.story-line .timeline li { border-right: 0; border-bottom: 1px solid var(--line); grid-template-columns: 72px 1fr; align-items: baseline; }
.story-line .timeline li:last-child { border-bottom: 0; }
.story-make { max-width: 640px; display: grid; gap: 14px; }
@media (max-width: 860px) { .story-grid { grid-template-columns: 1fr; } .story-grid .t-visual { display: none; } }

/* ---------- themes (site.json "theme"); "pop" is the default token set at the top ---------- */
[data-preset="night"] {
  --bg: #0f1020; --surface: #181a30; --ink: #f3f1ea; --muted: #a7a8c4; --line: #2b2d4a;
  --accent: #ff8a3d; --accent-ink: #1a0d02; --accent-soft: #3a2414; --cool: #8fa2ff;
  --f-display: "Unbounded", "Manrope", system-ui, sans-serif; --f-body: "Manrope", system-ui, sans-serif;
  color-scheme: dark;
}
[data-preset="night"] h1 { font-weight: 800; letter-spacing: -0.02em; }
[data-preset="night"] .chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
[data-preset="mint"] {
  --bg: #eef4f1; --surface: #ffffff; --ink: #0f2a22; --muted: #4f665e; --line: #d3e2db;
  --accent: #e8590c; --accent-ink: #ffffff; --accent-soft: #fde6d8; --cool: #0f766e;
  --f-display: "Fraunces", Georgia, serif; --f-body: "DM Sans", system-ui, sans-serif; --r: 10px;
}
@media (prefers-color-scheme: dark) {
  [data-preset="mint"] { --bg: #0c1b16; --surface: #12251e; --ink: #e7f3ee; --muted: #9db6ac; --line: #22392f; --accent: #ff7a2e; --accent-ink: #1b0b00; --accent-soft: #3b2010; --cool: #5eead4; color-scheme: dark; }
}
[data-preset="mint"] h1, [data-preset="mint"] h2 { font-weight: 900; letter-spacing: -0.015em; }
[data-preset="mint"] .btn, [data-preset="mint"] button { border-radius: 10px; }
[data-preset="mint"] .uploader, [data-preset="mint"] .drop { border-radius: 10px; }

/* original meme video: cover first, player on press */
.ref { margin: 0; display: grid; gap: 8px; }
.ref-play { position: relative; display: block; width: 100%; padding: 0; border-radius: var(--r); overflow: hidden; background: #000; aspect-ratio: 16 / 9; cursor: pointer; }
.ref-x .ref-play { aspect-ratio: 4 / 5; }
.ref-play img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; }
.ref-icon { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; transform: translate(-50%, -50%); border-radius: 50%; background: rgb(0 0 0 / .6); box-shadow: 0 0 0 3px rgb(255 255 255 / .85) inset; }
.ref-icon::after { content: ""; position: absolute; left: 26px; top: 20px; border-left: 18px solid #fff; border-top: 12px solid transparent; border-bottom: 12px solid transparent; }
.ref-tag { position: absolute; left: 10px; top: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .75rem; padding: 3px 10px; border-radius: 999px; }
.ref figcaption { font-size: .85rem; color: var(--muted); }
.ref figcaption a { color: var(--accent); font-weight: 600; }
.ref iframe { width: 100%; border: 0; border-radius: var(--r); background: #000; aspect-ratio: 16 / 9; display: block; }
.ref .twitter-tweet { margin: 0 !important; }
.card-thumb { position: relative; width: 120px; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: #000; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-thumb .ref-icon { width: 38px; height: 38px; }
.card-thumb .ref-icon::after { left: 15px; top: 11px; border-left-width: 12px; border-top-width: 8px; border-bottom-width: 8px; }

/* booth layout: intro + video on the left, uploader on the right; phones: intro, uploader, video */
.t-hero { grid-template-areas: "intro make" "ref make"; grid-template-rows: auto 1fr; }
.t-intro { grid-area: intro; } .t-make { grid-area: make; } .t-ref { grid-area: ref; align-self: start; }
@media (max-width: 860px) { .t-hero { grid-template-areas: "intro" "make" "ref"; grid-template-rows: none; } }
.stage-ref { max-width: 640px; margin: 18px auto 0; text-align: left; }
.story-ref { width: min(420px, 100%); }
@media (max-width: 860px) { .story-grid .story-ref { display: block; } }

/* self-hosted template preview */
.ref-box { position: relative; border-radius: var(--r); overflow: hidden; background: #000; display: flex; justify-content: center; }
.ref-box video { display: block; width: 100%; max-height: 72vh; object-fit: contain; background: #000; }
.ref-sound { position: absolute; right: 10px; bottom: 10px; padding: 7px 14px; font-size: .85rem; background: rgb(0 0 0 / .65); color: #fff; }
.ref-sound[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.card-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
