/* Milepost marketing site. Brand tokens match the app's playful redesign and the brand kit. */

:root {
  --ink: #0A0A0B;
  --ink-2: #2A2830;
  --ink-soft: rgba(10, 10, 11, 0.62);
  --paper: #F2F1EC;
  --paper-2: #E8E6DE;
  --card: #FBFAF6;
  --amber: #FFB547;
  --amber-lip: #D9891C;
  --amber-text: #8A5200;
  --coral: #FF8A5B;
  --violet: #A598FF;
  --violet-deep: #6B5BE0;
  --sky: #6CC4FF;
  --sky-deep: #2E8FD8;
  --mint: #6FCF97;
  --mint-deep: #17794F;
  --night: #15103A;
  --night-2: #211A4D;
  --dusk: linear-gradient(180deg, #1A1446 0%, #2E1E66 30%, #5B2F86 55%, #A84E83 76%, #E9726E 90%, #FF8A5B 100%);

  --display: "Bricolage Grotesque", ui-rounded, system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --fs-h1: clamp(2.9rem, 7vw, 6.2rem);
  --fs-h2: clamp(2.1rem, 4.6vw, 3.9rem);
  --fs-h3: clamp(1.35rem, 2vw, 1.7rem);
  --fs-lead: clamp(1.06rem, 1.4vw, 1.25rem);

  --gutter: clamp(16px, 4vw, 64px);
  --section-y: clamp(84px, 11vw, 168px);
  --max: 1200px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --r-card: 32px;
}

*, *::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(--body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 8px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; margin: 0; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.02em; line-height: 1.12; }
p { margin: 0; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-soft); max-width: 34ch; }
.amber { color: var(--amber); }

/* ---------- Buttons ---------- */
.btn {
  --lip: var(--amber-lip);
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 0 28px;
  border: 0; border-radius: 18px;
  background: var(--amber); color: var(--ink);
  font-family: var(--display); font-weight: 800; font-size: 1.08rem; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 5px 0 var(--lip), 0 14px 30px -10px rgba(255, 140, 40, 0.7);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), filter 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--lip), 0 20px 36px -10px rgba(255, 140, 40, 0.75); filter: brightness(1.03); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--lip), 0 6px 14px -8px rgba(255, 140, 40, 0.6); }
