/* Hallmark · v2.0.0 | theme: TapFredi Custom (DESIGN.md locked) | genre: editorial | shape: split-stage-collapse | signature: draggable-nfc-split-to-panoramic-ribbon */
/* critique: Split-stage comparison resolves via liquid NFC burst into a seam-crossing panoramic App Store showcase, interactive motion lab, midnight obsidian reveal, and Apple compliance hub. */
/* waive 7b: DESIGN.md locks pure white surfaces alongside Organic Milk (#FAF9F6). waive 12: User explicitly requested spring overshoot curves. waive 56: Three sequential non-overlapping Scrollcraft sticky acts each live inside separate tall sections. */

html, body {
  overflow-x: clip;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

button:disabled,
[aria-disabled="true"] {
  opacity: 0.48;
  cursor: not-allowed;
  pointer-events: none;
}

/* Skip link */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 160ms var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* Fixed subtle grain overlay (GPU safe, pointer-events none) */
.page-grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.032;
  background-image: radial-gradient(var(--ink) 0.55px, var(--transparent) 0.55px);
  background-size: 4px 4px;
}

/* Top Navigation */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  padding: 14px var(--gutter);
  pointer-events: none;
}

.topbar__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 10px 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  pointer-events: auto;
  transition: background-color 220ms var(--ease-out), border-color 220ms var(--ease-out), transform 220ms var(--ease-out);
}

.topbar--dark .topbar__inner {
  background: var(--glass-dark);
  border-color: var(--glass-dark-border);
  color: var(--obsidian-ink);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  min-height: 44px;
  padding-right: 6px;
}

.topbar--dark .brand-lockup {
  color: var(--obsidian-ink);
}

.brand-lockup__icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: var(--shadow-card);
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar__links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar__links a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 150ms var(--ease-out);
}

.topbar__links a:hover {
  color: var(--ink);
}

.topbar--dark .topbar__links a {
  color: var(--obsidian-muted);
}

.topbar--dark .topbar__links a:hover {
  color: var(--obsidian-ink);
}

/* Unified Primary Store CTA (one label, one style across page) */
.btn-store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  background: var(--olive-deep);
  color: var(--on-olive);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform 160ms var(--ease-spring), background-color 150ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.btn-store:hover {
  background: var(--olive-hover);
  box-shadow: var(--shadow-btn-hover);
  transform: translateY(-1px);
}

.btn-store:active {
  transform: translateY(1px) scale(0.97);
}

.btn-store--sm {
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
}

.btn-store svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  background: var(--transparent);
  color: var(--ink);
  border: 1.5px solid var(--border-strong);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 160ms var(--ease-spring), background-color 150ms var(--ease-out);
}

.btn-ghost:hover {
  background: var(--surface-tint);
  transform: translateY(-1px);
}

.btn-ghost:active {
  transform: translateY(1px) scale(0.97);
}

/* ==========================================================================
   ACT 1: SPLIT STAGE HERO (50/50 Tension -> Draggable & Scroll-Driven NFC Divider)
   ========================================================================== */
.act-split {
  position: relative;
  min-height: 185svh;
  background: var(--bg-milk);
}

.split-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  --split: 52%;
  --px: 0;
  --py: 0;
}

