*,
*::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,
textarea { 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--soft {
  color: var(--ink);
  border-color: var(--line);
  background: var(--cream);
}

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

.text-link {
  margin-top: 24px;
  padding: 0;
  border: 0;
  color: var(--rust);
  background: none;
  font-weight: 900;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button-row--center { justify-content: center; }

.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__collage {
  position: relative;
  width: min(560px, 92vw);
  height: 460px;
}

.opening__image {
  position: absolute;
  padding: 8px;
  object-fit: contain;
  background: rgba(255,255,255,.94);
  box-shadow: 0 24px 54px rgba(0,0,0,.24);
}

.opening__image--one {
  left: 0;
  top: 44px;
  width: 52%;
  aspect-ratio: 16 / 11;
  transform: rotate(-7deg);
}

.opening__image--two {
  left: 39%;
  top: 0;
  width: 35%;
  aspect-ratio: 2 / 3;
  transform: rotate(4deg);
}

.opening__image--three {
  right: 0;
  bottom: 0;
  width: 56%;
  aspect-ratio: 16 / 11;
  transform: rotate(5deg);
}

.opening__copy {
  max-width: 680px;
  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(240px, 64%);
  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.2rem;
  font-weight: 500;
}

.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);
}

.progress-nav {
  position: sticky;
  top: 10px;
  z-index: 35;
  width: min(1180px, calc(100% - 24px));
  margin: -18px auto 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,249,241,.92);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.progress-nav a {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: .78rem;
  font-weight: 900;
}

.progress-nav a:hover,
.progress-nav a.is-active {
  color: #fff;
  background: var(--green);
}

.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,
.letter-paper h2,
.after-layout h2,
.film-layout 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,
.after-layout__copy > p:not(.eyebrow),
.film-layout__copy > p:not(.eyebrow),
.closing-panel__copy > p:not(.eyebrow),
.modal__copy > p:not(.eyebrow),
.modal__panel--book > p:not(.eyebrow) {
  margin-top: 18px;
  color: var(--ink-soft);
}

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

.invitation-layout__cover {
  margin: 0;
  padding: 12px;
  background: var(--paper);
}

.invitation-layout__cover img {
  width: 100%;
  max-height: 700px;
  aspect-ratio: 2 / 3;
  object-fit: contain;
}

.invitation-card h3 {
  margin-top: 12px;
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 500;
}

.invitation-card__author {
  margin-top: 12px;
  color: var(--rust);
  font-family: Georgia, serif;
  font-size: 1.2rem;
}

.invitation-card dl {
  display: grid;
  gap: 14px;
  margin: 28px 0 0;
}

.invitation-card dl div {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.invitation-card dt {
  color: var(--gold-deep);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.invitation-card dd {
  margin: 6px 0 0;
  color: var(--ink-soft);
}

.countdown {
  margin-top: 28px;
  padding: clamp(30px, 6vw, 58px);
  border-radius: 32px;
  color: #fff;
  background:
    radial-gradient(circle at 84% 18%, rgba(213,180,109,.18), transparent 24%),
    linear-gradient(135deg, #283A31, #725443);
  box-shadow: var(--shadow);
}

.countdown .eyebrow { color: #E7D29A; }

.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  margin-top: 26px;
  border-top: 1px solid rgba(255,255,255,.22);
  border-bottom: 1px solid rgba(255,255,255,.22);
}

.countdown__grid > div {
  padding: 24px 14px;
  text-align: center;
}

.countdown__grid > div + div {
  border-left: 1px solid rgba(255,255,255,.22);
}

.countdown__grid strong {
  display: block;
  font-family: Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 500;
}

.countdown__grid span {
  display: block;
  margin-top: 6px;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.countdown__caption {
  margin-top: 20px;
  color: rgba(255,255,255,.66);
}

.prelude-grid,
.message-preview,
.gallery-grid,
.day-timeline {
  display: grid;
  gap: 18px;
}

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

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

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

.prelude-card h3,
.gallery-card strong {
  display: block;
  margin: 8px 6px 0;
  font-family: Georgia, serif;
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.25;
}

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

.letter-paper {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(34px, 7vw, 70px);
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(255,253,248,.96), rgba(255,253,248,.96)),
    repeating-linear-gradient(
      0deg,
      transparent 0 34px,
      rgba(37,49,41,.035) 34px 35px
    );
  box-shadow: var(--shadow);
}

.letter-paper__date {
  color: var(--ink-soft);
  text-align: right;
}

.letter-paper__salute {
  margin-top: 36px;
  font-family: Georgia, serif;
  font-size: 1.2rem;
}

.letter-paper > p:not(.letter-paper__date):not(.letter-paper__salute) {
  margin-top: 24px;
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.95;
}

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

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

.letter-paper figcaption {
  padding: 12px 6px 0;
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: .9rem;
  font-style: italic;
}

.letter-paper blockquote {
  margin: 40px 0;
  padding-left: 24px;
  border-left: 7px solid var(--gold);
  color: var(--rust);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-style: italic;
  line-height: 1.45;
}

.letter-paper__signature {
  margin-top: 36px;
  color: var(--rust);
  font-family: Georgia, serif;
  font-size: 2rem;
  font-style: italic;
}

.timeline-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 14px;
}

.timeline-button {
  flex: 0 0 auto;
  min-width: 106px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--cream);
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 1.18rem;
  font-weight: 700;
}

.timeline-button.is-active {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.timeline-feature {
  display: grid;
  gap: 28px;
  align-items: center;
  margin-top: 22px;
  padding: clamp(24px, 5vw, 42px);
  border-radius: 30px;
  background: var(--cream);
  box-shadow: var(--shadow);
}

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

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

.timeline-feature h3 {
  margin-top: 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
}

.timeline-feature p:not(.eyebrow) {
  margin-top: 16px;
  color: var(--ink-soft);
}

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

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

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

.gift-layout__copy > p {
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: 1.14rem;
}

.mini-books {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.mini-books button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  color: #fff;
  background: var(--green);
  cursor: pointer;
  font-weight: 900;
}

.message-preview {
  margin-top: 28px;
}

.message-preview article {
  min-height: 220px;
  padding: 26px;
  color: #fff;
  background: var(--green);
  box-shadow: var(--shadow-soft);
}

.message-preview article:nth-child(2) { background: var(--rust); }
.message-preview article:nth-child(3) { color: var(--ink); background: var(--gold); }

.message-preview blockquote {
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.45;
}

.message-preview span {
  display: block;
  margin-top: 24px;
  font-weight: 900;
  letter-spacing: .08em;
}

.day-hero {
  padding: 12px;
  background: var(--cream);
  box-shadow: var(--shadow);
}

.day-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: var(--paper);
}

.day-timeline {
  margin-top: 28px;
}

.day-timeline article {
  min-height: 210px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--cream);
  box-shadow: var(--shadow-soft);
}

