/* Marmalade marketing site — see .claude/skills/marmalade-design/SKILL.md */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, h4 {
  font-family: var(--disp);
  font-weight: 600;
  margin: 0;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

p { margin: 0; }
img, svg { max-width: 100%; display: block; }
a { color: var(--orange-deep); text-decoration: none; }
a:hover { color: var(--pink); }
::selection { background: rgba(252, 63, 130, .22); }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 6px; }
input::placeholder { color: var(--ink-faint); }

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

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Keyframes ---------- */

@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-16px) rotate(var(--r, 0deg)); } }
@keyframes drift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, -38px) scale(1.08); } }
@keyframes rise { from { opacity: 0; transform: translateY(42px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes scrolldot { 0%, 100% { transform: translate(-50%, 0); opacity: 1; } 50% { transform: translate(-50%, 7px); opacity: .35; } }

[data-reveal] {
  opacity: 0;
  transform: translateY(46px);
  transition: opacity 1s cubic-bezier(.16, 1, .3, 1), transform 1s cubic-bezier(.16, 1, .3, 1);
}
[data-reveal].in { opacity: 1; transform: translateY(0); }
[data-reveal].d1.in { transition-delay: .08s; }
[data-reveal].d2.in { transition-delay: .16s; }
[data-reveal].d3.in { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-blob], [data-float] { animation: none !important; }
  [data-reveal] { transition: none; opacity: 1; transform: none; }
}

/* ---------- Ambient blobs ---------- */

.blob-field { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.blob-field .blob-a {
  position: absolute; top: -14vh; right: -10vw; width: 46vw; height: 46vw; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(252, 63, 130, .22), transparent 66%);
  filter: blur(6px); animation: drift 24s ease-in-out infinite;
}
.blob-field .blob-b {
  position: absolute; bottom: -18vh; left: -12vw; width: 44vw; height: 44vw; border-radius: 50%;
  background: radial-gradient(circle at 55% 45%, rgba(251, 146, 30, .24), transparent 66%);
  filter: blur(6px); animation: drift 30s ease-in-out infinite reverse;
}

/* ---------- Placeholder image slot (flat gradient + dev label, swap for real screenshots later) ---------- */

.img-slot {
  position: relative;
  width: 100%; height: 100%;
  display: flex; align-items: flex-end;
  background: var(--grad-soft);
}
.img-slot.g2 { background: linear-gradient(135deg, #ffd9e6, #ffe4d6); }
.img-slot.g3 { background: linear-gradient(135deg, #ffe9c9, #ffd9e6); }
.img-slot.g4 { background: linear-gradient(135deg, #ffe4d6, #fde2ef); }
.img-slot.g5 { background: linear-gradient(135deg, #ffeccf, #ffd9e6); }
.img-slot .slot-tag {
  margin: 10px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, .7);
  padding: 4px 9px;
  border-radius: 999px;
}

/* ---------- Nav ---------- */

.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; gap: 24px;
  padding: 16px clamp(18px, 5vw, 60px);
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--cream) 74%, transparent);
  border-bottom: 1px solid rgba(74, 42, 56, .06);
}

.nav-brand { display: flex; align-items: center; gap: 11px; margin-right: auto; color: var(--ink); }
.nav-brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 4px 12px -4px rgba(74, 42, 56, .4); }
.nav-brand span { font-family: var(--disp); font-weight: 600; font-size: 23px; letter-spacing: -.01em; }

.nav-link {
  position: relative;
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 2px;
  background: var(--pink); border-radius: 2px; transition: right .3s cubic-bezier(.16, 1, .3, 1);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { right: 0; }

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px;
  background: var(--grad); color: #fff;
  font-family: var(--disp); font-weight: 600; font-size: 15px;
  box-shadow: 0 10px 24px -10px rgba(252, 63, 130, .7);
  transition: transform .25s, box-shadow .25s;
}
.nav-cta:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(252, 63, 130, .8); }
.nav-cta-short { display: none; }

/* ---------- Buttons / form (shared: hero + final CTA waitlist) ---------- */

.pill-input {
  flex: 1; min-width: 220px;
  padding: 15px 22px;
  border-radius: 999px;
  border: 2px solid var(--cream-3);
  background: #fff;
  font-family: var(--body); font-size: 16px; font-weight: 600; color: var(--ink);
}
.pill-input:focus-visible { outline-offset: 2px; }

.pill-btn {
  padding: 15px 28px; border: none; border-radius: 999px;
  background: var(--grad); color: #fff;
  font-family: var(--disp); font-weight: 600; font-size: 16px;
  cursor: pointer;
  box-shadow: 0 12px 26px -10px rgba(252, 63, 130, .7);
  transition: transform .25s;
}
.pill-btn:hover { transform: translateY(-2px); }
.pill-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.waitlist-form { display: flex; gap: 10px; flex-wrap: wrap; }
.waitlist-form[hidden] { display: none; }
.waitlist-success {
  display: inline-flex; align-items: center; gap: 13px;
  padding: 17px 22px; border-radius: 22px;
  background: #fff; box-shadow: var(--shadow);
}
.waitlist-success[hidden] { display: none; }
.waitlist-success .tick {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 800;
}
.waitlist-status[data-state="error"] { color: var(--pink); font-weight: 700; margin-top: 10px; }

/* Honeypot — off-screen, not display:none (bots detect that). */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Hero ---------- */

.hero {
  position: relative; z-index: 2;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding: 118px clamp(18px, 5vw, 60px) 60px;
  max-width: var(--container);
  margin: 0 auto;
}

.hero-copy { max-width: 660px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 999px;
  background: #fff; box-shadow: var(--shadow);
  font-family: var(--disp); font-weight: 500; font-size: 14px; color: var(--ink);
  animation: rise .8s .05s both;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

.hero h1 { font-size: clamp(48px, 6.6vw, 92px); line-height: .98; margin: 22px 0 0; animation: rise .8s .12s both; }

.hero-sub {
  font-size: clamp(18px, 1.5vw, 22px); line-height: 1.55; max-width: 33ch; margin: 26px 0 0;
  color: var(--ink-soft); font-weight: 500; animation: rise .8s .2s both;
}

.hero-form-wrap { margin-top: 34px; max-width: 480px; animation: rise .8s .28s both; }

.hero-trust { display: flex; align-items: center; gap: 10px; margin-top: 16px; color: var(--ink-faint); font-weight: 600; font-size: 14px; }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 560px; }

.polaroid {
  position: absolute;
  padding: 11px 11px 34px;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow);
  animation: floaty 7s ease-in-out infinite;
  will-change: transform;
}
.polaroid .shot { aspect-ratio: 1; border-radius: 5px; overflow: hidden; }
.polaroid .shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.polaroid .caption {
  position: absolute; bottom: 8px; left: 0; right: 0; text-align: center;
  font-family: var(--hand); font-size: 20px; color: var(--ink);
}
.polaroid.p1 { top: 2%; left: 2%; width: 150px; --r: -8deg; transform: rotate(-8deg); z-index: 1; }
.polaroid.p2 {
  bottom: 4%; right: 0; width: 132px; --r: 7deg; transform: rotate(7deg); z-index: 3;
  animation-duration: 8.5s; animation-delay: .6s;
}

.phone {
  position: relative; z-index: 2;
  width: 288px; height: 600px;
  border-radius: 46px;
  background: #171013;
  padding: 11px;
  box-shadow: var(--shadow-lg);
  animation: floaty 9s ease-in-out infinite;
}
/* Floating Dynamic Island pill, matched to the store-panel iPhone frames
   (19 Jul), replacing the old hanging notch tab. Sits level with the
   screenshot's own status bar row. */
.phone-notch {
  position: absolute; top: 15px; left: 50%; transform: translateX(-50%);
  width: 74px; height: 20px; background: #000; border-radius: 999px; z-index: 5;
}
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: var(--cream); }
/* Real screenshots are 720x1600 (taller than the frame): anchor to the top so
   the status bar + header stay visible and the crop eats the bottom instead. */
.phone-screen > img, .story-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }

.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--ink-faint); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  z-index: 2;
}
.scroll-cue .pill { width: 26px; height: 42px; border-radius: 14px; border: 2px solid var(--ink-faint); position: relative; }
.scroll-cue .pill .dot { position: absolute; top: 6px; left: 50%; transform: translate(-50%, 0); width: 4px; height: 7px; border-radius: 2px; background: var(--pink); animation: scrolldot 1.6s ease-in-out infinite; }