.split-pane {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.split-pane__bg {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  object-fit: cover;
  object-position: center center;
  will-change: transform;
  transform: translate3d(calc(var(--px) * -14px), calc(var(--py) * -10px), 0) scale(1.03);
  transition: transform 180ms var(--ease-out);
}

.split-pane__light {
  position: absolute;
  inset: 0;
  background: var(--light-wash);
  pointer-events: none;
}

/* Left pane: Roommate Chaos */
.split-pane--chaos {
  z-index: 1;
}

.split-pane--chaos .split-pane__bg {
  object-position: 62% center;
}

/* Floating code-drawn sticky notes on the chaos side for depth parallax */
.chaos-notes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.sticky-card {
  position: absolute;
  padding: 10px 12px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  box-shadow: var(--shadow-lift);
  will-change: transform;
}

.sticky-card--a {
  left: 56%;
  top: 19%;
  background: var(--pastel-dairy-bg);
  border: 1px solid var(--border);
  transform: rotate(-4deg) translate3d(calc(var(--px) * -22px), calc(var(--py) * -16px), 0);
}

.sticky-card--b {
  left: 61%;
  top: 34%;
  background: var(--pastel-drinks-bg);
  border: 1px solid var(--border);
  transform: rotate(3.5deg) translate3d(calc(var(--px) * -28px), calc(var(--py) * -18px), 0);
}

.sticky-card--c {
  left: 52%;
  top: 67%;
  background: var(--pastel-protein-bg);
  border: 1px solid var(--border);
  transform: rotate(-2.5deg) translate3d(calc(var(--px) * -18px), calc(var(--py) * -14px), 0);
}

/* Right pane: Live TapFredi (revealed by clip-path from split line rightward) */
.split-pane--calm {
  z-index: 3;
  clip-path: inset(0 0 0 var(--split));
  will-change: clip-path;
}

.split-pane--calm .split-pane__bg {
  object-position: 36% center;
  transform: translate3d(calc(var(--px) * -10px), calc(var(--py) * -8px), 0) scale(1.03);
}

/* Precision-lit 3D floating iPhone on the TapFredi side */
.hero-phone-wrap {
  position: absolute;
  right: clamp(24px, 6vw, 88px);
  top: 52%;
  z-index: 4;
  transform: translate3d(calc(var(--px) * 18px), calc(-50% + var(--py) * 14px), 0) perspective(1100px) rotateY(calc(-7deg + var(--px) * 5deg)) rotateX(calc(2deg - var(--py) * 4deg));
  transition: transform 220ms var(--ease-out);
}

.iphone-shell {
  position: relative;
  width: clamp(210px, 19vw, 272px);
  aspect-ratio: 460 / 1000;
  padding: 9px;
  border-radius: 38px;
  background: var(--bezel-outer);
  box-shadow: var(--shadow-phone), inset 0 1px 0 var(--bezel-rim);
}

.iphone-shell--dark {
  box-shadow: var(--shadow-phone-dark), inset 0 1px 0 var(--bezel-rim);
}

.iphone-shell__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  background: var(--bezel-inner);
}

.iphone-shell__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.iphone-shell__glare {
  position: absolute;
  inset: 0;
  border-radius: 30px;
  background: var(--sheen-glass);
  pointer-events: none;
}

/* Protective sibling scrim under left hero copy so text stays >= 7:1 regardless of split */
.hero-scrim {
  position: absolute;
  inset: 0;
  width: 62%;
  background: var(--scrim-light-left);
  z-index: 5;
  pointer-events: none;
}

/* Hero Copy Block */
.hero-copy {
  position: absolute;
  left: var(--gutter);
  top: 52%;
  transform: translateY(-50%);
  z-index: 6;
  max-width: min(500px, 46vw);
  min-width: 0;
}

.hero-copy h1 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(36px, 4.6vw, 64px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--ink);
  overflow-wrap: break-word;
  text-wrap: balance;
}

.hero-copy h1 .hl-olive {
  color: var(--olive-deep);
}

.hero-copy p {
  margin: 0 0 26px;
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.52;
  color: var(--ink-soft);
  max-width: 44ch;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* Draggable NFC Divider (Chrome of the Split Stage) */
.split-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 7;
  pointer-events: none;
}

.split-divider__track {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--olive);
  transform: translateX(calc(var(--split-px, 50vw)));
  will-change: transform;
}

.split-divider__handle {
  position: absolute;
  top: 52%;
  left: 0;
  width: 64px;
  height: 64px;
  margin-left: -32px;
  margin-top: -32px;
  border-radius: 50%;
  background: var(--bg-milk);
  border: 2.5px solid var(--olive);
  box-shadow: var(--shadow-divider);
  display: grid;
  place-items: center;
  cursor: ew-resize;
  pointer-events: auto;
  touch-action: none;
  padding: 0;
  color: var(--olive-deep);
  transition: transform 180ms var(--ease-spring), box-shadow 180ms var(--ease-out);
}

.split-divider__handle:hover {
  transform: scale(1.08);
}

.split-divider__handle:active,
.split-divider__handle[data-dragging="true"] {
  transform: scale(0.95);
}

.split-divider__handle svg {
  width: 32px;
  height: 32px;
}

.split-divider__pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px solid var(--olive);
  opacity: 0;
  pointer-events: none;
  animation: handle-ring 2.6s var(--ease-out) infinite;
}

