/* ============================================================
   LOOPIN — landing page
   Dark, minimal, app-focused. Google Sans Flex.
   ============================================================ */

:root {
  /* canvas */
  --bg:        #0A0A0B;
  --bg-2:      #100F12;
  --surface:   #161519;
  --surface-2: #1E1D22;
  --line:      rgba(255, 255, 255, 0.08);
  --line-2:    rgba(255, 255, 255, 0.14);

  /* ink */
  --ink:       #F4F3F1;
  --ink-soft:  rgba(244, 243, 241, 0.62);
  --ink-faint: rgba(244, 243, 241, 0.40);

  /* monochrome "accent" — light on dark, no colour */
  --accent:    #F4F3F1;
  --accent-2:  rgba(244, 243, 241, 0.55);
  --accent-grad: linear-gradient(180deg, #FFFFFF, #BEBEC4);
  --accent-soft: rgba(255, 255, 255, 0.09);

  --radius:    18px;
  --radius-lg: 28px;
  --maxw:      1120px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);

  --font: "Google Sans Flex", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ───────── shared type ───────── */
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 22px;
}

.h2 {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.big {
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.big--muted { color: var(--ink-faint); }

.section-head { max-width: 640px; margin-bottom: 64px; }

/* ───────── buttons ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font);
  font-size: 0.98rem;
  font-weight: 500;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 13px 22px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }

.btn--sm { padding: 9px 18px; font-size: 0.9rem; }

.btn--ghost { color: var(--ink-soft); }
.btn--ghost:hover { color: var(--ink); border-color: var(--ink-soft); }

.btn--store {
  background: var(--ink);
  color: #0A0A0B;
  border-color: var(--ink);
  padding: 11px 22px;
}
.btn--store:hover { background: #fff; }
.btn--store .store__apple { width: auto; height: 22px; margin-top: -2px; }
.btn--store span { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.btn--store small { font-size: 0.62rem; font-weight: 400; opacity: .7; letter-spacing: .02em; }
.btn--store strong { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }

.btn--lg { padding: 15px 30px; }
.btn--lg .store__apple { height: 27px; }
.btn--lg strong { font-size: 1.2rem; }

/* ───────── brand ───────── */
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: -0.02em; }
.brand__mark {
  display: grid; place-items: center;
  width: 30px;
  color: var(--ink);
}
.brand__mark svg { width: 100%; height: auto; display: block; }
.brand__word { font-size: 1.12rem; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
}
.nav.is-stuck {
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.nav__links { display: flex; gap: 30px; margin-left: auto; margin-right: 8px; }
.nav__links a { font-size: 0.92rem; color: var(--ink-soft); transition: color .2s; }
.nav__links a:hover { color: var(--ink); }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; padding: 64px 0 56px; overflow: hidden; }
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
}
.hero__title {
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin-bottom: 26px;
}
.hero__sub {
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  color: var(--ink-soft);
  max-width: 460px;
  margin-bottom: 38px;
}
.hero__cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.hero__art { display: grid; place-items: center; }

.hero__glow {
  position: absolute;
  top: -10%; right: -5%;
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.07), transparent 62%);
  filter: blur(20px);
  z-index: -1;
  pointer-events: none;
}

/* ============================================================
   PHONE MOCKUPS
   ============================================================ */
.phone {
  position: relative;
  width: 286px;
  aspect-ratio: 9 / 19.3;
  background: linear-gradient(160deg, #2a2a30, #131316);
  border-radius: 44px;
  padding: 8px;
  box-shadow:
    0 2px 4px rgba(0,0,0,.6),
    0 40px 90px -30px rgba(0,0,0,.8),
    inset 0 0 0 1px rgba(255,255,255,.06);
}
.phone--float { animation: float 7s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(-8px); } 50% { transform: translateY(8px); } }

.phone--sm { width: 248px; }

