/* ============================================
   WagPost — Scroll-Driven 3D Visual Story
   ============================================ */

:root {
  --cream: #faf6ef;
  --cream-deep: #f3ebe0;
  --paper: #fffdf9;
  --ink: #2a2622;
  --ink-soft: #5c554e;
  --muted: #8a8278;
  --sage: #7d9080;
  --sage-deep: #5f7364;
  --sage-soft: #c5d4c7;
  --rose: #e8c4c4;
  --sky: #c5d9e8;
  --sand: #e8dcc8;
  --blush: #f5e6e0;
  --lavender: #ddd4e8;
  --shadow: 0 20px 60px rgba(42, 38, 34, 0.12);
  --shadow-soft: 0 8px 30px rgba(42, 38, 34, 0.08);
  --radius: 20px;
  --radius-sm: 12px;
  --nav-h: 72px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-script: "Caveat", cursive;
  --font-serif: "Instrument Serif", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --rail-w: 48px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  opacity: 0.03;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Journey bar ---------- */
.journey-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 1100;
  background: transparent;
  pointer-events: none;
}

.journey-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--sage-soft), var(--sage), var(--sage-deep));
  transition: width 0.08s linear;
}

/* ---------- Chapter rail ---------- */
.chapter-rail {
  position: fixed;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: none;
  flex-direction: column;
  gap: 0.65rem;
}

@media (min-width: 1100px) {
  .chapter-rail {
    display: flex;
  }
}

.chapter-rail a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(42, 38, 34, 0.1);
  background: rgba(255, 253, 249, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: all 0.35s var(--ease);
}

.chapter-rail a:hover {
  color: var(--ink);
  border-color: var(--sage-soft);
}

.chapter-rail a.is-active {
  background: var(--sage);
  border-color: var(--sage);
  color: #fff;
  box-shadow: 0 4px 16px rgba(125, 144, 128, 0.35);
  transform: scale(1.08);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 500;
  border-radius: 999px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    background 0.3s ease, color 0.3s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--sage);
  color: #fff;
  padding: 0.85rem 1.75rem;
  box-shadow: 0 4px 20px rgba(125, 144, 128, 0.35);
}

.btn-primary:hover {
  background: var(--sage-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(125, 144, 128, 0.4);
}

.btn-nav {
  background: var(--sage);
  color: #fff;
  padding: 0.55rem 1.25rem;
  font-size: 0.9rem;
}

.btn-nav:hover {
  background: var(--sage-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  padding: 0.85rem 1.5rem;
}

.btn-ghost:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  padding: 0.85rem 1.5rem;
  border: 1.5px solid var(--sage-soft);
  width: 100%;
}

.btn-outline:hover {
  border-color: var(--sage);
  background: rgba(125, 144, 128, 0.06);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

/* ---------- Type ---------- */
.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 0.85rem;
}

.script {
  font-family: var(--font-script);
  font-weight: 600;
  line-height: 1.15;
}

.section-title {
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  color: var(--ink);
  margin-bottom: 0.85rem;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 32rem;
  margin: 0 auto;
}

.section-sub.align-left {
  margin-left: 0;
}

.chapter-label {
  position: absolute;
  top: calc(var(--nav-h) + 0.75rem);
  left: clamp(1.25rem, 4vw, 3rem);
  z-index: 5;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  opacity: 0.7;
}

.chapter-label span {
  font-family: var(--font-script);
  font-size: 1.1rem;
  letter-spacing: 0;
  color: var(--sage-deep);
}

.chapter {
  position: relative;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s;
}

.nav.scrolled {
  background: rgba(250, 246, 239, 0.88);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(42, 38, 34, 0.06);
}

.nav-logo-img {
  height: 36px;
  width: auto;
  filter: brightness(0) saturate(100%);
}

.nav-links {
  display: none;
  gap: 1.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.nav-links a {
  position: relative;
  transition: color 0.25s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1.5px;
  background: var(--sage);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

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

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav .btn-nav {
  display: none;
}

.nav-toggle {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4.25px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4.25px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 999;
  background: rgba(250, 246, 239, 0.97);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  font-size: 1.35rem;
  font-weight: 500;
}

.mobile-menu[hidden] {
  display: none;
}

@media (min-width: 900px) {
  .nav-links {
    display: flex;
  }
  .nav .btn-nav {
    display: inline-flex;
  }
  .nav-toggle {
    display: none;
  }
}

/* =========================================================
   CH 01 — HERO
   ========================================================= */
.chapter-hero {
  --hero-card-w: clamp(148px, 17.5vw, 248px);
  --hero-card-h: calc(var(--hero-card-w) * 720 / 526);
  --hero-open-w: calc(var(--hero-card-w) * 2);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 0.75rem) 0 3.25rem;
  overflow: hidden;
  isolation: isolate;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-wash {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
}

.hero-wash-a {
  width: min(55vw, 560px);
  height: min(55vw, 560px);
  background: #d8e5d6;
  top: -8%;
  left: -8%;
  animation: wash-drift 22s ease-in-out infinite;
}

.hero-wash-b {
  width: min(45vw, 440px);
  height: min(45vw, 440px);
  background: #efd5d5;
  top: 20%;
  right: -10%;
  animation: wash-drift 26s ease-in-out infinite reverse;
}

.hero-wash-c {
  width: min(40vw, 380px);
  height: min(40vw, 380px);
  background: #d7e4ef;
  bottom: 5%;
  left: 35%;
  opacity: 0.4;
  animation: wash-drift 20s ease-in-out infinite 4s;
}

.hero-table {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 140%;
  height: 42%;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse 55% 40% at 50% 0%, rgba(255, 253, 249, 0.9) 0%, transparent 70%),
    linear-gradient(180deg, transparent 0%, rgba(243, 235, 224, 0.65) 45%, rgba(236, 226, 212, 0.9) 100%);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 40%, transparent 40%, rgba(250, 246, 239, 0.55) 100%);
}

@keyframes wash-drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(24px, -18px) scale(1.06);
  }
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 3.5vh, 2.75rem);
}