.btn small { font-family: var(--body); font-weight: 600; font-size: 0.72rem; opacity: 0.7; letter-spacing: 0; }
.btn-ink { --lip: #000; background: var(--ink); color: var(--paper); box-shadow: 0 5px 0 #000, 0 14px 30px -14px rgba(0,0,0,.6); }
.btn-ink:hover { box-shadow: 0 7px 0 #000, 0 20px 36px -14px rgba(0,0,0,.6); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; text-decoration: none;
  padding: 10px 2px;
}
.link-arrow svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.link-arrow:hover svg { transform: translateY(3px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 12px 0 auto; z-index: 50;
  pointer-events: none;
}
.nav-inner {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: min(100% - 2 * var(--gutter) + 24px, var(--max) + 24px); margin-inline: auto;
  padding: 10px 10px 10px 16px;
  border-radius: 22px;
  color: #fff;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), color 0.3s;
}
.nav.is-stuck .nav-inner {
  background: rgba(21, 16, 58, 0.62);
  -webkit-backdrop-filter: blur(18px) saturate(1.8);
  backdrop-filter: blur(18px) saturate(1.8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 0 0 1px rgba(255,255,255,.08), 0 12px 32px rgba(10, 6, 30, .3);
}
.nav.on-light .nav-inner {
  color: var(--ink);
  background: rgba(251, 250, 246, 0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 0 0 1px rgba(10,10,11,.06), 0 12px 32px rgba(40, 30, 10, .1);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; }
.brand-word { font-family: var(--display); font-weight: 800; font-size: 1.55rem; letter-spacing: -0.045em; line-height: 1; padding-bottom: 3px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a:not(.btn) {
  display: inline-block; padding: 8px 14px; border-radius: 12px;
  font-size: 0.95rem; font-weight: 600; text-decoration: none; opacity: 0.86;
  transition: opacity .2s, background .2s;
}
.nav-links a:not(.btn):hover { opacity: 1; background: rgba(255,255,255,.12); }
.nav.on-light .nav-links a:not(.btn):hover { background: rgba(10,10,11,.06); }
.nav .btn { min-height: 44px; padding: 0 18px; font-size: 0.98rem; border-radius: 14px; box-shadow: 0 4px 0 var(--amber-lip); margin-left: 8px; }
.nav .btn:active { box-shadow: 0 1px 0 var(--amber-lip); transform: translateY(3px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  padding: clamp(120px, 15vh, 170px) 0 0;
  background: var(--dusk);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  display: flex; flex-direction: column;
}
.stars { position: absolute; inset: 0 0 45% 0; z-index: -1; }
.stars i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff;
  opacity: 0.6; animation: twinkle 3.6s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { opacity: .15; transform: scale(.7); } 50% { opacity: .9; transform: scale(1); } }

.hero-grid {
  flex: 1;
  display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: clamp(24px, 4vw, 56px);
  position: relative;
}
.hero-copy { position: relative; z-index: 3; padding-bottom: clamp(40px, 8vh, 110px); }
.hero h1 { margin-top: 0; font-size: clamp(2.9rem, 5.1vw, 5.6rem); }
.hero h1 .line { display: block; }
.hero .lead { color: rgba(255,255,255,.8); margin-top: 24px; max-width: 30ch; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 38px; }

.hero-stage { position: relative; height: clamp(560px, 72vh, 760px); align-self: end; }
.sun {
  position: absolute; left: 50%; bottom: 22%;
  width: min(560px, 92%); aspect-ratio: 1; translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #FFE19A 0%, #FFC163 38%, #FF9D4D 70%, #FF8A5B 100%);
  box-shadow: 0 0 120px 30px rgba(255, 170, 80, .45), 0 0 260px 80px rgba(255, 120, 80, .25);
  animation: sunrise 1.6s var(--ease) both .1s;
  z-index: 0;
}
@keyframes sunrise { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }
.hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(150px, 24vh, 260px); z-index: 1; pointer-events: none; }

.phone {
  position: absolute;
  width: clamp(220px, 21vw, 290px);
  aspect-ratio: 946 / 2052;
  padding: 1.5%;
  border-radius: 15.6% / 7.2%;
  background: #121114;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.22),
    0 0 0 1px rgba(10,10,11,.35),
    0 40px 70px -30px rgba(15, 5, 40, .55),
    0 18px 30px -18px rgba(15, 5, 40, .4);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 14.2% / 6.55%; background: var(--paper); }
.phone.p-front { z-index: 4; left: 40%; bottom: 6%; rotate: 5deg; animation: phoneIn 1.2s var(--ease) both .35s; }
.phone.p-back { z-index: 3; left: 12%; bottom: 16%; rotate: -9deg; width: clamp(190px, 18vw, 250px); animation: phoneIn2 1.2s var(--ease) both .55s; filter: saturate(.95); }
@keyframes phoneIn { from { transform: translateY(80px) rotate(4deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes phoneIn2 { from { transform: translateY(100px) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }

.car-art {
  position: absolute; z-index: 6; left: -16%; bottom: -5%;
  width: clamp(280px, 30vw, 440px);
  filter: drop-shadow(0 24px 30px rgba(40, 10, 50, .45));
  animation: carIn 1.3s var(--spring) both 1s;
}
.car-art img { animation: bob 4.5s ease-in-out infinite 2.3s; }
@keyframes carIn { from { transform: translate(-60px, 40px) scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(-1.5deg); } }

}

/* ---------- Section scaffolding ---------- */
section { position: relative; }
.section { padding-block: var(--section-y); }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(48px, 7vw, 96px); }
.section-head.center { text-align: center; justify-items: center; }
.section-head.center .lead { max-width: 46ch; }
.section-head h2 { max-width: 16ch; text-wrap: balance; }

/* ---------- Stats ---------- */
.stats { padding-top: clamp(80px, 10vw, 140px); }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: end; }
.stats h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); max-width: 16ch; }
.numbers { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; }
.numbers div { padding: 0 20px; border-left: 2px solid var(--paper-2); }
.numbers dt { font-family: var(--display); font-weight: 800; font-size: clamp(2.6rem, 5vw, 4.2rem); line-height: .95; letter-spacing: -0.05em; white-space: nowrap; }
.numbers dd { margin: 10px 0 0; color: var(--ink-soft); font-weight: 500; line-height: 1.35; }

/* ---------- How it works: the road ---------- */
.how { background: var(--paper); overflow: hidden; }
.road-wrap { position: relative; }
.road-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.road-svg { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 140px, #000 calc(100% - 140px), transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 140px, #000 calc(100% - 140px), transparent 100%); }

.r-ghost { fill: none; stroke: #E3E0D6; stroke-width: var(--rw); }
.r-asphalt { fill: none; stroke: #2E2A36; stroke-width: var(--rw); }
.r-edge { fill: none; stroke: #F6F3EA; stroke-width: calc(var(--rw) - 8px); }
.r-inner { fill: none; stroke: #2E2A36; stroke-width: calc(var(--rw) - 12px); }
.r-dash { fill: none; stroke: var(--amber); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 14 18; }
#pave-reveal { stroke-width: calc(var(--rw) + 30px); }
.road-wrap { --rw: 64px; }
.tree .grow { transform-box: fill-box; transform-origin: 50% 100%; transform: scale(0); transition: transform .9s var(--spring); }
.tree.on .grow { transform: scale(1); }
.tree.on .sway { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 4s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }

.road-car { position: absolute; top: 0; left: 0; width: 0; height: 0; z-index: 1; pointer-events: none; will-change: transform; }
.road-car svg { position: absolute; max-width: none; width: 60px; height: 36px; left: -30px; top: -18px; filter: drop-shadow(0 6px 6px rgba(30, 20, 10, .28)); }
.road-car .beam {
  position: absolute; left: 26px; top: -40px; width: 150px; height: 80px;
  background: radial-gradient(ellipse 100% 60% at 0% 50%, rgba(255, 226, 140, .8), rgba(255, 210, 120, 0) 70%);
  clip-path: polygon(0 40%, 100% 0, 100% 100%, 0 60%);
  opacity: 0; transition: opacity .8s var(--ease);
}
.road-car.night .beam { opacity: 1; }
.puff { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #D9D4C7; pointer-events: none; z-index: 2; animation: puff 1s var(--ease) forwards; }
@keyframes puff { from { transform: scale(.4); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
.how { transition: background-color 1.2s var(--ease); }
.how.dusk { background-color: #ECE7F3; }

.steps { position: relative; z-index: 2; display: grid; gap: clamp(90px, 12vw, 170px); }
.step { display: grid; grid-template-columns: 1fr 340px 1fr; align-items: center; }
.step-copy { max-width: 420px; }
.step-copy h3 { font-size: clamp(2rem, 3.4vw, 3rem); letter-spacing: -0.035em; }
.step-copy p { margin-top: 16px; font-size: 1.08rem; color: var(--ink-soft); max-width: 34ch; }
.step:nth-child(odd) .step-copy { grid-column: 1; grid-row: 1; justify-self: end; text-align: right; }
.step:nth-child(odd) .step-copy p { margin-left: auto; }
.step:nth-child(odd) .step-shot { grid-column: 3; grid-row: 1; justify-self: start; }
.step:nth-child(even) .step-copy { grid-column: 3; grid-row: 1; }
.step:nth-child(even) .step-shot { grid-column: 1; grid-row: 1; justify-self: end; }
.step-post { grid-column: 2; grid-row: 1; justify-self: center; position: relative; z-index: 2; }
.post {
  width: 64px; height: 84px; border-radius: 32px 32px 14px 14px;
  background: var(--card); color: var(--ink);
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 1.8rem; letter-spacing: -0.04em;
  box-shadow: inset 0 -6px 0 var(--paper-2), 0 0 0 5px var(--paper), 0 14px 24px -8px rgba(40, 30, 10, .35);
  transition: background .5s var(--ease), color .5s, transform .6s var(--spring);
  position: relative;
}
.post span { display: flex; flex-direction: column; align-items: center; line-height: 1; margin-top: 6px; }
.post small { display: block; font-size: 0.55rem; letter-spacing: 0.14em; text-transform: uppercase; font-family: var(--body); font-weight: 700; margin-bottom: 3px; opacity: .55; }
.post::after { content: ""; position: absolute; inset: -6px; border-radius: 36px 36px 18px 18px; border: 3px solid var(--amber); opacity: 0; pointer-events: none; }
.step.is-passed .post::after { animation: burst .8s var(--ease) forwards; }
@keyframes burst { 0% { opacity: .9; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.7); } }
.step-shot .phone { transition: rotate .9s var(--spring), transform .9s var(--spring); }
.step:nth-child(odd):not(.is-passed) .step-shot .phone { rotate: 9deg; transform: translateY(24px) scale(.96); }
.step:nth-child(even):not(.is-passed) .step-shot .phone { rotate: -9deg; transform: translateY(24px) scale(.96); }
.step.is-passed .post { background: var(--amber); transform: scale(1.08); box-shadow: inset 0 -6px 0 var(--amber-lip), 0 0 0 5px var(--paper), 0 14px 24px -8px rgba(217, 137, 28, .6); }

.step-shot { position: relative; }
.step-shot .phone { position: relative; width: clamp(220px, 20vw, 270px); left: auto; bottom: auto; }
.step:nth-child(odd) .step-shot .phone { rotate: 2deg; }
.step:nth-child(even) .step-shot .phone { rotate: -2deg; }
.blob { position: absolute; inset: 12% -18% 6% -18%; border-radius: 44% 56% 52% 48% / 52% 44% 56% 48%; z-index: -1; }

/* ---------- Bento ---------- */
.why { background: var(--card); }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(260px, auto); gap: 18px; }
.tile {
  position: relative; overflow: hidden;
  border-radius: var(--r-card); padding: clamp(24px, 2.6vw, 34px);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -24px rgba(40, 30, 10, .35); }
.tile h3 { max-width: 15ch; }
.tile p { color: var(--ink-soft); max-width: 32ch; font-size: 1rem; line-height: 1.5; }
.t-progress { grid-column: span 4; grid-row: span 2; background: linear-gradient(150deg, #FFC966 0%, var(--amber) 45%, var(--coral) 100%); }
.t-progress p { color: rgba(10,10,11,.72); }
.t-night { grid-column: span 2; grid-row: span 2; background: var(--night-2); color: #fff; }
.t-night p { color: rgba(255,255,255,.7); }
.t-private { grid-column: span 2; background: #DDF5E7; }
.t-manual { grid-column: span 2; background: var(--paper); }
.t-pdf { grid-column: span 2; background: #E4E0FF; }

.t-progress > :not(.tile-phone) { position: relative; z-index: 1; }
.tile-phone.phone { position: absolute; right: 7%; bottom: -34%; left: auto; width: clamp(200px, 19vw, 250px); rotate: 9deg; z-index: 0; transition: transform .7s var(--ease); }
.t-progress:hover .tile-phone { transform: translateY(-14px) rotate(-2deg); }
.progress-demo { margin-top: auto; display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 3vw, 40px); align-items: end; }
.ring { width: clamp(150px, 16vw, 210px); aspect-ratio: 1; position: relative; }
.ring svg { width: 100%; height: 100%; rotate: -90deg; }
.ring .track { stroke: rgba(10,10,11,.12); }
.ring .bar { stroke: var(--ink); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 2s var(--ease) .2s; }
.ring .moon-bar { stroke: var(--violet-deep); }
.in .ring .bar { stroke-dashoffset: 28; }
.in .ring .moon-bar { stroke-dashoffset: 20; }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label b { font-family: var(--display); font-size: clamp(2.6rem, 4vw, 3.6rem); letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.ring-label span { font-size: .85rem; font-weight: 600; opacity: .7; }
.finish-card {
  background: rgba(255,255,255,.55); border-radius: 22px; padding: 18px 20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  max-width: 300px; justify-self: start;
}
.finish-card .k { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .6; }
.finish-card .v { font-family: var(--display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em; }
.finish-card .bars { display: flex; gap: 5px; align-items: end; height: 54px; margin-top: 12px; }
.finish-card .bars i { flex: 1; border-radius: 6px; background: var(--ink); transform-origin: bottom; transform: scaleY(0); transition: transform .9s var(--spring); }
.in .finish-card .bars i { transform: scaleY(1); }

.arc-demo { margin-top: auto; position: relative; }
.arc-demo svg { width: 100%; height: auto; overflow: visible; }
.arc-demo .sky-arc { fill: none; stroke: rgba(255,255,255,.18); stroke-width: 2; stroke-dasharray: 3 7; }
.arc-demo .night-arc { fill: none; stroke: var(--violet); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 2.2s var(--ease) .3s; }
.in .arc-demo .night-arc { stroke-dashoffset: 0; }
.arc-demo .moon { offset-path: path("M110.8 46.3 Q 200.4 17.6 290 120"); offset-distance: 0%; transition: offset-distance 2.2s var(--ease) .3s; }
.in .arc-demo .moon { offset-distance: 88%; }
.arc-legend .mid { position: absolute; left: 34%; }
.arc-legend { position: relative; display: flex; justify-content: space-between; font-size: .8rem; color: rgba(255,255,255,.6); margin-top: 6px; font-variant-numeric: tabular-nums; }


}

.manual-demo { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.field {
  display: flex; flex-direction: column; padding: 10px 16px; border-radius: 16px; background: #fff;
  box-shadow: inset 0 0 0 1px rgba(10,10,11,.06); min-width: 110px;
}
.field span { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .5; }
.field b { font-family: var(--display); font-size: 1.15rem; letter-spacing: -0.02em; }
.pdf-demo { margin-top: auto; display: flex; align-items: end; gap: 18px; }
.paper-sheet {
  width: 120px; aspect-ratio: 8.5 / 11; border-radius: 10px; background: #fff; padding: 14px 12px; flex: none;
  box-shadow: 0 18px 30px -16px rgba(60, 40, 140, .5); rotate: -6deg; transition: rotate .5s var(--spring), transform .5s var(--spring);
  display: flex; flex-direction: column; gap: 6px;
}
.tile:hover .paper-sheet { rotate: 0deg; transform: translateY(-8px); }
.paper-sheet i { height: 5px; border-radius: 3px; background: #E4E0FF; }
.paper-sheet i:first-child { width: 60%; height: 8px; background: var(--violet-deep); margin-bottom: 4px; }
.paper-sheet i.sig { margin-top: auto; height: 1.5px; background: var(--ink); opacity: .5; }

/* ---------- Parents ---------- */
.parents { background: var(--night); color: #fff; overflow: hidden; isolation: isolate; }
.parents::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(50% 40% at 85% 15%, rgba(165, 152, 255, .28), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgba(255, 138, 91, .22), transparent 70%);
}
.parents .lead { color: rgba(255,255,255,.72); }
.parents-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.parent-list { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 22px; }
.parent-list li { padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); }
.parent-list b { display: block; font-family: var(--display); font-size: 1.25rem; letter-spacing: -0.02em; margin-bottom: 2px; }
.parent-list p { color: rgba(255,255,255,.68); }

.parent-stage { position: relative; height: clamp(520px, 52vw, 640px); }
.parent-stage .phone { left: 50%; top: 50%; translate: -50% -50%; rotate: -3deg; width: clamp(230px, 22vw, 280px); }
.qr-card {
  position: absolute; z-index: 5; left: 0; top: 10%;
  width: 190px; padding: 18px; border-radius: 26px;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 30px 50px -20px rgba(0,0,0,.6);
  rotate: -8deg;
}
.qr-card .qr { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #fff; }
.qr-card .qr svg { width: 100%; height: 100%; }
.qr-card .scan { position: absolute; left: 0; right: 0; height: 30%; background: linear-gradient(180deg, transparent, rgba(255, 181, 71, .55)); border-bottom: 3px solid var(--amber); animation: scan 2.4s ease-in-out infinite; }
@keyframes scan { 0% { top: -30%; } 60%, 100% { top: 100%; } }
.qr-card p { margin-top: 12px; font-weight: 700; font-size: .9rem; text-align: center; }
.qr-card p span { display: block; font-family: var(--display); font-size: 1.3rem; letter-spacing: .14em; }
.toast {
  position: absolute; z-index: 6; right: -2%; bottom: 14%;
  display: flex; gap: 12px; align-items: center;
  width: min(320px, 90%); padding: 14px 16px; border-radius: 22px;
  background: rgba(46, 36, 104, .9);
  -webkit-backdrop-filter: blur(18px) saturate(1.8); backdrop-filter: blur(18px) saturate(1.8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), inset 0 0 0 1px rgba(255,255,255,.12), 0 20px 40px rgba(0,0,0,.35);
  font-size: .9rem; line-height: 1.35;
}
.toast img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.toast b { display: block; }
.toast span { color: rgba(255,255,255,.75); }
.reveal-toast { opacity: 0; transform: translateY(20px) scale(.95); transition: opacity .7s var(--ease) .6s, transform .8s var(--spring) .6s; }
.in .reveal-toast { opacity: 1; transform: none; }

/* ---------- Gallery ---------- */
.gallery { overflow: hidden; }
.gallery-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 48px; }
.gallery-nav { display: flex; gap: 10px; }
.round-btn {
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--ink); color: var(--paper);
  transition: transform .25s var(--ease), background .2s;
}
.round-btn:hover { transform: scale(1.06); }
.round-btn:active { transform: scale(.94); }
.round-btn svg { width: 22px; height: 22px; }
.rail {
  display: flex; gap: clamp(18px, 2.4vw, 32px);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 20px max(var(--gutter), calc((100vw - var(--max)) / 2)) 40px;
  cursor: grab;
}
.rail::-webkit-scrollbar { display: none; }
.rail.dragging { cursor: grabbing; scroll-snap-type: none; }
.shot { flex: none; scroll-snap-align: center; display: grid; gap: 18px; width: clamp(230px, 22vw, 280px); }
.shot .phone { position: relative; width: 100%; left: auto; bottom: auto; transition: transform .6s var(--ease); }
.shot:hover .phone { transform: translateY(-8px) rotate(-1.5deg); }
.shot figcaption { font-family: var(--display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; line-height: 1.2; }
.shot figcaption span { color: var(--amber-text); }
.rail img { -webkit-user-drag: none; user-select: none; }

/* ---------- FAQ ---------- */
.faq { background: var(--card); }
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.faq-grid .section-head { position: sticky; top: 120px; margin-bottom: 0; }
.faq-list { display: grid; gap: 12px; }
.faq details {
  border-radius: 24px; background: var(--paper);
  transition: background .3s;
}
.faq details[open] { background: #fff; box-shadow: 0 20px 40px -28px rgba(40, 30, 10, .35); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 24px;
  font-family: var(--display); font-weight: 800; font-size: 1.18rem; letter-spacing: -0.02em; line-height: 1.25;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { flex: none; position: relative; width: 16px; height: 16px; transition: transform .4s var(--spring); }
.faq summary .plus::before, .faq summary .plus::after { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 2.5px; border-radius: 2px; background: var(--ink); }
.faq summary .plus::after { transform: rotate(90deg); }
.faq details[open] .plus { transform: rotate(45deg); }
.faq .answer { padding: 0 24px 24px; color: var(--ink-soft); max-width: 60ch; }
.faq .answer a { color: var(--amber-text); font-weight: 600; }

/* ---------- Final CTA ---------- */
.final {
  background: var(--dusk); color: #fff; text-align: center; overflow: hidden; isolation: isolate;
  padding-block: clamp(100px, 13vw, 180px) 0;
}
.final h2 { font-size: clamp(2.6rem, 6.4vw, 5.6rem); max-width: 14ch; margin-inline: auto; text-wrap: balance; }
.final .lead { color: rgba(255,255,255,.8); margin: 22px auto 0; max-width: 36ch; }
.final .hero-cta { justify-content: center; }
.final-art { position: relative; margin-top: clamp(40px, 6vw, 80px); height: clamp(260px, 32vw, 420px); }
.final-art .sun { bottom: auto; top: 10%; width: min(520px, 80vw); animation: none; }
.final-art img { position: absolute; left: 50%; bottom: -4%; translate: -50% 0; width: min(760px, 110vw); z-index: 2; filter: drop-shadow(0 30px 40px rgba(60, 10, 40, .4)); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(242, 241, 236, .7); padding: 64px 0 40px; font-size: .95rem; }
.footer-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: start; }
.footer .brand { color: var(--paper); }
.footer p.tag { margin-top: 12px; max-width: 32ch; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px 28px; flex-wrap: wrap; }
.footer ul a { text-decoration: none; font-weight: 600; color: var(--paper); opacity: .85; }
.footer ul a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.footer .fine { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: rgba(242,241,236,.5); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Legal / support pages ---------- */
.doc-hero { background: var(--dusk); color: #fff; padding: 150px 0 80px; overflow: hidden; position: relative; isolation: isolate; }
.doc-hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
.doc-hero p { margin-top: 16px; color: rgba(255,255,255,.75); max-width: 50ch; font-size: 1.1rem; }
.doc-hero .sun { width: 340px; left: auto; right: -60px; bottom: -170px; translate: none; animation: none; }
.doc { padding: clamp(56px, 7vw, 96px) 0 120px; }
.doc-body { max-width: 720px; }
.doc-body h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); letter-spacing: -0.025em; margin: 52px 0 14px; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body p, .doc-body li { color: var(--ink-2); font-size: 1.04rem; line-height: 1.7; }
.doc-body p + p { margin-top: 14px; }
.doc-body ul { padding-left: 1.2em; margin: 12px 0 0; display: grid; gap: 8px; }
.doc-body a { color: var(--amber-text); font-weight: 600; }
.doc-body strong { color: var(--ink); }
.callout { margin-top: 28px; padding: 22px 24px; border-radius: 24px; background: #fff; box-shadow: inset 0 0 0 1px rgba(10,10,11,.06); }
.contact-card {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 28px; border-radius: var(--r-card); background: var(--amber);
}
.contact-card b { display: block; font-family: var(--display); font-size: 1.5rem; letter-spacing: -0.02em; }
.contact-card .btn { box-shadow: 0 5px 0 #000; }
.doc-body details { border-radius: 20px; background: #fff; margin-top: 10px; box-shadow: inset 0 0 0 1px rgba(10,10,11,.05); }
.doc-body summary { cursor: pointer; padding: 18px 22px; font-family: var(--display); font-weight: 800; font-size: 1.1rem; letter-spacing: -0.015em; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.doc-body summary::-webkit-details-marker { display: none; }
.doc-body summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--amber-text); transition: transform .3s var(--ease); }
.doc-body details[open] summary::after { transform: rotate(45deg); }
.doc-body details p { padding: 0 22px 20px; margin: 0; }

/* ---------- Responsive ---------- */
@media (min-width: 901px) { .hero h1 .line { white-space: nowrap; } }

@media (max-width: 1080px) {
  .t-progress { grid-column: span 6; }
  .t-night { grid-column: span 6; grid-row: span 1; }
  .t-private, .t-manual, .t-pdf { grid-column: span 2; }
}

@media (max-width: 900px) {
  .road-wrap { --rw: 34px; }
  .road-car svg { width: 44px; height: 26px; left: -22px; top: -13px; }
  .road-car .beam { left: 18px; width: 100px; }
  .stats-grid { grid-template-columns: 1fr; align-items: start; }
  .t-private, .t-manual, .t-pdf { grid-column: span 6; }
  .nav-links li:not(:last-child) { display: none; }
  .hero { padding-top: 112px; min-height: 0; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 0; }
  .hero-stage { height: 560px; margin-top: 24px; }
  .phone.p-front { left: 46%; }
  .hero h1 .line { display: inline; }

  .step { grid-template-columns: 60px 1fr; gap: 0 20px; align-items: start; }
  .step .step-post, .step:nth-child(n) .step-post { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
  .step:nth-child(n) .step-copy { grid-column: 2; grid-row: 1; justify-self: start; text-align: left; }
  .step:nth-child(n) .step-copy p { margin-left: 0; }
  .step:nth-child(n) .step-shot { grid-column: 2; grid-row: 2; justify-self: center; margin-top: 40px; }
  .post { width: 52px; height: 68px; font-size: 1.4rem; }

  .parents-grid, .faq-grid { grid-template-columns: 1fr; }
  .faq-grid .section-head { position: static; }
}

@media (max-width: 640px) {
  .numbers div { padding: 0 12px; }
  .numbers dd { font-size: .9rem; }
  .brand-word { font-size: 1.35rem; }
  .hero-stage { height: 470px; }
  .phone { width: 196px; }
  .phone.p-front { left: auto; right: 6%; width: 206px; }
  .car-art { width: 250px; left: -10%; bottom: -3%; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .bento .tile { min-height: 230px; }
  .bento .tile { grid-column: auto; grid-row: auto; }
  .progress-demo { grid-template-columns: 1fr; }
  .tile-phone.phone { display: none; }
  .parent-stage { height: 560px; }
  .qr-card { width: 150px; left: -2%; top: 4%; padding: 12px; }
  .toast { right: 0; bottom: 4%; }
  .step { grid-template-columns: 52px 1fr; gap: 0 14px; }
  .step-shot .phone { width: 210px; }
  .faq summary { font-size: 1.06rem; padding: 18px 18px; }
  .faq .answer { padding: 0 18px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
.doc-hero .wrap { max-width: 720px; }
.doc-body ul + p { margin-top: 14px; }

/* Official Apple badge: artwork is used as supplied, only sized. */
.store-badge { display: inline-block; line-height: 0; border-radius: 10px; transition: transform 0.25s var(--ease); }
.store-badge img { height: 54px; width: auto; }
.store-badge:hover { transform: translateY(-2px); }
.store-badge:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }
