/* Period. — the website. The app's own palette (lib/presentation/theme.dart),
   system fonts only, nothing loaded from anywhere else. */

:root {
  --rose: #B5687F;
  --rose-top: #C67B91;
  --rose-bottom: #A85A73;
  --wine: #672C3E;
  --berry: #893B52;
  --raspberry: #B34D6C;
  --blush: #B8637E;
  --dot: #FFF6F8;

  --bg: #FCF6F7;
  --page: #F7EDF0;
  --line: #F0E1E6;
  --card: #FFFBFC;
  --ink: #3E2233;
  --ink-soft: rgba(62, 34, 51, .62);
  --ink-faint: rgba(62, 34, 51, .38);
  --tint: rgba(181, 104, 127, .14);
  --bezel: #1D1418;

  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.22, .8, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #110D0F;
    --page: #161113;
    --line: #2A2125;
    --card: #1F181B;
    --ink: #F2E4EA;
    --ink-soft: rgba(242, 228, 234, .64);
    --ink-faint: rgba(242, 228, 234, .36);
    --tint: rgba(197, 121, 144, .16);
    --wine: #9A425C;
    --berry: #B14C6A;
    --raspberry: #BD647F;
    --blush: #C57990;
    --bezel: #000;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
svg { display: block; }

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

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px max(20px, env(safe-area-inset-left)) 14px max(20px, env(safe-area-inset-right));
  color: #fff;
  transition: color .4s var(--ease), background .4s var(--ease), backdrop-filter .4s;
}
.nav.solid {
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(20px);
  backdrop-filter: saturate(1.6) blur(20px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(var(--rose-top), var(--rose-bottom));
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .25) inset;
}
.brand-icon i { width: 9px; height: 9px; border-radius: 50%; background: var(--dot); }
.brand-word { font: 600 19px/1 var(--display); letter-spacing: -.02em; }
.brand-word b, .finale-word b { color: var(--rose); font-weight: inherit; }
.nav:not(.solid) .brand-word b { color: inherit; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav-links a { text-decoration: none; opacity: .85; }
.nav-links a:hover { opacity: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; white-space: nowrap;
}
.pill-soon {
  padding: 7px 14px; font-size: 14px; font-weight: 500;
  background: rgba(255, 255, 255, .18);
}
.nav.solid .pill-soon { background: var(--tint); color: var(--berry); }
@media (max-width: 560px) {
  .nav-links a { display: none; }
}

/* ---------- 1. Hero ---------- */

/* Every piece is positioned by main.js with transforms and sizes only, from a
   smoothed scroll position, so the zoom glides rather than steps. */
.hero { height: 280vh; position: relative; }
.hero-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden;
}
.hero-field {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  background: linear-gradient(var(--rose-top), var(--rose-bottom));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .18) inset;
  will-change: transform, width, height;
}
.hero-dot, .hero-logo-dot {
  position: absolute; left: 0; top: 0;
  width: 100px; height: 100px; margin: -50px 0 0 -50px;
  border-radius: 50%; background: var(--dot);
  will-change: transform;
}
.hero-logo-dot { box-shadow: 0 0 60px rgba(255, 246, 248, .3); }
.hero-word {
  position: absolute; left: 50%; top: 50%;
  font: 600 clamp(52px, 11vw, 160px)/1 var(--display);
  letter-spacing: -.05em;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -50%);
  will-change: opacity, transform;
}
.ghost-dot {
  display: inline-block; width: .17em; height: .17em; margin-left: .035em;
  border-radius: 50%; vertical-align: baseline;
}
.hero-line {
  position: absolute; left: 0; right: 0; bottom: 14vh;
  margin: 0; text-align: center;
  font: 500 clamp(22px, 3vw, 34px)/1.2 var(--display);
  letter-spacing: -.02em;
  color: var(--ink-soft);
  opacity: 0;
}
.hero-line span { color: var(--rose); }
.scroll-cue {
  position: absolute; left: 50%; bottom: 34px; width: 26px; height: 42px;
  margin-left: -13px; border: 2px solid rgba(255, 255, 255, .7); border-radius: 14px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: #fff;
  animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- 2. Ring ---------- */

/* Long on purpose: about one screen of scrolling per feature. */
.ring-section { height: 600vh; position: relative; }
.ring-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: grid; grid-template-columns: auto minmax(280px, 360px);
  align-items: center; justify-content: center; column-gap: clamp(40px, 7vw, 120px);
  padding: 80px 24px 40px;
}
.ring-main { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.ring-wrap { position: relative; width: min(46vw, 62vh, 480px); aspect-ratio: 1; }
.ring { width: 100%; height: 100%; overflow: visible; }
#ringTicks line { stroke: var(--ink-faint); stroke-width: 1; stroke-linecap: round; }
#ringDays path { fill: none; stroke-width: 20; stroke-linecap: round; transition: opacity .35s var(--ease), stroke-width .5s var(--ease); }
#ringDays path.now { stroke-width: 26; }
#ringOrb {
  fill: var(--card); stroke: var(--wine); stroke-width: 7;
  filter: drop-shadow(0 4px 14px rgba(103, 44, 62, .35));
}
.ring-centre {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none;
}
.ring-caption {
  font-size: clamp(11px, 1.4vw, 14px); letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 500;
}
.ring-number {
  font: 200 clamp(84px, 14vw, 168px)/1 var(--display);
  letter-spacing: -.04em; font-variant-numeric: tabular-nums;
  margin: 2px 0 6px;
}
.ring-phase { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 17px; transition: opacity .4s var(--ease); }
.drop {
  width: 10px; height: 13px; background: var(--wine);
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  clip-path: path("M5 0 C5 0 0 6 0 8.5 A5 5 0 0 0 10 8.5 C10 6 5 0 5 0Z");
}
.window-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  background: var(--tint); color: var(--wine); font-weight: 600; font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.whisper {
  margin: 0; max-width: 36ch; text-align: center;
  color: var(--ink-soft); font-size: 16px;
}

