:root {
  --bg: #f8f7ff;
  --surface: #fffefe;
  --surface-2: #f5f2ff;
  --text: #1d1a24;
  --muted: #605977;
  --line: #ddd8ea;
  --accent: #5b7dff;
  --accent-soft: rgba(91, 125, 255, 0.14);
  --shadow: 0 10px 30px rgba(29, 26, 36, 0.08);
  --pink-soft: rgba(255, 121, 179, 0.12);
  --blue-soft: rgba(95, 172, 255, 0.14);
  --lavender-soft: rgba(164, 127, 255, 0.1);

  --font-body: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --font-display: Iowan Old Style, Baskerville, Georgia, serif;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  --radius-sm: 0.5rem;
  --radius-md: 0.9rem;
  --radius-lg: 1.25rem;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.875rem;
  --text-3xl: 2.5rem;

  --container: 72rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 4%, rgba(95, 172, 255, 0.2), transparent 42%),
    radial-gradient(circle at 92% 12%, rgba(255, 121, 179, 0.18), transparent 38%),
    radial-gradient(circle at 50% 100%, rgba(164, 127, 255, 0.08), transparent 40%),
    var(--bg);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 22rem;
  height: 22rem;
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;
  opacity: 0.5;
  filter: blur(28px);
}

body::before {
  top: 8%;
  right: -6rem;
  background: radial-gradient(circle, rgba(95, 172, 255, 0.24), transparent 68%);
  animation: ambientFloatA 20s ease-in-out infinite alternate;
}

body::after {
  bottom: 8%;
  left: -6rem;
  background: radial-gradient(circle, rgba(255, 121, 179, 0.22), transparent 68%);
  animation: ambientFloatB 24s ease-in-out infinite alternate;
}

@keyframes ambientFloatA {
  from {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.42;
  }
  to {
    transform: translate3d(-1rem, 1.25rem, 0) scale(1.06);
    opacity: 0.58;
  }
}

@keyframes ambientFloatB {
  from {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.4;
  }
  to {
    transform: translate3d(1rem, -1.5rem, 0) scale(1.08);
    opacity: 0.56;
  }
}

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

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
}

.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
  z-index: 1000;
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
  position: relative;
}

.section {
  padding-block: var(--space-7);
}

.sticker-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.section-stickers {
  position: absolute;
  inset: -0.85rem -1.2rem;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
}

.sticker {
  position: absolute;
  width: var(--size, 4.9rem);
  aspect-ratio: 1;
  padding: 0.5rem;
  border-radius: 1.05rem;
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(122, 123, 158, 0.32);
  box-shadow:
    0 16px 28px rgba(29, 26, 36, 0.12),
    0 5px 12px rgba(91, 125, 255, 0.14);
  transform: translate(var(--pop-x, 0), var(--pop-y, 0)) rotate(var(--rot, 0deg)) scale(1.04);
  backdrop-filter: blur(3px);
  opacity: 0.98;
  filter: saturate(1.08);
}

.sticker::before {
  content: "";
  position: absolute;
  top: -0.3rem;
  left: 16%;
  width: 68%;
  height: 0.56rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(122, 123, 158, 0.2);
  box-shadow: 0 3px 5px rgba(29, 26, 36, 0.07);
}

.sticker svg {
  width: 100%;
  height: 100%;
}

main .section {
  position: relative;
  z-index: 0;
}

main .section::before {
  content: "";
  position: absolute;
  inset: var(--space-4) 0;
  z-index: -1;
  border-radius: var(--radius-lg);
  opacity: 0.95;
}

main .section > .container > *:not(.section-stickers) {
  position: relative;
  z-index: 1;
}

main .section:not(:last-of-type)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(var(--space-4) * -0.65);
  transform: translateX(-50%);
  width: min(14rem, 55vw);
  height: 1.5rem;
  pointer-events: none;
  opacity: 0.75;
  z-index: 1;
  background:
    radial-gradient(circle at 10% 55%, rgba(95, 172, 255, 0.22) 0 0.2rem, transparent 0.24rem),
    radial-gradient(circle at 30% 40%, rgba(255, 121, 179, 0.2) 0 0.18rem, transparent 0.22rem),
    radial-gradient(circle at 50% 55%, rgba(164, 127, 255, 0.18) 0 0.18rem, transparent 0.22rem),
    radial-gradient(circle at 70% 42%, rgba(255, 121, 179, 0.16) 0 0.16rem, transparent 0.2rem),
    radial-gradient(circle at 90% 55%, rgba(95, 172, 255, 0.18) 0 0.2rem, transparent 0.24rem),
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(151, 184, 238, 0.3) 18%,
      rgba(225, 167, 210, 0.34) 50%,
      rgba(151, 184, 238, 0.3) 82%,
      transparent 100%
    );
  border-radius: 999px;
  mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
}

