/* ============================================================
   Dalia · landing system
   editorial typography · oklch palette · cinematic motion
   ============================================================ */

:root {
  /* surfaces */
  --bg:           oklch(98%   0.005 320);
  --bg-soft:      oklch(96.5% 0.008 320);
  --bg-deep:      oklch(94%   0.014 318);
  --bg-warm:      oklch(96%   0.018 60);

  /* ink */
  --ink:          oklch(22%   0.04  315);
  --ink-strong:   oklch(15%   0.05  315);
  --ink-soft:     oklch(45%   0.025 315);
  --ink-faint:    oklch(60%   0.018 315);
  --ink-quiet:    oklch(75%   0.012 315);

  /* accent — Dalia purple */
  --accent:       oklch(54%   0.16  305);
  --accent-deep:  oklch(44%   0.18  305);
  --accent-soft:  oklch(94%   0.04  305);
  --accent-glow:  oklch(82%   0.13  305);

  /* functional, in-app inherited */
  --mint:         oklch(72%   0.14  165);
  --coral:        oklch(72%   0.17  25);
  --amber:        oklch(78%   0.14  65);

  /* lines */
  --line:         oklch(88%   0.012 315);
  --line-soft:    oklch(93%   0.008 315);

  /* shadows */
  --shadow-sm:    0 4px 12px -2px   oklch(35% 0.08 315 / 0.07);
  --shadow-md:    0 14px 32px -10px oklch(35% 0.08 315 / 0.16);
  --shadow-lg:    0 32px 64px -16px oklch(32% 0.10 315 / 0.22);
  --shadow-phone: 0 50px 90px -25px oklch(30% 0.12 315 / 0.32),
                  0 16px 32px -12px oklch(30% 0.10 315 / 0.18);

  /* type */
  --serif:  'Fraunces', 'Playfair Display', Georgia, serif;
  --sans:   'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* easing */
  --ease-out-quart:  cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-quint:  cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-soft:   cubic-bezier(0.34, 1.2, 0.64, 1);

  /* rhythm */
  --gutter:       clamp(1.25rem, 4vw, 2rem);
  --section-y:    clamp(5rem, 12vw, 9rem);
  --container:    1240px;
}

/* ============================================================
   reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--bg); }

/* ============================================================
   typography
   ============================================================ */
.serif { font-family: var(--serif); font-variation-settings: "SOFT" 50, "WONK" 0; font-weight: 450; letter-spacing: -0.015em; }
.sans  { font-family: var(--sans); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 50;
  font-weight: 450;
  letter-spacing: -0.022em;
  color: var(--ink-strong);
  line-height: 1.02;
  margin: 0;
}

h1.hero {
  font-size: clamp(2rem, 4.2vw, 3.8rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
}
h1.hero em {
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  color: var(--accent);
}

h2.section-title {
  font-size: clamp(2rem, 4.8vw, 3.6rem);
  line-height: 1.04;
  max-width: 18ch;
}

h3.feature-title {
  font-size: clamp(1.35rem, 2.3vw, 1.85rem);
  line-height: 1.18;
}

p.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0;
}

p { margin: 0; max-width: 70ch; }

/* ============================================================
   layout
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section {
  padding-block: var(--section-y);
  position: relative;
}

/* ============================================================
   nav — minimal, fixed wordmark only
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 1.1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: oklch(98% 0.005 320 / 0.7);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color 600ms var(--ease-out-quart), background 600ms var(--ease-out-quart);
}
.nav.scrolled { border-bottom-color: var(--line-soft); }

.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.wordmark .dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  transform: translateY(-0.05em);
}

.nav-cta {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color 220ms, border-color 220ms, background 220ms;
}
.nav-cta:hover { color: var(--ink-strong); border-color: var(--ink-strong); }

/* ============================================================
   hero
   ============================================================ */