@keyframes handle-ring {
  0% { transform: scale(0.88); opacity: 0; }
  18% { opacity: 0.52; }
  100% { transform: scale(1.75); opacity: 0; }
}

.split-labels {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 24px;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.split-pill {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}

.split-pill--olive {
  background: var(--olive-tint);
  border-color: var(--olive-border);
  color: var(--olive-deep);
}

/* ==========================================================================
   ACT 2: THE HUSH & NFC TAP COLLAPSE (PEAK — Largest Span: 2.8vh)
   Burst + Particles + Liquid Transition + Mask Iris + Zoom Through + Pop-In
   ========================================================================== */
.act-peak {
  position: relative;
  min-height: 280svh;
  background: var(--obsidian);
  color: var(--obsidian-ink);
}

.peak-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  background: var(--bg-milk);
  color: var(--ink);
  --peak-p: 0;
}

/* Hush paper bed before collapse */
.peak-hush {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--bg-milk);
  z-index: 1;
}

.peak-hush__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  padding: 0 var(--gutter);
  max-width: 520px;
}

.peak-sticker-btn {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 2.5px solid var(--olive);
  background: var(--surface);
  color: var(--olive-deep);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-lift);
  transition: transform 200ms var(--ease-spring), box-shadow 200ms var(--ease-out);
}

.peak-sticker-btn:hover {
  transform: scale(1.06);
}

.peak-sticker-btn:active {
  transform: scale(0.94);
}

.peak-sticker-btn svg {
  width: 52px;
  height: 52px;
}

.peak-hush__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.peak-hush__sub {
  margin: 0;
  font-size: 16px;
  color: var(--ink-muted);
}

/* Liquid Iris / Mask Transition revealing the glowing open fridge */
.peak-reveal {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--obsidian);
  color: var(--obsidian-ink);
  clip-path: circle(0% at 50% 50%);
  will-change: clip-path;
  overflow: hidden;
}

.peak-reveal__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
  transform: scale(1.22);
  will-change: transform;
}

.peak-reveal__scrim {
  position: absolute;
  inset: 0;
  width: 58%;
  background: var(--scrim-dark-left);
  z-index: 2;
  pointer-events: none;
}

.peak-reveal__copy {
  position: absolute;
  left: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  max-width: min(460px, 44vw);
  color: var(--obsidian-ink);
  will-change: opacity, transform;
}

.js .peak-reveal__copy {
  opacity: 0;
}

.peak-reveal__copy h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4.2vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--obsidian-ink);
  overflow-wrap: break-word;
  text-wrap: balance;
}

.peak-reveal__copy p {
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--obsidian-muted);
  max-width: 40ch;
}

.peak-retrigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: var(--obsidian-elevated);
  border: 1px solid var(--obsidian-edge);
  color: var(--obsidian-ink);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms var(--ease-spring), background-color 150ms var(--ease-out);
}

.peak-retrigger:hover {
  background: var(--olive-deep);
  transform: translateY(-1px);
}

.peak-retrigger:active {
  transform: scale(0.96);
}

/* Staggered pop-in shelf inventory tags anchored to the real food items */
.shelf-pins {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.shelf-pin {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-milk);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lift);
  transition: opacity 320ms var(--ease-out), transform 460ms var(--ease-spring);
}

.js .shelf-pin {
  opacity: 0;
  transform: translateY(14px) scale(0.82);
}

.js .shelf-pin.is-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.shelf-pin__meter {
  width: 22px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--surface-tint);
  overflow: hidden;
  display: block;
}

.shelf-pin__meter i {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--olive);
  transform-origin: left center;
}

.shelf-pin--low .shelf-pin__meter i {
  background: var(--butter);
}

.shelf-pin--out .shelf-pin__meter i {
  background: var(--coral);
}

.shelf-pin__state {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.shelf-pin--milk { left: 49%; top: 26%; }
.shelf-pin--eggs { left: 62%; top: 34%; }
.shelf-pin--cheddar { left: 48%; top: 53%; }
.shelf-pin--salmon { left: 51%; top: 69%; }
.shelf-pin--lemons { left: 67%; top: 73%; }

/* High-DPI Burst & Particle Canvas */
.burst-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

/* Liquid Transition SVG wave overlay at top of reveal */
.liquid-edge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 76px;
  width: 100%;
  z-index: 6;
  pointer-events: none;
  fill: var(--bg-milk);
}

