/* The Ard 2027 — memory-box scroll redesign */
:root {
  --bg: #0a0c0b;
  --cream: #f4f0e8;
  --ink: #121412;
  --muted: rgba(244, 240, 232, 0.72);
  --muted-dark: rgba(18, 20, 18, 0.55);
  --line: rgba(244, 240, 232, 0.14);
  --accent: #e8e2d6;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --page-gutter: clamp(24px, 4vw, 48px);
  --content-wide: 1200px;
  --content-reading: 720px;
  --nav-offset: clamp(16px, 2.5vw, 32px);
  --scene-height: 100svh;
}
@media (min-width: 1024px) {
  :root {
    --page-gutter: clamp(48px, 5vw, 96px);
    --nav-offset: clamp(24px, 3vw, 48px);
  }
}
@supports (height: 100dvh) {
  .scene-pin { min-height: 100dvh; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--cream);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  color: #000;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* Nav */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.5rem;
  padding: var(--nav-offset) var(--page-gutter);
  pointer-events: none;
  transition: color 0.25s var(--ease);
}
.nav a { pointer-events: auto; }
.nav-mark {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  font-weight: 500;
  opacity: 0.92;
  padding: 0.35rem 0.55rem;
  border-radius: 0.35rem;
  background: rgba(10, 12, 11, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.nav-cta {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(244, 240, 232, 0.28);
  border-radius: 999px;
  background: rgba(10, 12, 11, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.25s var(--ease), border-color 0.25s, color 0.25s;
}
.nav-cta:hover { background: rgba(244, 240, 232, 0.12); border-color: rgba(244, 240, 232, 0.5); }
/* Light nav over cream scenes */
.nav.is-light .nav-mark {
  color: var(--ink);
  background: rgba(244, 240, 232, 0.72);
}
.nav.is-light .nav-cta {
  color: var(--ink);
  border-color: rgba(18, 20, 18, 0.22);
  background: rgba(244, 240, 232, 0.78);
}
.nav.is-light .nav-cta:hover {
  background: rgba(244, 240, 232, 0.95);
  border-color: rgba(18, 20, 18, 0.4);
}

/* Scenes */
.scene { position: relative; }
.scene-pin {
  position: relative;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.media-fill {
  position: absolute;
  inset: 0;
}
.media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  will-change: transform;
}
.media-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,12,11,0.35) 0%, rgba(10,12,11,0.55) 55%, rgba(10,12,11,0.72) 100%);
}

.scene-center {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 1.5rem;
  max-width: min(90vw, 38rem);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.2vh, 28px); /* eyebrow clearance */
}

.brand-mark {
  position: static;
  flex: none;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  font-weight: 500;
  margin: 0;
  opacity: 0.7;
}

.hero-lines {
  position: relative;
  width: min(90vw, 34rem);
  display: grid;
  place-items: center;
  overflow: hidden; /* exiting line y-travel must not invade brand-mark */
  padding-block: 0.15em; /* slight room for glyphs without eating gap */
}

.hero-lines .line {
  grid-area: 1 / 1;
  position: static;
  margin: 0;
  width: 100%;
  max-width: 100%;
  text-wrap: balance;
}

.line {
  margin: 0;
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--cream);
}

/* Scene 01 — line-b hidden until scroll enhance; both share one flow cell */
.scene-01 .line-b { opacity: 0; }
.scene-01 .scene-center { min-height: 12rem; }

/* Scene 02 — sticker */
.scene02-pin { background: var(--cream); }
.sticker-field {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  overflow: hidden;
  padding: 5rem 1.25rem 4rem;
  box-sizing: border-box;
}
.sticker-photo {
  position: absolute;
  width: 42vmin;
  height: 42vmin;
  object-fit: cover;
  border-radius: 0.4rem;
  transform: scale(0.35);
  opacity: 0;
  filter: blur(0px);
  will-change: transform, opacity;
}
.sticker-cutout {
  position: relative;
  z-index: 3;
  width: min(36vmin, 240px);
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.34));
  transform: translateY(6px) scale(0.94);
  transform-origin: center bottom;
}
.sticker-label {
  position: relative;
  z-index: 4;
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1.35rem, 4.2vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  opacity: 0;
  max-width: min(22rem, 88vw);
  line-height: 1.2;
  white-space: normal;
  text-align: center;
}