.hero {
  min-height: 100svh;
  padding-top: clamp(4.5rem, 7.5vh, 6rem);
  padding-bottom: clamp(1.5rem, 4vh, 2.5rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
  position: relative;
  isolation: isolate;
}
.hero-text { max-width: 42rem; }
.hero-text .eyebrow { margin-bottom: 1rem; }
.hero-text h1 { margin-bottom: 1.2rem; }
.hero-text .lede { margin-bottom: 1.6rem; font-size: clamp(1rem, 1.15vw, 1.1rem); }

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.5rem;
  background: var(--ink-strong);
  color: var(--bg);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  transform: translate3d(0, 0, 0);
  transition: transform 280ms var(--ease-out-quart), box-shadow 280ms var(--ease-out-quart), background 280ms;
  box-shadow: 0 1px 0 oklch(0% 0 0 / 0.04), var(--shadow-sm);
}
.btn-primary:hover  { transform: translate3d(0, -2px, 0); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translate3d(0,  0,   0); }

.btn-primary .pill {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--bg);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}
.btn-ghost::after {
  content: "";
  position: absolute;
  inset: auto 0 0.45rem 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 360ms var(--ease-out-quart);
}
.btn-ghost:hover { color: var(--ink-strong); }
.btn-ghost:hover::after { transform: scaleX(1); }
.btn-ghost .arrow { transform: translate3d(0, 0, 0); transition: transform 360ms var(--ease-out-quart); }
.btn-ghost:hover .arrow { transform: translate3d(0, 2px, 0); }

/* hero phone */
.hero-stage {
  position: relative;
  perspective: 2400px;
  perspective-origin: 50% 30%;
  display: grid;
  place-items: center;
  min-height: auto;
  /* parallax JS sets translate3d on this element on scroll; pre-declare
     will-change so Safari promotes the layer up front instead of mid-scroll
     (which causes a visible jump). */
  will-change: transform;
}
.hero-blob {
  position: absolute;
  inset: -12% -8% -8% -8%;
  z-index: -1;
  filter: blur(70px) saturate(1.3);
  opacity: 0.85;
  pointer-events: none;
  /* transform-based animation — Safari composes this on GPU reliably,
     unlike SVG `d:` keyframes which fall back to slow software rendering. */
  transform-origin: 50% 50%;
  animation: blobBreathe 26s ease-in-out infinite;
  will-change: transform;
}
.hero-blob svg { width: 100%; height: 100%; }
@keyframes blobBreathe {
  0%, 100% { transform: scale(1)    rotate(0deg); }
  50%      { transform: scale(1.06) rotate(4deg); }
}

.phone {
  position: relative;
  display: block;
  width: 100%;
  max-width: 320px;
  filter: drop-shadow(var(--shadow-phone));
  transform-style: preserve-3d;
  will-change: transform;
}
.phone img { width: 100%; height: auto; display: block; }

.phone.hero-phone {
  max-width: clamp(240px, 26vw, 300px);
  transform: rotateY(-13deg) rotateX(5deg) translateZ(0);
  animation: phoneFloat 5.5s ease-in-out infinite;
  will-change: transform;
}
@keyframes phoneFloat {
  /* explicit translateZ(0) on every keyframe so Safari keeps the element
     on its compositor layer for the whole animation cycle */
  0%, 100% { transform: rotateY(-13deg) rotateX(5deg) translateZ(0) translateY(0); }
  50%      { transform: rotateY(-13deg) rotateX(5deg) translateZ(0) translateY(-12px); }
}

/* hero glow ring */
.hero-ring {
  position: absolute;
  inset: 8% 12% auto auto;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  opacity: 0.35;
  z-index: -1;
  filter: blur(20px);
  pointer-events: none;
}

/* ============================================================
   reveal — global fade+rise, clip-mask for headlines
   ============================================================ */
/* Entrance animations use @keyframes (not transition) so Safari can't merge
   the initial and final paints into one frame and skip the from-state.
   `translate3d(0, …, 0)` forces GPU compositing on every browser. */
.reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  will-change: opacity, transform;
}
.reveal.in {
  animation: revealRise 900ms var(--ease-out-quart) both;
}

.reveal-stagger > * {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  will-change: opacity, transform;
}
.reveal-stagger.in > * {
  animation: revealRise 900ms var(--ease-out-quart) both;
}