/* The features: stacked in one grid cell, one shown at a time. */
.features { display: grid; }
.feature {
  grid-area: 1 / 1;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 30px 30px 32px; border-radius: 28px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line) inset, 0 30px 70px -40px rgba(103, 44, 62, .45);
  opacity: 0; transform: translateY(26px) scale(.97); filter: blur(6px);
  transition: opacity .6s var(--ease), transform .8s var(--ease), filter .6s var(--ease);
  pointer-events: none;
}
.feature.past { transform: translateY(-26px) scale(.97); }
.feature.on { opacity: 1; transform: none; filter: none; }
.feature svg {
  width: 48px; height: 48px; padding: 10px; border-radius: 14px;
  background: var(--tint); fill: none; stroke: var(--berry); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.feature-days {
  margin-top: 24px; font-size: 13px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--rose);
}
.feature h3 { margin: 8px 0 8px; font: 600 clamp(24px, 2.4vw, 30px)/1.15 var(--display); letter-spacing: -.025em; }
.feature p { margin: 0; color: var(--ink-soft); }
.feature-steps { grid-area: 2 / 1; display: flex; gap: 8px; margin-top: 22px; padding-left: 4px; }
.feature-steps i {
  width: 8px; height: 8px; border-radius: 99px; background: var(--line);
  transition: width .5s var(--ease), background .5s var(--ease);
}
.feature-steps i.on { width: 26px; background: var(--rose); }

@media (max-width: 860px) {
  .ring-stage {
    grid-template-columns: 1fr; align-content: center; justify-items: center;
    row-gap: 22px; padding: 70px 20px 24px;
  }
  .ring-main { gap: 16px; }
  .ring-wrap { width: min(72vw, 40svh, 360px); }
  .ring-number { font-size: clamp(60px, 17vw, 110px); }
  .window-pill { font-size: 14px; padding: 6px 13px; }
  .features { width: min(100%, 420px); }
  .feature { padding: 18px 20px 20px; border-radius: 22px; display: grid; grid-template-columns: auto 1fr; column-gap: 14px; }
  .feature svg { grid-row: 1 / 3; width: 40px; height: 40px; padding: 8px; border-radius: 12px; }
  .feature-days { margin: 0; font-size: 11px; align-self: end; }
  .feature h3 { margin: 2px 0 0; font-size: 21px; align-self: start; }
  .feature p { grid-column: 1 / 3; margin-top: 8px; font-size: 15px; }
  .feature-steps { justify-content: center; margin-top: 14px; padding: 0; }
}