/* Scene 03 — moments */
.scene-03 .scene-pin { background: #070807; }
.moment {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
}
.moment img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
}
.moment .line {
  position: absolute;
  left: 50%;
  bottom: 14%;
  transform: translateX(-50%);
  width: min(90vw, 36rem);
  text-align: center;
  text-shadow: 0 2px 24px rgba(0,0,0,0.55);
  padding: 0 1rem;
}
.moment::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.55) 80%);
  pointer-events: none;
}
.moment-close .line-close {
  bottom: 50%;
  transform: translate(-50%, 50%);
  font-size: clamp(1.55rem, 4vw, 2.5rem);
  max-width: 28rem;
}

/* Scene 04 — recap */
.scene-04 .scene-pin { background: #050605; }
.recap {
  width: min(92vw, 960px);
  text-align: center;
  padding: 1rem;
}
.recap-a, .recap-b {
  margin-bottom: 0.75rem;
  opacity: 1;
}
.recap-b { opacity: 0.9; margin-bottom: 1.75rem; }
.recap-player-wrap {
  margin: 0 auto;
  width: 100%;
  max-width: 880px;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
  transform-origin: center center;
  opacity: 1;
}
.recap-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  object-fit: cover;
}

/* Scene 05 — quiet */
.scene05-pin {
  background: var(--cream);
  color: var(--ink);
}
.quiet-bg {
  position: absolute;
  inset: 0;
  background: var(--cream);
}
.quiet-copy {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 1.5rem;
  max-width: 34rem;
}
.quiet-a, .quiet-b, .quiet-c {
  color: var(--ink);
}
.quiet-b { margin-top: 0.85rem; opacity: 1; }
.quiet-photo-wrap {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0; /* shown mid-scroll; hash seek / reduced-motion reveal */
  z-index: 1;
  pointer-events: none;
}
.no-gsap .quiet-photo-wrap,
.is-reduced-motion .quiet-photo-wrap {
  opacity: 1;
}
.no-gsap .quiet-b,
.is-reduced-motion .quiet-b {
  opacity: 1;
}
.quiet-photo {
  width: min(88vw, 72vh, 720px);
  height: min(88vw, 72vh, 720px);
  object-fit: contain;
  border-radius: 0.35rem;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
}
.quiet-c {
  position: absolute;
  z-index: 3;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  width: min(90vw, 30rem);
  text-align: center;
}