@keyframes revealRise {
  from { opacity: 0; transform: translate3d(0, 28px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0,    0); }
}
.reveal-stagger.in > :nth-child(1) { animation-delay: 0ms; }
.reveal-stagger.in > :nth-child(2) { animation-delay: 90ms; }
.reveal-stagger.in > :nth-child(3) { animation-delay: 180ms; }
.reveal-stagger.in > :nth-child(4) { animation-delay: 270ms; }
.reveal-stagger.in > :nth-child(5) { animation-delay: 360ms; }
.reveal-stagger.in > :nth-child(6) { animation-delay: 450ms; }

/* word-by-word reveal removed — caused layout instability with inline-block
   stacking + vertical-align + clip-path. The h1 uses the simpler .reveal
   (whole-headline fade + rise) which is editorial and predictable. */

/* ============================================================
   section · how it works (3 phones, arc layout)
   full-bleed bg, content stays inside an inner .container
   ============================================================ */
.howto {
  background: linear-gradient(180deg, transparent 0%, var(--bg-soft) 30%, var(--bg-soft) 70%, transparent 100%);
}
.howto > .container { position: relative; }
.howto-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.howto-head .lede { justify-self: end; }

.howto-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: clamp(1rem, 2vw, 2rem);
  align-items: center;
  perspective: 2200px;
  padding-block: 2rem;
}
.howto-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}
.howto-step .step-num {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.howto-step h3 { font-size: clamp(1.3rem, 1.8vw, 1.55rem); }
.howto-step p { color: var(--ink-soft); font-size: 0.97rem; max-width: 26ch; }

/* Full 3D chain: stage already has perspective; step + phone-wrap need
   preserve-3d so the rotateY interpolation propagates through the hierarchy
   instead of being flattened mid-transition (which is the Safari snap). */
.howto-stage,
.howto-step {
  transform-style: preserve-3d;
}
.howto-step .phone-wrap {
  transition: transform 600ms var(--ease-out-quart);
  transform-style: preserve-3d;
  /* Permanent layer promotion: Safari creates the 3D compositor layer up front
     instead of mid-hover (which causes a one-frame snap before the transition). */
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform-origin: 50% 50%;
}
/* Base (idle) states. Function list is identical across all four rules:
   translate3d → rotateY → rotateZ → scale. Identical lists are required
   for Safari to interpolate component-by-component instead of falling back
   to a discrete snap at the start of the transition. */
.howto-step:nth-child(1) .phone-wrap { transform: translate3d(0, 20px, 0) rotateY( 10deg) rotateZ(-2.5deg) scale(1); }
.howto-step:nth-child(2) .phone-wrap { transform: translate3d(0, 0,    0) rotateY(  0deg) rotateZ( 0deg)   scale(1.06); }
.howto-step:nth-child(3) .phone-wrap { transform: translate3d(0, 20px, 0) rotateY(-10deg) rotateZ( 2.5deg) scale(1); }

/* Per-position :hover rules. KEY DECISION: rotateY/rotateZ values are IDENTICAL
   to the base state. Only translate3d (lift) and scale (grow) change. This
   avoids the Safari rotateY-matrix-interpolation snap entirely — there's
   simply no rotation to interpolate. Visual effect: phone rises and grows
   while keeping its editorial 3D angle. */
.howto-step:nth-child(1):hover .phone-wrap { transform: translate3d(0, 10px, 0) rotateY( 10deg) rotateZ(-2.5deg) scale(1.05); }
.howto-step:nth-child(2):hover .phone-wrap { transform: translate3d(0, -8px, 0) rotateY(  0deg) rotateZ( 0deg)   scale(1.10); }
.howto-step:nth-child(3):hover .phone-wrap { transform: translate3d(0, 10px, 0) rotateY(-10deg) rotateZ( 2.5deg) scale(1.05); }

.howto-step .phone { max-width: 260px; }
.howto-step:nth-child(2) .phone { max-width: 280px; }

.howto-connector {
  position: absolute;
  top: 32%;
  left: 0;
  right: 0;
  height: 80px;
  pointer-events: none;
  z-index: -1;
}
.howto-connector svg { width: 100%; height: 100%; overflow: visible; }
.howto-connector path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.2;
  stroke-dasharray: 4 6;
  stroke-dashoffset: 1000;
  opacity: 0.35;
  transition: stroke-dashoffset 1800ms var(--ease-out-quart) 200ms;
}
.howto-stage.in .howto-connector path { stroke-dashoffset: 0; }