/* ---------- Story (pinned scroll-driven phone) ---------- */

#story { position: relative; z-index: 2; }

/* One viewport tall: panel changes are gesture-stepped by story.js (one
   flick = one panel, 18 Jul), not scroll-position-mapped, so the track no
   longer needs extra scroll distance. */
.story-track { height: 100vh; position: relative; }

.story-sticky {
  position: sticky; top: 0; height: 100vh;
  display: grid; grid-template-columns: 1fr minmax(280px, 340px) 1fr;
  align-items: center; gap: clamp(20px, 3vw, 56px);
  padding: 0 clamp(18px, 5vw, 60px);
  max-width: var(--container);
  margin: 0 auto;
  overflow: hidden;
}

.story-text-col { position: relative; grid-column: 1; min-height: 340px; justify-self: end; width: 100%; max-width: 460px; }
.story-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  opacity: 0; transform: translateY(18px);
  /* Shorter than the original 0.6s — with a snappier scroll pace, a slow
     crossfade means the next step can retrigger before the last one
     finishes, leaving 2-3 panels visibly overlapping mid-transition. */
  transition: opacity .28s ease-out, transform .28s ease-out;
  pointer-events: none;
}
.story-text.on { opacity: 1; transform: translateY(0); pointer-events: auto; }
.story-kicker { font-family: var(--disp); font-weight: 600; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-deep); }
.story-text h2 { font-size: clamp(34px, 3.8vw, 56px); line-height: 1; margin: 14px 0 0; }
.story-text p { font-size: clamp(17px, 1.35vw, 20px); line-height: 1.55; margin: 18px 0 0; color: var(--ink-soft); font-weight: 500; }