/* ==========================================================================
   ACT 3: CONTINUOUS PANORAMIC APP STORE SHOWCASE (charles-store-screenshots)
   Split 2-frame opening hook + Continuous living olive ribbon & felt art
   crossing EVERY single seam + top-left lighting & contact shadows
   ========================================================================== */
.act-pano {
  position: relative;
  min-height: 290svh;
  background: var(--bg-milk);
  color: var(--ink);
}

.pano-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg-milk);
  --pano-p: 0;
}

.pano-header {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 84px var(--gutter) 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-shrink: 0;
}

.pano-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 18ch;
}

.pano-header p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-muted);
  max-width: 38ch;
}

.pano-viewport {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* The continuous panoramic strip */
.pano-track {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 18px var(--gutter) 32px;
  will-change: transform;
}

/* Continuous living NFC ribbon spanning ALL 7 frames & crossing every seam */
.pano-ribbon {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
}

.pano-ribbon__base {
  fill: none;
  stroke: var(--olive-border);
  stroke-width: 3;
  stroke-linecap: round;
}

.pano-ribbon__live {
  fill: none;
  stroke: var(--olive);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-dasharray: 4200;
  stroke-dashoffset: calc(4200 - (var(--pano-p) * 4200));
}

.pano-ribbon__glow {
  fill: none;
  stroke: var(--butter);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 14 26;
  stroke-dashoffset: calc(var(--pano-p) * -420);
  opacity: 0.72;
}

/* Individual panoramic showcase frames */
.pano-frame {
  position: relative;
  flex: 0 0 clamp(300px, 28vw, 390px);
  height: clamp(460px, 66svh, 590px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px 24px 0;
  overflow: visible;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--frame-bg, var(--pastel-produce-bg));
}

.pano-frame:first-of-type {
  border-top-left-radius: var(--radius-xl);
  border-bottom-left-radius: var(--radius-xl);
  border-left: 1px solid var(--border);
}

.pano-frame:last-of-type {
  border-top-right-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
  border-right: 1px solid var(--border);
}

.pano-frame--produce { --frame-bg: var(--pastel-produce-bg); }
.pano-frame--drinks  { --frame-bg: var(--pastel-drinks-bg); }
.pano-frame--dairy   { --frame-bg: var(--pastel-dairy-bg); }
.pano-frame--bakery  { --frame-bg: var(--pastel-bakery-bg); }
.pano-frame--pantry  { --frame-bg: var(--pastel-pantry-bg); }
.pano-frame--protein { --frame-bg: var(--pastel-protein-bg); }

/* Unified warm top-left morning lighting wash on every frame */
.pano-frame__light {
  position: absolute;
  inset: 0;
  background: var(--light-wash);
  pointer-events: none;
  border-radius: inherit;
  z-index: 1;
}

.pano-frame__head {
  position: relative;
  z-index: 3;
  min-width: 0;
}

.pano-frame__head h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

.pano-frame__head p {
  margin: 0;
  font-size: 14px;
  line-height: 1.42;
  color: var(--ink-soft);
  max-width: 28ch;
}

/* Split hook badge bridging Frames 1 and 2 across the seam */
.seam-bridge {
  position: absolute;
  top: 50%;
  right: -68px;
  width: 136px;
  height: 136px;
  z-index: 6;
  pointer-events: none;
  transform: translateY(-50%) rotate(var(--bridge-rot, -6deg));
  filter: var(--shadow-bridge);
}

.seam-bridge--low {
  top: 72%;
  width: 120px;
  height: 120px;
  right: -60px;
}

.seam-bridge--high {
  top: 38%;
  width: 116px;
  height: 116px;
  right: -58px;
}

.seam-bridge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.pano-phone {
  position: relative;
  z-index: 3;
  width: 78%;
  margin: 14px auto 0;
  padding: 7px 7px 0;
  border-radius: 30px 30px 0 0;
  background: var(--bezel-outer);
  box-shadow: var(--shadow-phone), inset 0 1px 0 var(--bezel-rim);
  overflow: hidden;
  transform: translateY(0);
  transition: transform 320ms var(--ease-spring);
}

.pano-frame:hover .pano-phone {
  transform: translateY(-8px) scale(1.015);
}

.pano-phone__screen {
  position: relative;
  border-radius: 23px 23px 0 0;
  overflow: hidden;
  aspect-ratio: 460 / 740;
  background: var(--bezel-inner);
}

.pano-phone__screen img {
  width: 100%;
  height: auto;
}

/* ==========================================================================
   ACT 4: CODE-DRAWN INTERACTIVE MOTION GRAPHICS LAB
   Shape Morph + Liquid Motion Jar + Motion Trail + Count Up (Example + Real Plans)
   ========================================================================== */
.act-lab {
  position: relative;
  padding: clamp(56px, 8vw, 108px) var(--gutter);
  background: var(--bg);
  color: var(--ink);
}

.lab-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
}