.hero-copy {
  text-align: center;
  max-width: 40rem;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 1.1rem;
}

.kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  animation: kicker-pulse 2.4s ease-in-out infinite;
}

@keyframes kicker-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(125, 144, 128, 0.15);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(125, 144, 128, 0.08);
  }
}

.hero-line {
  display: block;
  font-family: var(--font-script);
  font-weight: 600;
  font-size: clamp(2.85rem, 7.5vw, 4.85rem);
  line-height: 1.08;
  color: var(--ink);
}

.hero-line-em {
  color: var(--sage-deep);
}

.hero-lede {
  font-size: clamp(1.02rem, 1.8vw, 1.18rem);
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 30rem;
  margin: 1.1rem auto 1.65rem;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.hero-btn svg {
  transition: transform 0.3s var(--ease);
}

.hero-btn:hover svg {
  transform: translateX(3px);
}

.hero-open-btn {
  color: var(--ink-soft);
  border: 1px solid rgba(42, 38, 34, 0.1);
  background: rgba(255, 253, 249, 0.55);
  backdrop-filter: blur(8px);
}

.hero-open-btn:hover {
  color: var(--ink);
  border-color: var(--sage-soft);
}

[data-hero-el] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.chapter-hero.is-ready [data-hero-el] {
  opacity: 1;
  transform: none;
}

.chapter-hero.is-ready .hero-kicker {
  transition-delay: 0.05s;
}
.chapter-hero.is-ready .hero-title {
  transition-delay: 0.15s;
}
.chapter-hero.is-ready .hero-lede {
  transition-delay: 0.28s;
}
.chapter-hero.is-ready .hero-cta-row {
  transition-delay: 0.4s;
}
.chapter-hero.is-ready .hero-theater {
  transition-delay: 0.35s;
}

.hero-theater {
  position: relative;
  width: 100%;
  max-width: min(1180px, 100vw);
  height: calc(var(--hero-card-h) + 56px);
  perspective: 1600px;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
}

.theater-stage {
  position: relative;
  width: 100%;
  height: var(--hero-card-h);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform 0.45s var(--ease-out);
}

.theater-shadow {
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: min(92%, 900px);
  height: 36px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(42, 38, 34, 0.18) 0%, transparent 72%);
  filter: blur(8px);
  transition: width 0.9s var(--ease);
}

.chapter-hero.is-open .theater-shadow {
  width: min(98%, 1040px);
}

.stage-card {
  --rise: 0px;
  --spread-x: 0px;
  --rot: 0deg;
  --scale: 1;
  --z: 1;
  position: absolute;
  bottom: 0;
  left: 50%;
  width: var(--hero-card-w);
  height: var(--hero-card-h);
  margin-left: calc(var(--hero-card-w) / -2);
  transform: translate3d(var(--spread-x), var(--rise), 0) rotate(var(--rot)) scale(var(--scale));
  transform-origin: center bottom;
  z-index: var(--z);
  transition: transform 1.05s var(--ease), opacity 0.7s ease;
  opacity: 0;
}

.chapter-hero.is-ready .stage-card {
  opacity: 1;
}

.stage-card-face {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 18px 36px rgba(42, 38, 34, 0.14), 0 2px 6px rgba(42, 38, 34, 0.06);
}

