:root {
  --bg: #14110d;
  --bg-elev: #1c1814;
  --bg-glow: #221c14;
  --ink: #ece5d4;
  --ink-soft: #b5ac97;
  --ink-muted: #6f6857;
  --rule: #2a261f;
  --rule-strong: #3a3528;
  --accent: #d6b787;
  --accent-soft: #b89867;
  --display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-width: 38rem;
  --section-gap: clamp(3.5rem, 8vw, 6rem);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
}

body {
  position: relative;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(
      ellipse 90% 60% at 50% 30%,
      var(--bg-glow) 0%,
      var(--bg) 60%
    ),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* ── Film-grain overlay ─────────────────────────────── */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ── Cinema (full-bleed photo hero) ─────────────────── */

.cinema {
  position: relative;
  width: 100%;
  height: clamp(28rem, 80vh, 44rem);
  overflow: hidden;
  background: #0a0805;
}

.cinema-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  filter: saturate(0.95) contrast(1.02);
}

.cinema-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(20, 17, 13, 0.3) 0%,
      rgba(20, 17, 13, 0.05) 18%,
      rgba(20, 17, 13, 0) 50%,
      rgba(20, 17, 13, 0.65) 90%,
      var(--bg) 100%
    );
}

.masthead--over {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.5rem, 5vw, 2.5rem);
}

.masthead--over .eyebrow {
  color: var(--ink);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.masthead--over .masthead-rule {
  background: rgba(236, 229, 212, 0.4);
}

.cinema-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(2rem, 5vh, 3.5rem);
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.cinema-caption-line {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
}

.cinema-caption-name {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: var(--ink);
  letter-spacing: 0.005em;
}

/* ── Page container ─────────────────────────────────── */

.page {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 5vw, 2.5rem)
    clamp(3rem, 8vw, 5rem);
  z-index: 1;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.eyebrow--right {
  color: var(--ink-muted);
}

.masthead-rule {
  height: 1px;
  background: var(--rule-strong);
}

/* ── Hero (text block, no photo) ────────────────────── */

.hero {
  position: relative;
  text-align: center;
  padding-bottom: var(--section-gap);
  isolation: isolate;
}

.hero-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -42%);
  font-family: var(--display);
  font-style: normal;
  font-weight: 300;
  font-size: clamp(18rem, 55vw, 32rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--accent);
  opacity: 0.05;
  pointer-events: none;
  user-select: none;
  z-index: -1;
  white-space: nowrap;
}

.hero-kicker {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 1.75rem;
}

.hero-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-style: normal;
  font-size: clamp(3.5rem, 12vw, 6.25rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.hero-names {
  display: block;
}

.hero-amp {
  display: block;
  font-style: italic;
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.55em;
  color: var(--accent);
  margin: 0.05em 0;
  line-height: 1;
}

/* Equation centerpiece */

.hero-equation {
  margin: 2.5rem auto 0;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(0.7rem, 1.6vw, 1rem);
  padding: 0.85rem clamp(1.25rem, 3vw, 2rem);
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  font-family: var(--display);
  line-height: 1;
}

.hero-eq-num,
.hero-eq-sum {
  font-style: normal;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.6rem);
  color: var(--ink);
  letter-spacing: -0.01em;
}

.hero-eq-sum {
  color: var(--accent);
  font-size: clamp(2.4rem, 6.5vw, 3.25rem);
  font-weight: 400;
}

.hero-eq-op {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 300;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  position: relative;
  top: -0.15em;
}