/* ---------- 3. Film ---------- */

.film { padding: 12vh 20px; display: grid; place-items: center; }
.film-frame {
  position: relative; width: min(1200px, 100%); aspect-ratio: 16 / 9;
  border-radius: clamp(18px, 3vw, 36px); overflow: hidden;
  background: linear-gradient(var(--rose-top), var(--rose-bottom));
  box-shadow: 0 40px 120px -40px rgba(103, 44, 62, .45);
}
.film-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 700px) and (orientation: portrait) {
  .film-frame { width: min(100%, calc(82svh * 9 / 16)); aspect-ratio: 9 / 16; }
}
.sound {
  position: absolute; right: 18px; bottom: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px 9px 12px; border: 0; border-radius: 999px;
  font: 500 14px var(--text); color: #fff; cursor: pointer;
  background: rgba(30, 14, 22, .38);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.sound svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound svg path:first-child { fill: #fff; }
.sound .wave { display: none; }
.sound[aria-pressed="true"] .wave { display: block; }
.sound[aria-pressed="true"] .mute { display: none; }

/* ---------- 4. Gallery: an endless carousel ---------- */

.gallery {
  padding: 12vh 0 14vh;
  display: flex; flex-direction: column; align-items: center; gap: 6vh;
}
.big-line {
  margin: 0; padding: 0 20px; text-align: center;
  font: 600 clamp(36px, 6.4vw, 96px)/1.02 var(--display);
  letter-spacing: -.045em;
}
.big-line span { color: var(--rose); }
.marquee {
  width: 100%; overflow: hidden; padding: 24px 0 8px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  cursor: pointer;
}
/* Two copies of the six screens; moving by exactly half loops seamlessly.
   Each card carries its gap as a margin so the halves are equal. */
/* main.js moves it, easing its speed down to a stop and back up again,
   rather than a CSS animation that can only halt mid-stride. */
.track {
  display: flex; width: max-content;
  will-change: transform;
  backface-visibility: hidden;
}
.phone-card {
  margin: 0 clamp(14px, 2vw, 28px); flex: none;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.phone {
  position: relative;
  height: min(54vh, 560px);
  aspect-ratio: 1320 / 2868;
  border-radius: 13% / 6%;
  border: clamp(6px, .9vw, 9px) solid var(--bezel);
  background: var(--bezel);
  overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(62, 34, 51, .55), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.phone::after {
  content: ""; position: absolute; top: 1.6%; left: 50%; width: 30%; height: 3.2%;
  transform: translateX(-50%); border-radius: 999px; background: #000;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 10% / 4.6%; }
.phone-card figcaption { font-weight: 600; font-size: 16px; color: var(--ink-soft); transition: color .4s; }
@media (hover: hover) {
  .phone-card:hover .phone { transform: translateY(-10px) scale(1.03); box-shadow: 0 46px 90px -34px rgba(103, 44, 62, .6), 0 0 0 1px rgba(255, 255, 255, .06) inset; }
  .phone-card:hover figcaption { color: var(--rose); }
}
@media (max-width: 600px) { .phone { height: min(48svh, 460px); } }
.marquee-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px 8px 12px; border: 0; border-radius: 999px;
  background: var(--tint); color: var(--berry);
  font: 600 14px var(--text); cursor: pointer;
}
.marquee-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.marquee-toggle .i-play { display: none; fill: currentColor; }
.marquee-toggle[aria-pressed="true"] .i-play { display: block; }
.marquee-toggle[aria-pressed="true"] .i-pause { display: none; }

/* ---------- 5. Vault ---------- */

.vault {
  padding: 16vh 20px 18vh; display: flex; flex-direction: column; align-items: center; gap: 28px;
  background: radial-gradient(60% 50% at 50% 35%, var(--tint), transparent 70%);
}
.vault-scene { position: relative; width: min(720px, 100%); height: 440px; }
.vault-phone {
  position: absolute; left: 50%; top: 50%; width: 170px; height: 360px; margin: -180px 0 0 -85px;
  border-radius: 34px; border: 8px solid var(--bezel); background: var(--card);
  box-shadow: 0 30px 70px -30px rgba(62, 34, 51, .55);
  overflow: hidden;
}
.vault-screen {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(var(--rose-top), var(--rose-bottom));
  opacity: .12; transition: opacity .8s var(--ease) 1.6s;
}
.lock { width: 64px; height: 64px; fill: none; stroke: var(--dot); stroke-width: 3; stroke-linecap: round; }
.lock rect { fill: var(--dot); stroke: none; }
.lock .shackle { transform: translateY(-6px); transition: transform .5s var(--ease) 2.1s; }
.in .vault-screen { opacity: 1; }
.in .lock .shackle { transform: none; }

.chip {
  position: absolute; left: 50%; top: 50%;
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  background: var(--card); color: var(--wine); font-weight: 600; font-size: 15px;
  box-shadow: 0 10px 30px -12px rgba(62, 34, 51, .4), 0 0 0 1px var(--line) inset;
  transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y)));
  transition: transform 1.1s var(--ease), opacity .4s ease;
  transition-delay: var(--d);
}
.c1 { --x: -270px; --y: -150px; --d: .1s; }
.c2 { --x: 250px;  --y: -120px; --d: .3s; }
.c3 { --x: -290px; --y: 40px;   --d: .5s; }
.c4 { --x: 270px;  --y: 70px;   --d: .7s; }
.c5 { --x: -180px; --y: 175px;  --d: .9s; }
.c6 { --x: 190px;  --y: 180px;  --d: 1.1s; }
.in .chip {
  transform: translate(-50%, -50%) scale(.2);
  opacity: 0;
  transition: transform 1.1s var(--ease), opacity .3s ease;
  transition-delay: var(--d), calc(var(--d) + .8s);
}

.away {
  position: absolute; display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--ink-faint); font-size: 13px; font-weight: 500;
  opacity: .9; transition: opacity .8s ease 1.4s, filter .8s ease 1.4s;
}
.away svg { width: 54px; height: 54px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.away line { stroke: var(--rose); stroke-dasharray: 64; stroke-dashoffset: 64; transition: stroke-dashoffset .6s var(--ease) 1.8s; }
.a1 { left: 4%;  top: 2%; }
.a2 { right: 4%; top: 6%; }
.a3 { left: 50%; bottom: -2%; transform: translateX(-50%); display: none; }
.in .away { opacity: .45; }
.in .away line { stroke-dashoffset: 0; }
@media (max-width: 640px) {
  .vault-scene { height: 400px; }
  .c1 { --x: -120px; --y: -170px; } .c2 { --x: 110px; --y: -150px; }
  .c3 { --x: -130px; --y: 20px; }   .c4 { --x: 120px; --y: 40px; }
  .c5 { --x: -100px; --y: 175px; }  .c6 { --x: 100px; --y: 180px; }
  .a1, .a2 { display: none; }
}

/* ---------- 6. The year, then Wrapped ---------- */

/* One sticky scene. The heatmap tilts into terrain, its period days lift off
   like sparks, and a phone rises through them playing Period. Wrapped. The
   page keeps its own light look; only a soft glow takes each story's colour. */
@property --story { syntax: "<color>"; inherits: true; initial-value: #C9587A; }
.year { height: 520vh; position: relative; }
.year-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden; perspective: 1400px;
  --story: #C9587A;
  transition: --story 1.2s ease;
}
.year-glow {
  position: absolute; inset: -10%;
  background:
    radial-gradient(34% 42% at var(--gx, 66%) 52%, color-mix(in srgb, var(--story) 30%, transparent), transparent 70%),
    radial-gradient(40% 40% at calc(var(--gx, 66%) - 30%) 70%, color-mix(in srgb, var(--story) 12%, transparent), transparent 70%);
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}
.year-line {
  position: absolute; left: 0; right: 0; top: 13vh; z-index: 2;
  will-change: transform, opacity;
}
.terrain {
  position: absolute; left: 50%; top: 56%;
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr);
  gap: clamp(3px, .5vw, 6px);
  transform-style: preserve-3d;
  will-change: transform, opacity;
}
.terrain i {
  width: clamp(5px, 1.25vw, 15px); aspect-ratio: 1; border-radius: 28%;
  background: var(--line);
}
/* Only the period days stand up and lift off, so only they get their own
   3D layer: a few dozen, not all 371, which is what keeps it smooth. */