.stage-card-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* Closed arc — 7 large cards */
.chapter-hero.is-ready:not(.is-open) .sc-0 {
  --spread-x: calc(var(--hero-card-w) * -2.45);
  --rot: -16deg;
  --rise: 32px;
  --scale: 0.82;
  --z: 1;
}
.chapter-hero.is-ready:not(.is-open) .sc-1 {
  --spread-x: calc(var(--hero-card-w) * -1.6);
  --rot: -10deg;
  --rise: 16px;
  --scale: 0.9;
  --z: 2;
}
.chapter-hero.is-ready:not(.is-open) .sc-2 {
  --spread-x: calc(var(--hero-card-w) * -0.8);
  --rot: -4.5deg;
  --rise: 5px;
  --scale: 0.97;
  --z: 3;
}
.chapter-hero.is-ready:not(.is-open) .sc-feature {
  --spread-x: 0;
  --rise: 0;
  --scale: 1.06;
  --z: 6;
}
.chapter-hero.is-ready:not(.is-open) .sc-3 {
  --spread-x: calc(var(--hero-card-w) * 0.8);
  --rot: 4.5deg;
  --rise: 5px;
  --scale: 0.97;
  --z: 3;
}
.chapter-hero.is-ready:not(.is-open) .sc-4 {
  --spread-x: calc(var(--hero-card-w) * 1.6);
  --rot: 10deg;
  --rise: 16px;
  --scale: 0.9;
  --z: 2;
}
.chapter-hero.is-ready:not(.is-open) .sc-5 {
  --spread-x: calc(var(--hero-card-w) * 2.45);
  --rot: 16deg;
  --rise: 32px;
  --scale: 0.82;
  --z: 1;
}

/* Open — side cards make room for bifold */
.chapter-hero.is-open .sc-0 {
  --spread-x: calc(var(--hero-card-w) * -3.15);
  --rot: -18deg;
  --rise: 40px;
  --scale: 0.78;
  --z: 1;
}
.chapter-hero.is-open .sc-1 {
  --spread-x: calc(var(--hero-card-w) * -2.2);
  --rot: -12deg;
  --rise: 24px;
  --scale: 0.86;
  --z: 2;
}
.chapter-hero.is-open .sc-2 {
  --spread-x: calc(var(--hero-card-w) * -1.35);
  --rot: -6deg;
  --rise: 10px;
  --scale: 0.92;
  --z: 3;
}
.chapter-hero.is-open .sc-feature {
  --rise: -6px;
  --scale: 1;
  --z: 7;
  width: var(--hero-open-w);
  margin-left: calc(var(--hero-open-w) / -2);
}
.chapter-hero.is-open .sc-3 {
  --spread-x: calc(var(--hero-card-w) * 1.35);
  --rot: 6deg;
  --rise: 10px;
  --scale: 0.92;
  --z: 3;
}
.chapter-hero.is-open .sc-4 {
  --spread-x: calc(var(--hero-card-w) * 2.2);
  --rot: 12deg;
  --rise: 24px;
  --scale: 0.86;
  --z: 2;
}
.chapter-hero.is-open .sc-5 {
  --spread-x: calc(var(--hero-card-w) * 3.15);
  --rot: 18deg;
  --rise: 40px;
  --scale: 0.78;
  --z: 1;
}

.sc-feature {
  cursor: pointer;
  outline: none;
  width: var(--hero-card-w);
  transition: transform 1.05s var(--ease), width 0.95s var(--ease),
    margin-left 0.95s var(--ease), opacity 0.7s ease;
}

.sc-feature:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 10px;
  border-radius: 6px;
}

.bifold {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  perspective: 1600px;
}

.bifold-leaf {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  transform-style: preserve-3d;
}

.bifold-left {
  left: 0;
  transform-origin: right center;
  opacity: 0;
  transition: opacity 0.35s ease, transform 1s var(--ease);
  pointer-events: none;
}

.bifold-right {
  left: 0;
  width: 100%;
  transform-origin: left center;
  transition: width 0.95s var(--ease), left 0.95s var(--ease), transform 1.05s var(--ease);
  z-index: 2;
}

.leaf-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: var(--paper);
}

.leaf-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.leaf-inside {
  border-radius: 4px 0 0 4px;
}

.leaf-cover {
  border-radius: 5px;
  box-shadow: 0 18px 36px rgba(42, 38, 34, 0.16);
}

.leaf-message {
  transform: rotateY(180deg);
  border-radius: 4px 0 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, #fffdf9 0%, #f6efe4 100%);
}

.leaf-message-body {
  padding: 12% 10%;
  text-align: center;
}

.leaf-message-body p:first-child {
  font-family: var(--font-script);
  font-size: clamp(0.95rem, 1.85vw, 1.35rem);
  line-height: 1.28;
}

.leaf-heart {
  display: block;
  margin: 0.55rem 0 0.4rem;
  color: var(--sage);
  font-size: 1.15rem;
}

.leaf-from {
  font-size: clamp(0.58rem, 0.95vw, 0.75rem);
  color: var(--muted);
}

.chapter-hero.is-open .bifold-left {
  opacity: 1;
  transform: rotateY(8deg);
  pointer-events: auto;
}

