/*
  Moments Product v0 — prototype styles.

  Sections:
    1. Base / stage / material glass        (from Study 02 desktop + mobile)
    2. Opening                              (Study 02 portal, unchanged character)
    3. Discovery                            (carousel of Moment titles)
    4. Viewer                               (approved story cards, mmnts-* from reference)
    5. Scene transitions / reduced motion
*/

:root {
  color-scheme: dark;
  --pearl: rgba(255, 238, 230, 0.94);
  --pearl-soft: rgba(255, 238, 230, 0.62);

  --serif: "Iowan Old Style", Baskerville, "Times New Roman", serif;
  --card-serif: "Iowan Old Style", Baskerville, Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.2, 0.75, 0.16, 1);
  --scene-in: 1100ms;
  --scene-out: 700ms;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #250916;
}

html:not([data-ui-ready]) body {
  opacity: 0;
}

body {
  color: var(--pearl);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

/* ---------------------------------------------------------------- 1. Stage */

.stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 480px;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
  background: var(--page, #250916);
  transition: background 1.2s ease;
}

#material,
.glass,
.scene {
  position: absolute;
  inset: 0;
}

#material {
  z-index: -3;
  display: block;
  width: 100%;
  height: 100%;
}

.stage.no-material {
  background-image: radial-gradient(circle at 50% 42%, rgba(255, 238, 230, 0.08), transparent 68%);
}

.stage.no-material #material { display: none; }

.glass {
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(116deg, rgba(255, 255, 255, 0.065), transparent 19%, transparent 72%, rgba(255, 213, 197, 0.045)),
    radial-gradient(circle at 26% 2%, rgba(255, 255, 255, 0.08), transparent 28%);
  box-shadow:
    inset 0 0 1px rgba(255, 255, 255, 0.32),
    inset 0 0 150px rgba(8, 0, 6, 0.2);
}

.glass::after {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
  content: "";
  opacity: 0.035;
}

.scene {
  display: grid;
  transition:
    opacity var(--scene-in) var(--ease-out),
    transform var(--scene-in) var(--ease-out);
}

.scene.is-hidden { display: none; }

.fallback {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  margin: 0;
  padding: 0 24px;
  font-family: var(--serif);
  font-style: italic;
  text-align: center;
  transform: translate(-50%, 130px);
}

.fallback-data { transform: translate(-50%, -50%); }

.product-footer {
  position: absolute;
  z-index: 4;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 50%;
  width: min(760px, calc(100% - 40px));
  color: var(--pearl-soft);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  transform: translateX(-50%);
}

.product-footer p { margin: 0 0 5px; }

.product-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  column-gap: 18px;
  row-gap: 2px;
}

.product-footer a {
  color: var(--pearl);
  text-decoration-color: rgba(255, 238, 230, 0.45);
  text-underline-offset: 3px;
}

.product-footer a:focus-visible {
  outline: 1px solid var(--pearl);
  outline-offset: 3px;
}

.stage[data-state="viewer"] .product-footer { display: none; }

.mmnts-original {
  display: block;
  min-height: 44px;
  margin: -4px 0 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(242, 247, 240, .75);
  cursor: pointer;
  font: inherit;
}

/* -------------------------------------------------------------- 2. Opening */

.scene-opening {
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  text-align: center;
  touch-action: none;
}

.opening-locale {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 2;
  transition: opacity 0.9s var(--ease-out);
}

.scene-opening h1 {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(5.4rem, 11vw, 11.6rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.075em;
  line-height: 0.8;
  text-shadow: 0 18px 70px rgba(22, 0, 12, 0.25);
  transform: translate(-52%, -72%);
  transition:
    transform 2.1s var(--ease-out),
    text-shadow 1.4s ease,
    opacity 1.4s var(--ease-out),
    filter 1.4s var(--ease-out),
    letter-spacing 1.6s var(--ease-out);
  white-space: nowrap;
}

#feel {
  position: absolute;
  top: calc(50% + clamp(80px, 9vw, 122px));
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 13px;
  border: 0;
  padding: 18px 28px;
  color: var(--pearl-soft);
  background: transparent;
  cursor: pointer;
  font: 650 0.62rem/1 var(--sans);
  letter-spacing: 0.21em;
  text-transform: uppercase;
  transform: translateX(-50%);
  transition: opacity 0.9s var(--ease-out), filter 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

#feel:focus-visible {
  border-radius: 999px;
  outline: 1px solid rgba(255, 238, 230, 0.72);
  outline-offset: 5px;
}