.phone__screen {
  position: relative;
  width: 100%; height: 100%;
  background: radial-gradient(120% 80% at 50% 0%, #18171c, #0c0c0e 70%);
  border-radius: 36px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
/* notch */
.phone__screen::before {
  content: "";
  position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 22px; border-radius: 999px;
  background: #050506; z-index: 5;
}

.status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 22px 4px;
  font-size: 0.72rem; font-weight: 600; color: var(--ink-soft);
}
.status__icons { display: flex; gap: 4px; }
.status__icons i { width: 13px; height: 9px; border-radius: 2px; background: var(--ink-soft); display: inline-block; }
.status__icons i:last-child { width: 18px; border-radius: 3px; }

.app { flex: 1; display: flex; flex-direction: column; padding: 14px 18px 20px; min-height: 0; }

.app__topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.chev { font-size: 1.3rem; color: var(--ink-soft); }
.dots { color: var(--ink-faint); letter-spacing: 1px; font-size: .7rem; }
.pill {
  font-size: 0.66rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 999px;
}
.pill--demo { background: var(--accent-soft); color: var(--accent-2); }
.pill--mini { background: rgba(255,255,255,.06); color: var(--ink-soft); font-size: .62rem; letter-spacing: .02em; text-transform: none; }

/* — Player screen (matches app) — */
.app--player { background: radial-gradient(130% 80% at 50% 122%, rgba(46,74,92,.34), transparent 60%); }
.player__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.player__top svg { width: 18px; height: 18px; color: var(--ink-soft); display: block; }
.player__status { display: flex; align-items: center; gap: 8px; font-size: .64rem; font-weight: 600; letter-spacing: .2em; color: var(--ink-soft); }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: #34d27b; box-shadow: 0 0 8px rgba(52,210,123,.7); }
.vinyl {
  position: relative; width: 62%; aspect-ratio: 1; margin: 18px auto 22px; border-radius: 50%;
  background: repeating-radial-gradient(circle at 50% 50%, #202024 0 1.5px, #131316 1.5px 4px), #0e0e10;
  box-shadow: 0 24px 50px -18px rgba(0,0,0,.8), inset 0 0 0 1px rgba(255,255,255,.05);
}
.vinyl::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 50% 32%, rgba(255,255,255,.07), transparent 55%); }
.vinyl__label {
  position: absolute; inset: 34%; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 38%, #d2d2d8, #97979f); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
.vinyl__label::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #161618; }
.player__title { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.02em; }
.player__meta { display: flex; align-items: center; gap: 10px; margin-top: 9px; font-size: .72rem; color: var(--ink-soft); }
.pm__sep { width: 1px; height: 11px; background: var(--line-2); }
.pm__stage { display: flex; align-items: center; gap: 6px; letter-spacing: .14em; }
.pm__stage i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-faint); }
.pm__icons { margin-left: auto; display: flex; gap: 14px; }
.player__meta svg { width: 15px; height: 15px; color: var(--ink-faint); display: block; }
.app--player .scrub { margin-top: 16px; }
.app--player .scrub__bar span { width: 4%; }
.app--player .scrub__bar::after { left: 4%; }
.player__controls { display: flex; align-items: center; justify-content: center; gap: 36px; margin: 18px 0 20px; }
.player__controls svg { display: block; color: var(--ink-soft); }
.player__controls .pc svg { width: 24px; height: 24px; }
.player__controls .pc--play svg { width: 30px; height: 30px; color: var(--ink); }
.player__tabs { margin-top: auto; display: flex; align-items: flex-start; justify-content: space-around; padding-top: 14px; border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .55rem; font-weight: 600; letter-spacing: .1em; color: var(--ink-faint); }
.tab svg { width: 18px; height: 18px; display: block; }

@keyframes eq { 0%,100% { height: 14px; opacity:.6 } 50% { height: 48px; opacity:1 } }

.scrub { margin: 16px 0; }
.scrub__bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); position: relative; }
.scrub__bar span { position: absolute; left: 0; top: 0; height: 100%; width: 38%; border-radius: 4px; background: var(--accent-grad); }
.scrub__bar::after { content:""; position:absolute; left:38%; top:50%; width:10px; height:10px; border-radius:50%; background:#fff; transform:translate(-50%,-50%); }
.scrub__time { display: flex; justify-content: space-between; font-size: .68rem; color: var(--ink-faint); margin-top: 7px; }

.controls { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 26px; }
.ctrl { font-size: 1.2rem; color: var(--ink-soft); }
.ctrl--main {
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--ink); color: #0a0a0b; font-size: 1.1rem;
  padding-left: 3px;
}
.ctrl--rec { color: var(--accent); font-size: 1.5rem; }
.ctrl--xs { width: 30px; height: 30px; font-size: .7rem; }