/* Scene 06 — invite */
.scene-06 {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 6rem 1.25rem 4rem;
}
.invite-inner {
  width: min(100%, 420px);
  text-align: center;
}
.invite-small {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: -0.01em;
}
.invite-year {
  margin: 0 0 1.25rem;
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.invite-again {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: -0.015em;
}
.invite-support {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.45;
}
.invite-come {
  margin: 0 0 2rem;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.invite-form { display: grid; gap: 0.9rem; }
.form-row {
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 480px) {
  .form-row { grid-template-columns: 1fr 1.3fr; }
}
.field {
  display: grid;
  gap: 0.35rem;
  text-align: left;
}
.field span {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.field input {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: rgba(244, 240, 232, 0.04);
  color: var(--cream);
  outline: none;
  transition: border-color 0.2s;
}
.field input:focus { border-color: rgba(244, 240, 232, 0.45); }
.btn-access {
  width: 100%;
  padding: 0.95rem 1.2rem;
  border: 0;
  border-radius: 0.4rem;
  background: var(--cream);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: transform 0.2s var(--ease), opacity 0.2s;
}
.btn-access:hover { transform: translateY(-1px); }
.btn-access:disabled { opacity: 0.55; cursor: wait; }
.form-micro {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.form-error {
  margin: 0;
  color: #ffb4a8;
  font-size: 0.85rem;
}

.success-panel { text-align: center; }
.success-panel h2 {
  margin: 0 0 0.6rem;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.success-panel .prose p {
  margin: 0 0 1.25rem;
  color: var(--muted);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--cream);
  padding: 0.7rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
}
.why-box {
  margin-top: 2rem;
  text-align: left;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.why-box h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
}
.why-box textarea {
  width: 100%;
  min-height: 90px;
  padding: 0.75rem;
  border-radius: 0.4rem;
  border: 1px solid var(--line);
  background: rgba(244,240,232,0.04);
  color: var(--cream);
  resize: vertical;
  margin-bottom: 0.75rem;
}
.why-note { font-size: 0.85rem; color: var(--muted); }

.long-link-wrap { margin: 2.5rem 0 0; }
.long-link {
  font-size: 0.88rem;
  color: var(--muted);
  border-bottom: 1px solid rgba(244,240,232,0.25);
  padding-bottom: 0.1rem;
  transition: color 0.2s;
}
.long-link:hover { color: var(--cream); }

/* Long story */
.long-story {
  padding: 4rem 1.25rem 5rem;
  background: #070807;
}
.long-story-inner {
  width: min(100%, 820px);
  margin: 0 auto;
}
.long-kicker {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}
.long-frame {
  border-radius: 0.45rem;
  overflow: hidden;
  background: #000;
}
.long-player {
  width: 100%;
  aspect-ratio: 16 / 9;
}

/* Ending */
.ending {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.ending-media {
  position: absolute;
  inset: 0;
}
.ending-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}
.ending-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,12,11,0.35), rgba(10,12,11,0.7));
}
.ending-copy {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 1.5rem;
}
.ending-line {
  margin: 0 0 1.25rem;
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}
.ending-meta {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  font-weight: 500;
  opacity: 0.75;
}

.site-footer {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--bg);
}

