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

:root {
  --ink: #253129;
  --ink-soft: #6E746F;
  --green: #455A4C;
  --green-deep: #283A31;
  --rust: #8E5A49;
  --gold: #D5B46D;
  --gold-deep: #A8843D;
  --cream: #FFF9F1;
  --paper: #F4EADF;
  --line: rgba(37,49,41,.12);
  --shadow: 0 26px 70px rgba(37,49,41,.15);
  --shadow-soft: 0 14px 34px rgba(37,49,41,.09);
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(213,180,109,.15), transparent 24%),
    radial-gradient(circle at 10% 26%, rgba(69,90,76,.10), transparent 20%),
    linear-gradient(180deg, #FFF9F1 0%, #EEE5DB 100%);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.7;
}

body.modal-open { overflow: hidden; }

button,
input { font: inherit; }

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

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

h1, h2, h3, blockquote {
  margin: 0;
  font-family: Fraunces, "Playfair Display", Georgia, serif;
  line-height: 1.05;
}

p { margin: 0; }

.eyebrow {
  color: var(--gold-deep);
  font-size: .73rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.button:hover { transform: translateY(-1px); }

.button--gold {
  color: var(--ink);
  background: var(--gold);
  box-shadow: 0 12px 28px rgba(213,180,109,.20);
}

.button--green {
  color: #fff;
  background: var(--green);
}

.button--outline {
  color: #fff;
  border-color: rgba(255,255,255,.24);
  background: rgba(255,255,255,.05);
}

.opening {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  gap: 36px;
  padding: 18px;
  overflow: auto;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(213,180,109,.18), transparent 24%),
    linear-gradient(135deg, #283A31, #725443);
  transition: opacity .4s ease, visibility .4s ease;
}

.opening.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.opening__visual {
  position: relative;
  width: min(520px, 90vw);
  padding: 14px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  box-shadow: 0 30px 70px rgba(0,0,0,.28);
  transform: rotate(-2deg);
}

.opening__visual img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: contain;
}

.opening__label {
  position: absolute;
  right: -26px;
  bottom: 28px;
  padding: 14px 18px;
  color: var(--ink);
  background: var(--gold);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
  transform: rotate(7deg);
}

.opening__copy {
  max-width: 650px;
  text-align: center;
}

.opening .eyebrow { color: #E7D29A; }

.opening__copy h1 {
  margin-top: 12px;
  color: #fff;
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.05em;
}

.opening__copy > p:not(.eyebrow) {
  margin-top: 18px;
  color: rgba(255,255,255,.74);
  font-family: Georgia, serif;
  font-size: 1.18rem;
  font-style: italic;
}

.opening__copy .button { margin-top: 30px; }

.hero {
  position: relative;
  min-height: 920px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 84% 16%, rgba(213,180,109,.18), transparent 24%),
    linear-gradient(135deg, #283A31 0%, #725443 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .12;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, #000, transparent 92%);
}

.topbar {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--gold);
  font-family: Georgia, serif;
  font-weight: 700;
}

.topbar__actions { display: flex; gap: 18px; }

.topbar__button {
  padding: 0;
  border: 0;
  color: rgba(255,255,255,.78);
  background: none;
  cursor: pointer;
}

.topbar__button:hover,
.topbar__button:focus-visible { color: var(--gold); }

.hero__layout {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 36px));
  margin: 0 auto;
  padding: 54px 0 148px;
  display: grid;
  gap: 60px;
  align-items: center;
}

.hero__copy { max-width: 700px; }
.hero__copy .eyebrow { color: #E7D29A; }

.hero h1 {
  margin-top: 16px;
  color: #fff;
  font-size: clamp(4rem, 9vw, 7.4rem);
  font-weight: 500;
  letter-spacing: -.055em;
}

.hero h1 span {
  display: block;
  color: var(--gold);
  font-size: .45em;
  font-style: italic;
}

.hero__lead {
  margin-top: 24px;
  color: rgba(255,255,255,.72);
  font-family: Georgia, serif;
  font-size: clamp(1.08rem, 2.2vw, 1.4rem);
  font-style: italic;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero__meta span {
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.04);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.hero__visual {
  position: relative;
  min-height: 580px;
}

.hero__photo {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 86%;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.07);
  box-shadow: 0 28px 76px rgba(0,0,0,.22);
  transform: rotate(2.5deg);
}

.hero__photo img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: contain;
}

.hero__caption {
  position: absolute;
  left: 0;
  top: 56px;
  z-index: 2;
  width: min(250px, 66%);
  padding: 22px;
  border-left: 10px solid var(--gold);
  color: var(--ink);
  background: var(--cream);
  box-shadow: 0 18px 36px rgba(0,0,0,.16);
  transform: rotate(-6deg);
}