/* ============================================================
   section · the whole day (annotated phone, full-bleed deco)
   ============================================================ */
.wholeday {
  position: relative;
  text-align: center;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 70% at 50% 55%, oklch(95% 0.025 305) 0%, transparent 65%);
}
.wholeday-deco {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  width: 100%;
  height: 100%;
  filter: blur(2.5px);
  opacity: 0.72;
}
.wholeday-deco svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.wholeday-deco .deco-layer-a,
.wholeday-deco .deco-layer-b {
  transform-origin: 50% 50%;
  will-change: transform;
}
.wholeday-deco .deco-layer-a {
  animation: decoDriftA 38s ease-in-out infinite;
}
.wholeday-deco .deco-layer-b {
  animation: decoDriftB 46s ease-in-out -8s infinite;
}
@keyframes decoDriftA {
  0%, 100% { transform: translate3d(-1.6%, -0.6%, 0); }
  50%      { transform: translate3d( 1.6%,  0.6%, 0); }
}
@keyframes decoDriftB {
  0%, 100% { transform: translate3d( 1.2%,  0.8%, 0); }
  50%      { transform: translate3d(-1.2%, -0.8%, 0); }
}
.wholeday-deco .deco-curve {
  fill: none;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 2200ms var(--ease-out-quart);
}
.wholeday.in .deco-curve { opacity: 1; }
.wholeday.in .deco-layer-a .deco-curve:nth-child(1) { transition-delay: 200ms; }
.wholeday.in .deco-layer-a .deco-curve:nth-child(2) { transition-delay: 700ms; }
.wholeday.in .deco-layer-b .deco-curve:nth-child(1) { transition-delay: 1100ms; }
.wholeday > .container { position: relative; }
.wholeday-head { margin-inline: auto; max-width: 38rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.wholeday-head h2 { margin-inline: auto; }
.wholeday-head .lede { margin-inline: auto; margin-top: 1.5rem; }

.wholeday-stage {
  position: relative;
  perspective: 2400px;
  display: grid;
  place-items: center;
  min-height: 720px;
  padding-block: 2rem;
}
.wholeday-stage .phone {
  max-width: 360px;
  transform: rotateX(3deg);
}
.wholeday-stage .phone-glow {
  position: absolute;
  width: 540px;
  height: 540px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 65%);
  z-index: -1;
  filter: blur(40px);
}

.annot {
  position: absolute;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
  box-shadow: var(--shadow-md);
  font-size: 0.86rem;
  line-height: 1.4;
  max-width: 220px;
  opacity: 0;
  transform: translate3d(0, 10px, 0) scale(0.85);
  transition: opacity 700ms var(--ease-out-soft), transform 700ms var(--ease-out-soft);
}
.annot strong {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 0.15rem;
  letter-spacing: -0.01em;
}
.annot.in { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
.wholeday-stage.in .annot:nth-of-type(1) { transition-delay: 200ms; }
.wholeday-stage.in .annot:nth-of-type(2) { transition-delay: 500ms; }
.wholeday-stage.in .annot:nth-of-type(3) { transition-delay: 800ms; }
.wholeday-stage.in .annot:nth-of-type(4) { transition-delay: 1100ms; }

.annot-1 { top: 12%;  left: 4%;  text-align: left; }
.annot-2 { top: 30%;  right: 4%; text-align: left; }
.annot-3 { bottom: 32%; left: 4%; text-align: left; }
.annot-4 { bottom: 14%; right: 4%; text-align: left; }

.annot-line {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 800ms var(--ease-out-quart) 600ms;
}
.wholeday-stage.in .annot-line { opacity: 0.35; }
.annot-line svg { width: 100%; height: 100%; overflow: visible; }
.annot-line path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

/* ============================================================
   section · progress (overlapping phones, full-bleed warm bg)
   ============================================================ */
.progress-section {
  background: linear-gradient(180deg, transparent 0%, var(--bg-warm) 35%, var(--bg-warm) 65%, transparent 100%);
}
.progress-section > .container { position: relative; }
.progress-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.progress-text h2 { margin-bottom: 1.5rem; }
.progress-text .lede { margin-bottom: 2rem; }
.progress-text ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.2rem;
}
.progress-text li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  font-size: 0.97rem;
  color: var(--ink-soft);
  padding-block: 0.5rem;
  border-bottom: 1px solid var(--line-soft);
}
.progress-text li:last-child { border-bottom: 0; }
.progress-text li strong {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--ink-strong);
  white-space: nowrap;
}