.chapter-hero.is-open .bifold-right {
  width: 50%;
  left: 50%;
  transform: rotateY(-152deg);
}

.chapter-hero.is-open .bifold-right .leaf-cover {
  border-radius: 0 4px 4px 0;
}

.feature-hint {
  position: absolute;
  left: 50%;
  bottom: -1.75rem;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.chapter-hero.is-ready:not(.is-open) .feature-hint {
  opacity: 1;
  animation: hint-fade 2.8s ease-in-out 1.6s infinite;
}

@keyframes hint-fade {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

.hero-scroll {
  position: absolute;
  bottom: 1.15rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.6s ease 1.2s;
}

.chapter-hero.is-ready .hero-scroll {
  opacity: 1;
}

.hero-scroll-bar {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--sage), transparent);
  animation: scroll-pulse 2.2s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scroll-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scaleY(0.65);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

.chapter-hero:not(.is-ready) .stage-card {
  --spread-x: 0;
  --rot: 0deg;
  --rise: 40px;
  --scale: 0.85;
}

@media (min-width: 1200px) {
  .chapter-hero {
    --hero-card-w: 260px;
  }
}

@media (max-width: 900px) {
  .chapter-hero {
    --hero-card-w: clamp(128px, 18vw, 180px);
  }
  /* Hide outermost pair on tablet so the arc stays readable */
  .sc-0,
  .sc-5 {
    display: none;
  }
  .chapter-hero.is-ready:not(.is-open) .sc-1 {
    --spread-x: calc(var(--hero-card-w) * -1.55);
  }
  .chapter-hero.is-ready:not(.is-open) .sc-4 {
    --spread-x: calc(var(--hero-card-w) * 1.55);
  }
  .chapter-hero.is-open .sc-1 {
    --spread-x: calc(var(--hero-card-w) * -2.05);
  }
  .chapter-hero.is-open .sc-2 {
    --spread-x: calc(var(--hero-card-w) * -1.2);
  }
  .chapter-hero.is-open .sc-3 {
    --spread-x: calc(var(--hero-card-w) * 1.2);
  }
  .chapter-hero.is-open .sc-4 {
    --spread-x: calc(var(--hero-card-w) * 2.05);
  }
}

@media (max-width: 720px) {
  .chapter-hero {
    --hero-card-w: clamp(120px, 28vw, 160px);
    justify-content: flex-start;
    padding-top: calc(var(--nav-h) + 1.25rem);
  }
  .hero-inner {
    gap: 1.35rem;
  }
}

@media (max-width: 480px) {
  .sc-0,
  .sc-1,
  .sc-4,
  .sc-5 {
    display: none;
  }
  .chapter-hero {
    --hero-card-w: clamp(140px, 42vw, 180px);
  }
  .chapter-hero.is-ready:not(.is-open) .sc-2 {
    --spread-x: calc(var(--hero-card-w) * -0.68);
  }
  .chapter-hero.is-ready:not(.is-open) .sc-3 {
    --spread-x: calc(var(--hero-card-w) * 0.68);
  }
  .chapter-hero.is-open .sc-2 {
    --spread-x: calc(var(--hero-card-w) * -1.15);
  }
  .chapter-hero.is-open .sc-3 {
    --spread-x: calc(var(--hero-card-w) * 1.15);
  }
}

/* Moments bridge */
.moments {
  padding: 1.1rem 0;
  background: var(--cream-deep);
  border-top: 1px solid rgba(42, 38, 34, 0.04);
  border-bottom: 1px solid rgba(42, 38, 34, 0.04);
  overflow: hidden;
}

.moments-track {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.moments-row {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: marquee 40s linear infinite;
  font-family: var(--font-script);
  font-size: 1.35rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.moments-row .dot {
  color: var(--sage);
  opacity: 0.6;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* =========================================================
   CH 02 — THE BOND
   ========================================================= */
.chapter-story {
  padding: clamp(5rem, 12vw, 8rem) clamp(1.25rem, 4vw, 3rem);
  overflow: hidden;
  background: linear-gradient(180deg, var(--cream) 0%, var(--blush) 50%, var(--cream) 100%);
}

.story-scene {
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
}

.story-depth {
  position: absolute;
  inset: -10% -5%;
  pointer-events: none;
}

.depth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.4;
}

.depth-orb.d1 {
  width: 280px;
  height: 280px;
  background: var(--sage-soft);
  top: 10%;
  left: -5%;
  transform: translateY(calc(var(--p) * -40px));
}

.depth-orb.d2 {
  width: 220px;
  height: 220px;
  background: var(--rose);
  bottom: 10%;
  right: 5%;
  transform: translateY(calc(var(--p) * 30px));
}

.depth-orb.d3 {
  width: 180px;
  height: 180px;
  background: var(--sky);
  top: 40%;
  right: 30%;
  transform: translateY(calc(var(--p) * -20px));
}

.story-stage {
  display: grid;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (min-width: 900px) {
  .story-stage {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 4rem;
  }
}

.story-art-wrap {
  position: relative;
  transform: translateY(calc((1 - var(--p)) * 40px))
    rotateY(calc((1 - var(--p)) * -8deg));
  transform-style: preserve-3d;
  transition: none;
  perspective: 1000px;
}

.story-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(145deg, #f5ebe3, #e8f0e8);
  aspect-ratio: 5 / 4;
}

.story-ref {
  width: 165%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  transform: scale(calc(1.05 - var(--p) * 0.05));
}

.story-float-cards {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sf-card {
  position: absolute;
  width: clamp(70px, 12vw, 110px);
  aspect-ratio: 526 / 720;
  border-radius: 4px;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.sf-a {
  right: -4%;
  bottom: 8%;
  transform: rotate(8deg) translateY(calc((1 - var(--p)) * 50px));
  z-index: 3;
}

.sf-b {
  right: 12%;
  top: -4%;
  transform: rotate(-10deg) translateY(calc((1 - var(--p)) * 70px));
  opacity: 0.95;
  z-index: 2;
}

.sf-c {
  left: -6%;
  bottom: 20%;
  width: clamp(55px, 9vw, 80px);
  transform: rotate(-6deg) translateY(calc((1 - var(--p)) * 40px));
  opacity: 0.85;
  z-index: 1;
}

.story-copy {
  opacity: calc(0.25 + var(--p) * 0.75);
  transform: translateY(calc((1 - var(--p)) * 32px));
}

.story-text {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.75;
  margin: 1.5rem 0 2.25rem;
  max-width: 34rem;
}

.story-line {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.story-line.is-in {
  opacity: 1;
  transform: none;
}

.story-text em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink);
}

.story-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(42, 38, 34, 0.08);
}

.stat strong {
  display: block;
  font-family: var(--font-script);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--sage-deep);
  line-height: 1.1;
}

.stat span {
  font-size: 0.78rem;
  color: var(--muted);
}

/* =========================================================
   CH 03 — THE RITUAL (sticky how)
   ========================================================= */
.chapter-how {
  background: var(--paper);
}

.how-pin {
  height: 450vh;
  position: relative;
}

.how-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 1rem) clamp(1.25rem, 4vw, 3rem) 2rem;
  overflow: hidden;
}

.how-head {
  text-align: center;
  margin-bottom: clamp(1.5rem, 4vh, 2.5rem);
  flex-shrink: 0;
}

.how-head .section-sub {
  margin-top: 0.5rem;
}

.how-stage {
  display: grid;
  gap: 2rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  min-height: 0;
}

@media (min-width: 860px) {
  .how-stage {
    grid-template-columns: 1fr 1.1fr;
    gap: 3rem;
  }
}

.ritual-card {
  --step: 0;
  width: min(240px, 55vw);
  aspect-ratio: 526 / 720;
  margin: 0 auto;
  perspective: 1200px;
  position: relative;
}

.ritual-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s var(--ease);
}

