/* Outloop — shared tokens, nav, footer and the landing page. Legal pages add legal.css. */

:root {
  --ink: #1f2421;
  --ink-soft: #4a514d;
  --muted: #7d858a;
  --paper: #fbfcfd;
  --surface: #f1f4f6;
  --sky: #eaf4ff;
  --water: #bfd9f1;
  --accent: #648db8;
  --accent-bright: #7fadde;
  --line: #e4e8eb;
  --night: #0d1013;
  --night-soft: #171b1f;
  --night-line: #262c31;
  --on-night: #f3f5f7;
  --on-night-muted: #9aa3aa;
  --nav-bg: rgba(251, 252, 253, 0.72);
  --card: #ffffff;
  --shadow: 0 30px 80px -30px rgba(31, 36, 33, 0.35);

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", "New York", Georgia, serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f3f5f7;
    --ink-soft: #c3cacf;
    --muted: #8d969c;
    --paper: #0d1013;
    --surface: #171b1f;
    --sky: #121a23;
    --water: #23384d;
    --accent: #8fb6e0;
    --accent-bright: #a9caee;
    --line: #262c31;
    --nav-bg: rgba(13, 16, 19, 0.72);
    --card: #171b1f;
    --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #f3f5f7;
  --ink-soft: #c3cacf;
  --muted: #8d969c;
  --paper: #0d1013;
  --surface: #171b1f;
  --sky: #121a23;
  --water: #23384d;
  --accent: #8fb6e0;
  --accent-bright: #a9caee;
  --line: #262c31;
  --nav-bg: rgba(13, 16, 19, 0.72);
  --card: #171b1f;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; font-size: 18px; letter-spacing: -0.02em; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.nav-links a { text-decoration: none; font-size: 14px; color: var(--ink-soft); transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-weight: 600; font-size: 15px; text-decoration: none; border: 0; cursor: pointer;
  transition: transform 0.25s cubic-bezier(.2,.8,.2,1), background 0.2s;
}
.pill:hover { transform: translateY(-1px) scale(1.02); }
.pill.small { min-height: 34px; padding: 0 16px; font-size: 13px; }
.pill.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.pill svg { width: 18px; height: 18px; }
@media (max-width: 760px) { .nav-links { display: none; } .nav .pill { margin-left: auto; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: 128px; text-align: center; background: linear-gradient(180deg, var(--sky) 0%, var(--paper) 62%); }
.hero h1 {
  margin: 18px auto 0; max-width: 14ch;
  font-size: clamp(48px, 9vw, 120px); line-height: 0.95; letter-spacing: -0.045em; font-weight: 700;
}
.hero h1 .serif { font-weight: 400; color: var(--accent); }
.hero .lede { margin: 28px auto 0; max-width: 34em; font-size: clamp(18px, 2vw, 22px); color: var(--ink-soft); }
.hero .ctas { margin-top: 34px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.word > span { display: inline-block; will-change: transform; }

.hero-stage { position: relative; margin: 72px auto 0; height: 160vh; }
.hero-frame {
  position: sticky; top: 72px;
  width: min(1100px, calc(100% - 2 * var(--gutter))); margin: 0 auto;
  aspect-ratio: 3 / 2; max-height: calc(100vh - 100px);
  border-radius: 36px; overflow: hidden; background: #e9eef2;
  box-shadow: var(--shadow);
  will-change: transform;
}
.hero-frame img { width: 100%; height: 100%; object-fit: cover; }
.tag {
  position: absolute; display: flex; align-items: center; gap: 8px;
  padding: 9px 14px 9px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.86); color: #1f2421;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: clamp(11px, 1.3vw, 14px); font-weight: 600; white-space: nowrap;
  box-shadow: 0 10px 30px -12px rgba(31, 36, 33, 0.45);
}
.tag i { width: 22px; height: 22px; border-radius: 50%; background: #648db8; display: grid; place-items: center; font-style: normal; color: #fff; font-size: 11px; }
.tag small { color: #7d858a; font-weight: 500; }
.tag.t1 { left: 34%; top: 9%; }
.tag.t2 { right: 4%; top: 25%; }
.tag.t3 { left: 3%; top: 54%; }
.tag.t4 { left: 50%; bottom: 13%; transform: translateX(-50%); }
@media (max-width: 640px) {
  .hero-frame { border-radius: 22px; aspect-ratio: 4 / 5; }
  .hero-frame img { object-position: 45% 50%; }
  .tag.t1 { left: 8%; top: 8%; } .tag.t2 { right: 4%; top: 30%; } .tag.t3 { left: 4%; top: 62%; }
}

/* ---------- Statement (words fill as you scroll) ---------- */
.statement { padding: clamp(120px, 18vw, 220px) 0; }
.statement p {
  margin: 0; max-width: 20ch;
  font-size: clamp(36px, 6.2vw, 84px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700;
}
.js .statement .fill-word { opacity: 0.16; }

/* ---------- Moods (pinned) ---------- */
.moods { position: relative; background: var(--night); color: var(--on-night); }
.moods-pin { height: 100vh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: var(--gutter); max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.moods h2 { margin: 14px 0 0; font-size: clamp(40px, 6vw, 80px); line-height: 1; letter-spacing: -0.04em; font-weight: 700; }
.mood-word { display: block; position: relative; height: 1.15em; overflow: hidden; color: var(--accent-bright); }
.mood-word span { position: absolute; left: 0; top: 0; white-space: nowrap; line-height: 1.15; }
.js .mood-word span + span { opacity: 0; }
.moods .copy p { color: var(--on-night-muted); max-width: 28em; font-size: 19px; margin-top: 26px; }
.mood-stack { position: relative; aspect-ratio: 4 / 5; max-height: 76vh; justify-self: center; width: 100%; max-width: 520px; border-radius: 32px; overflow: hidden; background: var(--night-soft); }
.mood-stack img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mood-meta {
  position: absolute; left: 18px; right: 18px; bottom: 18px; display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-radius: 20px; background: rgba(13, 16, 19, 0.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 14px; font-weight: 600;
}
.mood-meta .dots { display: flex; gap: 6px; }
.mood-meta .dots b { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.35); transition: background .3s, width .3s; }
.mood-meta .dots b.on { background: #fff; width: 18px; border-radius: 3px; }
@media (max-width: 860px) {
  .moods-pin { grid-template-columns: 1fr; align-content: center; gap: 28px; text-align: left; }
  .moods .copy p { display: none; }
  .mood-stack { max-height: 54vh; aspect-ratio: 4 / 4.4; }
}
.no-pin .moods-pin { height: auto; padding-top: 100px; padding-bottom: 100px; }

/* ---------- Phone tour (pinned) ---------- */
.tour { position: relative; }
.tour-pin { height: 100vh; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(24px, 5vw, 80px); max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.tour-steps { position: relative; height: 260px; }
.tour-step { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; }
.js .tour-step + .tour-step { opacity: 0; }
.tour-step .num { font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--accent); }
.tour-step h3 { margin: 6px 0 12px; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.02; letter-spacing: -0.035em; }
.tour-step p { margin: 0; color: var(--ink-soft); max-width: 22em; }
.phone {
  position: relative; width: min(330px, 72vw); aspect-ratio: 700 / 1518;
  border-radius: 54px; padding: 11px; background: #111;
  box-shadow: 0 0 0 2px #2b2f33, 0 50px 100px -30px rgba(31, 36, 33, 0.55);
}
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 44px; overflow: hidden; background: #fff; }
.phone .screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.js .phone .screen img + img { opacity: 0; }
.tour-progress { display: flex; flex-direction: column; gap: 14px; justify-self: end; }
.tour-progress button {
  all: unset; cursor: pointer; display: flex; align-items: center; gap: 12px; min-height: 44px;
  font-size: 15px; font-weight: 600; color: var(--muted); transition: color .3s;
}
.tour-progress button::before { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; transition: width .3s; }
.tour-progress button.on { color: var(--ink); }
.tour-progress button.on::before { width: 48px; background: var(--accent); }
@media (max-width: 960px) {
  .tour-pin { grid-template-columns: 1fr; justify-items: center; align-content: center; gap: 24px; text-align: center; }
  .tour-progress { display: none; }
  .tour-steps { order: 2; height: 150px; width: 100%; }
  .tour-step { align-items: center; }
  .tour-step h3 { font-size: 28px; margin-bottom: 6px; } .tour-step p { font-size: 15px; }
  .phone { width: min(250px, 58vw); border-radius: 42px; padding: 8px; }
  .phone .screen { border-radius: 35px; }
}
@media (max-width: 960px) and (max-height: 700px) { .phone { width: min(200px, 50vw); } }
.no-pin .tour-pin { height: auto; padding-top: 100px; padding-bottom: 100px; }

/* ---------- Plus features (horizontal) ---------- */
.plus { position: relative; background: var(--surface); overflow: hidden; }
.plus-head { padding-top: clamp(100px, 12vw, 160px); }
.plus-head h2 { margin: 14px 0 0; font-size: clamp(40px, 6vw, 80px); line-height: 1; letter-spacing: -0.04em; max-width: 13ch; }
.plus-head p { color: var(--ink-soft); max-width: 32em; font-size: 19px; }
.rail-pin { height: 100vh; display: flex; align-items: center; }
.rail { display: flex; gap: 20px; padding: 0 var(--gutter); padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); will-change: transform; }
.card {
  position: relative; flex: 0 0 auto; width: clamp(270px, 30vw, 380px); height: min(560px, 70vh);
  border-radius: 30px; background: var(--card); overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 28px;
  box-shadow: 0 1px 0 var(--line);
  contain: paint; isolation: isolate;
}
.card h3 { margin: 0 0 8px; font-size: 26px; line-height: 1.08; letter-spacing: -0.03em; }
.card p { margin: 0; color: var(--ink-soft); font-size: 16px; }
.card .glyph { position: absolute; top: 28px; left: 28px; width: 52px; height: 52px; border-radius: 16px; background: var(--sky); color: var(--accent); display: grid; place-items: center; }
.card .glyph svg { width: 26px; height: 26px; }
.card.photo { color: #fff; }
.card.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card.photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 38%, rgba(0,0,0,.72) 100%); }
.card.photo h3, .card.photo p { position: relative; z-index: 1; }
.card.photo p { color: rgba(255,255,255,.82); }
.card .art { position: absolute; top: 96px; left: 28px; right: 28px; height: 46%; }
.card .art svg { width: 100%; height: 100%; overflow: visible; }
.no-pin .rail-pin { height: auto; padding: 60px 0 100px; }
.no-pin .rail { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
.no-pin .card { scroll-snap-align: start; }

/* ---------- Free vs Plus ---------- */
.compare { padding: clamp(100px, 12vw, 160px) 0; }
.compare h2 { margin: 14px 0 48px; font-size: clamp(36px, 5vw, 64px); letter-spacing: -0.04em; line-height: 1.02; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.plan { border-radius: 30px; padding: 34px; background: var(--surface); }
.plan.plus-plan { background: var(--ink); color: var(--paper); position: relative; overflow: hidden; }
.plan.plus-plan::before { content: ""; position: absolute; width: 380px; height: 380px; right: -140px; top: -160px; border-radius: 50%; border: 22px solid var(--accent); opacity: .5; }
.plan h3 { margin: 0; font-size: 30px; letter-spacing: -0.03em; }
.plan .price { margin: 6px 0 24px; color: var(--muted); font-size: 15px; }
.plan.plus-plan .price { color: color-mix(in srgb, var(--paper) 60%, transparent); }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; position: relative; }
.plan li { display: flex; gap: 12px; align-items: flex-start; }
.plan li svg { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 2px; color: var(--accent); }
.plan.plus-plan li svg { color: var(--accent-bright); }
.fine { margin-top: 20px; color: var(--muted); font-size: 13px; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* ---------- Privacy ---------- */
.privacy { background: var(--night); color: var(--on-night); padding: clamp(100px, 13vw, 180px) 0; overflow: hidden; }
.privacy-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--gutter); align-items: end; }
.privacy h2 { margin: 14px 0 0; font-size: clamp(44px, 7vw, 96px); line-height: 0.96; letter-spacing: -0.045em; }
.privacy h2 .serif { color: var(--accent-bright); }
.privacy-head p { color: var(--on-night-muted); font-size: 19px; margin: 0; }
.vault { margin: 64px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.vault div { border-radius: 26px; padding: 26px; background: var(--night-soft); border: 1px solid var(--night-line); }
.vault svg { width: 30px; height: 30px; color: var(--accent-bright); }
.vault h3 { margin: 18px 0 8px; font-size: 20px; letter-spacing: -0.02em; }
.vault p { margin: 0; color: var(--on-night-muted); font-size: 15px; }
.privacy .pill { background: var(--on-night); color: var(--night); margin-top: 40px; }
.privacy .pill.ghost { background: transparent; color: var(--on-night); box-shadow: inset 0 0 0 1px var(--night-line); }
.privacy .links { display: flex; gap: 12px; flex-wrap: wrap; }
.blur-pin { position: relative; height: 220px; margin-top: 64px; border-radius: 30px; overflow: hidden; border: 1px solid var(--night-line); }
.blur-pin img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.4) brightness(.6); }
.blur-pin .zone {
  position: absolute; left: 50%; top: 50%; width: 170px; height: 170px; margin: -85px 0 0 -85px; border-radius: 50%;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(127, 173, 222, .18); border: 1.5px dashed rgba(169, 202, 238, .9);
  display: grid; place-items: center; font-size: 13px; font-weight: 600; text-align: center; color: #fff; padding: 20px;
}
@media (max-width: 960px) { .vault { grid-template-columns: 1fr 1fr; } .privacy-head { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .vault { grid-template-columns: 1fr; } }

/* ---------- Closing loop ---------- */
.finale { position: relative; text-align: center; padding: clamp(110px, 14vw, 200px) 0 clamp(90px, 10vw, 140px); overflow: hidden; }
.finale-loop { width: min(760px, 100%); margin: 0 auto; display: block; overflow: visible; }
.finale-loop .track { fill: none; stroke: var(--line); stroke-width: 6; stroke-linecap: round; }
.finale-loop .draw { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; }
.finale-loop .stop { fill: var(--paper); stroke: var(--accent); stroke-width: 4; }
.finale-loop .home { fill: var(--ink); }
.finale-loop .walker { fill: var(--accent); }
.finale-loop text { fill: var(--muted); font: 600 15px var(--sans); }
.finale h2 { margin: 30px auto 0; font-size: clamp(44px, 7vw, 96px); line-height: .98; letter-spacing: -0.045em; max-width: 12ch; }
.finale p { color: var(--ink-soft); font-size: 19px; max-width: 30em; margin: 22px auto 0; }
.finale .ctas { margin-top: 34px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: 13px; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 18px 36px; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.foot nav a { text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.foot nav a:hover { color: var(--ink); }
.foot .credit { width: 100%; }
.foot .theme { margin-left: auto; }
.theme button { all: unset; cursor: pointer; min-height: 32px; padding: 0 12px; border-radius: 999px; font-weight: 600; color: var(--muted); }
.theme button[aria-pressed="true"] { background: var(--surface); color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-stage { height: auto; }
  .hero-frame { position: relative; top: 0; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Reduced motion or no GSAP: every step is shown, stacked. */
.no-pin .tour-steps { height: auto; display: grid; gap: 28px; }
.no-pin .tour-step { position: relative; opacity: 1 !important; transform: none !important; }
.no-pin .fill-word { opacity: 1 !important; }
/* Without motion the art shows its finished state; a partly filled ring reads as progress. */
.art-ring { stroke-dasharray: 362 440; }
.brand img { box-shadow: 0 0 0 1px var(--line); }