.lab-intro {
  max-width: 640px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.lab-intro h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.8vw, 50px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}

.lab-intro p {
  margin: 0;
  font-size: 17px;
  color: var(--ink-muted);
  max-width: 54ch;
}

/* Asymmetric two-row layout (never 3 equal cards!) */
.lab-grid {
  display: grid;
  gap: 20px;
}

.lab-row {
  display: grid;
  gap: 20px;
}

.lab-row--top {
  grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr);
}

.lab-row--bottom {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.38fr);
}

.lab-panel {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--bg-milk);
  border: 1px solid var(--border);
  padding: clamp(22px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  overflow: hidden;
  transition: transform 280ms var(--ease-spring), border-color 180ms var(--ease-out);
}

.lab-panel:hover {
  border-color: var(--border-strong);
}

.lab-panel__head h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.lab-panel__head p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-muted);
  max-width: 44ch;
}

/* Module 1: Shape Morph & Shape Transition */
.morph-stage {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.morph-canvas-box {
  position: relative;
  width: 172px;
  height: 172px;
  border-radius: var(--radius-xl);
  background: var(--olive-tint);
  border: 1px solid var(--olive-border);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.morph-blob {
  position: absolute;
  width: 116px;
  height: 116px;
  background: var(--olive);
  opacity: 0.14;
  border-radius: 42% 58% 64% 36% / 44% 38% 62% 56%;
  transition: border-radius 520ms var(--ease-spring), transform 520ms var(--ease-spring);
}

.morph-svg {
  position: relative;
  z-index: 2;
  width: 78px;
  height: 78px;
  color: var(--olive-deep);
  transition: transform 420ms var(--ease-spring);
}

.morph-svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.morph-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.morph-tab {
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms var(--ease-spring), background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}

.morph-tab[aria-pressed="true"] {
  background: var(--olive-deep);
  border-color: var(--olive-deep);
  color: var(--on-olive);
  transform: scale(1.04);
}

.morph-caption {
  margin: 0;
  font-size: 15px;
  color: var(--ink-body);
  min-height: 48px;
}

/* Module 2: Liquid Motion Quantity Jar */
.jar-lab {
  display: flex;
  align-items: center;
  gap: 24px;
}

.jar-widget {
  position: relative;
  width: 124px;
  height: 174px;
  border-radius: 26px;
  background: var(--surface);
  border: 2px solid var(--border-strong);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: var(--shadow-card);
  padding: 0;
  transition: transform 200ms var(--ease-spring);
}

.jar-widget:active {
  transform: scale(0.95);
}

.jar-liquid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.jar-label {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  height: 100%;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.jar-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.jar-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.jar-lvl-btn {
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), transform 180ms var(--ease-spring);
}

.jar-lvl-btn[aria-pressed="true"] {
  background: var(--olive-deep);
  border-color: var(--olive-deep);
  color: var(--on-olive);
  transform: scale(1.04);
}

.jar-status {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
}

/* Module 3: Motion Trail + Pop-In List Hop */
.trail-stage {
  position: relative;
  min-height: 176px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  overflow: hidden;
}

.trail-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trail-col__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
}

.trail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-milk);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  transition: transform 360ms var(--ease-spring), opacity 220ms var(--ease-out);
}

.trail-item--new {
  background: var(--olive-tint);
  border-color: var(--olive-border);
  color: var(--olive-deep);
}