.progress-stack {
  position: relative;
  perspective: 2200px;
  min-height: 620px;
  display: grid;
  place-items: center;
}
.progress-stack .phone-back {
  position: absolute;
  max-width: 240px;
  transform: translate(-95px, -45px) rotateY(12deg) rotateZ(-2deg);
  opacity: 0.94;
  z-index: 1;
}
.progress-stack .phone-front {
  position: relative;
  max-width: 290px;
  transform: translate(60px, 45px) rotateY(-9deg) rotateZ(2deg);
  z-index: 2;
}

/* ============================================================
   section · challenges 3D carousel
   ============================================================ */
.challenges {
  text-align: center;
  overflow: hidden;
}
.challenges-head { max-width: 42rem; margin-inline: auto; margin-bottom: clamp(3rem, 6vw, 5rem); }
.challenges-head h2 { margin-inline: auto; }
.challenges-head .lede { margin-inline: auto; margin-top: 1.5rem; }

.challenge-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 2rem;
}
.chip {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  letter-spacing: 0.005em;
  color: var(--ink-soft);
  transform: translate3d(0, 0, 0);
  transition: color 240ms var(--ease-out-quart), border-color 240ms var(--ease-out-quart), transform 240ms var(--ease-out-quart);
}
.chip:hover { color: var(--ink-strong); border-color: var(--accent); transform: translate3d(0, -1px, 0); }

.carousel {
  position: relative;
  perspective: 2000px;
  height: 620px;
  margin-top: clamp(3rem, 6vw, 4rem);
}
.carousel-track {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 950ms var(--ease-out-quart);
}
.carousel-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 280px;
  height: 580px;
  margin-left: -140px;
  margin-top: -290px;
  display: grid;
  place-items: center;
  transition: transform 950ms var(--ease-out-quart), opacity 950ms var(--ease-out-quart), filter 950ms var(--ease-out-quart);
  cursor: grab;
}
.carousel-card.is-dragging { cursor: grabbing; }
.carousel-card .phone { width: 100%; max-width: 280px; }
/* All carousel positions share the same transform function order:
   translate3d → rotateY → scale. Safari interpolates smoothly only when
   both ends of a transition have identical function lists. */
.carousel-card[data-pos="-1"] { transform: translate3d(-180px, 0, -160px) rotateY( 40deg) scale(1);   opacity: 0.55; filter: saturate(0.85); }
.carousel-card[data-pos="0"]  { transform: translate3d(   0,   0,    0)   rotateY(  0deg) scale(1);   opacity: 1;    filter: none;             z-index: 5; }
.carousel-card[data-pos="1"]  { transform: translate3d( 180px, 0, -160px) rotateY(-40deg) scale(1);   opacity: 0.55; filter: saturate(0.85); }
.carousel-card[data-pos="-2"],
.carousel-card[data-pos="2"]  { transform: translate3d(   0,   0, -240px) rotateY(  0deg) scale(0.7); opacity: 0; pointer-events: none; }

.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
  border: 0;
  padding: 0;
  transform: scale(1);
  transition: background 300ms, transform 300ms;
}
.dot.active { background: var(--accent); transform: scale(1.5); }

/* ============================================================
   section · day closure (full-bleed deep bg + radial overlays)
   ============================================================ */
.closure {
  background: var(--bg-deep);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.closure::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 70% at 85% 15%, var(--accent-soft) 0%, transparent 55%),
    radial-gradient(ellipse 60% 70% at 15% 85%, var(--bg-warm) 0%, transparent 55%);
  opacity: 0.85;
  pointer-events: none;
}
.closure > .container { position: relative; }
.closure-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  position: relative;
}
.closure-text { max-width: 36rem; }
.closure-text h2 { margin-bottom: 1.6rem; }
.closure-text .lede { margin-bottom: 2rem; }