.story-phone-col { grid-column: 2; justify-self: center; }
.story-phone {
  position: relative; width: 300px; height: 624px; border-radius: 48px;
  background: #171013; padding: 12px; box-shadow: var(--shadow-lg);
}
.story-phone .phone-notch { top: 16px; width: 78px; height: 21px; z-index: 6; }
.story-phone .phone-screen { border-radius: 37px; }
.story-screen { position: absolute; inset: 0; opacity: 0; transition: opacity .28s ease; }
.story-screen.on { opacity: 1; }

.story-rail { grid-column: 3; justify-self: start; display: flex; flex-direction: column; gap: 18px; }
.story-dot { display: flex; align-items: center; gap: 12px; opacity: .4; transition: opacity .4s; }
.story-dot.on { opacity: 1; }
.story-dot .bar { width: 6px; height: 34px; border-radius: 6px; background: var(--cream-3); transition: background .4s, height .4s; }
.story-dot.on .bar { background: var(--grad); height: 46px; }
.story-dot span:last-child { font-family: var(--disp); font-weight: 500; font-size: 14px; white-space: nowrap; }

/* Mobile alternative (Jared, 19 Jul): below 900px the pinned carousel is
   replaced by this plain stacked list — scroll capture fought touch
   momentum (jitter) and hard flicks skipped panels. Desktop keeps the
   stepped carousel. */
.story-stack { display: none; }
.stack-item { padding: clamp(44px, 8vh, 72px) clamp(18px, 5vw, 40px); text-align: center; max-width: 560px; margin: 0 auto; }
.stack-item h2 { font-size: clamp(32px, 9vw, 44px); line-height: 1.05; margin: 12px 0 0; }
.stack-item p { font-size: 17px; line-height: 1.55; margin: 16px 0 0; color: var(--ink-soft); font-weight: 500; }
.stack-phone {
  position: relative; width: 228px; height: 474px; border-radius: 38px;
  background: #171013; padding: 11px; box-shadow: var(--shadow-lg);
  margin: 26px auto 0;
}
.stack-phone .phone-notch { top: 14px; width: 58px; height: 16px; z-index: 6; }
.stack-phone .phone-screen { border-radius: 30px; }