.site-header {
  padding-top: var(--space-4);
}

.hero {
  position: relative;
  padding: var(--space-7) var(--space-5);
  background:
    radial-gradient(circle at 12% 10%, rgba(95, 172, 255, 0.18), transparent 40%),
    radial-gradient(circle at 88% 20%, rgba(255, 121, 179, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 245, 255, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: clip;
}

.hero-layout {
  display: grid;
  gap: var(--space-5);
}

.hero-copy {
  min-width: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -4rem -4rem auto;
  width: 10rem;
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--accent-soft);
  filter: blur(2px);
}

.hero > *:not(.section-stickers) {
  position: relative;
  z-index: 1;
}

.site-footer .container > *:not(.section-stickers) {
  position: relative;
  z-index: 1;
}

.hero-photo-frame {
  margin: 0;
  align-self: center;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(151, 184, 238, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 245, 255, 0.92));
  box-shadow: 0 16px 35px rgba(31, 26, 23, 0.08);
  padding: var(--space-2);
}

.hero-photo {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  border-radius: calc(var(--radius-lg) - 0.3rem);
}

#timeline::before {
  background:
    linear-gradient(180deg, rgba(244, 249, 255, 0.95), rgba(233, 244, 255, 0.88));
  border: 1px solid rgba(129, 177, 236, 0.22);
}

#gallery::before {
  background:
    linear-gradient(180deg, rgba(255, 243, 249, 0.96), rgba(255, 237, 247, 0.9));
  border: 1px solid rgba(236, 146, 188, 0.2);
}

#reasons::before {
  background:
    linear-gradient(180deg, rgba(247, 244, 255, 0.96), rgba(241, 236, 255, 0.9));
  border: 1px solid rgba(173, 150, 236, 0.18);
}

#perspective::before {
  background:
    linear-gradient(180deg, rgba(240, 249, 255, 0.96), rgba(247, 240, 255, 0.92));
  border: 1px solid rgba(151, 184, 238, 0.2);
}

#letter::before {
  background:
    linear-gradient(180deg, rgba(244, 251, 255, 0.95), rgba(245, 241, 255, 0.92));
  border: 1px solid rgba(151, 184, 238, 0.18);
}

#extras::before {
  background:
    linear-gradient(180deg, rgba(255, 246, 252, 0.95), rgba(246, 247, 255, 0.92));
  border: 1px solid rgba(225, 167, 210, 0.18);
}

.eyebrow {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.75rem);
  max-width: 12ch;
}

.hero-subtitle {
  margin: var(--space-4) 0 0;
  max-width: 40ch;
  color: var(--muted);
  font-size: var(--text-lg);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 var(--space-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font-size: var(--text-sm);
}

.section-heading {
  margin-bottom: var(--space-5);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
}

.section-heading + * {
  margin-top: 0;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 var(--space-3);
  border-left: 1px solid var(--line);
  display: grid;
  gap: var(--space-5);
}

.timeline-item {
  position: relative;
  padding-left: var(--space-4);
  min-height: 18rem;
  display: flex;
  align-items: flex-start;
}

.timeline-item::after {
  content: "";
  position: absolute;
  inset: 0 0 0 calc(-1 * var(--space-4));
  pointer-events: none;
}

.timeline-dot {
  position: absolute;
  left: calc(-1 * var(--space-3) - 0.25rem);
  top: 1rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}

.timeline-card {
  width: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 252, 255, 0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: 0 4px 16px rgba(31, 26, 23, 0.04);
  transition:
    box-shadow 220ms ease,
    border-color 220ms ease,
    background 220ms ease,
    transform 220ms ease,
    max-width 260ms ease;
}

.timeline-date {
  margin: 0 0 var(--space-2);
  color: var(--muted);
  font-size: var(--text-sm);
}

.timeline-card h3 {
  font-size: var(--text-lg);
  font-family: var(--font-display);
  margin-bottom: var(--space-2);
}

.timeline-summary {
  margin: 0;
}

.timeline-detail {
  display: grid;
  grid-template-rows: 1fr;
  margin-top: var(--space-3);
  opacity: 1;
  transition:
    grid-template-rows 280ms ease,
    opacity 220ms ease,
    margin-top 220ms ease;
}

.timeline-detail-inner {
  overflow: hidden;
  display: grid;
  gap: var(--space-3);
}

.timeline-media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

.timeline-media-placeholder {
  min-height: 7rem;
  border-radius: calc(var(--radius-md) - 0.2rem);
  border: 1px dashed rgba(96, 117, 170, 0.35);
  background:
    linear-gradient(135deg, rgba(95, 172, 255, 0.12), rgba(255, 121, 179, 0.09)),
    repeating-linear-gradient(
      -45deg,
      rgba(96, 117, 170, 0.07) 0 10px,
      rgba(255, 255, 255, 0.03) 10px 20px
    );
}

.timeline-media-photo {
  width: 100%;
  min-height: 7rem;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: calc(var(--radius-md) - 0.2rem);
  border: 1px solid rgba(96, 117, 170, 0.14);
  background: rgba(255, 255, 255, 0.5);
}

.timeline-detail-copy {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-base);
  line-height: 1.75;
  max-width: none;
}