.terrain i[class] { will-change: transform, opacity; }
.terrain i.l1 { background: color-mix(in srgb, var(--blush) 40%, var(--line)); }
.terrain i.l2 { background: var(--blush); }
.terrain i.l3 { background: var(--raspberry); }
.terrain i.l4 { background: var(--wine); }

.wrapped-copy {
  position: absolute; top: 50%; left: max(6vw, calc(50% - 560px)); width: min(440px, 40vw);
  display: flex; flex-direction: column; align-items: flex-start; gap: 20px;
  opacity: 0; will-change: transform, opacity;
}
.wrapped-copy .big-line { text-align: left; padding: 0; font-size: clamp(36px, 5vw, 76px); }
.wrapped-copy .whisper { text-align: left; max-width: 34ch; }
.wrapped-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 10px; border-radius: 999px;
  background: var(--tint); color: var(--berry); font-weight: 600; font-size: 14px;
}
.wrapped-kicker::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--rose); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rose) 25%, transparent);
}
.year-stage .wrapped-kicker { background: color-mix(in srgb, var(--story) 16%, transparent); transition: background 1.2s; }

.wrapped-spot {
  position: absolute; top: 50%; left: calc(50% + min(16vw, 230px));
  will-change: transform, opacity;
}
.wrapped-phone {
  position: absolute; left: 0; top: 0;
  height: min(68vh, 620px); translate: -50% -50%;
  cursor: pointer; outline: none;
  transform: perspective(1200px) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg));
  transition: transform .5s var(--ease), box-shadow 1.2s;
  box-shadow: 0 50px 100px -40px color-mix(in srgb, var(--story) 70%, #000), 0 0 0 1px rgba(255, 255, 255, .06) inset;
}
.wrapped-phone:focus-visible { box-shadow: 0 0 0 4px var(--rose); }
.stories { position: absolute; inset: 0; }
.stories img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transform: scale(1.08); filter: blur(8px);
  transition: opacity .55s var(--ease), transform .9s var(--ease), filter .55s var(--ease);
}
.stories img.on { opacity: 1; transform: none; filter: none; }