.hero-occasion {
  margin: 1.25rem 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.hero-occasion-line {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero-occasion-sub {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--ink-muted);
}

.hero-date {
  margin: 2rem 0 0;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ── Details ────────────────────────────────────────── */

.details {
  display: grid;
  gap: 0;
  padding-bottom: var(--section-gap);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.detail {
  text-align: center;
  padding: 2.5rem 1rem;
  border-bottom: 1px solid var(--rule);
}

.detail:last-child {
  border-bottom: none;
}

.detail-label {
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
}

.detail-line {
  margin: 0.2rem 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.96rem;
  color: var(--ink-soft);
}

.detail-line--strong {
  font-family: var(--display);
  font-style: normal;
  font-weight: 400;
  font-size: 1.85rem;
  color: var(--ink);
  margin: 0.5rem 0;
  letter-spacing: -0.005em;
}

.detail-muted {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.1rem;
  color: var(--ink-muted);
  letter-spacing: 0.005em;
}

.detail-attire {
  margin: 1.1rem 0 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--accent-soft);
  letter-spacing: 0.005em;
}

/* ── RSVP section ───────────────────────────────────── */

.rsvp {
  text-align: center;
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}

.section-title {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-weight: 400;
  font-style: normal;
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.section-lede {
  margin: 0 auto 2.75rem;
  max-width: 28rem;
  color: var(--ink-soft);
  font-size: 0.96rem;
  font-family: var(--sans);
}

.section-lede strong {
  font-weight: 500;
  color: var(--accent);
}

/* ── Form ───────────────────────────────────────────── */

.form {
  text-align: left;
  display: grid;
  gap: 1.5rem;
  max-width: 26rem;
  margin: 0 auto;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.field label,
.field legend {
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 0;
}

.field input[type="text"],
.field input[type="email"] {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule-strong);
  padding: 0.65rem 0;
  border-radius: 0;
  outline: none;
  transition: border-color 200ms ease;
  -webkit-appearance: none;
  appearance: none;
}

.field input::placeholder {
  color: var(--ink-muted);
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.05rem;
}

.field input:focus {
  border-bottom-color: var(--accent);
}

.field--choice {
  border: none;
  margin: 0;
  padding: 0;
}

.field--choice legend {
  margin-bottom: 0.85rem;
}

.choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.75rem;
  border: 1px solid var(--rule-strong);
  background: var(--bg-elev);
  cursor: pointer;
  transition:
    border-color 200ms ease,
    background-color 200ms ease,
    color 200ms ease;
}

.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.choice span {
  font-family: var(--display);
  font-style: normal;
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

.choice:hover {
  border-color: var(--accent-soft);
}

.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent);
}

.choice:has(input:checked) span {
  color: var(--bg);
}

[data-show-when] {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 320ms ease,
    opacity 280ms ease,
    margin 280ms ease;
  margin-top: -1.5rem;
}

[data-show-when].is-visible {
  max-height: 14rem;
  opacity: 1;
  margin-top: 0;
}

.field-help {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

.submit {
  margin-top: 0.75rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--ink);
  border: none;
  padding: 1.15rem 1.5rem;
  cursor: pointer;
  transition:
    background-color 200ms ease,
    transform 120ms ease;
}

.submit:hover {
  background: var(--accent);
}

.submit:active {
  transform: translateY(1px);
}

.submit:disabled {
  opacity: 0.55;
  cursor: progress;
}

.form-status {
  margin: 0;
  min-height: 1.2em;
  font-family: var(--sans);
  font-size: 0.85rem;
  text-align: center;
  color: var(--accent);
  font-style: italic;
}

/* ── Thank-you state ────────────────────────────────── */

.thank-you {
  max-width: 26rem;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

.thank-you h3 {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-weight: 400;
  font-style: normal;
  font-size: 2.5rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.thank-you p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  font-family: var(--sans);
}

/* ── Closing ────────────────────────────────────────── */

.closing {
  text-align: center;
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--rule);
}

.closing-line {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.closing-signature {
  margin: 0.85rem 0 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 2rem;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.closing-mark {
  margin: 0.9rem 0 0;
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ── Responsive tweaks ──────────────────────────────── */

@media (max-width: 480px) {
  .masthead--over {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 0.5rem;
  }
  .masthead--over .masthead-rule {
    display: none;
  }
  .choice-row {
    grid-template-columns: 1fr;
  }
  .hero-watermark {
    font-size: 16rem;
  }
  .cinema {
    height: 70vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