.timeline-item.is-active .timeline-card {
  border-color: rgba(91, 125, 255, 0.35);
  box-shadow: 0 14px 30px rgba(91, 125, 255, 0.12);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 121, 179, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(242, 249, 255, 0.97));
  transform: translateY(-2px);
}

.timeline-item.is-active .timeline-dot {
  box-shadow:
    0 0 0 1px var(--line),
    0 0 0 6px rgba(91, 125, 255, 0.12);
}

.js-enabled .timeline-item:not(.is-expanded) .timeline-detail {
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
}

.js-enabled .timeline-item:not(.is-expanded) .timeline-card {
  box-shadow: 0 4px 14px rgba(31, 26, 23, 0.035);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  isolation: isolate;
}

.gallery-card {
  position: relative;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 246, 252, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  box-shadow: 0 4px 16px rgba(31, 26, 23, 0.04);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.gallery-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: calc(var(--radius-md) - 0.25rem);
  border: 1px dashed rgba(98, 87, 77, 0.4);
  background:
    linear-gradient(135deg, rgba(95, 172, 255, 0.09), rgba(255, 121, 179, 0.07)),
    repeating-linear-gradient(
      -45deg,
      rgba(96, 117, 170, 0.06) 0 10px,
      rgba(255, 255, 255, 0.04) 10px 20px
    );
  transition: transform 220ms ease;
}

.gallery-photo {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  border-radius: calc(var(--radius-md) - 0.25rem);
  border: 1px solid rgba(98, 87, 77, 0.12);
  background: rgba(255, 255, 255, 0.5);
  transition: transform 220ms ease;
}

.gallery-card figcaption {
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: var(--text-sm);
}

@media (hover: hover) and (pointer: fine) {
  .gallery-card:hover,
  .gallery-card:focus-within {
    z-index: 2;
    transform: scale(1.04);
    border-color: rgba(236, 146, 188, 0.35);
    box-shadow: 0 14px 28px rgba(95, 172, 255, 0.12), 0 10px 18px rgba(255, 121, 179, 0.1);
  }

  .gallery-card:hover .gallery-placeholder,
  .gallery-card:focus-within .gallery-placeholder,
  .gallery-card:hover .gallery-photo,
  .gallery-card:focus-within .gallery-photo {
    transform: scale(1.02);
  }
}

.notes-stack {
  display: grid;
  gap: var(--space-3);
}

.unfold-note {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 243, 255, 0.94));
  border: 1px solid rgba(173, 150, 236, 0.22);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 18px rgba(79, 72, 112, 0.06);
  overflow: clip;
  transition:
    box-shadow 220ms ease,
    border-color 220ms ease,
    transform 220ms ease;
}

.unfold-note::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.35rem;
  background: linear-gradient(180deg, rgba(91, 125, 255, 0.5), rgba(255, 121, 179, 0.35));
  opacity: 0.7;
}

.unfold-note summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-4) var(--space-4) var(--space-4) calc(var(--space-4) + 0.4rem);
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.unfold-note summary::-webkit-details-marker {
  display: none;
}

