:root {
  color-scheme: dark;
  --paper: #0d090e;
  --paper-light: #191119;
  --ink: #f5edf1;
  --muted: #ad9da6;
  --red: #ef4963;
  --red-dark: #ff7187;
  --purple: #a56bc8;
  --purple-deep: #522568;
  --line: rgba(244, 229, 238, 0.14);
  --section-gap: clamp(72px, 7vw, 104px);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 3%, rgba(210, 37, 69, 0.14), transparent 28rem),
    radial-gradient(circle at 92% 15%, rgba(113, 52, 146, 0.2), transparent 34rem),
    var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.2'/%3E%3C/svg%3E");
}

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

a {
  color: inherit;
}

.page-shell {
  width: min(100%, 1360px);
  margin: 0 auto;
  padding-right: 20px;
  padding-left: 20px;
  padding-right: max(20px, env(safe-area-inset-right));
  padding-left: max(20px, env(safe-area-inset-left));
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(420px, 1.14fr);
  align-items: center;
  min-height: min(790px, 100vh);
  min-height: min(790px, 100svh);
  padding: 80px 0 120px;
}

.hero-copy,
.hero-art,
.photo-card,
.note-body {
  min-width: 0;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--red);
  font-size: 0.69rem;
  font-weight: 750;
  letter-spacing: 0.19em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 650px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4.6rem, 8.4vw, 8rem);
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

h1 em {
  color: var(--purple);
  font-weight: 400;
}

.hero-title-line {
  display: block;
  white-space: nowrap;
}

.hero-title-accent {
  margin-top: clamp(12px, 1.4vw, 22px);
}

.hero-title-break {
  display: none;
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 520px;
}

.year-disc {
  position: relative;
  z-index: 2;
  display: flex;
  width: clamp(238px, 27vw, 350px);
  aspect-ratio: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--paper-light);
  background: linear-gradient(145deg, #351841, var(--purple-deep) 48%, #802b4b 105%);
  border-radius: 50%;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48), 0 0 70px rgba(129, 48, 109, 0.18);
}

.year-disc::before {
  position: absolute;
  inset: 9%;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.year-disc::after {
  position: absolute;
  top: -30%;
  right: -42%;
  width: 75%;
  height: 160%;
  content: "";
  background: rgba(230, 51, 79, 0.25);
  transform: rotate(28deg);
}

.disc-small,
.disc-number {
  position: relative;
  z-index: 1;
}

.disc-small {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.disc-number {
  margin: -4px 0 -8px;
  font-family: var(--serif);
  font-size: clamp(6.4rem, 11vw, 9.5rem);
  letter-spacing: -0.09em;
  line-height: 1;
}

.orbit {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.orbit-one {
  width: 76%;
  aspect-ratio: 1;
  animation: orbit 24s linear infinite;
}

.orbit-one::before,
.orbit-two::before {
  position: absolute;
  top: 50%;
  left: -4px;
  width: 8px;
  height: 8px;
  content: "";
  background: var(--red);
  border-radius: 50%;
}

.orbit-two {
  width: 58%;
  aspect-ratio: 1;
  border-color: rgba(165, 107, 200, 0.3);
  transform: rotate(45deg);
}

.orbit-two::before {
  top: 16%;
  left: 84%;
  background: var(--purple);
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

.signal-line {
  position: absolute;
  z-index: 3;
  width: min(100%, 640px);
  overflow: visible;
  stroke: var(--red);
  stroke-width: 2;
}

.signal-line path {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw-signal 2.4s 0.35s cubic-bezier(0.55, 0, 0.35, 1) forwards;
}

.signal-line circle {
  fill: var(--paper);
}

@keyframes draw-signal {
  to { stroke-dashoffset: 0; }
}

.signal-label {
  position: absolute;
  z-index: 4;
  top: calc(50% + 22px);
  margin: 0;
  color: var(--red-dark);
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.22em;
}

.signal-label-left { left: 0; }
.signal-label-right { right: 0; }

.section-circuit {
  display: flex;
  width: 100%;
  align-items: center;
}

.section-circuit > span {
  height: 1px;
  flex: 1;
  background: var(--line);
}

.section-circuit > span:first-child::after,
.section-circuit > span:last-child::before {
  display: block;
  width: 7px;
  height: 7px;
  margin-top: -3px;
  content: "";
  background: var(--paper);
  border: 1px solid var(--purple);
  border-radius: 50%;
}

.section-circuit > span:first-child::after { margin-left: auto; }

.section-circuit > i {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  margin: 0 15px;
  background: var(--red);
  border: 4px solid var(--paper);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--red);
}

.hero-divider {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
}

.memories {
  padding: var(--section-gap) 0 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 72px;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 5vw, 5rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.section-number {
  margin: 0 0 5px;
  color: var(--purple);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 58px 28px;
  align-items: start;
}

.photo-card {
  margin: 0;
}

.photo-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  color: inherit;
  background: #1a1219;
  border: 0;
  border-radius: clamp(18px, 2vw, 28px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.23);
  cursor: zoom-in;
  touch-action: manipulation;
  transition: box-shadow 350ms ease, transform 350ms ease;
}

@media (hover: hover) {
  .photo-button:hover {
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.34);
    transform: translateY(-4px);
  }
}

.photo-button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 5px;
}

.photo-button::after {
  position: absolute;
  inset: 0;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: inherit;
  box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.035);
  pointer-events: none;
}