/* Reduced motion — no pinning/transforms; all narrative visible */
@media (prefers-reduced-motion: reduce) {
  .media-img, .sticker-photo, .sticker-cutout, .moment, .quiet-b, .quiet-c, .quiet-photo-wrap {
    transition: none !important;
  }
  .scene { min-height: auto; }
  .scene-pin {
    position: relative !important;
    height: auto;
    min-height: auto;
    overflow: visible;
    padding: 4rem 1.25rem;
  }
  .scene-01 .line-a,
  .scene-01 .line-b,
  .quiet-a, .quiet-b, .quiet-photo-wrap,
  .recap-a, .recap-b, .recap-player-wrap,
  .sticker-photo, .sticker-cutout {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-lines .line {
    position: static;
    grid-area: auto;
  }
  .scene-01 .line-b { margin-top: 1rem; }
  .moment {
    position: relative !important;
    inset: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    min-height: 70vh;
  }
  .moment + .moment { margin-top: 1rem; }
  .quiet-photo-wrap {
    position: relative !important;
    inset: auto !important;
    margin-top: 2rem;
    opacity: 1 !important;
  }
  .sticker-photo {
    position: relative !important;
    width: min(70vw, 420px) !important;
    height: auto !important;
    max-height: 70vh;
    object-fit: contain !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .sticker-field {
    padding: 5rem 1.25rem 4rem;
  }
}

/* ========== Desktop ≥1024px ========== */
@media (min-width: 1024px) {
  .scene-center {
    position: absolute;
    inset: 0;
    margin: auto;
    width: min(calc(100vw - 2 * var(--page-gutter)), 1160px);
    max-width: min(calc(100vw - 2 * var(--page-gutter)), 1160px);
    height: fit-content;
    max-height: calc(100% - 2 * var(--nav-offset));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 2.6vh, 32px);
    text-align: center;
    padding: var(--nav-offset) var(--page-gutter);
  }

  .brand-mark {
    position: static;
    margin: 0;
    flex: none;
    z-index: 2;
  }

  .hero-lines {
    z-index: 1;
    overflow: hidden;
  }

  .hero-lines {
    width: min(100%, 52rem);
  }

  .scene-01 .line,
  .hero-lines .line {
    font-size: clamp(56px, 5.25vw, 92px);
    line-height: 0.98;
    letter-spacing: -0.045em;
    text-wrap: balance;
  }

  /* Dad+daughter sticker — prefer full subjects over edge fill */
  .sticker-field {
    background: #f3efe5;
  }
  .sticker-photo {
    object-fit: contain;
    object-position: 50% 18%;
  }

  /* Scene 03 captions clear of chrome */
  .moment .line {
    bottom: max(14%, 8vh);
  }

  /* Recap + long video desktop widths */
  .recap {
    width: min(var(--content-wide), calc(100vw - 2 * var(--page-gutter)));
  }
  .recap-player-wrap {
    max-width: min(1120px, calc(100vw - 2 * var(--page-gutter)));
  }

  .long-story {
    padding: 4rem var(--page-gutter) 5rem;
  }
  .long-story-inner {
    width: min(1120px, calc(100vw - 2 * var(--page-gutter)));
  }
  .long-player {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .invite-inner {
    width: min(100%, 480px);
  }

  .site-footer {
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
  }

  /* Short desktop heights — keep ≥18px eyebrow clearance */
  @media (max-height: 800px) {
    .scene-center { gap: clamp(18px, 2vh, 22px); }
    .scene-01 .line,
    .hero-lines .line {
      font-size: clamp(42px, 5vw, 64px);
    }
  }
}

/* Fallback when GSAP missing: show narrative */
.no-gsap .scene-01 .line-b { opacity: 1; margin-top: 1rem; }
.no-gsap .hero-lines .line { grid-area: auto; }
.no-gsap .moment[data-m="0"] { opacity: 1; visibility: visible; }
.no-gsap .quiet-photo-wrap { opacity: 1; }
.no-gsap .sticker-photo { opacity: 1; transform: none; scale: 1; }

/* Mobile tweaks — shorter pins handled in JS; tighter type */
@media (max-width: 700px) {
  .nav { padding: 0.9rem 1rem; }
  .line { font-size: clamp(1.5rem, 6vw, 2rem); font-weight: 700; }
  .sticker-cutout {
    width: min(55vmin, 200px);
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.36));
  }
  .moment .line { bottom: 18%; }
  .quiet-photo {
    width: min(92vw, 52vh, 360px);
    height: min(92vw, 52vh, 360px);
  }
  .invite-year { font-size: clamp(2.1rem, 10vw, 2.8rem); }
  .scene-06 { padding: 5rem 1.15rem 5.5rem; }
  .invite-inner { padding-bottom: 0.5rem; }
}

.br-mobile { display: none; }
@media (max-width: 640px) {
  .br-mobile { display: inline; }
}

.invite-lede {
  max-width: 28rem;
  margin: 0.85rem auto 1.6rem;
  font-size: clamp(0.98rem, 2.2vw, 1.08rem);
  line-height: 1.55;
  font-weight: 450;
  color: var(--muted);
  text-wrap: pretty;
  opacity: 1;
}
.invite-priority {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 1rem;
  letter-spacing: 0.01em;
  opacity: 1;
}
.invite-small,
.invite-year,
.invite-lede,
.invite-priority,
.invite-panel,
.long-link-wrap {
  opacity: 1;
}
.nav-cta {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: none;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .nav-cta { font-size: 0.65rem; letter-spacing: 0.02em; }
}

@media (max-width: 640px) {
  .sticker-field {
    gap: 1rem;
    padding: 4.5rem 1.1rem 3.5rem;
    justify-content: center;
  }
  .sticker-cutout {
    width: min(62vmin, 220px);
  }
  .sticker-label {
    font-size: clamp(1.25rem, 5.6vw, 1.55rem);
    max-width: 18.5rem;
  }
}