.ritual-face {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: scale(0.92) rotateY(-12deg);
  transition: opacity 0.55s var(--ease), transform 0.7s var(--ease);
  pointer-events: none;
}

.ritual-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ritual-blank {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #fffdf9, #f0e8dc);
  border: 1.5px dashed rgba(42, 38, 34, 0.12);
}

.ritual-placeholder {
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: var(--muted);
}

.ritual-compose-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 253, 249, 0.72);
  backdrop-filter: blur(2px);
  font-family: var(--font-script);
  font-size: 1.25rem;
  color: var(--ink);
}

.ritual-dim {
  filter: brightness(0.92);
}

.compose-cursor {
  width: 2px;
  height: 1.1em;
  background: var(--sage);
  margin-top: 0.25rem;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.ritual-pet-tag {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #f5f0e8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}

.ritual-bifold {
  display: flex;
  width: 100%;
  height: 100%;
}

.rb-left,
.rb-right {
  width: 50%;
  height: 100%;
}

.rb-left img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rb-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8%;
  text-align: center;
  background: linear-gradient(165deg, #fffdf9, #f3ebe0);
  font-family: var(--font-script);
  font-size: 0.85rem;
  line-height: 1.3;
  border-left: 1px solid rgba(42, 38, 34, 0.05);
}

.rb-right span {
  font-family: var(--font-sans);
  font-size: 0.55rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.ritual-envelope {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(250, 246, 239, 0.55);
}

.ritual-envelope img {
  width: 48%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(42, 38, 34, 0.15));
  animation: envelope-float 2s ease-in-out infinite;
}

@keyframes envelope-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Active ritual faces by step class on #ritualCard */
.ritual-card[data-face="blank"] .ritual-blank,
.ritual-card[data-face="select"] .ritual-select,
.ritual-card[data-face="compose"] .ritual-compose,
.ritual-card[data-face="pair"] .ritual-pair,
.ritual-card[data-face="preview"] .ritual-preview,
.ritual-card[data-face="send"] .ritual-send {
  opacity: 1;
  transform: scale(1) rotateY(0);
}

.ritual-steps {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ritual-step {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid transparent;
  opacity: 0.35;
  transform: translateX(12px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease),
    background 0.35s ease, border-color 0.35s ease;
}

.ritual-step.is-active {
  opacity: 1;
  transform: none;
  background: rgba(125, 144, 128, 0.08);
  border-color: rgba(125, 144, 128, 0.2);
}

.ritual-step.is-done {
  opacity: 0.55;
  transform: none;
}

.ritual-num {
  grid-row: 1 / 3;
  align-self: center;
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--sage-deep);
  width: 2rem;
}

.ritual-step h3 {
  font-family: var(--font-script);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.2;
}

.ritual-step p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  grid-column: 2;
}

.ritual-progress {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(280px, 60vw);
  height: 3px;
  background: rgba(42, 38, 34, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.ritual-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--sage);
  border-radius: inherit;
  transition: width 0.15s linear;
}

/* =========================================================
   CH 04 — THE COLLECTION
   ========================================================= */
.chapter-gallery {
  background: var(--cream-deep);
}

.gallery-pin {
  height: 320vh;
  position: relative;
}

.gallery-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 0.5rem) 0 2rem;
  overflow: hidden;
}

.gallery-head {
  text-align: center;
  padding: 0 1.5rem;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}

.gallery-viewport {
  perspective: 1200px;
  overflow: hidden;
  height: min(48vh, 380px);
  display: flex;
  align-items: center;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.gallery-ribbon {
  display: flex;
  gap: clamp(1rem, 2vw, 1.5rem);
  padding: 2rem clamp(1.5rem, 4vw, 3rem);
  transform-style: preserve-3d;
  will-change: transform;
}

.ribbon-card {
  flex: 0 0 auto;
  width: clamp(140px, 18vw, 200px);
  aspect-ratio: 526 / 720;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--paper);
  transform: rotateY(calc(var(--tilt, 0) * 1deg)) translateZ(0);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.ribbon-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ribbon-card.is-focus {
  transform: translateY(-14px) scale(1.06) rotateY(0);
  box-shadow: 0 28px 50px rgba(42, 38, 34, 0.18);
  z-index: 2;
}

.gallery-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  text-align: center;
  max-width: 28rem;
  margin: 0 auto;
}

.brand-mark {
  width: 44px;
  flex-shrink: 0;
  filter: brightness(0) saturate(100%);
  opacity: 0.7;
}

/* =========================================================
   CH 05 — THE PRACTICE
   ========================================================= */
.chapter-clinics {
  padding: clamp(5rem, 12vw, 8rem) clamp(1.25rem, 4vw, 3rem);
  background: var(--cream);
  overflow: hidden;
}

.clinics-scene {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 3.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .clinics-scene {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.clinics-copy {
  opacity: calc(0.3 + var(--p) * 0.7);
  transform: translateX(calc((1 - var(--p)) * -30px));
}

.feature-list {
  list-style: none;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.feature-list li {
  display: flex;
  gap: 1rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.feature-list li.is-in {
  opacity: 1;
  transform: none;
}

.feature-list .fi {
  color: var(--sage);
  margin-top: 0.3rem;
}

.feature-list strong {
  display: block;
  margin-bottom: 0.2rem;
}

.feature-list p {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.clinics-visual {
  position: relative;
  perspective: 1400px;
}

.mock-device {
  background: var(--paper);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(42, 38, 34, 0.06);
  max-width: 420px;
  margin: 0 auto;
  transform:
    rotateY(calc((1 - var(--p)) * 18deg))
    rotateX(calc((1 - var(--p)) * 6deg))
    translateY(calc((1 - var(--p)) * 40px));
  transform-style: preserve-3d;
  transition: none;
}

.mock-chrome {
  display: flex;
  gap: 6px;
  padding: 0.85rem 1rem;
  background: var(--cream-deep);
  border-bottom: 1px solid rgba(42, 38, 34, 0.05);
}

.mock-chrome span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e0d8cc;
}

.mock-chrome span:nth-child(1) {
  background: #e8b4b4;
}
.mock-chrome span:nth-child(2) {
  background: #e8d9a8;
}
.mock-chrome span:nth-child(3) {
  background: #b8d4b8;
}

.mock-body {
  padding: 1.25rem;
}

.mock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.mock-logo {
  height: 22px;
  filter: brightness(0) saturate(100%);
  opacity: 0.85;
}

.mock-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sage-deep);
  background: var(--sage-soft);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}

.mock-card-preview {
  display: flex;
  gap: 1rem;
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
}

.mock-card-preview > img {
  width: 72px;
  aspect-ratio: 526 / 720;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: var(--shadow-soft);
}

.mock-pet {
  font-weight: 600;
  font-size: 0.95rem;
}

.mock-clinic {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.2rem 0 0.6rem;
}

.mock-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--sage-deep);
  background: rgba(125, 144, 128, 0.15);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.mock-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.mock-row img {
  width: 100%;
  aspect-ratio: 526 / 720;
  object-fit: cover;
  border-radius: 3px;
}

.mock-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orbit-card {
  position: absolute;
  width: 72px;
  aspect-ratio: 526 / 720;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.oc1 {
  top: 8%;
  right: 0;
  transform: rotate(12deg) translateY(calc((1 - var(--p)) * 60px));
  opacity: calc(var(--p));
}

.oc2 {
  bottom: 12%;
  left: 0;
  transform: rotate(-10deg) translateY(calc((1 - var(--p)) * 50px));
  opacity: calc(var(--p) * 0.9);
}

/* =========================================================
   CH 06 — THE ECHO
   ========================================================= */
.chapter-voices {
  padding: clamp(5rem, 12vw, 8rem) clamp(1.25rem, 4vw, 3rem);
  background: linear-gradient(180deg, var(--cream) 0%, var(--blush) 45%, var(--cream) 100%);
  overflow: hidden;
}

.voices-head {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.voices-space {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
  perspective: 1200px;
}

@media (min-width: 800px) {
  .voices-space {
    grid-template-columns: 1fr 1.15fr 1fr;
    align-items: stretch;
  }
}

.voice-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(42, 38, 34, 0.04);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(40px) rotateX(8deg);
  transition: opacity 0.7s var(--ease), transform 0.8s var(--ease), box-shadow 0.4s ease;
  transform-style: preserve-3d;
}

.voice-card.is-in {
  opacity: 1;
  transform: translateY(0) rotateX(0);
}

.voice-card.featured {
  background: linear-gradient(165deg, #fffdf9 0%, #f0f5f0 100%);
  border-color: var(--sage-soft);
}

@media (min-width: 800px) {
  .voice-card.featured.is-in {
    transform: scale(1.03);
  }
  .vc1.is-in {
    transform: translateY(12px) rotateY(4deg);
  }
  .vc3.is-in {
    transform: translateY(12px) rotateY(-4deg);
  }
}

.voice-card:hover {
  box-shadow: var(--shadow);
}

.quote-mark {
  font-family: var(--font-serif);
  font-size: 4rem;
  line-height: 0.6;
  color: var(--sage-soft);
  margin-bottom: 0.75rem;
}

.quote {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink-soft);
  flex: 1;
  margin-bottom: 1.75rem;
}

.voice-card footer {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.av-sage {
  background: var(--sage-soft);
}
.av-rose {
  background: var(--rose);
}
.av-sky {
  background: var(--sky);
}

.voice-card footer strong {
  display: block;
  font-size: 0.92rem;
}

.voice-card footer span {
  font-size: 0.8rem;
  color: var(--muted);
}

.voice-peek {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(42, 38, 34, 0.06);
}

.voice-peek img {
  width: 52px;
  aspect-ratio: 526 / 720;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: var(--shadow-soft);
  transform: rotate(-3deg);
}

.voice-peek img:last-child {
  transform: rotate(4deg);
}

/* =========================================================
   CH 07 — THE PATH
   ========================================================= */
.chapter-pricing {
  padding: clamp(5rem, 12vw, 8rem) clamp(1.25rem, 4vw, 3rem);
  background: var(--paper);
}

.pricing-head {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.pricing-paths {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
  perspective: 1400px;
}

@media (min-width: 800px) {
  .pricing-paths {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }
}

.path-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  border: 1px solid rgba(42, 38, 34, 0.06);
  display: flex;
  flex-direction: column;
  position: relative;
  opacity: 0;
  transform: translateY(50px) rotateX(10deg);
  transition: opacity 0.7s var(--ease), transform 0.8s var(--ease), box-shadow 0.4s ease;
  transform-style: preserve-3d;
}

.path-card.is-in {
  opacity: 1;
  transform: translateY(0) rotateX(0);
}

.path-card:hover {
  box-shadow: var(--shadow-soft);
}

.path-card.featured {
  background: var(--ink);
  color: #f5f0e8;
  border-color: transparent;
  box-shadow: var(--shadow);
}

.path-card.featured .price-desc,
.path-card.featured li,
.path-card.featured .period {
  color: rgba(245, 240, 232, 0.72);
}

.path-card.featured h3,
.path-card.featured .amount {
  color: #fff;
}

.path-card.featured .btn-primary {
  background: var(--sage);
}

.price-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sage);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
}

.path-card h3 {
  font-family: var(--font-script);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.price-desc {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
  min-height: 2.6em;
}

.price {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.amount {
  font-size: 2.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.period {
  font-size: 0.9rem;
  color: var(--muted);
}

.path-card ul {
  list-style: none;
  margin-bottom: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.path-card li {
  font-size: 0.92rem;
  color: var(--ink-soft);
  padding-left: 1.4rem;
  position: relative;
}

.path-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--sage);
  font-weight: 600;
  font-size: 0.85rem;
}

.path-card.featured li::before {
  color: var(--sage-soft);
}

/* =========================================================
   CH 08 — BEGIN
   ========================================================= */
.chapter-cta {
  padding: clamp(5rem, 12vw, 9rem) clamp(1.25rem, 4vw, 3rem);
  background: var(--cream);
  overflow: hidden;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.cta-scene {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.cta-gather {
  position: absolute;
  inset: -20% -30%;
  pointer-events: none;
  z-index: 0;
}

.gather-c {
  position: absolute;
  width: clamp(70px, 12vw, 110px);
  aspect-ratio: 526 / 720;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: var(--shadow);
  opacity: calc(0.3 + var(--p) * 0.55);
  transition: transform 0.1s linear;
}

.g1 {
  top: 5%;
  left: 5%;
  transform: rotate(-14deg) translate(calc((1 - var(--p)) * -40px), calc((1 - var(--p)) * 30px));
}
.g2 {
  top: 0;
  right: 8%;
  transform: rotate(10deg) translate(calc((1 - var(--p)) * 40px), calc((1 - var(--p)) * 20px));
}
.g3 {
  bottom: 15%;
  left: 0;
  transform: rotate(6deg) translate(calc((1 - var(--p)) * -30px), calc((1 - var(--p)) * -20px));
}
.g4 {
  bottom: 10%;
  right: 2%;
  transform: rotate(-8deg) translate(calc((1 - var(--p)) * 35px), calc((1 - var(--p)) * -25px));
}
.g5 {
  top: 40%;
  left: 50%;
  width: clamp(60px, 10vw, 90px);
  opacity: calc(0.15 + var(--p) * 0.25);
  transform: translate(-50%, -50%) rotate(3deg) scale(calc(0.8 + var(--p) * 0.2));
  z-index: -1;
}

.cta-inner {
  position: relative;
  z-index: 2;
  opacity: calc(0.4 + var(--p) * 0.6);
  transform: translateY(calc((1 - var(--p)) * 28px));
}

.cta-mark {
  width: 64px;
  margin: 0 auto 1.5rem;
  filter: brightness(0) saturate(100%);
  opacity: 0.8;
}

.cta-title {
  margin-bottom: 1rem;
}

.cta-sub {
  color: var(--ink-soft);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.65;
}

.cta-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 440px;
  margin: 0 auto 1rem;
}

@media (min-width: 520px) {
  .cta-form {
    flex-direction: row;
  }
}

.cta-form input {
  flex: 1;
  padding: 1rem 1.25rem;
  border: 1.5px solid rgba(42, 38, 34, 0.1);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.cta-form input::placeholder {
  color: var(--muted);
}

.cta-form input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 4px rgba(125, 144, 128, 0.15);
}

.cta-note {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: rgba(245, 240, 232, 0.75);
  padding: 4rem clamp(1.25rem, 4vw, 3rem) 2rem;
}

.footer-top {
  max-width: 1100px;
  margin: 0 auto 3rem;
  display: grid;
  gap: 3rem;
}

@media (min-width: 768px) {
  .footer-top {
    grid-template-columns: 1.3fr 1.5fr;
    gap: 4rem;
  }
}

.footer-logo {
  height: 40px;
  width: auto;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 28rem;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.footer-cols h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.45);
  margin-bottom: 1rem;
}

.footer-cols a {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.65rem;
  transition: color 0.2s;
}

.footer-cols a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(245, 240, 232, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(245, 240, 232, 0.45);
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

.footer-legal a:hover {
  color: #fff;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #f5f0e8;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast[hidden] {
  display: block;
  visibility: hidden;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-wash,
  .moments-row,
  .hero-scroll-bar,
  .kicker-dot,
  .feature-hint,
  .compose-cursor,
  .ritual-envelope img {
    animation: none !important;
  }

  [data-hero-el],
  .story-line,
  .feature-list li,
  .voice-card,
  .path-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .how-pin,
  .gallery-pin {
    height: auto;
  }

  .how-sticky,
  .gallery-sticky {
    position: relative;
    height: auto;
    min-height: auto;
    padding-top: calc(var(--nav-h) + 2rem);
    padding-bottom: 3rem;
  }

  .stage-card,
  .sc-feature,
  .bifold-left,
  .bifold-right {
    transition: none !important;
  }

  .story-art-wrap,
  .story-copy,
  .mock-device,
  .cta-inner,
  .gather-c {
    transform: none !important;
    opacity: 1 !important;
  }
}