.js .trail-item--new {
  opacity: 0;
  transform: scale(0.78) translateY(8px);
}

.js .trail-item--new.is-popped {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.trail-ghosts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.trail-echo {
  position: absolute;
  left: 20px;
  top: 72px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--olive-deep);
  color: var(--on-olive);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  will-change: transform, opacity;
}

.trail-trigger {
  align-self: flex-start;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--bg);
  border: 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms var(--ease-spring), background-color 150ms var(--ease-out);
}

.trail-trigger:hover {
  background: var(--olive-deep);
  transform: translateY(-1px);
}

.trail-trigger:active {
  transform: scale(0.96);
}

/* Module 4: Count Up Receipt & Real Plan Facts */
.split-ledger {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px;
}

.ledger-box {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px 18px;
}

.ledger-box__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  margin: 0 0 12px;
}

.ledger-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.ledger-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  color: var(--ink-body);
}

.ledger-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--ink);
}

.ledger-summary {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 600;
  color: var(--olive-deep);
}

.plan-tiers {
  display: grid;
  gap: 10px;
}

.plan-row {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-milk);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.plan-row strong {
  font-size: 15px;
  color: var(--ink);
}

.plan-row span {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--olive-deep);
  white-space: nowrap;
}

.plan-footnote {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}

/* ==========================================================================
   ACT 5: MIDNIGHT OBSIDIAN REVEAL (Mask Transition + Parallax Depth)
   ========================================================================== */
.act-midnight {
  position: relative;
  background: var(--obsidian);
  color: var(--obsidian-ink);
  padding: clamp(72px, 10vw, 132px) var(--gutter) clamp(72px, 10vw, 124px);
  overflow: hidden;
}

.midnight-mask-top {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  width: 100%;
  height: 64px;
  fill: var(--bg);
  pointer-events: none;
  z-index: 3;
}

.midnight-glow {
  position: absolute;
  inset: 0;
  background: var(--dark-glow);
  pointer-events: none;
  z-index: 1;
}

.midnight-grid {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.midnight-copy h2 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--obsidian-ink);
  text-wrap: balance;
}

.midnight-copy p {
  margin: 0 0 26px;
  font-size: 17px;
  line-height: 1.58;
  color: var(--obsidian-muted);
  max-width: 44ch;
}

.midnight-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.midnight-facts li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--obsidian-ink);
}

.midnight-facts svg {
  width: 20px;
  height: 20px;
  color: var(--olive-bright);
  flex-shrink: 0;
}

.midnight-visual {
  position: relative;
  min-height: clamp(380px, 46vw, 540px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.midnight-kitchen-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-xl);
  border: 1px solid var(--obsidian-border);
  box-shadow: var(--shadow-phone-dark);
}

.midnight-phone {
  position: relative;
  z-index: 3;
  margin-right: clamp(16px, 4vw, 44px);
  transform: translateY(18px);
}

/* ==========================================================================
   ACT 6: RESOLVED CLOSE + APPLE COMPLIANCE ESSENTIALS HUB
   ========================================================================== */
.act-close {
  position: relative;
  background: var(--bg-milk);
  color: var(--ink);
  padding: clamp(72px, 10vw, 128px) var(--gutter) clamp(48px, 6vw, 72px);
}

.close-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
}

.close-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  padding-bottom: clamp(48px, 7vw, 84px);
  border-bottom: 1px solid var(--border);
}

.close-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  box-shadow: var(--shadow-lift);
  margin-bottom: 22px;
}

.close-hero h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
}

.close-hero p {
  margin: 0 0 26px;
  font-size: 17px;
  line-height: 1.58;
  color: var(--ink-muted);
  max-width: 48ch;
}

.close-note {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--ink-muted);
  max-width: 46ch;
}

.close-art {
  display: flex;
  justify-content: center;
}

.close-art img {
  width: min(360px, 100%);
  height: auto;
  filter: var(--shadow-art);
  mix-blend-mode: multiply;
}

/* Apple Compliance & Service Disclosures Hub */
.essentials {
  padding-top: clamp(44px, 6vw, 72px);
}

.essentials__head {
  margin-bottom: 28px;
  max-width: 620px;
}

.essentials__head h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.essentials__head p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-muted);
}