.day-timeline time {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--gold);
  font-size: .72rem;
  font-weight: 900;
}

.day-timeline h3 {
  margin-top: 18px;
  font-size: 1.45rem;
  font-weight: 500;
}

.day-timeline p {
  margin-top: 12px;
  color: var(--ink-soft);
}

.film-layout {
  display: grid;
  gap: 28px;
  align-items: center;
  margin-top: 34px;
  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;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.gallery-filter {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--cream);
  cursor: pointer;
  font-weight: 900;
}

.gallery-filter.is-active {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.gallery-card {
  cursor: pointer;
  text-align: left;
}

.gallery-card.is-hidden { display: none; }

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

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

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

.after-stats {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.after-stats article {
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.after-stats strong {
  display: block;
  color: var(--rust);
  font-family: Georgia, serif;
  font-size: 2.2rem;
}

.after-stats span {
  display: block;
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.live-messages {
  margin-top: 34px;
  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);
}

.live-messages .eyebrow { color: #E7D29A; }
.live-messages h2 { color: #fff; }

#message-form {
  display: grid;
  gap: 18px;
}

#message-form label {
  color: rgba(255,255,255,.82);
  font-weight: 900;
}

#message-form input,
#message-form textarea {
  width: 100%;
  margin-top: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px;
  color: #fff;
  background: rgba(255,255,255,.06);
}

.saved-messages {
  display: grid;
  gap: 14px;
  margin-top: 30px;
}

.saved-messages article {
  padding: 22px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
}

.saved-messages blockquote {
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.45;
}

.saved-messages span {
  display: block;
  margin-top: 16px;
  color: var(--gold);
  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: -20px;
  bottom: -45px;
  color: rgba(255,255,255,.06);
  font-family: Georgia, serif;
  font-size: clamp(9rem, 24vw, 18rem);
  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(980px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  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;
}

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

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

.modal__panel--pieces {
  width: min(780px, 100%);
  padding: clamp(38px, 7vw, 60px);
}

.pieces-grid {
  display: grid;
  gap: 14px;
  margin-top: 30px;
}

.pieces-grid button {
  min-height: 120px;
  padding: 22px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
  cursor: pointer;
  text-align: left;
}

.pieces-grid span {
  display: block;
  color: var(--gold-deep);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.pieces-grid strong {
  display: block;
  margin-top: 10px;
  font-family: Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
}

.modal__panel--book {
  width: min(700px, 100%);
  padding: clamp(38px, 7vw, 60px);
}

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

.modal__panel--gallery {
  display: grid;
  gap: 22px;
  padding: 18px;
}

.modal__panel--gallery img {
  width: 100%;
  min-height: 360px;
  border-radius: 20px;
  object-fit: contain;
  background: var(--paper);
}

.modal__copy { padding: 16px 12px 24px; }

.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(440px,.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);
  }

  .invitation-layout,
  .timeline-feature,
  .gift-layout,
  .film-layout,
  .after-layout {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

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

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

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

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

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

  .modal__panel--gallery {
    grid-template-columns: minmax(0,1.08fr) minmax(300px,.92fr);
    align-items: center;
  }
}

@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; }
}

@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,
  .button-row,
  .closing-panel__actions {
    flex-direction: column;
  }

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

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

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

  .countdown__grid > div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,.22);
  }

  .countdown__grid > div:nth-child(4) {
    border-top: 1px solid rgba(255,255,255,.22);
  }
}

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