.hero__caption span {
  color: var(--rust);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
}

.hero__caption strong {
  display: block;
  margin-top: 8px;
  font-family: Georgia, serif;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.35;
}

.audio-dock {
  position: absolute;
  right: 50%;
  bottom: 26px;
  z-index: 2;
  width: min(720px, calc(100% - 36px));
  transform: translateX(50%);
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: 12px 18px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 22px;
  background: rgba(40,58,49,.84);
  backdrop-filter: blur(10px);
}

.audio-dock__play {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: var(--gold);
  cursor: pointer;
}

.audio-dock__meta strong {
  display: block;
  color: #fff;
  font-family: Georgia, serif;
  font-weight: 500;
}

.audio-dock__meta span {
  color: rgba(255,255,255,.60);
  font-size: .82rem;
}

.audio-dock__progress {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--gold);
}

.section {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 92px 0;
}

.section-heading {
  max-width: 800px;
  margin-bottom: 46px;
}

.section-heading--split {
  display: grid;
  gap: 20px;
  max-width: none;
  align-items: end;
}

.section-heading h2,
.film-layout h2,
.notes-layout__copy h2,
.closing-panel h2,
.modal__panel h2 {
  margin-top: 12px;
  color: var(--ink);
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  font-weight: 500;
  letter-spacing: -.04em;
}

.section-heading > p:not(.eyebrow),
.section-heading--split > p,
.film-layout__copy > p:not(.eyebrow),
.notes-layout__copy > p:not(.eyebrow),
.closing-panel__copy > p:not(.eyebrow),
.modal__panel--book > p:not(.eyebrow),
.modal__panel--message > p:not(.eyebrow) {
  margin-top: 18px;
  color: var(--ink-soft);
}

.intro-cards {
  display: grid;
  gap: 14px;
}

.intro-cards article {
  min-height: 150px;
  padding: 26px;
  border: 1px solid var(--line);
  background: var(--cream);
  box-shadow: var(--shadow-soft);
}

.intro-cards strong {
  display: block;
  color: var(--rust);
  font-family: Georgia, serif;
  font-size: 3rem;
  font-weight: 500;
}

.intro-cards span {
  display: block;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.bookshelf {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 36px 28px 58px;
  border-radius: 30px;
  background: linear-gradient(180deg, #73513E, #4E342A);
  box-shadow: var(--shadow);
}

.bookshelf::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 24px;
  height: 20px;
  border-radius: 6px;
  background: #2F201A;
  box-shadow: 0 9px 18px rgba(0,0,0,.24);
}

.book-spine {
  min-height: 250px;
  padding: 24px 18px;
  border: 0;
  color: #fff;
  background: var(--green);
  box-shadow: inset -8px 0 rgba(0,0,0,.08);
  cursor: pointer;
  text-align: left;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.book-spine--rust { background: var(--rust); }

.book-spine--gold {
  color: var(--ink);
  background: var(--gold);
}

.book-spine--dark { background: var(--green-deep); }

.book-spine--paper {
  color: var(--ink);
  background: var(--paper);
}

.book-spine span {
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.book-spine strong {
  margin-top: 16px;
  font-family: Georgia, serif;
  font-size: 1.15rem;
  font-weight: 500;
}

.book-spine small {
  margin-top: auto;
  font-weight: 900;
}

.film-layout {
  display: grid;
  gap: 28px;
  align-items: center;
  padding: clamp(30px, 6vw, 58px);
  border-radius: 32px;
  color: #fff;
  background:
    radial-gradient(circle at 86% 16%, rgba(213,180,109,.16), transparent 24%),
    linear-gradient(135deg, #283A31, #725443);
  box-shadow: var(--shadow);
}

.film-layout .eyebrow { color: #E7D29A; }
.film-layout h2 { color: #fff; }

.film-layout__copy > p:not(.eyebrow) { color: rgba(255,255,255,.70); }

.film-layout video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: var(--green-deep);
  object-fit: contain;
}

.moments-grid {
  display: grid;
  gap: 18px;
}

.moment-card {
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--cream);
  box-shadow: var(--shadow-soft);
}

.moment-card img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: contain;
  background: var(--paper);
}

.moment-card > span {
  display: block;
  margin: 16px 6px 0;
  color: var(--gold-deep);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.moment-card h3 {
  margin: 8px 6px 0;
  font-size: 1.5rem;
  font-weight: 500;
}

.moment-card p {
  margin: 12px 6px 8px;
  color: var(--ink-soft);
}

.message-grid {
  display: grid;
  gap: 16px;
}

.message-card {
  min-height: 230px;
  padding: 24px;
  border: 0;
  color: #fff;
  background: var(--green);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  text-align: left;
}

.message-card--rust { background: var(--rust); }

.message-card--gold {
  color: var(--ink);
  background: var(--gold);
}

.message-card--dark { background: var(--green-deep); }

.message-card--paper {
  color: var(--ink);
  background: var(--paper);
}

.message-card span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  font-family: Georgia, serif;
  font-size: 1.25rem;
}

.message-card strong {
  display: block;
  margin-top: 28px;
  font-family: Georgia, serif;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.45;
}

.message-card small {
  display: block;
  margin-top: 20px;
  font-weight: 900;
  letter-spacing: .1em;
}

.notes-layout {
  display: grid;
  gap: 30px;
  align-items: center;
  padding: clamp(30px, 6vw, 58px);
  border-radius: 32px;
  background: var(--cream);
  box-shadow: var(--shadow);
}

.notes-layout figure {
  margin: 0;
  padding: 12px;
  background: var(--paper);
}

.notes-layout figure img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: contain;
}

#wish-form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

#wish-form label {
  color: var(--ink-soft);
  font-weight: 900;
}

#wish-form input {
  width: 100%;
  margin-top: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
}