.photo-button img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 300ms ease, transform 650ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.photo-button img.loaded {
  opacity: 1;
}

.photo-button:hover img.loaded {
  transform: scale(1.025);
}

.photo-one { grid-column: 1 / span 5; }
.photo-one .photo-button { aspect-ratio: 4 / 5; }
.photo-two { grid-column: 7 / span 6; margin-top: 96px; }
.photo-two .photo-button { aspect-ratio: 5 / 4; }
.photo-three { grid-column: 1 / span 6; }
.photo-three .photo-button { aspect-ratio: 5 / 4; }
.photo-four { grid-column: 8 / span 5; margin-top: 72px; }
.photo-four .photo-button { aspect-ratio: 4 / 5; }
.photo-five { grid-column: 1 / span 5; }
.photo-five .photo-button { aspect-ratio: 4 / 5; }
.photo-six { grid-column: 7 / span 6; margin-top: 96px; }
.photo-six .photo-button { aspect-ratio: 5 / 4; }

.note-section {
  padding: var(--section-gap) 0;
}

.love-note {
  position: relative;
  width: min(100% - 48px, 820px);
  min-height: 560px;
  margin: 0 auto;
  padding: 24px 68px 65px;
  background: var(--paper-light);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.5), 0 3px 10px rgba(0, 0, 0, 0.3);
  transform: rotate(-0.5deg);
}

.love-note::after {
  position: absolute;
  inset: 10px;
  content: "";
  border: 1px solid rgba(239, 73, 99, 0.2);
  pointer-events: none;
}

.note-body {
  width: min(100%, 590px);
  margin: 58px auto 0;
}