/* ---------- Why / manifesto ---------- */

.why { position: relative; z-index: 2; padding: clamp(80px, 12vh, 160px) clamp(18px, 5vw, 60px); text-align: center; max-width: var(--container); margin: 0 auto; }
/* Higher specificity than `.why p` below is deliberate — the eyebrow is a
   <p> too, and without this it silently loses its size/color to the p rule. */
.why .why-eyebrow { font-family: var(--hand); font-size: clamp(34px, 5vw, 64px); color: var(--pink); margin: 0 0 4px; }
.why h2 { font-size: clamp(40px, 6vw, 84px); line-height: 1; max-width: 16ch; margin: 0 auto; }
.why p { font-size: clamp(18px, 1.6vw, 23px); line-height: 1.6; max-width: 52ch; margin: 28px auto 0; color: var(--ink-soft); font-weight: 500; }

/* ---------- Privacy strip ---------- */

.privacy-strip {
  position: relative; z-index: 2;
  margin: 0 clamp(14px, 4vw, 48px) clamp(60px, 10vh, 120px);
  border-radius: clamp(28px, 4vw, 52px);
  background: var(--grad); color: #fff;
  padding: clamp(48px, 7vw, 88px) clamp(28px, 6vw, 80px);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.privacy-strip .strip-blob {
  position: absolute; top: -40px; right: -30px; width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255, 255, 255, .14);
}
.privacy-strip .strip-inner { position: relative; max-width: var(--container); margin: 0 auto; }
.privacy-strip .eyebrow { font-family: var(--disp); font-weight: 600; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; opacity: .9; }
.privacy-strip h2 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.02; margin: 16px 0 0; max-width: 20ch; }
.privacy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: clamp(20px, 3vw, 44px); margin-top: clamp(36px, 5vw, 60px); }
.privacy-grid > div { border-top: 2px solid rgba(255, 255, 255, .35); padding-top: 18px; }
.privacy-grid h3 { font-size: clamp(22px, 2vw, 28px); margin: 0; }
.privacy-grid p { margin: 10px 0 0; font-weight: 500; line-height: 1.5; opacity: .92; }

/* ---------- Feature grid ---------- */

.features { position: relative; z-index: 2; padding: 0 clamp(18px, 5vw, 60px) clamp(70px, 10vh, 130px); }
.features-inner { max-width: var(--container); margin: 0 auto; }
.features h2 { font-size: clamp(32px, 4.2vw, 56px); max-width: 16ch; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: clamp(32px, 4vw, 52px); }
.feature-card {
  background: #fff; border-radius: 26px; padding: 28px; box-shadow: var(--shadow);
  transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}
.feature-card:hover { transform: translateY(-6px); }
.feature-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--grad-soft); display: grid; place-items: center; font-size: 26px; }
.feature-card h3 { font-size: 22px; margin: 18px 0 0; }
.feature-card p { margin: 9px 0 0; color: var(--ink-soft); font-weight: 500; line-height: 1.5; }

/* ---------- Final CTA / waitlist ---------- */

.final-cta { position: relative; z-index: 2; padding: clamp(70px, 10vh, 130px) clamp(18px, 5vw, 60px) clamp(90px, 12vh, 150px); text-align: center; max-width: var(--container); margin: 0 auto; }
.final-cta-icon { width: clamp(120px, 16vw, 180px); margin: 0 auto; }
/* The bob animation lives on the img, one level below the [data-reveal]
   wrapper's fade-up transition — both would target `transform`, and an
   animation silently wins over a transition on the same element/property,
   so on one shared element the reveal never actually slid in and the two
   fought over every frame. Splitting them onto parent/child fixes both. */