.wish-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.wish-cloud span {
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
  font-size: .86rem;
  font-weight: 900;
}

.closing-panel {
  position: relative;
  min-height: 540px;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: clamp(42px, 7vw, 76px);
  border-radius: 34px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(213,180,109,.16), transparent 24%),
    linear-gradient(135deg, #283A31, #725443);
  box-shadow: var(--shadow);
}

.closing-panel__word {
  position: absolute;
  right: -40px;
  bottom: -50px;
  color: rgba(255,255,255,.06);
  font-family: Georgia, serif;
  font-size: clamp(7rem, 19vw, 15rem);
  line-height: 1;
}

.closing-panel__copy {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.closing-panel .eyebrow { color: #E7D29A; }
.closing-panel h2 { color: #fff; }
.closing-panel__copy > p:not(.eyebrow) { color: rgba(255,255,255,.72); }

.closing-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.footer {
  padding: 0 18px 34px;
  color: var(--ink-soft);
  font-size: .9rem;
  text-align: center;
}

.footer a { color: var(--ink); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.modal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(37,49,41,.82);
  backdrop-filter: blur(8px);
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: clamp(38px, 7vw, 60px);
  border-radius: 30px;
  background: var(--cream);
  box-shadow: 0 34px 90px rgba(37,49,41,.30);
}

.modal__close {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: 14px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--rust);
  font-size: 1.4rem;
  cursor: pointer;
}

.book-signature {
  margin-top: 28px;
  color: var(--rust);
  font-family: Georgia, serif;
  font-size: 1.7rem;
  font-style: italic;
}

.modal__panel--bookmark {
  width: min(1100px, 100%);
  padding: 18px;
}

.modal__panel--bookmark iframe {
  width: 100%;
  height: min(82vh, 880px);
  border: 0;
  border-radius: 20px;
  background: #fff;
}

.toast {
  position: fixed;
  z-index: 90;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100% - 36px));
  padding: 14px 18px;
  border-radius: 14px;
  color: #fff;
  background: var(--green);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  font-weight: 900;
}

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

@media (min-width: 820px) {
  .opening {
    grid-template-columns: minmax(420px,.9fr) minmax(0,1.1fr);
  }
}

@media (min-width: 900px) {
  .hero__layout {
    grid-template-columns: minmax(0,1fr) minmax(420px,.92fr);
  }

  .section-heading--split {
    grid-template-columns: minmax(0,1.2fr) minmax(280px,.8fr);
  }

  .intro-cards {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }

  .bookshelf {
    grid-template-columns: repeat(5, minmax(0,1fr));
  }

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

  .moments-grid {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }

  .message-grid {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
}

@media (max-width: 899px) {
  .hero { min-height: auto; }
  .hero__copy { text-align: center; }
  .hero__meta, .hero__actions { justify-content: center; }
  .hero__visual { min-height: 520px; }

  .bookshelf {
    grid-template-columns: repeat(5, minmax(140px,1fr));
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  .topbar { align-items: flex-start; }

  .topbar__actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }

  .hero h1 { font-size: clamp(3.5rem, 17vw, 5.2rem); }

  .hero__actions,
  .closing-panel__actions {
    flex-direction: column;
  }

  .hero__actions .button,
  .closing-panel__actions .button {
    width: 100%;
  }

  .hero__visual { min-height: 430px; }
  .hero__photo { width: 92%; }
  .section { padding: 70px 0; }
}

@media (max-height: 760px) and (min-width: 641px) {
  .opening { gap: 22px; }
  .opening__visual { width: min(360px, 48vh); }
  .opening__copy h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
  .opening__copy > p:not(.eyebrow) { margin-top: 12px; }
  .opening__copy .button { margin-top: 22px; }
}