.note-body h2 {
  margin: 0 0 36px;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 5.5vw, 4.5rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.note-body h2::after {
  display: block;
  width: 58px;
  height: 3px;
  margin-top: 28px;
  content: "";
  background: linear-gradient(90deg, var(--red) 50%, var(--purple) 50%);
}

.note-copy {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.78;
}

.note-copy p {
  margin: 0 0 18px;
}

.signature {
  margin: 38px 0 0;
  color: var(--purple);
  font-family: var(--serif);
  font-size: 1.08rem;
  font-style: italic;
}

.signature span {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 1.45rem;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 100px;
  color: var(--muted);
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

footer a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.lightbox {
  width: min(92vw, 1000px);
  max-width: none;
  padding: 0;
  overflow: visible;
  color: white;
  background: transparent;
  border: 0;
}

.lightbox::backdrop {
  background: rgba(5, 3, 6, 0.94);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}

.lightbox img {
  display: block;
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
}

.lightbox p {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: 1rem;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: -42px;
  right: 0;
  padding: 0;
  color: white;
  background: none;
  border: 0;
  font-family: var(--sans);
  font-size: 2rem;
  font-weight: 200;
  cursor: pointer;
  touch-action: manipulation;
}

body.lightbox-open {
  overflow: hidden;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 70px;
    padding-bottom: 64px;
  }

  .hero-copy { position: relative; z-index: 4; }

  .hero-art {
    width: min(100%, 620px);
    min-height: 480px;
    margin: 25px auto 55px;
  }

  .photo-grid { gap: 55px 20px; }
  .photo-two { margin-top: 64px; }
  .photo-three { margin-top: 0; }
}

@media (max-width: 650px) {
  :root {
    --section-gap: clamp(44px, 12vw, 56px);
  }

  .page-shell {
    width: 100%;
    padding-right: 12px;
    padding-left: 12px;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  footer a {
    min-height: 44px;
    align-items: center;
  }

  .hero {
    min-height: auto;
    padding: clamp(44px, 12vw, 52px) 0 clamp(40px, 11vw, 48px);
    padding-top: calc(clamp(44px, 12vw, 52px) + env(safe-area-inset-top));
  }

  .eyebrow {
    margin-bottom: 17px;
    font-size: 0.64rem;
  }

  h1 {
    font-size: clamp(4rem, 21vw, 5.65rem);
    line-height: 0.98;
  }

  .hero-art {
    min-height: clamp(300px, 88vw, 340px);
    margin: clamp(44px, 12vw, 56px) auto 24px;
  }

  .orbit-one { width: min(90%, 350px); }
  .orbit-two { width: min(72%, 280px); }
  .signal-line { width: min(104%, 430px); }

  .year-disc {
    width: clamp(210px, 67vw, 258px);
  }

  .disc-number {
    font-size: clamp(5.8rem, 29vw, 7.8rem);
  }

  .section-heading { margin-bottom: 45px; }
  .section-number { display: none; }

  .section-heading h2 {
    font-size: clamp(2.55rem, 12vw, 3.5rem);
    line-height: 0.96;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px 10px;
  }

  .photo-button {
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  }

  .photo-one,
  .photo-two,
  .photo-three,
  .photo-four,
  .photo-five,
  .photo-six {
    grid-column: auto;
    margin-top: 0;
  }

  .photo-one,
  .photo-four { grid-column: 1 / -1; }

  .photo-one .photo-button,
  .photo-four .photo-button { aspect-ratio: 4 / 3; }

  .photo-two .photo-button,
  .photo-three .photo-button,
  .photo-five .photo-button,
  .photo-six .photo-button { aspect-ratio: 4 / 5; }

  .love-note {
    width: calc(100% - 6px);
    padding: 18px 24px 46px;
    overflow: hidden;
    transform: none;
  }

  .note-body { margin-top: 39px; }

  .note-body h2 {
    margin-bottom: 31px;
    font-size: clamp(2.65rem, 13vw, 3.55rem);
  }

  .note-copy {
    font-size: 1rem;
    line-height: 1.72;
  }

  .note-copy p { margin-bottom: 20px; }

  footer {
    gap: 14px;
    min-height: 86px;
    padding-bottom: env(safe-area-inset-bottom);
    font-size: 0.625rem;
  }

  footer p {
    margin: 0;
  }

  footer a,
  footer p {
    white-space: nowrap;
  }

  .lightbox[open] {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    max-width: none;
    margin: 0;
    padding: 58px 12px 20px;
    padding: calc(58px + env(safe-area-inset-top)) 12px calc(20px + env(safe-area-inset-bottom));
    flex-direction: column;
    justify-content: center;
    overscroll-behavior: contain;
  }

  .lightbox img {
    width: 100%;
    max-height: calc(100dvh - 130px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }

  .lightbox-close {
    top: 10px;
    right: 16px;
    top: calc(10px + env(safe-area-inset-top));
    right: calc(16px + env(safe-area-inset-right));
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
  }

  .lightbox p {
    margin-top: 12px;
    font-size: 0.9rem;
  }
}

@media (max-width: 360px) {
  .page-shell {
    padding-right: 10px;
    padding-left: 10px;
    padding-right: max(10px, env(safe-area-inset-right));
    padding-left: max(10px, env(safe-area-inset-left));
  }

  .hero-art { min-height: 300px; }

  .photo-grid { gap: 28px 8px; }

  .love-note { padding-inline: 20px; }
}

@media (min-width: 400px) and (max-width: 650px) {
  .page-shell {
    padding-right: 16px;
    padding-left: 16px;
    padding-right: max(16px, env(safe-area-inset-right));
    padding-left: max(16px, env(safe-area-inset-left));
  }

  .love-note { padding-inline: 28px; }
}

@media (orientation: landscape) and (max-height: 500px) and (max-width: 1024px) {
  :root {
    --section-gap: 48px;
  }

  .page-shell {
    padding-right: 18px;
    padding-left: 18px;
    padding-right: max(18px, env(safe-area-inset-right));
    padding-left: max(18px, env(safe-area-inset-left));
  }

  .hero {
    grid-template-columns: minmax(220px, 0.9fr) minmax(250px, 1.1fr);
    column-gap: 24px;
    min-height: auto;
    padding: 34px 0 58px;
    padding-top: calc(34px + env(safe-area-inset-top));
  }

  .hero-copy { grid-column: 1; }

  .hero .eyebrow { margin-bottom: 12px; }

  h1 {
    font-size: clamp(3.35rem, 8vw, 4.8rem);
    line-height: 0.96;
  }

  .hero-art {
    grid-column: 2;
    grid-row: 1;
    min-height: 270px;
    margin: 0;
  }

  .year-disc { width: min(32vw, 215px); }
  .disc-number { font-size: clamp(5rem, 15vw, 6.8rem); }
  .orbit-one { width: min(80%, 280px); }
  .orbit-two { width: min(63%, 220px); }
  .signal-line { width: min(100%, 390px); }

  .section-heading { margin-bottom: 40px; }

  .lightbox[open] {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 12px 62px;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-right: max(62px, env(safe-area-inset-right));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    padding-left: max(62px, env(safe-area-inset-left));
    flex-direction: column;
    justify-content: center;
    overscroll-behavior: contain;
  }

  .lightbox img {
    max-height: calc(100dvh - 60px);
  }

  .lightbox-close {
    top: 6px;
    right: 10px;
    top: max(6px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
  }

  .lightbox p { margin-top: 8px; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