/* The year's numbers, floating round the phone. */
.stat {
  position: absolute; left: 0; top: 0;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 14px 18px 13px; border-radius: 22px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line) inset, 0 24px 50px -24px rgba(62, 34, 51, .45);
  transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(.4);
  opacity: 0;
  transition: transform .9s cubic-bezier(.34, 1.56, .64, 1), opacity .4s ease;
}
.stat.in { opacity: 1; transform: translate(var(--x), var(--y)) rotate(var(--r)); }
.stat b {
  font: 700 clamp(30px, 3.4vw, 46px)/1 var(--display); letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--rose), color-mix(in srgb, var(--story) 80%, var(--wine)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat small { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
/* A soft bob once landed. On `translate`, so it never fights the pop. */
.stat.in { animation: bob 5s ease-in-out var(--d) infinite; }
@keyframes bob { 50% { translate: 0 -10px; } }
.t1 { --x: calc(-50% - min(19vw, 250px)); --y: -230px; --r: -6deg; --d: .9s; }
.t2 { --x: calc(-50% + min(17vw, 220px)); --y: -150px; --r: 5deg;  --d: 1.1s; }
.t3 { --x: calc(-50% - min(20vw, 260px)); --y: 120px;  --r: 4deg;  --d: 1.3s; }
.t4 { --x: calc(-50% + min(18vw, 236px)); --y: 190px;  --r: -5deg; --d: 1.5s; }

@media (max-width: 860px) {
  .wrapped-copy {
    top: 9vh; left: 20px; right: 20px; width: auto;
    align-items: center; gap: 10px; text-align: center;
  }
  .wrapped-copy .big-line { text-align: center; font-size: clamp(32px, 9vw, 52px); }
  .wrapped-copy .whisper { display: none; }
  .wrapped-spot { left: 50%; top: 63%; }
  .wrapped-phone { height: min(50svh, 470px); }
  .stat { padding: 10px 13px 9px; border-radius: 16px; }
  .stat b { font-size: 26px; }
  .stat small { font-size: 11px; }
  .t1 { --x: calc(-50% - 118px); --y: -170px; }
  .t2 { --x: calc(-50% + 118px); --y: -110px; }
  .t3 { --x: calc(-50% - 124px); --y: 70px; }
  .t4 { --x: calc(-50% + 120px); --y: 140px; }
}

/* ---------- 8. Tiles ---------- */

.tiles {
  width: min(1100px, 100% - 40px); margin: 0 auto; padding: 4vh 0 16vh;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.tile {
  background: var(--card); border-radius: 24px; padding: 26px 24px 24px;
  display: flex; flex-direction: column; gap: 4px; min-height: 168px;
  box-shadow: 0 0 0 1px var(--line) inset;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--line) inset, 0 24px 50px -30px rgba(103, 44, 62, .4); }
.tile svg {
  width: 44px; height: 44px; padding: 9px; margin-bottom: auto; border-radius: 12px;
  background: var(--tint); fill: none; stroke: var(--berry); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.tile b { font: 600 19px/1.25 var(--display); letter-spacing: -.01em; margin-top: 22px; }
.tile small { color: var(--ink-soft); font-size: 14px; }
@media (max-width: 860px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr; } .tile { min-height: 0; } }

/* ---------- 9. Finale ---------- */

.finale {
  padding: 10vh 20px 16vh; display: flex; flex-direction: column; align-items: center; text-align: center;
}
.finale-icon {
  width: 128px; height: 128px; border-radius: 29px;
  background: linear-gradient(var(--rose-top), var(--rose-bottom));
  display: grid; place-items: center;
  box-shadow: 0 30px 80px -24px rgba(168, 90, 115, .6), 0 0 0 1px rgba(255, 255, 255, .2) inset;
}
.finale-icon i {
  width: 38px; height: 38px; border-radius: 50%; background: var(--dot);
  animation: breathe 3.2s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.12); } }