.share-moment-link {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: calc(50% + clamp(80px, 9vw, 122px) + 96px);
  min-height: 40px;
  padding: 8px 14px;
  color: var(--pearl-soft);
  opacity: 0.85;
  font-size: 12px;
  letter-spacing: 0.03em;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transform: translateX(-50%);
  transition: opacity 0.9s var(--ease-out), color 0.3s ease;
}

.share-moment-link:hover {
  opacity: 0.9;
  color: var(--pearl);
}

.share-moment-link:focus-visible {
  border-radius: 999px;
  outline: 1px solid rgba(255, 238, 230, 0.55);
  outline-offset: 4px;
}

.scene-opening.is-dissolving .share-moment-link {
  opacity: 0;
  pointer-events: none;
}

.discovery-actions .share-moment-link {
  position: static;
  top: auto;
  left: auto;
  transform: none;
  min-height: 36px;
}

.touch-mark {
  position: relative;
  width: 37px;
  height: 37px;
  border: 1px solid rgba(255, 238, 230, 0.32);
  border-radius: 50%;
}

.touch-mark::before,
.touch-mark::after {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(255, 238, 230, 0.14);
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
}

.touch-mark::before { width: 52px; height: 52px; }
.touch-mark::after { width: 5px; height: 5px; background: var(--pearl); }

.stage.is-feeling .scene-opening h1 {
  text-shadow: 0 22px 86px rgba(255, 165, 155, 0.21);
}

.stage.is-feeling .touch-mark::before {
  animation: desktop-touch 2.4s cubic-bezier(0.16, 0.8, 0.2, 1);
}

@keyframes desktop-touch {
  0%, 100% { opacity: 0.14; transform: translate(-50%, -50%) scale(1); }
  45% { opacity: 0.34; transform: translate(-50%, -50%) scale(1.18); }
}

/* Opening dissolving into Discovery: the wordmark loosens, blurs and drifts
   into the material; the button sinks. No fade-to-black. */
.scene-opening.is-dissolving h1 {
  opacity: 0;
  filter: blur(26px);
  letter-spacing: 0.02em;
  transform: translate(-52%, -84%) scale(1.12);
}

.scene-opening.is-dissolving #feel {
  opacity: 0;
  filter: blur(8px);
  transform: translate(-50%, 26px);
  pointer-events: none;
}

.scene-opening.is-dissolving .opening-locale {
  opacity: 0;
  pointer-events: none;
}

/* ------------------------------------------------------------ 3. Discovery */

.scene-discovery {
  grid-template-rows: auto 1fr auto auto;
  row-gap: 18px;
  padding:
    max(22px, env(safe-area-inset-top))
    0
    calc(max(26px, env(safe-area-inset-bottom)) + 90px);
}

.discovery-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 max(28px, env(safe-area-inset-right)) 0 max(28px, env(safe-area-inset-left));
}

.wordmark {
  font-family: var(--serif);
  font-size: 30px;
  font-style: italic;
  letter-spacing: -0.06em;
  line-height: 1;
}

.discovery-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 120px;
}

.discovery-tag {
  justify-self: end;
  color: var(--pearl-soft);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.locale-control {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  overflow: hidden;
  background: transparent;
  touch-action: manipulation;
  transition: gap 220ms ease;
}

.locale-control:not(.is-open) { gap: 0; }

.opening-locale .locale-control,
.viewer-locale .locale-control {
  flex-direction: row-reverse;
}

.locale-button {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 40px;
  min-width: 40px;
  min-height: 34px;
  padding: 0 8px;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--pearl);
  cursor: pointer;
  opacity: 0.55;
  font: 650 0.62rem/1 var(--sans);
  letter-spacing: 0.21em;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    opacity 220ms ease,
    color 220ms ease,
    width 220ms ease,
    min-width 220ms ease,
    padding 220ms ease;
}