.closure-stage {
  position: relative;
  perspective: 2200px;
  display: grid;
  place-items: center;
  min-height: 640px;
}
.closure-stage .phone {
  max-width: 320px;
  transform: rotateY(-7deg) rotateX(3deg);
  clip-path: inset(0 0 0 0);
  transition: clip-path 1400ms var(--ease-out-quart);
}
.closure-stage:not(.in) .phone { clip-path: inset(50% 0 50% 0); }

/* ============================================================
   trust band
   ============================================================ */
.trust {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding-block: clamp(2rem, 4vw, 3rem);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.2rem, 3vw, 3rem);
}
.trust-item { display: flex; flex-direction: column; gap: 0.4rem; }
.trust-item .label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.trust-item .value {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--ink-strong);
  letter-spacing: -0.01em;
}

/* ============================================================
   final CTA
   ============================================================ */
.final-cta {
  text-align: center;
  position: relative;
  padding-block: clamp(6rem, 14vw, 10rem);
  isolation: isolate;
}
.final-cta::before {
  content: "";
  position: absolute;
  inset: -10% 10% 10%;
  z-index: -1;
  background: radial-gradient(ellipse at center, var(--accent-soft) 0%, transparent 65%);
  filter: blur(40px);
  opacity: 0.85;
}

.final-stage {
  position: relative;
  perspective: 2400px;
  display: grid;
  place-items: center;
  min-height: 480px;
  margin-bottom: 3rem;
}
.final-stage .phone {
  max-width: 280px;
  transform: rotateX(8deg) rotateY(-5deg);
  animation: phoneFloat 5.5s ease-in-out infinite;
}

.final-cta h2 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  margin-inline: auto;
  margin-bottom: 1.5rem;
  max-width: 18ch;
  line-height: 0.98;
}
.final-cta h2 em { font-style: italic; font-variation-settings: "SOFT" 100; color: var(--accent); }
.final-cta .lede { margin-inline: auto; margin-bottom: 2.5rem; }

.final-form {
  display: inline-flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.4rem 0.35rem 1.4rem;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 280ms, box-shadow 280ms;
  max-width: 100%;
}
.final-form:focus-within { border-color: var(--accent); box-shadow: var(--shadow-md); }
.final-form input {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink-strong);
  padding: 0.65rem 0;
  width: 240px;
  outline: 0;
}
.final-form input::placeholder { color: var(--ink-faint); }
.final-form button {
  background: var(--ink-strong);
  color: var(--bg);
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  transform: translate3d(0, 0, 0);
  transition: transform 240ms var(--ease-out-quart), background 240ms;
}
.final-form button:hover { background: var(--accent-deep); transform: translate3d(0, -1px, 0); }

/* waitlist form states — loading / success / error */
.final-form.is-loading { opacity: 0.85; pointer-events: none; }
.final-form.is-success {
  border-color: var(--mint);
  box-shadow: 0 0 0 4px oklch(72% 0.14 165 / 0.15);
}
.final-form.is-success input  { color: var(--mint); }
.final-form.is-success button {
  background: var(--mint);
  color: var(--ink-strong);
  cursor: default;
  pointer-events: none;
}
.final-form.is-error {
  border-color: var(--coral);
  animation: waitlistShake 360ms var(--ease-out-quart);
}
.final-form.is-error button { background: var(--coral); }
@keyframes waitlistShake {
  0%, 100% { transform: translate3d(0, 0, 0); }
  20%      { transform: translate3d(-6px, 0, 0); }
  40%      { transform: translate3d(5px, 0, 0); }
  60%      { transform: translate3d(-3px, 0, 0); }
  80%      { transform: translate3d(2px, 0, 0); }
}
.final-form input:disabled,
.final-form button:disabled { cursor: default; }

/* ============================================================
   footer
   ============================================================ */
