:root {
  --red: #9d1832;
  --red-bright: #dc3145;
  --ink: #34201f;
  --cream: #f7efe4;
  --paper: #fffaf3;
  --blush: #f4d7cf;
  --green: #667b4f;
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "Be Vietnam Pro", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--sans);
  overflow-x: hidden;
}

body.lightbox-open {
  overflow: hidden;
}

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

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

.section-pad {
  width: min(100%, 1280px);
  margin-inline: auto;
  padding-inline: clamp(22px, 6vw, 84px);
}

.page-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 4px;
  z-index: 50;
  pointer-events: none;
}

.page-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--red-bright);
  transform: scaleX(0);
  transform-origin: left;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  min-height: 100svh;
  padding: clamp(24px, 4vw, 62px);
  background:
    radial-gradient(circle at 13% 12%, rgb(255 255 255 / 0.95), transparent 22%),
    linear-gradient(135deg, #fffaf3, #f5e4d5);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  width: 420px;
  aspect-ratio: 1;
  left: -190px;
  bottom: -190px;
  border: 1px solid rgb(157 24 50 / 0.25);
  border-radius: 50%;
  box-shadow: 0 0 0 34px var(--cream), 0 0 0 35px rgb(157 24 50 / 0.16), 0 0 0 78px var(--cream), 0 0 0 79px rgb(157 24 50 / 0.1);
}

.hero-copy {
  z-index: 2;
  align-self: center;
  padding: 6vw 4vw 6vw 3vw;
}

.eyebrow,
.tiny-label,
.chapter-no {
  margin: 0 0 18px;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 580px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 8vw, 8.8rem);
  font-weight: 400;
  line-height: 0.76;
  letter-spacing: -0.045em;
}

.hero h1 span {
  display: block;
  color: var(--red);
  font-style: italic;
}

.hero-name {
  display: inline-block;
  margin: 34px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgb(52 32 31 / 0.35);
  font-size: clamp(0.92rem, 1.3vw, 1.08rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-lead {
  margin: 12px 0 30px;
  color: #735f59;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  line-height: 1.35;
}

.story-start {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-height: 50px;
  color: var(--paper);
  padding: 12px 14px 12px 22px;
  border-radius: 999px;
  background: var(--red);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 180ms ease, background 180ms ease;
}

.story-start svg {
  width: 30px;
  height: 30px;
  padding: 6px;
  border-radius: 50%;
  background: var(--paper);
  stroke: var(--red);
  stroke-width: 1.8;
  fill: none;
}

.story-start:hover {
  background: var(--red-bright);
  transform: translateY(-2px);
}

.hero-photo {
  position: relative;
  align-self: stretch;
  min-height: 72vh;
  border-radius: 46% 46% 24px 24px;
  background: var(--paper);
  box-shadow: 0 35px 80px rgb(76 25 24 / 0.13);
  overflow: hidden;
}

.hero-photo img {
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.sun-stamp {
  position: absolute;
  z-index: 3;
  right: clamp(12px, 3vw, 36px);
  top: clamp(12px, 3vw, 36px);
  display: grid;
  place-content: center;
  width: clamp(88px, 10vw, 134px);
  aspect-ratio: 1;
  color: var(--paper);
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--red);
  text-align: center;
  transform: rotate(7deg);
}

.sun-stamp span {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 0.7;
}

.sun-stamp small {
  margin-top: 9px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-squiggle {
  position: absolute;
  width: 150px;
  right: -28px;
  bottom: 38px;
  overflow: visible;
}

.hero-squiggle path {
  fill: none;
  stroke: var(--paper);
  stroke-linecap: round;
  stroke-width: 3;
}

.hero-scroll {
  position: absolute;
  left: 26px;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8b736e;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transform: rotate(-90deg);
  transform-origin: left center;
}

.hero-scroll span {
  display: block;
  width: 34px;
  height: 1px;
  background: currentColor;
}

.opening-note {
  padding-top: clamp(110px, 15vw, 190px);
  padding-bottom: clamp(110px, 15vw, 190px);
  text-align: center;
}

.opening-note h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 6.2rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.opening-line {
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(380px, 70%);
  margin: 38px auto 28px;
  color: var(--red);
}

.opening-line::before,
.opening-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgb(157 24 50 / 0.35);
}

.opening-note > p:last-child {
  max-width: 650px;
  margin: 0 auto;
  color: #6e5a54;
  font-size: clamp(0.98rem, 1.4vw, 1.16rem);
  line-height: 1.9;
}

.chapter-red {
  color: var(--paper);
  background: var(--red);
  padding-block: clamp(90px, 12vw, 160px);
}

.chapter-heading {
  position: relative;
}

.chapter-heading .chapter-no {
  color: currentColor;
  opacity: 0.7;
}

.chapter-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 10vw, 9.5rem);
  font-weight: 400;
  line-height: 0.76;
  letter-spacing: -0.04em;
}