.locale-button:hover,
.locale-button[aria-pressed="true"] { opacity: 1; }

.locale-control:not(.is-open) .locale-button:not([aria-pressed="true"]) {
  width: 0;
  min-width: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.locale-button:focus-visible {
  border-radius: 999px;
  outline: 1px solid rgba(255, 238, 230, 0.72);
  outline-offset: 3px;
}

.carousel {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 0;
}

.carousel-track {
  --slide: min(54vw, 660px);
  display: flex;
  align-items: center;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-inline: calc(50% - var(--slide) / 2);
  scroll-snap-type: x mandatory;
  scroll-padding-inline: calc(50% - var(--slide) / 2);
  scrollbar-width: none;
  touch-action: pan-x;
  outline: none;
  -webkit-overflow-scrolling: touch;
}

.carousel-track::-webkit-scrollbar { display: none; }

.slide {
  flex: 0 0 var(--slide);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 22px;
  padding: 0 24px;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  text-align: center;
  opacity: 0.34;
  transform: scale(0.84) translateY(10px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}

.slide.is-active {
  opacity: 1;
  transform: none;
}

.slide-kicker {
  margin: 0;
  color: var(--pearl-soft);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.slide-title {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pearl);
  cursor: pointer;
  font-family: var(--serif);
  font-size: clamp(38px, 4.6vw, 64px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.02;
  text-align: center;
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  text-wrap: balance;
  transition: none;
}

.slide-title:focus-visible {
  border-radius: 8px;
  outline: 1px solid rgba(255, 238, 230, 0.6);
  outline-offset: 10px;
}

.slide.is-active .slide-title:hover {
  text-shadow: 0 22px 86px rgba(255, 255, 255, 0.18);
}

.slide-meta {
  margin: 0;
  color: var(--pearl-soft);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.carousel-arrow {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 56px;
  min-width: 56px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(255, 238, 230, 0.82);
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 42px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-50%);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
  transition: color 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.carousel-arrow:hover:not(:disabled) {
  color: var(--pearl);
  transform: translateY(-50%) scale(1.08);
}

.carousel-arrow:disabled {
  color: rgba(255, 238, 230, 0.4);
  background: transparent;
  cursor: default;
}
.carousel-arrow-prev { left: max(10px, env(safe-area-inset-left)); }
.carousel-arrow-next { right: max(10px, env(safe-area-inset-right)); }

.carousel-arrow:focus-visible {
  outline: 1px solid rgba(255, 238, 230, 0.55);
  outline-offset: 4px;
}

.discovery-actions {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.pill {
  min-height: 46px;
  padding: 0 26px;
  border: 1px solid rgba(255, 238, 230, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--pearl);
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.06em;
  backdrop-filter: blur(6px);
  transition: border-color 0.3s ease, background 0.3s ease;
}

.pill:hover { border-color: rgba(255, 238, 230, 0.7); background: rgba(255, 255, 255, 0.08); }

.text-button {
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--pearl-soft);
  cursor: pointer;
  font: 650 0.62rem/1 var(--sans);
  letter-spacing: 0.21em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

#surprise { --pearl-soft: rgba(255, 238, 230, 0.72); }

.text-button:hover { color: var(--pearl); }

.pill:focus-visible,
.text-button:focus-visible {
  border-radius: 999px;
  outline: 1px solid rgba(255, 238, 230, 0.72);
  outline-offset: 4px;
}

.dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
}

.dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(229, 239, 232, 0.37);
  cursor: pointer;
  transition: width 0.3s var(--ease-out), background 0.3s ease;
}

.dot[aria-current="step"],
.dot[aria-current="true"] {
  width: 19px;
  border-radius: 10px;
  background: #f7f8ef;
}

/* --------------------------------------------------------------- 4. Viewer */

.scene-viewer {
  grid-template-rows: auto 1fr;
  padding-top: max(14px, env(safe-area-inset-top));
}

.viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left));
}

.viewer-back { text-transform: none; letter-spacing: 0.02em; font-weight: 500; font-size: 13px; }