.unfold-note summary::after {
  content: "+";
  width: 1.5rem;
  height: 1.5rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(91, 125, 255, 0.22);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
  flex-shrink: 0;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.unfold-note[open] {
  border-color: rgba(173, 150, 236, 0.35);
  box-shadow: 0 12px 22px rgba(91, 125, 255, 0.08), 0 6px 14px rgba(255, 121, 179, 0.06);
  transform: translateY(-1px);
}

.unfold-note[open] summary::after {
  content: "−";
  transform: rotate(0deg);
  background: rgba(91, 125, 255, 0.08);
  border-color: rgba(91, 125, 255, 0.3);
}

.unfold-note-body {
  padding: 0 var(--space-4) var(--space-4) calc(var(--space-4) + 0.4rem);
  color: var(--muted);
  display: grid;
  gap: var(--space-2);
}

.unfold-note-body p {
  margin: 0;
}

.unfold-note:focus-within {
  outline: 2px solid rgba(91, 125, 255, 0.35);
  outline-offset: 2px;
}

.perspective-slider {
  --then-weight: 100;
  --now-weight: 0;
  --then-col: 100%;
  --now-col: 0%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 243, 255, 0.94));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: 0 8px 22px rgba(91, 125, 255, 0.06);
}

.perspective-controls {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.perspective-controls label {
  font-weight: 600;
}

.perspective-controls input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.control-help {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.control-value {
  justify-self: start;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(91, 125, 255, 0.22);
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  font-size: var(--text-sm);
}

.perspective-rows {
  display: grid;
  gap: var(--space-3);
}

.perspective-row {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(151, 184, 238, 0.18);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}

.perspective-theme {
  margin: 0 0 var(--space-2);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.perspective-pair {
  display: grid;
  gap: var(--space-2);
  align-items: stretch;
}

.perspective-side {
  min-width: 0;
  overflow: auto;
  border-radius: calc(var(--radius-md) - 0.15rem);
  border: 1px solid rgba(221, 216, 234, 0.8);
  padding: var(--space-3);
  height: 8.5rem;
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}

.perspective-side h3 {
  font-size: var(--text-base);
  font-family: var(--font-display);
  margin-bottom: var(--space-1);
}

.perspective-side p {
  margin: 0;
  color: var(--muted);
}

.perspective-side.is-then {
  background:
    linear-gradient(180deg, rgba(236, 247, 255, 0.92), rgba(226, 241, 255, 0.86));
  opacity: calc(0.45 + (var(--then-weight) / 100) * 0.55);
  transform: scale(calc(0.985 + (var(--then-weight) / 100) * 0.03));
  box-shadow: 0 0 0 1px rgba(95, 172, 255, 0.08) inset;
}

.perspective-side.is-now {
  background:
    linear-gradient(180deg, rgba(255, 240, 249, 0.92), rgba(255, 232, 245, 0.86));
  opacity: calc(0.45 + (var(--now-weight) / 100) * 0.55);
  transform: scale(calc(0.985 + (var(--now-weight) / 100) * 0.03));
  box-shadow: 0 0 0 1px rgba(255, 121, 179, 0.08) inset;
}

.perspective-slider[data-now-hidden="true"] .perspective-side.is-now {
  display: none;
}

.perspective-slider[data-now-hidden="true"] .perspective-pair {
  grid-template-columns: 1fr;
}

.letter-card {
  max-width: 44rem;
  margin-inline: auto;
  padding: var(--space-5);
  background:
    radial-gradient(circle at 0% 0%, rgba(95, 172, 255, 0.08), transparent 36%),
    radial-gradient(circle at 100% 0%, rgba(255, 121, 179, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 244, 255, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.letter-reveal {
  display: grid;
  gap: var(--space-4);
}

.letter-seal-button {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  border: 1px solid rgba(225, 167, 210, 0.35);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 241, 249, 0.94));
  color: var(--text);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  box-shadow: 0 8px 18px rgba(255, 121, 179, 0.08);
  cursor: pointer;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.letter-seal-button:hover,
.letter-seal-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(95, 172, 255, 0.08), 0 10px 18px rgba(255, 121, 179, 0.08);
  border-color: rgba(225, 167, 210, 0.5);
}

.letter-seal-button:focus-visible {
  outline: 2px solid rgba(91, 125, 255, 0.3);
  outline-offset: 2px;
}

.seal-mark {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 121, 179, 0.16), rgba(95, 172, 255, 0.14));
  color: var(--muted);
  font-size: 0.9rem;
}

.envelope-shell {
  position: relative;
  max-width: 46rem;
  margin-inline: auto;
  padding: var(--space-5) var(--space-3) var(--space-3);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 248, 252, 0.94), rgba(246, 248, 255, 0.94));
  border: 1px solid rgba(221, 216, 234, 0.85);
  box-shadow: 0 16px 28px rgba(91, 125, 255, 0.06);
  overflow: clip;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 7rem;
  background:
    linear-gradient(180deg, rgba(255, 241, 249, 0.95), rgba(246, 242, 255, 0.95));
  clip-path: polygon(0 0, 100% 0, 50% 92%);
  transform-origin: top center;
  z-index: 3;
  border-bottom: 1px solid rgba(225, 167, 210, 0.2);
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 260ms ease;
}