.chapter-heading h2 em {
  font-weight: 400;
}

.chapter-red .chapter-heading > p:last-child {
  max-width: 390px;
  margin: 44px 0 70px auto;
  color: #f4cdd0;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.4;
}

.photo-story {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(14px, 2vw, 28px);
}

.photo-card {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #efe6db;
  cursor: zoom-in;
  overflow: hidden;
}

.photo-card img {
  height: 100%;
  object-fit: cover;
  transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 400ms ease;
}

.photo-card::after {
  content: "↗";
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--ink);
  border-radius: 50%;
  background: rgb(255 250 243 / 0.9);
  font-size: 1rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.photo-card:hover img {
  transform: scale(1.035);
}

.photo-card:hover::after,
.photo-card:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.photo-card:focus-visible {
  outline: 4px solid #fff;
  outline-offset: 4px;
}

.red-grid .tall {
  grid-column: span 5;
  aspect-ratio: 0.76;
}

.red-grid .wide {
  grid-column: span 7;
  aspect-ratio: 1.52;
}

.red-grid .portrait {
  grid-column: span 4;
  aspect-ratio: 0.76;
}

.hand-note {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 8px 12px;
  color: var(--red);
  border-radius: 50%;
  background: var(--paper);
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  transform: rotate(9deg);
}

.story-quote {
  grid-column: span 3;
  align-self: center;
  padding: 3vw 1vw;
  text-align: center;
}

.story-quote span {
  display: block;
  height: 50px;
  font-family: var(--serif);
  font-size: 6rem;
  opacity: 0.45;
}

.story-quote p {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.4vw, 2.1rem);
  line-height: 1.3;
}

.chapter-aside {
  grid-column: span 4;
  align-self: center;
  padding: 28px;
}

.chapter-aside p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 4rem);
  font-style: italic;
  line-height: 0.9;
}

.chapter-aside svg {
  width: 100px;
  margin: 15px 0 0 35%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.interlude {
  padding: 20px 0;
  color: var(--red);
  background: #f4c5c0;
  overflow: hidden;
}

.interlude-track {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  width: max-content;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4vw, 3.5rem);
  font-style: italic;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
}

.interlude-track i {
  font-family: var(--sans);
  font-size: 0.7em;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-33.33%); }
}

.chapter-garden {
  padding-block: clamp(100px, 13vw, 180px);
  background:
    radial-gradient(circle at 85% 12%, rgb(220 226 192 / 0.7), transparent 20%),
    linear-gradient(#fffdf8, #edf0df 60%, #f7efe4);
}

.garden-intro {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: end;
  gap: 8vw;
  margin-bottom: 70px;
}

.chapter-garden .chapter-no {
  color: var(--green);
}

.chapter-garden .chapter-heading h2 {
  color: #495c3c;
}

.garden-copy {
  max-width: 460px;
  margin: 0 0 12px;
  color: #5c6852;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.55;
}

.garden-hero {
  position: relative;
  margin-bottom: clamp(50px, 8vw, 110px);
}

.garden-hero .cinematic {
  aspect-ratio: 16 / 8.2;
  border-radius: 220px 220px 8px 8px;
}

.garden-caption {
  position: absolute;
  right: clamp(30px, 10vw, 140px);
  bottom: -0.38em;
  color: var(--green);
  font-family: var(--serif);
  font-size: clamp(2.5rem, 7vw, 7rem);
  font-style: italic;
  line-height: 1;
  transform: rotate(-4deg);
}

.garden-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(14px, 2vw, 28px);
}

.garden-grid .portrait {
  grid-column: span 4;
  aspect-ratio: 0.72;
}

.garden-grid .landscape {
  grid-column: span 8;
  aspect-ratio: 1.55;
}

.garden-poem {
  grid-column: span 8;
  display: grid;
  place-content: center;
  min-height: 300px;
  padding: 40px;
  border: 1px solid rgb(73 92 60 / 0.28);
  border-radius: 50%;
  text-align: center;
}

.garden-poem p {
  margin: 0;
  color: #495c3c;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 5rem);
  font-style: italic;
  line-height: 0.95;
}

.garden-poem span {
  margin-top: 22px;
  color: #6d7a60;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.birthday-wish {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) 1.2fr;
  align-items: center;
  gap: clamp(50px, 10vw, 140px);
  padding-top: clamp(110px, 15vw, 200px);
  padding-bottom: clamp(110px, 15vw, 200px);
}

.wish-photo {
  position: relative;
}