/* — Home screen — */
.app--home .home__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.home__head h3 { font-size: 1.4rem; font-weight: 600; letter-spacing: -0.02em; }
.add { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); font-size: 1.2rem; color: var(--ink-soft); }
.filters { display: flex; gap: 7px; margin-bottom: 16px; }
.chip { font-size: .68rem; padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.05); color: var(--ink-soft); }
.chip--on { background: var(--ink); color: #0a0a0b; }
.songlist { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.songlist li { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.sl__art { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(150deg,#26252b,#141318); display: grid; place-items: center; color: var(--ink-soft); font-size: .9rem; }
.sl__meta { display: flex; flex-direction: column; line-height: 1.25; }
.sl__meta b { font-size: .86rem; font-weight: 600; }
.sl__meta small { font-size: .68rem; color: var(--ink-faint); }
.sl__bar { grid-column: 1 / -1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.08); margin-top: 2px; }
.sl__bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent-grad); }

/* — Writing screen — */
.write__title { font-size: .92rem; font-weight: 600; }
.lyrics { flex: 1; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.ly { font-size: .92rem; line-height: 1.45; }
.ly--head { color: var(--accent-2); font-size: .72rem; font-weight: 600; letter-spacing: .05em; margin-top: 6px; }
.ly--ghost { color: var(--ink-faint); }
.caret { display: inline-block; width: 2px; height: 1em; background: var(--accent); margin-left: 2px; vertical-align: -2px; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.miniplayer { margin-top: 14px; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 9px 12px; }
.mp__wave { flex: 1; display: flex; align-items: center; gap: 3px; height: 22px; }
.mp__wave i { flex: 1; border-radius: 2px; background: rgba(255,255,255,.18); height: 40%; }
.mp__wave i:nth-child(2n) { height: 80%; }
.mp__wave i:nth-child(3n) { height: 60%; background: var(--accent); }
.miniplayer small { font-size: .68rem; color: var(--ink-faint); }

/* — Recording screen — */
.app--rec { align-items: center; }
.app--rec .app__topbar { width: 100%; }
.rec__live { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--ink-soft); margin: 10px 0 8px; }
.rec__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(255,255,255,.5); animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.45); } 70% { box-shadow: 0 0 0 12px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
.rec__wave { display: flex; align-items: center; gap: 3px; height: 96px; margin: 20px 0; }
.rec__wave span { width: 3px; border-radius: 3px; background: var(--accent-grad); animation: eq 0.9s ease-in-out infinite; }
.rec__wave span:nth-child(2n) { animation-delay: -.3s; }
.rec__wave span:nth-child(3n) { animation-delay: -.6s; }
.rec__wave span:nth-child(5n) { animation-delay: -.15s; }
.rec__timer { font-size: 2rem; font-weight: 500; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.takes { display: flex; gap: 8px; margin: 18px 0; }
.take { font-size: .68rem; padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.05); color: var(--ink-soft); }
.take--on { background: var(--accent-soft); color: var(--accent-2); }
.ctrl--stop { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #0A0A0B; font-size: 1rem; }

/* — Progress screen — */
.app--prog { align-items: center; }
.app--prog .app__topbar { width: 100%; }
.ring { position: relative; width: 150px; height: 150px; margin: 18px 0 26px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__bg { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 9; }
.ring__fg { fill: none; stroke: url(#g) ; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 124; }
.ring__label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring__label b { font-size: 1.8rem; font-weight: 600; }
.ring__label small { display: block; font-size: .66rem; color: var(--ink-faint); }
.checklist { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 9px; }
.checklist li { display: flex; align-items: center; gap: 11px; font-size: .85rem; color: var(--ink-soft); }
.checklist li span { width: 19px; height: 19px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-size: .6rem; }
.checklist li.done { color: var(--ink); }
.checklist li.done span { background: var(--accent-grad); border-color: transparent; color: #0A0A0B; }


/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how { padding: 0 0 120px; }
.how__head { text-align: center; max-width: 760px; margin: 0 auto 64px; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.step { background: var(--bg); padding: 40px 36px 44px; position: relative; }
.step h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 500; letter-spacing: -0.025em; margin: 0 0 10px; }
.step p { color: var(--ink-soft); max-width: 360px; }
.stages { display: flex; align-items: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.stage { font-size: .78rem; font-weight: 500; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-soft); }
.stage--done { background: var(--accent-grad); color: #0A0A0B; border-color: transparent; }
.arrow { color: var(--ink-faint); }

/* ============================================================
   BUILT FOR
   ============================================================ */
.built { padding: 0 0 130px; }
.built__list { list-style: none; }
.built__list li {
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.2;
  color: var(--ink-faint);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  transition: color .3s var(--ease), padding-left .3s var(--ease);
}
.built__list li:hover { color: var(--ink); padding-left: 14px; }
.built__last { color: var(--ink) !important; }

/* ============================================================
   FINALE / DOWNLOAD CTA
   ============================================================ */
.cta { position: relative; padding: 130px 0 140px; border-top: 1px solid var(--line); background: var(--bg-2); overflow: hidden; text-align: center; }
.cta__inner { display: flex; flex-direction: column; align-items: center; }
.cta__kicker {
  font-size: clamp(1.15rem, 2.6vw, 1.6rem); font-weight: 500; letter-spacing: -0.02em;
  line-height: 1.3; color: var(--ink-faint); max-width: 560px; margin-bottom: 30px;
}
.cta__kicker strong { color: var(--ink); font-weight: 500; }
.cta__title {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 500; line-height: 1.05; letter-spacing: -0.04em;
  margin-bottom: 14px;
}
.cta__sub { color: var(--ink-soft); font-size: 1.12rem; margin-bottom: 38px; }
.cta__free { margin-top: 22px; font-size: .85rem; color: var(--ink-faint); letter-spacing: .01em; }
.cta__glow {
  position: absolute; bottom: -40%; left: 50%; transform: translateX(-50%);
  width: 760px; height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,.055), transparent 60%);
  filter: blur(10px); pointer-events: none;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line); padding: 56px 0 40px; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.footer__links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer__links a { font-size: .92rem; color: var(--ink-soft); transition: color .2s; }
.footer__links a:hover { color: var(--ink); }
.footer__base { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.footer__base p { font-size: .85rem; color: var(--ink-faint); }

/* ============================================================
   HERO TYPEWRITER
   ============================================================ */
.type { display: inline-block; white-space: nowrap; }
.type__word { }
.type__caret {
  display: inline-block;
  width: 4px; height: 0.82em;
  margin-left: 6px;
  background: var(--ink);
  border-radius: 2px;
  vertical-align: baseline;
  animation: blink 1s step-end infinite;
}

/* ============================================================
   SCATTERED GRID
   ============================================================ */
.scatter { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 40px 0 30px; }
.scatter li {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 20px;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.scatter li:hover { border-color: var(--line-2); transform: translateY(-3px); }
.scatter__where { display: block; font-size: .82rem; color: var(--ink-faint); margin-bottom: 9px; }
.scatter__what { display: block; font-size: 1.3rem; font-weight: 500; letter-spacing: -0.02em; }

/* ============================================================
   APP CHIPS (insight: your apps -> Loopin)
   ============================================================ */
.tools__row {
  display: flex; align-items: stretch; justify-content: center;
  flex-wrap: wrap; gap: 14px;
  margin-top: 8px;
}
.appchip {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; min-width: 150px;
  display: flex; flex-direction: column; gap: 3px;
}
.appchip b { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.appchip small { font-size: .85rem; color: var(--ink-soft); }
.appchip--loopin { background: var(--ink); border-color: var(--ink); position: relative; padding-top: 22px; }
.appchip--loopin b, .appchip--loopin small { color: #0A0A0B; }
.appchip--loopin small { color: rgba(10,10,11,.6); }
.appchip__mark { width: 34px; color: #0A0A0B; margin-bottom: 6px; }
.appchip__mark svg { width: 100%; height: auto; display: block; }
.plus, .equals { align-self: center; color: var(--ink-faint); font-size: 1.2rem; }
.equals { color: var(--ink-soft); }

/* ============================================================
   STORY SECTIONS (Apple-style, label-free)
   ============================================================ */
.story { padding: 100px 0; }
.hero + .story { padding-top: 80px; }
.story + .story { padding-top: 0; }
.story--center { text-align: center; }
.story__inner { max-width: 860px; margin: 0 auto; }
.story__head { max-width: 760px; margin: 0 auto 52px; }
.story .big { margin-bottom: 4px; }
.story__foot { margin-top: 30px; font-size: clamp(1.3rem, 2.6vw, 1.7rem); font-weight: 500; letter-spacing: -0.025em; }
.story__note { margin: 34px auto 0; font-size: clamp(1.2rem, 2.5vw, 1.55rem); font-weight: 500; letter-spacing: -0.025em; color: var(--ink-faint); max-width: 680px; }
.story__note strong { color: var(--ink); font-weight: 500; }
.story--center .scatter { max-width: 760px; margin-inline: auto; }

/* ============================================================
   LEGAL / PROSE PAGE
   ============================================================ */
.legal { padding: 80px 0 120px; }
.legal__wrap { max-width: 760px; }
.legal__back { display: inline-flex; align-items: center; gap: 7px; font-size: .9rem; color: var(--ink-soft); margin-bottom: 38px; transition: color .2s; }
.legal__back:hover { color: var(--ink); }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; }
.legal__updated { color: var(--ink-faint); font-size: .92rem; margin-top: 12px; margin-bottom: 8px; }
.legal h2 { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.02em; margin-top: 52px; margin-bottom: 14px; }
.legal h3 { font-size: 1.12rem; font-weight: 600; letter-spacing: -0.01em; margin-top: 30px; margin-bottom: 10px; color: var(--ink); }
.legal p { color: var(--ink-soft); margin-bottom: 16px; line-height: 1.7; }
.legal a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); transition: text-decoration-color .2s; }
.legal a:hover { text-decoration-color: var(--ink); }
.legal ul { list-style: none; margin: 0 0 18px; padding: 0; }
.legal li { position: relative; padding-left: 22px; color: var(--ink-soft); margin-bottom: 10px; line-height: 1.65; }
.legal li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-faint); }
.legal strong { color: var(--ink); font-weight: 600; }
.legal code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .86em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--ink); }
.legal hr { border: none; border-top: 1px solid var(--line); margin: 44px 0; }
.legal__table-wrap { overflow-x: auto; margin: 8px 0 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.legal table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.legal th, .legal td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal thead th { color: var(--ink); font-weight: 600; background: var(--surface); }
.legal tbody td:first-child { color: var(--ink); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .86rem; white-space: nowrap; }
.legal tbody td { color: var(--ink-soft); }
.legal tbody tr:last-child td { border-bottom: none; }

/* support page extras */
.legal__lead { font-size: 1.15rem; color: var(--ink-soft); margin-top: 14px; max-width: 620px; }
.contact-card {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin: 30px 0 8px;
}
.contact-card__text { display: flex; flex-direction: column; gap: 3px; }
.contact-card__text b { color: var(--ink); font-size: 1.05rem; font-weight: 600; }
.contact-card__text span { color: var(--ink-soft); font-size: .92rem; }
.contact-card .btn--store strong { font-size: .98rem; }

.faq { margin: 4px 0 8px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 20px 40px 20px 0; color: var(--ink); font-size: 1.05rem; font-weight: 500;
  letter-spacing: -0.01em; transition: color .2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--ink); }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 300; color: var(--ink-faint); transition: transform .25s var(--ease), color .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); color: var(--ink); }
.faq details p { color: var(--ink-soft); margin: 0 0 22px; max-width: 640px; line-height: 1.7; }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero { padding: 36px 0 72px; }
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__sub { margin-inline: auto; }
  .hero__copy { text-align: center; }
  .hero__cta { justify-content: center; }
  .hero__glow { width: 380px; height: 380px; }
  .steps { grid-template-columns: 1fr; }
  .story { padding-block: 72px; }
  .hero + .story { padding-top: 56px; }
  .built { padding-block: 80px; }
  .how { padding: 0 0 80px; }
  .scatter { grid-template-columns: repeat(2, 1fr); }
  .tools__row { flex-direction: column; align-items: stretch; }
  .plus, .equals { transform: rotate(90deg); }
  .cta { padding: 90px 0 96px; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 22px; }
  .btn--ghost { display: none; }
  .btn--store { width: 100%; max-width: 320px; justify-content: center; }
  .hero__cta { width: 100%; }
  .hero__title { font-size: clamp(2.5rem, 12vw, 3.4rem); }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__links { gap: 18px 22px; }
  .footer__base { flex-direction: column; align-items: flex-start; gap: 6px; }
  .scatter { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .step { padding: 30px 26px 32px; }
  .contact-card { flex-direction: column; align-items: stretch; }
  .contact-card .btn--store { width: 100%; max-width: none; justify-content: center; }
  .faq summary { font-size: 1rem; padding-right: 36px; }
}

/* keep the hero device from ever overflowing a narrow screen */
.phone { max-width: 84vw; }

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