.envelope-pocket {
  position: absolute;
  inset: auto 0 0 0;
  height: 62%;
  background:
    linear-gradient(180deg, rgba(255, 250, 253, 0.9), rgba(245, 247, 255, 0.95));
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 0, 50% 48%);
  z-index: 1;
  opacity: 0.9;
}

.letter-reveal .letter-card {
  position: relative;
  z-index: 2;
  transform: translateY(2.25rem);
  opacity: 0;
  transition:
    transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 280ms ease;
}

.letter-reveal.is-open .envelope-flap {
  transform: rotateX(165deg);
  opacity: 0.35;
}

.letter-reveal.is-open .letter-card {
  transform: translateY(0);
  opacity: 1;
}

.letter-reveal:not(.is-open) .letter-card {
  pointer-events: none;
}

.letter-card p {
  margin: 0;
}

.letter-card p + p {
  margin-top: var(--space-3);
}

.extras-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.extras-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 245, 255, 0.93));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(31, 26, 23, 0.04);
  color: var(--muted);
}

.extras-list a::after {
  content: "↗";
  font-size: var(--text-lg);
  opacity: 0.7;
}

.extras-list a[aria-disabled="true"] {
  cursor: default;
  opacity: 0.92;
}

.extras-list a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-footer {
  padding: 0 0 var(--space-7);
}

.site-footer .container {
  border-top: 1px solid var(--line);
  padding-top: var(--space-4);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

/* Optional animation hook (future enhancement can toggle .is-visible) */
.reveal-on-scroll {
  opacity: 1;
  transform: none;
}

@media (min-width: 40rem) {
  .section {
    padding-block: var(--space-8);
  }

  .hero {
    padding: var(--space-8) var(--space-7);
  }

  .hero-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(15rem, 0.75fr);
    align-items: center;
    gap: var(--space-6);
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }

  .notes-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .timeline-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
  }

  .timeline-media-placeholder {
    min-height: 9rem;
  }

  .timeline-media-photo {
    min-height: 9rem;
  }

  .timeline-item {
    min-height: 20rem;
  }

  .perspective-slider {
    padding: var(--space-5);
  }

  .perspective-pair {
    grid-template-columns: minmax(0, var(--then-col)) minmax(0, var(--now-col));
    align-items: stretch;
    transition: grid-template-columns 220ms ease;
  }

  .perspective-side {
    height: 7.75rem;
  }

  .envelope-shell {
    padding: var(--space-6) var(--space-4) var(--space-4);
  }
}

@media (min-width: 64rem) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .notes-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline {
    gap: var(--space-6);
  }

  .timeline-card {
    padding: var(--space-5);
  }

  .timeline-item {
    min-height: 24rem;
  }

  .js-enabled .timeline-item .timeline-card {
    max-width: 38rem;
  }

  .js-enabled .timeline-item.is-expanded .timeline-card {
    max-width: 100%;
  }

  .timeline-detail-copy {
    font-size: var(--text-lg);
    line-height: 1.8;
    max-width: none;
  }

  .perspective-row {
    padding: var(--space-4);
  }
}

@media (max-width: 42rem) {
  .sticker {
    width: calc(var(--size, 4.25rem) * 0.8);
    opacity: 0.8;
    padding: 0.35rem;
  }

  #timeline .section-stickers .sticker:nth-child(2),
  #gallery .section-stickers .sticker:nth-child(n + 4),
  #letter .section-stickers .sticker:nth-child(2),
  #extras .section-stickers .sticker:nth-child(2) {
    display: none;
  }
}

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

  body::before,
  body::after {
    animation: none !important;
  }

  .letter-reveal .letter-card {
    transform: translateY(0);
  }

  .letter-reveal .envelope-flap {
    transform: none !important;
  }

  * {
    animation: none !important;
    transition: none !important;
  }
}