.finale-word { margin-top: 34px; font: 600 clamp(56px, 9vw, 120px)/1 var(--display); letter-spacing: -.05em; }
.finale-line { margin: 14px 0 34px; font: 500 clamp(20px, 2.6vw, 28px)/1.2 var(--display); color: var(--ink-soft); letter-spacing: -.02em; }
.finale-cta { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pill-store {
  padding: 14px 24px; font: 600 17px var(--text);
  background: var(--ink); color: var(--bg);
}
.pill-store svg { width: 20px; height: 20px; fill: currentColor; }
.for { color: var(--ink-faint); font-size: 14px; }

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

.footer {
  border-top: 1px solid var(--line);
  padding: 34px 20px 48px; text-align: center; color: var(--ink-soft); font-size: 14px;
}
.footer div { display: flex; justify-content: center; gap: 22px; margin-bottom: 10px; }
.footer a { text-decoration: none; font-weight: 500; color: var(--ink); }
.footer a:hover { color: var(--rose); }
.footer p { margin: 4px 0; }
.footer .fine { color: var(--ink-faint); font-size: 12px; max-width: 60ch; margin: 14px auto 0; }

/* ---------- Reveal ---------- */

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Reduce Motion: everything simply there ---------- */

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue span, .finale-icon i { animation: none; }
  .chip, .vault-screen, .lock .shackle, .away, .away line { transition: none !important; }
  .stories img, .feature, .stat { transition: none; }
  .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .phone-card[aria-hidden="true"], .marquee-toggle { display: none; }
  .stat.in { animation: none; }
}