.final-cta-icon img { width: 100%; filter: drop-shadow(0 24px 40px rgba(74, 42, 56, .3)); animation: bob 3.2s ease-in-out infinite; will-change: transform; }
.final-cta h2 { font-size: clamp(40px, 6vw, 82px); line-height: 1; margin: 26px 0 0; }
.final-cta > p { font-size: clamp(18px, 1.6vw, 22px); margin: 22px auto 0; max-width: 44ch; color: var(--ink-soft); font-weight: 500; }
.final-cta .waitlist-form-wrap { margin: 34px auto 0; max-width: 480px; }
.final-cta .waitlist-form { justify-content: center; }
.store-badges { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
/* Hero variant: left-aligned under the headline, badges not yet clickable. */
.hero-store-badges { justify-content: flex-start; margin-top: 0; }
.hero-store-badges .store-badge-link { cursor: default; }
.store-badge-link {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 11px 20px; border-radius: 14px;
  background: #111; color: #fff; text-decoration: none;
  box-shadow: 0 10px 26px -12px rgba(0, 0, 0, .5);
  transition: transform .25s, box-shadow .25s;
}
.store-badge-link:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .55); }
.store-badge-text { display: flex; flex-direction: column; line-height: 1; text-align: left; }
.store-badge-eyebrow { font-family: var(--body); font-weight: 600; font-size: 11px; letter-spacing: .04em; opacity: .85; }
.store-badge-name { font-family: var(--body); font-weight: 800; font-size: 19px; margin-top: 3px; }
.cta-form-btn { flex: 1 0 100%; }

/* ---------- Footer ---------- */