.viewer-stage {
  --card-w: min(430px, 100vw - 32px, (100dvh - 104px) * 9 / 16);
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 0;
  padding: 8px 16px max(20px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.viewer-stage::-webkit-scrollbar { display: none; }

/* Full story scrolls inside the stage. Block layout here: as a stretched grid
   item the overflow:hidden article would be clamped to the container height. */
.viewer-stage.is-full { display: block; align-content: start; }
.viewer-stage.is-full .mmnts-full-story { margin: 0 auto; }

/* --- Story card: mmnts-* rules carried over from moments-stories-prototype.html.
       Colours come from theme.surface via custom properties set on the card. --- */

.mmnts-product-card,
.mmnts-full-story {
  position: relative;
  width: var(--card-w);
  overflow: hidden;
  border-radius: 22px;
  color: var(--ink, #f7f8ef);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  font-family: Arial, "DejaVu Sans", sans-serif;
  touch-action: pan-y;
  user-select: none;
}

.mmnts-product-card {
  aspect-ratio: 9 / 16;
  display: flex;
  flex-direction: column;
  max-height: 100%;
  min-height: 0;
  padding: 28px 28px 24px;
  background: var(--card-bg);
}

.mmnts-product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background:
    radial-gradient(circle at 10% 8%, rgba(255,255,255,.65) 0 1px, transparent 1.5px),
    radial-gradient(circle at 31% 6%, rgba(255,255,255,.48) 0 1px, transparent 1.5px),
    radial-gradient(circle at 57% 11%, rgba(255,255,255,.56) 0 1px, transparent 1.5px),
    radial-gradient(circle at 88% 15%, rgba(255,255,255,.48) 0 1px, transparent 1.5px),
    radial-gradient(circle at 14% 61%, rgba(255,255,255,.44) 0 1px, transparent 1.5px),
    radial-gradient(circle at 86% 48%, rgba(255,255,255,.58) 0 1px, transparent 1.5px),
    radial-gradient(circle at 20% 84%, rgba(255,255,255,.42) 0 1px, transparent 1.5px),
    radial-gradient(circle at 79% 74%, rgba(255,255,255,.44) 0 1px, transparent 1.5px);
}

.mmnts-card-head,
.mmnts-card-copy,
.mmnts-card-foot {
  position: relative;
  z-index: 1;
}

.mmnts-card-head {
  display: flex;
  flex: 0 0 auto;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.mmnts-brand {
  font-family: var(--card-serif);
  font-size: 30px;
  font-style: italic;
  letter-spacing: -1px;
}

.mmnts-real {
  color: var(--ink-soft, rgba(232, 239, 233, .67));
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.mmnts-card-copy {
  display: flex;
  flex: 1 1 0%;
  min-height: 0;
  flex-direction: column;
  padding-top: 70px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.mmnts-card-copy::-webkit-scrollbar { display: none; }

.mmnts-kicker {
  margin: 0 0 42px;
  color: var(--ink-soft, rgba(232, 239, 233, .68));
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.mmnts-headline {
  margin: 0 0 32px;
  color: var(--ink, #f8faf0);
  font-family: var(--card-serif);
  font-size: clamp(34px, 10.7cqw, 46px);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -1.5px;
}

.mmnts-body {
  margin: 0 0 18px;
  color: var(--ink, #f8faf0);
  font-family: var(--card-serif);
  font-size: clamp(21px, 6.7cqw, 27px);
  line-height: 1.22;
}

.mmnts-emphasis {
  margin: auto 0 0;
  color: var(--emphasis, #e8fff1);
  font-family: var(--card-serif);
  font-size: clamp(23px, 7.4cqw, 31px);
  font-style: italic;
  line-height: 1.18;
}

.mmnts-afterword {
  margin: 22px 0 0;
  color: var(--ink, #f8faf0);
  font-family: var(--card-serif);
  font-size: clamp(20px, 6.4cqw, 26px);
}

/* density: "dense" (presentation override from data) */
.mmnts-dense .mmnts-card-copy { padding-top: 54px; }
.mmnts-dense .mmnts-kicker { margin-bottom: 30px; }
.mmnts-dense .mmnts-headline {
  margin-bottom: 22px;
  font-size: clamp(29px, 9.3cqw, 37px);
  line-height: 1.05;
}
.mmnts-dense .mmnts-body {
  margin-bottom: 14px;
  font-size: clamp(18px, 5.9cqw, 23px);
  line-height: 1.19;
}
.mmnts-dense .mmnts-emphasis {
  font-size: clamp(21px, 6.8cqw, 27px);
  line-height: 1.15;
}
.mmnts-dense .mmnts-afterword {
  margin-top: 14px;
  font-size: clamp(18px, 5.7cqw, 23px);
}

/* final screen */
.mmnts-final-screen .mmnts-card-copy { padding-top: 48px; }
.mmnts-final-screen .mmnts-kicker { margin-bottom: 25px; }
.mmnts-final-screen .mmnts-headline { font-size: clamp(27px, 8.6cqw, 34px); }
.mmnts-final-screen .mmnts-body { font-size: clamp(17px, 5.6cqw, 21px); }
.mmnts-final-screen .mmnts-emphasis { font-size: clamp(20px, 6.3cqw, 25px); }

.mmnts-full-button {
  width: 100%;
  min-height: 48px;
  margin-top: auto;
  padding: 12px 0 10px;
  border: 0;
  border-top: 1px solid rgba(244, 247, 239, .22);
  background: transparent;
  color: var(--ink, #f7f8ef);
  cursor: pointer;
  text-align: left;
  font: inherit;
  letter-spacing: .2px;
}

.mmnts-card-end {
  flex: 0 0 auto;
  margin-top: 8px;
}

.mmnts-card-end .mmnts-full-button {
  margin-top: 0;
}

.mmnts-action-zone + .mmnts-full-button {
  border-top: 0;
  padding-top: 6px;
}

.mmnts-action-zone {
  margin-top: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(244, 247, 239, .18);
}

.mmnts-full-story .mmnts-action-zone {
  margin-top: 28px;
  padding-top: 22px;
}

.mmnts-action-choice {
  display: flex;
  align-items: center;
  gap: 18px;
}

.mmnts-action-want,
.mmnts-action-skip,
.mmnts-action-live,
.mmnts-plan-commit {
  min-height: 40px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font: inherit;
  touch-action: manipulation;
}

.mmnts-action-want,
.mmnts-action-skip {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012) 38%, transparent 72%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    color 0.22s ease,
    transform 0.16s ease;
}

.mmnts-action-want::before,
.mmnts-action-skip::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
}

.mmnts-action-want {
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(247, 248, 239, 0.92);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.mmnts-action-skip {
  color: var(--ink-soft, rgba(232, 239, 233, .6));
  font-size: 13px;
  letter-spacing: 0.02em;
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.035), transparent 58%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(255, 255, 255, 0.02);
}

.mmnts-action-want:hover {
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.mmnts-action-skip:hover {
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

.mmnts-action-want:active,
.mmnts-action-skip:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 1px 3px rgba(8, 12, 10, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.mmnts-action-want.is-selected {
  color: rgba(247, 248, 239, 0.98);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.mmnts-action-skip.is-selected {
  color: rgba(232, 239, 233, 0.84);
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.mmnts-action-want.is-selected,
.mmnts-action-skip.is-selected {
  cursor: default;
}

.mmnts-action-want.is-selected:hover {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.mmnts-action-skip.is-selected:hover {
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.mmnts-action-want.is-selected:active,
.mmnts-action-skip.is-selected:active {
  transform: none;
}

.mmnts-action-mark {
  margin-left: 0.35em;
  letter-spacing: 0;
  text-transform: none;
  color: var(--emphasis, #e8fff1);
}

.mmnts-action-want.is-confirmed,
.mmnts-plan-commit.is-confirmed {
  cursor: default;
  pointer-events: none;
}

.mmnts-plan-commit.is-confirmed {
  color: var(--emphasis, #e8fff1);
}

.mmnts-plan-commit.is-selected {
  opacity: 1;
}

.mmnts-action-live,
.mmnts-plan-commit {
  display: block;
  width: 100%;
  margin-top: 2px;
  letter-spacing: 0.2px;
}

.mmnts-action-committed {
  margin: 0;
  color: var(--emphasis, #e8fff1);
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  opacity: 0.86;
}

.mmnts-has-action .mmnts-card-copy { padding-top: 34px; }
.mmnts-has-action .mmnts-kicker { margin-bottom: 18px; }
.mmnts-has-action .mmnts-headline {
  margin-bottom: 16px;
  font-size: clamp(24px, 7.6cqw, 31px);
}
.mmnts-has-action .mmnts-body {
  margin-bottom: 10px;
  font-size: clamp(16px, 5.1cqw, 19px);
}
.mmnts-has-action .mmnts-emphasis {
  font-size: clamp(18px, 5.7cqw, 22px);
}

.mmnts-plan-copy p {
  margin: 0 0 22px;
  color: rgba(248, 250, 240, .92);
  font-family: var(--card-serif);
  font-size: clamp(19px, 5.9cqw, 23px);
  line-height: 1.52;
}

.mmnts-plan-essence p {
  color: var(--emphasis, #e8fff1);
  font-style: italic;
}

.mmnts-plan-limitations {
  margin: 2px 0 26px;
  padding: 10px 0 10px 16px;
  border-left: 1px solid rgba(244, 247, 239, .34);
}

.mmnts-plan-limitations p {
  margin: 0;
  color: rgba(248, 250, 240, .78);
  font-family: var(--card-serif);
  font-size: clamp(16px, 4.8cqw, 18px);
  line-height: 1.5;
}

.mmnts-plan-steps {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.mmnts-plan-steps li {
  display: grid;
  grid-template-columns: 1.6em 1fr;
  gap: 8px;
  margin: 0 0 16px;
}

.mmnts-plan-num {
  color: var(--ink-soft, rgba(232, 239, 233, .67));
  font-size: 11px;
  letter-spacing: 1px;
  padding-top: 6px;
}

.mmnts-plan-steps p {
  margin: 0;
  color: rgba(248, 250, 240, .92);
  font-family: var(--card-serif);
  font-size: clamp(18px, 5.6cqw, 22px);
  line-height: 1.42;
}

.mmnts-plan-first-title {
  margin: 8px 0 12px;
  color: var(--emphasis, #e8fff1);
  font-size: 11px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
}

.mmnts-plan-commit {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(244, 247, 239, .18);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-size: 12px;
}

.mmnts-action-want:focus-visible,
.mmnts-action-skip:focus-visible,
.mmnts-action-live:focus-visible,
.mmnts-plan-commit:focus-visible {
  outline: 1px solid rgba(244, 247, 239, .55);
  outline-offset: 4px;
}

.mmnts-card-foot {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(240, 247, 240, .14);
  color: rgba(229, 239, 232, .65);
  font-size: 10px;
  letter-spacing: 2px;
}

.mmnts-arrow {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  min-width: 48px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(248, 250, 240, 0.86);
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-50%);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.mmnts-arrow:hover:not(:disabled) {
  color: #fff;
  transform: translateY(-50%) scale(1.08);
}

.mmnts-arrow:disabled {
  color: rgba(248, 250, 240, 0.38);
  background: transparent;
  cursor: default;
}

.mmnts-arrow-prev { left: 0; justify-items: start; padding-left: 2px; }
.mmnts-arrow-next { right: 0; justify-items: end; padding-right: 2px; }

.mmnts-full-story {
  padding: 30px 28px 34px;
  background: var(--full-bg);
  user-select: text;
}

.mmnts-story-back {
  min-height: 44px;
  margin: -8px 0 25px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(242, 247, 240, .75);
  cursor: pointer;
  font: inherit;
}

.mmnts-full-label {
  margin: 0 0 26px;
  color: rgba(232, 239, 233, .62);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.mmnts-full-title {
  margin: 0 0 28px;
  color: var(--ink, #f8faf0);
  font-family: var(--card-serif);
  font-size: clamp(35px, 10.7cqw, 46px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -1.5px;
}

.mmnts-full-copy p {
  margin: 0 0 21px;
  color: rgba(248, 250, 240, .92);
  font-family: var(--card-serif);
  font-size: clamp(19px, 5.9cqw, 23px);
  line-height: 1.52;
}

.mmnts-full-copy p:last-child {
  color: var(--emphasis, #e8fff1);
  font-style: italic;
}

.mmnts-meta {
  display: grid;
  gap: 14px;
  margin: 34px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid rgba(240, 247, 240, .16);
}

.mmnts-meta div { display: grid; gap: 4px; }
.mmnts-meta dt {
  color: rgba(232, 239, 233, .55);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.mmnts-meta dd {
  margin: 0;
  color: rgba(248, 250, 240, .9);
  font-family: var(--card-serif);
  font-size: 18px;
}

/* The card is a container so the reference's vw-based clamps map onto card
   width (cqw) instead of viewport width — the card no longer equals viewport. */
.mmnts-product-card,
.mmnts-full-story { container-type: inline-size; }

/* Reference's small-phone tweaks, keyed on card width instead of viewport. */
@container (max-width: 340px) {
  .mmnts-product-card { padding: 23px 23px 20px; border-radius: 18px; }
  .mmnts-card-copy { padding-top: 50px; }
  .mmnts-kicker { margin-bottom: 29px; letter-spacing: 2px; }
  .mmnts-real { letter-spacing: 2px; }
  .mmnts-dense .mmnts-card-copy { padding-top: 38px; }
  .mmnts-dense .mmnts-kicker { margin-bottom: 20px; }
  .mmnts-final-screen .mmnts-card-copy { padding-top: 34px; }
  .mmnts-final-screen .mmnts-full-button { min-height: 42px; padding: 8px 0; }
  .mmnts-has-action .mmnts-card-copy { padding-top: 26px; }
  .mmnts-action-want,
  .mmnts-action-skip,
  .mmnts-action-live,
  .mmnts-plan-commit { min-height: 44px; }
}

/* ------------------------------------------------- 5. Transitions / motion */

.scene.is-entering {
  opacity: 0;
  transform: translateY(14px) scale(0.985);
}

.scene.is-leaving {
  opacity: 0;
  transform: translateY(-10px) scale(1.015);
  pointer-events: none;
  transition-duration: var(--scene-out);
}

@media (prefers-reduced-motion: no-preference) {
  .mmnts-card-copy,
  .mmnts-full-story { animation: mmnts-rise .28s ease both; }
  @keyframes mmnts-rise { from { opacity: 0; transform: translateY(8px); } }
}

/* -------------------------------------------------------- Phone chrome */

@media (max-width: 720px) {
  .scene-opening h1 {
    top: 43.5%;
    font-size: clamp(4.15rem, 20vw, 5.25rem);
    letter-spacing: -0.078em;
    transform: translate(-53%, -50%);
  }

  .scene-opening.is-dissolving h1 {
    transform: translate(-53%, -62%) scale(1.12);
  }

  #feel {
    top: 55.5%;
    min-width: 156px;
    gap: 15px;
    padding: 20px 24px;
    transform: translate(-50%, -50%);
  }

  .scene-opening.is-dissolving #feel {
    transform: translate(-50%, calc(-50% + 26px));
  }

  .share-moment-link {
    top: calc(55.5% + 78px);
  }

  .touch-mark { width: 39px; height: 39px; }
  .touch-mark::before { width: 57px; height: 57px; }

  .scene-discovery {
    row-gap: 14px;
    padding-bottom: calc(max(26px, env(safe-area-inset-bottom)) + 116px);
  }

  .discovery-bar {
    grid-template-columns: auto 1fr auto;
    padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  }

  .wordmark { font-size: 26px; }
  .discovery-filters { min-height: 28px; min-width: 0; }
  .discovery-tag { letter-spacing: 2px; }
  .locale-button { width: 36px; min-width: 36px; padding: 0 6px; }

  .carousel-track { --slide: 80vw; }

  .slide { gap: 18px; padding: 0 10px; }
  .slide-title { font-size: clamp(31px, 8.8vw, 40px); }

  .pill { min-height: 48px; }
}

/* Discovery arrows: phone keeps explicit prev/next in side gutters, not over titles. */
@media (max-width: 720px) {
  .carousel {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    column-gap: 2px;
    padding-inline: max(2px, env(safe-area-inset-left)) max(2px, env(safe-area-inset-right));
  }

  .carousel-arrow {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    width: 46px;
    min-width: 46px;
    height: 52px;
    font-size: 30px;
    justify-self: center;
  }

  .carousel-arrow:hover:not(:disabled) {
    transform: scale(1.08);
  }

  .carousel-track {
    --slide: 100%;
    min-width: 0;
  }
}

/* Story viewer: phone is a full remaining-height product surface, not a 9:16 mock. */
@media (max-width: 720px) {
  .viewer-stage {
    --card-w: 100%;
    display: grid;
    justify-items: stretch;
    align-content: stretch;
    padding: 4px 8px max(10px, env(safe-area-inset-bottom));
    overflow: hidden;
  }

  .viewer-stage.is-full {
    overflow-y: auto;
  }

  .viewer-stage.is-full .mmnts-full-story {
    width: 100%;
    min-height: 100%;
    margin: 0;
  }

  .mmnts-product-card {
    aspect-ratio: unset;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    padding: 20px 18px 14px;
    overflow: hidden;
  }

  .mmnts-card-head {
    flex: 0 0 auto;
    padding-left: 32px;
    padding-right: 32px;
  }

  .mmnts-card-copy,
  .mmnts-dense .mmnts-card-copy,
  .mmnts-final-screen .mmnts-card-copy,
  .mmnts-has-action .mmnts-card-copy {
    flex: 1 1 0%;
    height: auto;
    min-height: 0;
    padding-top: 22px;
    padding-left: 32px;
    padding-right: 32px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .mmnts-card-copy::-webkit-scrollbar { display: none; }

  .mmnts-kicker { margin-bottom: 18px; }
  .mmnts-headline { margin-bottom: 16px; }
  .mmnts-body { margin-bottom: 12px; }
  .mmnts-emphasis { margin: 18px 0 0; }
  .mmnts-afterword { margin-top: 14px; }

  .mmnts-dense .mmnts-kicker { margin-bottom: 14px; }
  .mmnts-dense .mmnts-headline { margin-bottom: 14px; }
  .mmnts-final-screen .mmnts-kicker { margin-bottom: 14px; }

  .mmnts-full-button,
  .mmnts-card-end,
  .mmnts-action-zone {
    margin-top: 16px;
  }

  .mmnts-card-end .mmnts-full-button { margin-top: 0; }
  .mmnts-action-zone + .mmnts-full-button { margin-top: 8px; }

  .mmnts-card-foot {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    flex: 0 0 auto;
    margin-top: 12px;
    padding-top: 12px;
  }

  /* Phone story arrows stay on the surface edges; copy inset keeps text clear. */
  .mmnts-arrow {
    width: 44px;
    min-width: 44px;
    height: 56px;
    font-size: 24px;
  }

  .mmnts-arrow-prev { left: 0; }
  .mmnts-arrow-next { right: 0; }
}

/* Tablet portrait: keep a 9:16 story card, but drop the 430px desktop cap. */
@media (min-width: 721px) and (max-width: 1100px) {
  .viewer-stage {
    --card-w: min(580px, calc(100vw - 72px), calc((100dvh - 112px) * 9 / 16));
  }
}

@media (max-height: 560px) and (min-width: 721px) {
  .scene-discovery { row-gap: 10px; }
  .slide-title { font-size: clamp(30px, 4vw, 44px); }
}

@media (max-height: 560px) {
  .product-footer {
    bottom: max(8px, env(safe-area-inset-bottom));
    width: calc(100% - 20px);
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root { --scene-in: 220ms; --scene-out: 180ms; }
  .scene-opening h1,
  #feel,
  .slide,
  .slide-title,
  .stage { transition-duration: 0.2s; }
  .locale-control,
  .locale-button { transition-duration: 0.01ms; }
  .mmnts-action-want,
  .mmnts-action-skip { transition-duration: 0.01ms; }
  .mmnts-action-want:active,
  .mmnts-action-skip:active { transform: none; }
  .stage.is-feeling .touch-mark::before { animation: none; }
  .scene.is-entering,
  .scene.is-leaving { transform: none; }
}