.wish-photo img {
  aspect-ratio: 0.72;
  border-radius: 48% 48% 8px 8px;
  object-fit: cover;
}

.wish-photo span {
  position: absolute;
  right: -28px;
  top: 10%;
  display: grid;
  place-items: center;
  width: 82px;
  aspect-ratio: 1;
  color: var(--paper);
  border-radius: 50%;
  background: var(--red-bright);
  font-size: 2.5rem;
  transform: rotate(12deg);
}

.wish-copy h2 {
  margin: 0 0 34px;
  font-family: var(--serif);
  font-size: clamp(3.2rem, 7vw, 7.2rem);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: -0.04em;
}

.wish-copy h2 em {
  color: var(--red);
  font-weight: 400;
}

.wish-copy > p:not(.tiny-label, .signature) {
  max-width: 520px;
  color: #6e5a54;
  line-height: 1.85;
}

.signature {
  margin-top: 28px;
  color: var(--red);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-style: italic;
}

footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 26px clamp(22px, 6vw, 84px);
  color: var(--paper);
  background: var(--ink);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

footer a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font-size: 1rem;
  text-decoration: none;
}

footer p {
  margin: 0;
  text-align: center;
}

footer span {
  justify-self: end;
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(33 18 18 / 0.96);
  overflow: hidden;
}

.lightbox[open] {
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  align-items: center;
}

.lightbox::backdrop {
  background: rgb(33 18 18 / 0.96);
}

.lightbox figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  height: 100dvh;
  margin: 0;
  padding: 30px 0 20px;
}

.lightbox figure img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100dvh - 80px);
  margin: auto;
  object-fit: contain;
}

.lightbox figcaption {
  color: var(--paper);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-align: center;
}

.lightbox button {
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  color: var(--paper);
  border: 1px solid rgb(255 255 255 / 0.45);
  border-radius: 50%;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
}

.lightbox-nav {
  justify-self: center;
}

.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 800ms ease, transform 800ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.reveal[data-delay="1"] {
  transition-delay: 120ms;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: auto;
    padding: 28px 18px 56px;
  }

  .hero-copy {
    padding: 52px 10px 10px;
  }

  .hero h1 {
    font-size: clamp(4.5rem, 21vw, 7.5rem);
  }

  .hero-name {
    margin-top: 28px;
  }

  .hero-photo {
    min-height: 64svh;
    border-radius: 48% 48% 18px 18px;
  }

  .hero-photo img {
    object-position: 55% center;
  }

  .hero-scroll {
    display: none;
  }

  .opening-note h2 br {
    display: none;
  }

  .photo-story,
  .garden-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .red-grid .tall,
  .red-grid .wide,
  .red-grid .portrait,
  .garden-grid .portrait,
  .garden-grid .landscape {
    grid-column: span 1;
  }

  .red-grid .wide,
  .garden-grid .landscape {
    aspect-ratio: 0.82;
  }

  .story-quote,
  .chapter-aside,
  .garden-poem {
    grid-column: 1 / -1;
  }

  .story-quote {
    padding: 48px 12px;
  }

  .chapter-aside {
    padding: 50px 15vw;
  }

  .chapter-red .chapter-heading > p:last-child {
    margin: 38px 0 55px;
  }

  .garden-intro {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .garden-hero .cinematic {
    aspect-ratio: 0.92;
    border-radius: 180px 180px 8px 8px;
  }

  .garden-hero .cinematic img {
    object-position: center;
  }

  .garden-caption {
    right: 35px;
  }

  .garden-poem {
    min-height: 260px;
  }

  .birthday-wish {
    grid-template-columns: 1fr;
  }

  .wish-photo {
    width: 82%;
  }

  footer {
    grid-template-columns: auto 1fr;
  }

  footer p {
    text-align: right;
  }

  footer span {
    grid-column: 2;
    justify-self: end;
  }

  .lightbox[open] {
    grid-template-columns: 1fr;
  }

  .lightbox figure {
    grid-column: 1;
    grid-row: 1;
    padding: 72px 14px 86px;
  }

  .lightbox-nav {
    position: absolute;
    bottom: max(22px, env(safe-area-inset-bottom));
  }

  .lightbox-nav.prev { left: 24px; }
  .lightbox-nav.next { right: 24px; }
}

@media (max-width: 480px) {
  .hero h1 {
    line-height: 0.82;
  }

  .hero-lead br {
    display: none;
  }

  .chapter-heading h2 {
    font-size: clamp(4rem, 19vw, 6.2rem);
  }

  .red-grid,
  .garden-grid {
    gap: 10px;
  }

  .photo-card::after {
    display: none;
  }

  .wish-photo span {
    right: -22px;
    width: 66px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .photo-card img { transition: none; }
}