.essentials-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.essential-link {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  transition: transform 200ms var(--ease-spring), border-color 160ms var(--ease-out), box-shadow 200ms var(--ease-out);
}

.essential-link:hover {
  border-color: var(--olive-border);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.essential-link:active {
  transform: translateY(0) scale(0.99);
}

.essential-link__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}

.essential-link__title svg {
  width: 20px;
  height: 20px;
  color: var(--olive);
  flex-shrink: 0;
}

.essential-link p {
  margin: 0;
  font-size: 14px;
  line-height: 1.52;
  color: var(--ink-muted);
}

/* Footer */
.site-footer {
  margin-top: clamp(44px, 6vw, 72px);
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  color: var(--ink-muted);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.site-footer__links a {
  text-decoration: none;
  color: var(--ink-muted);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 150ms var(--ease-out);
}

.site-footer__links a:hover {
  color: var(--ink);
}

/* Scroll-entry stagger reveals (progressive: visible by default without JS) */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px) scale(0.97);
  transition: opacity 420ms var(--ease-out), transform 560ms var(--ease-spring);
}

.js [data-reveal].is-shown {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ==========================================================================
   RESPONSIVE MOBILE-FIRST COLLAPSE (< 900px & < 680px)
   ========================================================================== */
@media (max-width: 960px) {
  .topbar__links {
    display: none;
  }

  .hero-copy {
    top: auto;
    bottom: 66px;
    transform: none;
    max-width: calc(100% - var(--gutter) * 2);
  }

  .hero-scrim {
    width: 100%;
    height: 62%;
    top: auto;
    background: var(--scrim-light-bottom);
  }

  .hero-phone-wrap {
    right: 18px;
    top: 32%;
  }

  .iphone-shell {
    width: clamp(148px, 34vw, 196px);
    border-radius: 28px;
    padding: 6px;
  }

  .iphone-shell__screen,
  .iphone-shell__glare {
    border-radius: 22px;
  }

  .chaos-notes {
    display: none;
  }

  .split-divider__handle {
    top: 36%;
    width: 54px;
    height: 54px;
    margin-left: -27px;
    margin-top: -27px;
  }

  .peak-reveal__scrim {
    width: 100%;
    height: 58%;
    top: auto;
    background: var(--scrim-dark-bottom);
  }

  .peak-reveal__copy {
    top: auto;
    bottom: 52px;
    transform: none;
    max-width: calc(100% - var(--gutter) * 2);
  }

  .shelf-pin--eggs,
  .shelf-pin--lemons {
    display: none;
  }

  .shelf-pin--milk { left: 12%; top: 18%; }
  .shelf-pin--cheddar { left: 52%; top: 28%; }
  .shelf-pin--salmon { left: 16%; top: 40%; }

  .pano-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 76px;
  }

  .pano-frame {
    flex: 0 0 82vw;
    height: clamp(420px, 60svh, 520px);
  }

  .lab-row--top,
  .lab-row--bottom,
  .morph-stage,
  .split-ledger,
  .midnight-grid,
  .close-hero,
  .essentials-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .trail-stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .midnight-visual {
    justify-content: center;
    min-height: 360px;
  }

  .midnight-phone {
    margin-right: 0;
  }
}

/* ==========================================================================
   REDUCED MOTION FALLBACK (Comprehensible, reachable, zero position thrash)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .split-divider__pulse {
    animation: none;
  }

  .act-split {
    min-height: auto;
  }

  .split-stage {
    position: relative;
    height: 92svh;
  }

  .act-peak {
    min-height: auto;
  }

  .peak-stage {
    position: relative;
    height: 90svh;
  }

  .peak-reveal {
    clip-path: circle(150% at 50% 50%) !important;
  }

  .peak-reveal__img {
    transform: none !important;
  }

  .peak-reveal__copy {
    opacity: 1 !important;
    transform: translateY(-50%) !important;
  }

  .shelf-pin {
    opacity: 1 !important;
    transform: none !important;
  }

  .act-pano {
    min-height: auto;
  }

  .pano-stage {
    position: relative;
    height: auto;
    padding-bottom: 40px;
  }

  .pano-viewport {
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .pano-track {
    transform: none !important;
  }

  .pano-frame {
    scroll-snap-align: start;
  }

  .pano-ribbon__live {
    stroke-dashoffset: 0 !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