.footer {
  padding: 2.5rem var(--gutter) 3rem;
  border-top: 1px solid var(--line-soft);
}
.footer-inner {
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-meta {
  font-size: 0.82rem;
  color: var(--ink-faint);
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.footer-meta a { transition: color 220ms; }
.footer-meta a:hover { color: var(--ink-strong); }
.footer-back {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  letter-spacing: -0.005em;
  margin-left: auto;
  padding-left: 1.4rem;
  border-left: 1px solid var(--line);
}
.footer-back .arrow,
.footer-back::first-letter { /* no-op, kept for parity */ }
@media (max-width: 720px) {
  .footer-back { margin-left: 0; padding-left: 0; border-left: 0; }
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
}
.lang-switch a {
  color: var(--ink-faint);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  transition: color 220ms, background 220ms;
}
.lang-switch a.active { color: var(--ink-strong); background: var(--bg-soft); }
.lang-switch a:hover { color: var(--ink-strong); }
.lang-switch .sep { color: var(--ink-quiet); }

/* ============================================================
   responsive
   ============================================================ */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: clamp(5rem, 12vh, 7rem);
    overflow: hidden;
  }
  /* on mobile the phone becomes a faded right-side decoration behind the text;
     the text stays in normal flow at full width and the hero height is whatever
     the text needs */
  .hero-text {
    max-width: 100%;
    position: relative;
    z-index: 2;
  }
  .hero-stage {
    position: absolute;
    top: 0;
    right: -12%;
    bottom: 0;
    width: 62%;
    max-width: 320px;
    min-height: 0;
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .hero-ring { width: 280px; height: 280px; inset: 8% -10% auto auto; opacity: 0.2; }

  .howto-head { grid-template-columns: 1fr; gap: 1.5rem; }
  .howto-head .lede { justify-self: start; }
  .howto-stage { grid-template-columns: 1fr; gap: 4rem; }
  .howto-step:nth-child(n) .phone-wrap { transform: rotateY(0) rotateZ(0); }
  .howto-connector { display: none; }

  .annot { max-width: 180px; font-size: 0.78rem; padding: 0.6rem 0.8rem; }
  .annot-1, .annot-3 { left: 0; }
  .annot-2, .annot-4 { right: 0; }

  .progress-grid { grid-template-columns: 1fr; gap: 3rem; }
  .progress-stack { min-height: 540px; }
  .progress-stack .phone-back { transform: translate(-70px, -40px) rotateY(12deg); max-width: 200px; }
  .progress-stack .phone-front { transform: translate(40px, 40px) rotateY(-9deg); max-width: 240px; }

  .closure-grid { grid-template-columns: 1fr; gap: 3rem; }
  .closure-stage { min-height: 480px; }

  .trust-grid { grid-template-columns: repeat(2, 1fr); }

  .carousel { height: 540px; }
  .carousel-card { width: 230px; height: 480px; margin-left: -115px; margin-top: -240px; }
  .carousel-card[data-pos="-1"] { transform: translate3d(-130px, 0, -120px) rotateY( 38deg) scale(1); }
  .carousel-card[data-pos="1"]  { transform: translate3d( 130px, 0, -120px) rotateY(-38deg) scale(1); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav { padding: 0.85rem var(--gutter); }
  .wordmark { font-size: 1.3rem; }
  .nav-cta { font-size: 0.78rem; padding: 0.45rem 0.85rem; }

  .hero-text h1 { font-size: clamp(2.4rem, 11vw, 3.6rem); }

  .progress-stack .phone-back { transform: translate(-50px, -30px) rotateY(12deg); max-width: 170px; }
  .progress-stack .phone-front { transform: translate(30px, 30px) rotateY(-9deg); max-width: 210px; }

  .trust-grid { grid-template-columns: 1fr; }

  .final-form { width: 100%; flex-direction: column; padding: 0.5rem; gap: 0.4rem; border-radius: 22px; }
  .final-form input { width: 100%; padding: 0.85rem 1rem; }
  .final-form button { width: 100%; padding: 0.85rem; }
}

/* ============================================================
   reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.2s !important;
  }
  .reveal, .reveal-stagger > *, .reveal-words .word > span { transform: none; }
  .phone, .hero-phone, .final-stage .phone { animation: none; transform: none !important; }
  .closure-stage .phone { clip-path: none; }
  .howto-step .phone-wrap { transform: none !important; }
}