.site-footer { position: relative; z-index: 2; background: var(--ink); color: var(--cream); padding: clamp(48px, 7vw, 80px) clamp(18px, 5vw, 60px) 40px; }
.footer-grid { max-width: var(--container); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; align-items: start; }
.footer-brand { display: flex; align-items: center; gap: 11px; }
.footer-brand img { width: 44px; height: 44px; border-radius: 12px; }
.footer-brand span { font-family: var(--disp); font-weight: 600; font-size: 26px; }
.footer-tag { font-family: var(--hand); font-size: 26px; margin: 14px 0 0; color: var(--amber); }
.footer-desc { margin: 12px 0 0; max-width: 34ch; color: rgba(252, 244, 233, .6); font-weight: 500; }
.footer-h { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: rgba(252, 244, 233, .5); font-weight: 700; font-family: var(--body); }
.footer-links { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.footer-links a { color: var(--cream); font-weight: 600; }
.footer-bottom { max-width: 1180px; margin: 44px auto 0; padding-top: 22px; border-top: 1px solid rgba(252, 244, 233, .14); color: rgba(252, 244, 233, .5); font-weight: 600; font-size: 14px; }

/* ---------- Legal pages (Privacy / Terms) ---------- */

.legal-hero { position: relative; z-index: 2; padding: clamp(56px, 9vh, 110px) clamp(18px, 5vw, 60px) clamp(30px, 5vh, 60px); max-width: 1100px; margin: 0 auto; text-align: center; }
.legal-hero .hand { font-family: var(--hand); font-size: clamp(28px, 4vw, 44px); color: var(--pink); animation: rise .7s .02s both; }
.legal-hero h1 { font-size: clamp(44px, 7vw, 88px); margin: 6px 0 0; animation: rise .7s .1s both; }
.legal-hero p { max-width: 56ch; margin: 22px auto 0; color: var(--ink-soft); font-weight: 500; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; animation: rise .7s .18s both; }
.legal-hero .updated { margin: 16px 0 0; color: var(--ink-faint); font-weight: 700; font-size: 14px; }

.tldr-grid { position: relative; z-index: 2; max-width: 1100px; margin: 0 auto; padding: 0 clamp(18px, 5vw, 60px) clamp(40px, 6vh, 72px); display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.tldr-card { background: #fff; border-radius: 24px; padding: 26px; box-shadow: var(--shadow); }
.tldr-card .feature-icon { width: 48px; height: 48px; border-radius: 14px; font-size: 24px; }
.tldr-card h3 { font-size: 21px; margin: 16px 0 0; }
.tldr-card p { margin: 8px 0 0; color: var(--ink-soft); font-weight: 500; line-height: 1.5; }

.legal-grid { position: relative; z-index: 2; max-width: 1100px; margin: 0 auto; padding: 0 clamp(18px, 5vw, 60px) clamp(70px, 10vh, 120px); display: grid; grid-template-columns: 230px 1fr; gap: clamp(30px, 5vw, 64px); align-items: start; }
.toc { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 4px; }
.toc-label { font-family: var(--disp); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); padding: 0 14px 8px; }
.toc a { display: block; padding: 8px 14px; border-radius: 10px; color: var(--ink-soft); font-weight: 700; font-size: 14px; transition: background .25s, color .25s; }
.toc a:hover { background: var(--cream-2); color: var(--ink); }
.toc a.on { background: var(--grad-soft); color: var(--ink); }

.legal { display: flex; flex-direction: column; gap: clamp(34px, 5vw, 52px); }
.legal-section { scroll-margin-top: 96px; }
.legal-num { font-family: var(--disp); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-deep); }
.legal h2 { margin: 8px 0 0; font-size: clamp(26px, 3vw, 34px); }
.legal p { color: var(--ink-soft); font-weight: 500; line-height: 1.65; font-size: 17px; margin-top: 12px; }
.legal li { color: var(--ink-soft); font-weight: 500; line-height: 1.6; font-size: 17px; margin-top: 8px; }

.legal-cta { background: var(--grad); color: #fff; border-radius: 26px; padding: clamp(28px, 4vw, 44px); box-shadow: var(--shadow); }
.legal-cta h2 { font-size: clamp(24px, 2.6vw, 32px); color: #fff; }
.legal-cta p { margin-top: 12px; font-weight: 500; line-height: 1.6; opacity: .94; font-size: 17px; color: #fff; }
.legal-cta a { color: #fff; text-decoration: underline; }

.legal-footer { position: relative; z-index: 2; background: var(--ink); color: var(--cream); padding: 44px clamp(18px, 5vw, 60px); text-align: center; }
.legal-footer .footer-tag { font-size: 26px; }
.legal-footer p:last-child { margin: 10px 0 0; color: rgba(252, 244, 233, .55); font-weight: 600; font-size: 14px; }
.legal-footer a { color: var(--cream); }

.legal-nav { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 20px; padding: 16px clamp(18px, 5vw, 60px); backdrop-filter: blur(14px); background: color-mix(in srgb, var(--cream) 78%, transparent); border-bottom: 1px solid rgba(74, 42, 56, .06); }
.legal-nav a.back { font-weight: 700; font-size: 15px; color: var(--ink); }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 34px; padding: 104px clamp(18px, 5vw, 60px) 60px; min-height: auto; }
  .hero-visual { min-height: 430px; }
  .hero-visual .phone { width: 238px; height: 496px; border-radius: 40px; }
  .hero-visual .polaroid { width: 118px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

/* Mobile swaps the pinned carousel for the stacked list (.story-stack) —
   no scroll capture on touch screens. */
@media (max-width: 900px) {
  .nav-link { display: none; }
  .scroll-cue { display: none; }
  .nav-cta-full { display: none; }
  .nav-cta-short { display: inline; }
  .hero-form-btn { flex: 1 0 100%; }
  .hero-trust { flex-direction: column; align-items: flex-start; gap: 6px; }
  .hero-trust-sep { display: none; }

  .story-track { display: none; }
  .story-stack { display: block; }

  .legal-grid { grid-template-columns: 1fr; }
  .toc { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .hero-visual .polaroid { display: none; }
  .hero-visual .phone { width: 230px; height: 478px; }
  .stack-phone { width: 206px; height: 428px; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  /* The brand row is a flex row: text-align on the column doesn't move it. */
  .footer-brand { justify-content: center; }
}
