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

html {
  /* Marker navigation is scripted, so the UA smooth-scroll would only fight it. */
  background: var(--color-paper);
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--type-body);
  line-height: var(--leading-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

button,
input {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: var(--tracking-display);
}

.skip-link {
  position: fixed;
  top: calc(72px + var(--space-3));
  left: var(--space-3);
  z-index: var(--z-header);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-field);
  background: var(--color-accent);
  color: var(--color-paper);
  transform: translateX(-180%);
  transition: transform var(--duration-fast) var(--ease-material);
}

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

:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgb(225 199 138 / 0.82);
}

.whittr-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-header);
  height: calc(72px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid rgb(14 42 54 / 0.12);
  background: rgb(246 242 234 / 0.92);
}

.whittr-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: min(100% - 2.5rem, 1440px);
  height: 100%;
  margin-inline: auto;
  gap: clamp(var(--space-6), 4vw, var(--space-10));
}

.brand-mark,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1;
  text-decoration: none;
}

.brand-mark,
.nav-links a,
.whittr-footer nav a,
.footer-brand {
  min-height: 44px;
}

.brand-orbit {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid var(--color-accent);
  border-right-color: transparent;
  border-radius: var(--radius-control);
  transform: rotate(-18deg);
}

.brand-orbit img {
  width: 19px;
  height: 19px;
  transform: rotate(18deg);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(var(--space-5), 2.4vw, var(--space-8));
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
}

.nav-links a,
.whittr-footer nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-inline-size: 44px;
  color: var(--color-ink-secondary);
  font-size: var(--type-small);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-material);
}

.nav-links a:hover,
.whittr-footer nav a:hover {
  color: var(--color-accent);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color var(--duration-fast) var(--ease-material),
    background-color var(--duration-fast) var(--ease-material),
    border-color var(--duration-fast) var(--ease-material),
    transform var(--duration-fast) var(--ease-material),
    box-shadow var(--duration-fast) var(--ease-material);
}

.button-primary {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-paper);
  box-shadow: var(--shadow-tinted-soft);
}

.button-primary:hover {
  background: #17404D;
}

.button-secondary {
  border-color: var(--color-border-strong);
  background: rgb(246 242 234 / 0.86);
  color: var(--color-accent);
}

.button-secondary:hover {
  border-color: var(--color-accent);
  background: var(--color-paper);
}

.button:active,
.rail-control:active:not(:disabled),
.pearl-state-card:active,
.reduced-state-control:active {
  transform: scale(0.98);
}

/* Z bands are defined once in tokens.css and applied by scene responsibility. */
.whittr-cinematic-scroll {
  position: relative;
  min-height: var(--cinematic-length, 5200px);
  background: var(--color-paper);
}

.whittr-cinematic-stage {
  position: sticky;
  top: 0;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
  background: var(--color-atmosphere);
  --shell-travel: 1;
}

@supports not (overflow: clip) {
  .whittr-cinematic-stage {
    overflow: hidden;
  }
}

.whittr-world,
.environment-layer,
.environment-image,
.atmosphere,
.light,
.focus-tint {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Scroll-driven layers carry no transition: the playhead is the animation. */
.whittr-world {
  z-index: var(--z-world);
  overflow: hidden;
  transform: translate3d(var(--parallax-x, 0px), var(--parallax-y, 0px), 0) scale(var(--camera-scale, 1));
  transform-origin: 58% 62%;
  will-change: transform;
}

.environment-layer {
  z-index: var(--z-world);
  margin: 0;
  will-change: opacity;
}

.environment-image {
  object-fit: cover;
  object-position: center center;
}

.environment-dawn {
  opacity: var(--environment-dawn-opacity, 1);
}

.environment-guide {
  opacity: var(--environment-guide-opacity, 0);
}

.environment-underwater {
  opacity: var(--environment-underwater-opacity, 0);
}

.environment-bloom {
  opacity: var(--environment-bloom-opacity, 0);
}

.environment-portrait {
  opacity: var(--environment-portrait-opacity, 0);
}

.environment-finale {
  opacity: var(--environment-finale-opacity, 0);
}

.atmosphere-wash {
  z-index: var(--z-world);
  background:
    linear-gradient(90deg, rgb(246 242 234 / 0.88) 0%, rgb(246 242 234 / 0.42) 28%, transparent 55%),
    linear-gradient(180deg, rgb(215 230 242 / 0.12), rgb(225 199 138 / 0.08));
  pointer-events: none;
}

.light-falloff {
  z-index: var(--z-world);
  background: radial-gradient(circle at 84% 10%, rgb(246 242 234 / 0.36), transparent 32%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.material-layer {
  position: absolute;
  z-index: var(--z-material);
  pointer-events: none;
  user-select: none;
}

.shell-left,
.shell-right,
.petal-left,
.petal-right {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: opacity, transform;
}

.shell-left {
  opacity: var(--shell-open, 0);
  transform: translate3d(calc(var(--shell-left-x, -8%) * var(--shell-travel)), var(--shell-y, 0%), 0);
  transform-origin: left bottom;
}

.shell-right {
  opacity: var(--shell-open, 0);
  transform: translate3d(calc(var(--shell-right-x, 8%) * var(--shell-travel)), var(--shell-y, 0%), 0);
  transform-origin: right bottom;
}

.petal-left {
  opacity: var(--petal-left-opacity, 0);
  transform: translate3d(var(--petal-left-x, -2%), var(--petal-left-y, 4%), 0);
}

.petal-right {
  opacity: var(--petal-right-opacity, 0);
  transform: translate3d(var(--petal-right-x, 2%), var(--petal-right-y, 4%), 0);
}

.pearl-system,
.effect-system,
.glim-system {
  position: absolute;
  z-index: var(--z-material);
  margin: 0;
  pointer-events: none;
}

.pearl-system {
  bottom: clamp(1rem, 3vh, 2.5rem);
  left: 59%;
  width: clamp(280px, 27vw, 440px);
  aspect-ratio: 1;
  /* Give the soft plate enough definition to read as a material object. */
  filter: saturate(1.08) contrast(1.05) drop-shadow(0 24px 34px rgb(14 42 54 / 0.2));
  transform: translate3d(calc(-50% + var(--pearl-x, 0px)), var(--pearl-y, 0px), 0) scale(var(--pearl-scale, 1));
  transform-origin: center bottom;
  will-change: transform;
}

.pearl-state,
.effect-layer,
.glim-pose {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Rail selection is a discrete choice, not a scroll position, so it is the one
   place these crossfades need a transition of their own. */
.whittr-cinematic-stage[data-rail-active="true"] .pearl-state,
.whittr-cinematic-stage[data-rail-active="true"] .glim-pose {
  transition: opacity 220ms var(--ease-material);
}

.pearl-state-matte {
  opacity: var(--pearl-matte-opacity, 1);
}

.pearl-state-soft-sheen {
  opacity: var(--pearl-soft-sheen-opacity, 0);
}

.pearl-state-brightening {
  opacity: var(--pearl-brightening-opacity, 0);
}

.pearl-state-luminous {
  opacity: var(--pearl-luminous-opacity, 0);
}

.pearl-state-full-glow {
  opacity: var(--pearl-full-glow-opacity, 0);
}

.effect-system {
  bottom: clamp(1rem, 3vh, 2.5rem);
  left: 59%;
  width: clamp(280px, 27vw, 440px);
  aspect-ratio: 1;
  opacity: var(--effect-visibility, 0);
  transform: translate3d(calc(-50% + var(--pearl-x, 0px)), var(--pearl-y, 0px), 0) scale(var(--pearl-scale, 1));
}

.effect-resting-fog {
  opacity: var(--effect-resting-fog-opacity, 0);
}

.effect-soft-shimmer {
  opacity: var(--effect-soft-shimmer-opacity, 0);
}

.effect-iridescent-glow {
  opacity: var(--effect-iridescent-glow-opacity, 0);
}

.effect-radiant-halo {
  opacity: var(--effect-radiant-halo-opacity, 0);
}

.effect-reveal {
  opacity: var(--effect-reveal-opacity, 0);
}

.glim-system {
  right: clamp(2rem, 8vw, 9rem);
  bottom: clamp(2rem, 7vh, 5.5rem);
  width: clamp(150px, 17vw, 260px);
  aspect-ratio: 1;
  opacity: var(--glim-visibility, 0);
  filter: drop-shadow(0 18px 26px rgb(46 111 163 / 0.16));
  transform: translate3d(var(--glim-x, 0px), var(--glim-y, 0px), 0);
  will-change: opacity, transform;
}

.glim-pose-quiet {
  opacity: var(--glim-quiet-opacity, 1);
}

.glim-pose-helpful {
  opacity: var(--glim-helpful-opacity, 0);
}

.glim-pose-guide {
  opacity: var(--glim-guide-opacity, 0);
}

.glim-pose-celebration {
  opacity: var(--glim-celebration-opacity, 0);
}

.glim-pose-master {
  opacity: var(--glim-master-opacity, 0);
}

.glim-pose-resting {
  opacity: var(--glim-resting-opacity, 0);
}

.focus-tint {
  z-index: var(--z-material);
  background: rgb(14 42 54 / 0.22);
  opacity: var(--focus-tint, 0);
  pointer-events: none;
}

.narrative-layer {
  position: absolute;
  inset: 0;
  z-index: var(--z-content);
  pointer-events: none;
}

.narrative-panel {
  position: absolute;
  width: min(42rem, 46vw);
  color: var(--color-ink);
  will-change: opacity, transform;
}

.narrative-panel::before {
  position: absolute;
  z-index: -1;
  /* Generous box, and the gradient reaches transparent well inside every edge,
     so the scrim never shows a boundary of its own. */
  inset: -7rem -8rem;
  background: radial-gradient(
    58% 52% at 50% 48%,
    rgb(246 242 234 / 0.82) 0%,
    rgb(246 242 234 / 0.66) 40%,
    rgb(246 242 234 / 0.28) 66%,
    transparent 84%
  );
  content: "";
  pointer-events: none;
}

.narrative-panel h1 {
  max-width: 17ch;
  font-size: min(var(--type-display-1), 5.2rem);
  line-height: var(--leading-display);
}

.narrative-panel h1 em {
  display: block;
  padding: 0 0.12em 0.08em 0;
  color: var(--color-accent);
  font-family: inherit;
  font-weight: inherit;
  line-height: 1.12;
}

.narrative-panel h2,
.rail-heading h2,
.final-panel h2 {
  font-size: var(--type-display-2);
  line-height: 1.1;
}

/* Break earlier so the measure clears the shell plates framing the stage. */
.narrative-panel h2 {
  max-width: 15ch;
}

.narrative-companion,
.narrative-progress {
  text-align: right;
}

.narrative-companion h2,
.narrative-progress h2,
.narrative-companion > p,
.narrative-progress > p {
  margin-left: auto;
}

.narrative-panel > p,
.rail-heading p,
.final-copy p {
  max-width: 34rem;
  margin-top: var(--space-5);
  color: var(--color-ink-secondary);
  font-size: var(--type-body);
}

/* Body copy over photography needs more weight than the on-paper secondary. */
.narrative-panel > p {
  color: #3A4A54;
}

.narrative-intro {
  top: clamp(9rem, 23vh, 14rem);
  left: clamp(1.5rem, 7vw, 8rem);
  width: min(52rem, 58vw);
  opacity: var(--intro-opacity, 1);
  pointer-events: auto;
  transform: translate3d(0, var(--intro-offset, 0px), 0);
}

.narrative-intro[data-active="false"] {
  pointer-events: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-7);
}

.narrative-companion {
  top: 24%;
  right: clamp(1.5rem, 8vw, 9rem);
  opacity: var(--companion-opacity, 0);
  transform: translate3d(0, var(--companion-offset, 28px), 0);
}

.narrative-routine {
  top: 18%;
  left: clamp(1.5rem, 8vw, 9rem);
  opacity: var(--routine-opacity, 0);
  transform: translate3d(0, var(--routine-offset, 28px), 0);
}

.routine-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-6);
  max-width: 36rem;
  margin: var(--space-7) 0 0;
  padding: 0;
  color: var(--color-accent);
  font-size: var(--type-small);
  font-weight: 650;
  list-style: none;
}

.routine-facts li {
  padding-left: var(--space-4);
  border-left: 2px solid var(--color-glow);
}

.narrative-clean-hold {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.narrative-progress {
  top: 23%;
  right: clamp(1.5rem, 8vw, 9rem);
  opacity: var(--progress-opacity, 0);
  transform: translate3d(0, var(--progress-offset, 28px), 0);
}

.narrative-panel[data-active="true"] {
  pointer-events: auto;
}

.pearl-rail {
  position: absolute;
  inset: auto clamp(1rem, 4vw, 4rem) clamp(1rem, 3.5vh, 2.5rem);
  z-index: var(--z-controls);
  max-height: calc(100svh - 6rem);
  padding: clamp(var(--space-5), 2.4vw, var(--space-8));
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: rgb(246 242 234 / 0.97);
  box-shadow: var(--shadow-tinted), var(--shadow-inset-highlight);
  opacity: var(--rail-progress, 0);
  pointer-events: none;
  transform: translate3d(0, var(--rail-offset, 26px), 0);
  will-change: opacity, transform;
}

.pearl-rail[data-active="true"] {
  pointer-events: auto;
}

.rail-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-8);
  margin-bottom: var(--space-6);
}

.rail-heading h2 {
  max-width: 12ch;
}

.rail-heading p {
  max-width: 28rem;
  margin-top: 0;
}

.pearl-state-list {
  display: flex;
  gap: var(--space-4);
  margin: 0;
  /* Fade the trailing edge so the fifth card reads as "more", not as clipped. */
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 4rem), transparent 100%);
  padding: var(--space-1) var(--space-1) var(--space-4);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  touch-action: pan-y;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  scroll-snap-type: inline mandatory;
  scrollbar-color: var(--color-border-strong) transparent;
  scrollbar-width: thin;
  list-style: none;
  cursor: grab;
}

.pearl-state-list[data-dragging="true"] {
  cursor: grabbing;
}

.pearl-state-list li {
  flex: 0 0 clamp(17rem, 24vw, 21rem);
  min-width: 0;
  scroll-snap-align: start;
}

.pearl-state-card {
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  min-height: 10.5rem;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: rgb(238 243 245 / 0.48);
  box-shadow: none;
  cursor: pointer;
  text-align: left;
  transition:
    background-color var(--duration-fast) var(--ease-material),
    border-color var(--duration-fast) var(--ease-material),
    box-shadow var(--duration-fast) var(--ease-material),
    transform var(--duration-fast) var(--ease-material);
}

@media (hover: hover) and (pointer: fine) {
  .pearl-state-card:hover {
    border-color: var(--color-border-strong);
    background: rgb(215 230 242 / 0.64);
  }

  .pearl-state-card:hover:not([aria-pressed="true"]) {
    transform: translateY(-2px);
  }
}

.pearl-state-card[aria-pressed="true"] {
  border-color: var(--color-accent);
  background: var(--color-paper);
  box-shadow: inset 0 0 0 2px var(--color-glow), var(--shadow-tinted-soft);
}

.pearl-state-card img {
  width: 5.25rem;
  height: 5.25rem;
  filter: drop-shadow(0 8px 12px rgb(46 111 163 / 0.14));
}

.state-card-copy {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
  color: var(--color-ink-secondary);
  font-size: 0.78rem;
  line-height: 1.35;
}

.state-card-copy strong {
  margin-bottom: var(--space-1);
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
}

.rail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  margin-top: var(--space-4);
}

.rail-controls {
  display: flex;
  gap: var(--space-2);
  flex: 0 0 auto;
}

.rail-control,
.reduced-state-control {
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-control);
  background: var(--color-paper);
  color: var(--color-accent);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  transition:
    background-color var(--duration-fast) var(--ease-material),
    border-color var(--duration-fast) var(--ease-material),
    transform var(--duration-fast) var(--ease-material);
}

.rail-control:hover:not(:disabled),
.reduced-state-control:hover {
  background: var(--color-atmosphere);
  border-color: var(--color-accent);
}

.rail-control:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.rail-status {
  max-width: 38rem;
  color: var(--color-ink-secondary);
  font-size: var(--type-small);
  text-align: right;
}

.final-panel {
  position: absolute;
  top: 50%;
  left: clamp(1rem, 7vw, 8rem);
  z-index: var(--z-content);
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(24rem, 1.15fr);
  align-items: end;
  /* One gap value left a tall empty row under the form; rows are their own. */
  column-gap: clamp(var(--space-8), 6vw, var(--space-12));
  row-gap: var(--space-6);
  width: min(calc(100% - 2rem), 78rem);
  padding: clamp(var(--space-6), 3vw, var(--space-9));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: rgb(246 242 234 / 0.97);
  box-shadow: var(--shadow-tinted), var(--shadow-inset-highlight);
  opacity: var(--final-progress, 0);
  pointer-events: none;
  transform: translate3d(0, calc(-50% + var(--final-offset, 28px)), 0);
  will-change: opacity, transform;
}

.final-panel[data-active="true"] {
  pointer-events: auto;
}

.waitlist-form {
  min-width: 0;
}

.waitlist-form input {
  font-size: max(16px, 1rem);
}

.waitlist-form[data-waitlist-state="submitting"] .field-action input,
.waitlist-form[data-waitlist-state="success"] .field-action input {
  opacity: 0.72;
}

.waitlist-form[data-waitlist-state="error"] .field-action input[aria-invalid="true"] {
  border-color: var(--color-error);
}

.waitlist-fields {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field-group {
  display: grid;
  gap: var(--space-2);
}

.field-group label {
  color: var(--color-accent);
  font-size: var(--type-small);
  font-weight: 700;
}

.field-action {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) auto;
  gap: var(--space-2);
}

.field-action input {
  width: 100%;
  min-height: 50px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-field);
  background: #FEFCF8;
  color: var(--color-ink);
  box-shadow: inset 0 1px 3px rgb(14 42 54 / 0.08);
  transition:
    border-color var(--duration-fast) var(--ease-material),
    box-shadow var(--duration-fast) var(--ease-material);
}

.field-action input:hover {
  border-color: var(--color-accent);
}

.field-action input:focus-visible {
  border-color: var(--color-accent);
}

.field-helper,
.field-error,
.field-status,
.recommended-products {
  color: var(--color-ink-secondary);
  font-size: 0.79rem;
  line-height: 1.45;
}

.field-error {
  min-height: 1.15em;
  color: var(--color-error);
  font-weight: 650;
}

.field-status {
  min-height: 1.15em;
  margin-top: var(--space-2);
  color: var(--color-accent);
  font-weight: 650;
}

.waitlist-form[data-waitlist-state="error"] .field-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.recommended-products {
  grid-column: 2;
}

.recommended-products a {
  color: var(--color-accent);
  font-weight: 700;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.reduced-motion-content {
  display: none;
}

.whittr-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  width: min(100% - 2.5rem, 1440px);
  min-height: 7rem;
  margin-inline: auto;
  border-top: 1px solid var(--color-border);
}

.whittr-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-5) var(--space-7);
}

@media (max-width: 1024px) {
  .whittr-nav {
    width: min(100% - 2rem, 960px);
    gap: var(--space-5);
  }

  .nav-links {
    gap: var(--space-4);
  }

  .narrative-panel {
    width: min(42rem, 60vw);
  }

  .narrative-intro {
    width: min(44rem, 68vw);
  }

  .narrative-panel h1 {
    font-size: clamp(2.8rem, 6.5vw, 4.6rem);
  }

  .pearl-system,
  .effect-system {
    left: 64%;
    width: clamp(280px, 39vw, 430px);
  }

  .glim-system {
    right: 3rem;
  }

  .rail-heading {
    display: block;
  }

  .rail-heading h2 {
    max-width: none;
  }

  .rail-heading p {
    margin-top: var(--space-2);
  }

  .final-panel {
    left: var(--space-7);
    grid-template-columns: 1fr;
    gap: var(--space-6);
    width: calc(100% - 4rem);
  }

  .recommended-products {
    grid-column: auto;
  }
}

@media (max-width: 768px) {
  /* Adaptive compact stage: retain the approved choreography with less travel. */
  .whittr-cinematic-scroll {
    --cinematic-length: 4000px;
  }

  .whittr-header {
    height: calc(66px + env(safe-area-inset-top));
  }

  .whittr-nav {
    grid-template-columns: 1fr auto;
    width: calc(100% - 1.5rem);
    min-width: 0;
  }

  .nav-links {
    display: none;
  }

  .nav-primary {
    min-height: 44px;
    padding-inline: var(--space-4);
    font-size: 0.8rem;
  }

  .whittr-cinematic-stage {
    min-height: 100svh;
  }

  .environment-image {
    object-position: 56% center;
  }

  .environment-portrait .environment-image {
    object-position: 72% center;
  }

  .whittr-cinematic-stage {
    --shell-travel: 0.5;
  }

  .atmosphere-wash {
    background:
      linear-gradient(180deg, rgb(246 242 234 / 0.9) 0%, rgb(246 242 234 / 0.44) 45%, transparent 68%),
      linear-gradient(90deg, rgb(246 242 234 / 0.36), transparent 80%);
  }

  .narrative-panel {
    right: auto;
    left: var(--space-5);
    width: calc(100% - 2.5rem);
  }

  .narrative-intro {
    top: clamp(7.25rem, 16vh, 9rem);
  }

  .narrative-panel h1 {
    max-width: 14ch;
    font-size: clamp(2.55rem, 11vw, 4.1rem);
  }

  .narrative-panel h2,
  .rail-heading h2,
  .final-panel h2 {
    font-size: clamp(2rem, 9vw, 3.2rem);
  }

  .narrative-panel > p {
    max-width: 31rem;
  }

  .hero-actions {
    margin-top: var(--space-5);
  }

  .pearl-system,
  .effect-system {
    bottom: 1rem;
    left: 63%;
    width: min(68vw, 330px);
  }

  .glim-system {
    right: 0.75rem;
    bottom: 1.5rem;
    width: min(35vw, 180px);
  }

  .routine-facts {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .pearl-rail {
    inset: auto max(var(--space-3), env(safe-area-inset-right)) max(var(--space-3), env(safe-area-inset-bottom)) max(var(--space-3), env(safe-area-inset-left));
    max-height: calc(100svh - 5rem);
    padding: var(--space-5) var(--space-3);
  }

  .pearl-state-list li {
    flex-basis: min(84vw, 19rem);
  }

  .pearl-state-card {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    min-height: 9.5rem;
  }

  .pearl-state-card img {
    width: 4.5rem;
    height: 4.5rem;
  }

  .rail-footer {
    align-items: start;
    flex-direction: column;
  }

  .rail-status {
    text-align: left;
  }

  .final-panel {
    left: max(var(--space-3), env(safe-area-inset-left));
    width: calc(100% - max(1.5rem, env(safe-area-inset-left) + env(safe-area-inset-right)));
    max-height: calc(100svh - 5rem);
    padding: var(--space-5);
    overflow-y: auto;
  }

  .field-action {
    grid-template-columns: 1fr;
  }

  .whittr-footer {
    align-items: flex-start;
    flex-direction: column;
    width: calc(100% - 2rem);
    padding-block: var(--space-7);
  }

  .whittr-footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .whittr-cinematic-scroll {
    --cinematic-length: 3300px;
  }

  .brand-mark {
    font-size: 1.25rem;
  }

  .brand-orbit {
    width: 30px;
    height: 30px;
  }

  .nav-primary {
    padding-inline: var(--space-3);
  }

  .narrative-panel h1 {
    font-size: clamp(2.35rem, 10.5vw, 3.2rem);
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (orientation: landscape) and (max-height: 600px) {
  .whittr-header {
    height: calc(52px + env(safe-area-inset-top));
  }

  .narrative-intro {
    top: calc(3.75rem + env(safe-area-inset-top));
  }

  .pearl-rail,
  .final-panel {
    max-height: calc(100svh - 4rem - env(safe-area-inset-bottom));
    overflow-y: auto;
  }
}

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

  /* This is a real document-flow alternative, not a shortened version of the film. */
  .whittr-cinematic-scroll {
    min-height: 0;
  }

  .whittr-cinematic-stage {
    position: static;
    top: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: visible;
    padding-bottom: max(var(--space-8), env(safe-area-inset-bottom));
  }

  .whittr-world {
    position: relative;
    inset: auto;
    width: 100%;
    height: min(54svh, 27.5rem);
    min-height: 18rem;
    overflow: clip;
    transform: none;
  }

  .environment-guide,
  .environment-underwater,
  .environment-bloom,
  .environment-portrait,
  .environment-finale,
  .shell-left,
  .shell-right,
  .petal-left,
  .petal-right,
  .effect-system,
  .glim-system,
  .focus-tint,
  .pearl-system {
    display: none;
  }

  .environment-dawn {
    display: block;
    opacity: 1;
  }

  .atmosphere-wash,
  .light-falloff {
    display: none;
  }

  .narrative-layer {
    position: static;
    inset: auto;
    display: contents;
  }

  .narrative-panel {
    display: none;
  }

  .narrative-intro {
    position: static;
    display: grid;
    gap: var(--space-5);
    width: min(100% - 2rem, 44rem);
    margin: 0 auto;
    padding: max(var(--space-8), env(safe-area-inset-top)) 0 var(--space-6);
    opacity: 1;
    pointer-events: auto;
    text-shadow: none;
    transform: none;
  }

  .narrative-intro h1 {
    max-width: 17ch;
  }

  #reduced-motion-title,
  #companion,
  #progress,
  #pearl-states,
  #waitlist {
    scroll-margin-top: calc(72px + env(safe-area-inset-top) + var(--space-4));
  }

  .reduced-motion-content {
    display: grid;
    gap: var(--space-6);
    width: min(100% - 2rem, 44rem);
    margin: 0 auto;
    padding: max(var(--space-8), env(safe-area-inset-top)) 0 var(--space-8);
  }

  .reduced-motion-content > :not(.reduced-pearl-preview) {
    display: grid;
    gap: var(--space-3);
    min-width: 0;
  }

  .reduced-motion-content h2 {
    color: var(--color-accent);
    font-size: clamp(2rem, 8vw, 3.4rem);
    line-height: 1.08;
  }

  .reduced-motion-content p {
    max-width: 38rem;
    color: var(--color-ink-secondary);
  }

  .reduced-pearl-preview {
    position: relative;
    width: min(100%, 19rem);
    aspect-ratio: 1;
    margin: 0;
    justify-self: center;
    filter: none;
    backdrop-filter: none;
  }

  .reduced-preview-state {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .reduced-preview-matte { opacity: var(--reduced-preview-matte-opacity, 1); }
  .reduced-preview-soft-sheen { opacity: var(--reduced-preview-soft-sheen-opacity, 0); }
  .reduced-preview-brightening { opacity: var(--reduced-preview-brightening-opacity, 0); }
  .reduced-preview-luminous { opacity: var(--reduced-preview-luminous-opacity, 0); }
  .reduced-preview-full-glow { opacity: var(--reduced-preview-full-glow-opacity, 0); }

  .pearl-rail,
  .final-panel {
    position: static;
    inset: auto;
    width: min(100% - 2rem, 72rem);
    max-height: none;
    margin: 0 auto var(--space-8);
    overflow: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .final-panel {
    grid-template-columns: 1fr;
  }

  .pearl-state-card,
  .pearl-state-card img,
  .pearl-rail,
  .final-panel {
    filter: none;
    backdrop-filter: none;
  }

  .whittr-world,
  .environment-layer,
  .shell-left,
  .shell-right,
  .petal-left,
  .petal-right,
  .narrative-panel,
  .pearl-rail,
  .final-panel,
  .button,
  .rail-control,
  .pearl-state-card {
    transition: none;
  }

  .pearl-state,
  .reduced-preview-state {
    transition: opacity 120ms linear;
  }

  /* The reduced experience is a document, not a stage: no scrims, no
     compositor hints for layers that never move. */
  .narrative-panel::before {
    display: none;
  }

  .whittr-world,
  .environment-layer,
  .shell-left,
  .shell-right,
  .petal-left,
  .petal-right,
  .pearl-system,
  .glim-system,
  .narrative-panel,
  .pearl-rail,
  .final-panel {
    will-change: auto;
  }
}
