/* ---------------------------------------------------------------
   Wedding invitation — one stylesheet, no build step.
   Breakpoint: 720px (phone-first).
   --------------------------------------------------------------- */

:root {
  --bg: #f7f2e9;
  --bg-2: #efe7d7;
  --card: #fffdf8;
  --ink: #241e1a;
  --muted: #6d6259;
  --line: #ded0b9;
  --gold: #a4855b;
  --gold-soft: #cbb593;
  --rose: #b4797f;
  --sage: #7c8a72;

  --serif: "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --shadow: 0 20px 45px -30px rgba(58, 41, 26, .55);
  --edge: 22px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

html:focus-within { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; height: 100vh; }

/* paper grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

::selection { background: var(--gold-soft); color: #fff; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------------- shared type ---------------- */

h1, h2, h3, .names, .quote p {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: .01em;
  margin: 0;
}

.kicker {
  margin: 0;
  font-size: 10px;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}

.names {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .28em;
  font-style: italic;
  font-size: clamp(38px, 13vw, 64px);
  line-height: 1.05;
}

.names em {
  font-style: normal;
  font-size: .52em;
  color: var(--gold);
  transform: translateY(-.12em);
}

.rule {
  width: min(260px, 72%);
  height: 1px;
  margin: 26px auto;
  background: linear-gradient(90deg, transparent, var(--gold-soft) 18%, var(--gold) 50%, var(--gold-soft) 82%, transparent);
}

.rule--sm { width: 74px; margin: 18px auto 0; }

.date {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}

.date--lg { font-size: 13px; margin-top: 14px; letter-spacing: .2em; }

.muted { color: var(--muted); }

.btn {
  appearance: none;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--gold);
  padding: 15px 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s;
}

.btn:hover { background: var(--gold); color: #fff; border-color: var(--gold); }

.btn--ghost { border-color: var(--line); }

/* ---------------- gate ---------------- */

.gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: var(--bg);
}

.gate__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.4%;
  background: linear-gradient(165deg, #fbf7ee 0%, #f2e9d8 62%, #e7dac2 100%);
  transition: transform 1.1s var(--ease);
  will-change: transform;
}

.gate__panel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold-soft) 22%, var(--gold) 50%, var(--gold-soft) 78%, transparent);
  box-shadow: 0 0 18px rgba(164, 133, 91, .35);
}

.gate__panel--l { left: 0; }
.gate__panel--r { right: 0; }
.gate__panel--l::after { right: 0; }
.gate__panel--r::after { left: 0; }

.gate__panel--l::before,
.gate__panel--r::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(164, 133, 91, .28);
  border-radius: 140px 140px 0 0;
}

.gate__card {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 34px 24px;
  max-width: 460px;
  background: rgba(255, 253, 248, .82);
  border: 1px solid rgba(222, 208, 185, .9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(2px);
  transition: opacity .5s var(--ease), transform .7s var(--ease);
}

.gate.is-open .gate__card {
  opacity: 0;
  transform: translateY(-10px) scale(.98);
  pointer-events: none;
}

.gate.is-open .gate__panel--l { transform: translateX(-101%); }
.gate.is-open .gate__panel--r { transform: translateX(101%); }
.gate.is-open { pointer-events: none; }

.seal {
  width: 74px;
  height: 92px;
  margin: 18px auto 6px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: .06em;
  color: var(--gold);
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .9), transparent 60%);
}

.seal--sm { width: 54px; height: 68px; font-size: 13px; margin: 0 auto 18px; }

.names--cover { margin-bottom: 4px; }

.gate .date { margin-bottom: 30px; }

.to {
  margin: 0 0 22px;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.to b { color: var(--ink); font-weight: 400; letter-spacing: .12em; }

.music-hint {
  margin: 16px 0 0;
  font-size: 9px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .7;
}

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 90px var(--edge) 110px;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% -10%, #fffdf7 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

.arch {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(430px, 92vw);
  height: 78%;
  color: var(--gold);
  opacity: .32;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  text-align: center;
  max-width: 520px;
}

.hero .names { margin: 16px 0 0; }
.hero .date { margin-top: 0; }

.lede {
  margin: 22px auto 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.9;
}

.cue {
  position: absolute;
  bottom: 86px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 9px;
  letter-spacing: .3em;
  text-transform: uppercase;
}

.hero__mark {
  position: absolute;
  bottom: 158px;
  left: 50%;
  transform: translateX(-50%);
  opacity: .95;
}

.hero__mark .seal--sm { margin: 0; }

.cue svg { animation: nudge 2.6s var(--ease) infinite; }

@keyframes nudge {
  0%, 100% { transform: translateY(-2px); opacity: .5; }
  50% { transform: translateY(4px); opacity: 1; }
}

/* ---------------- sections ---------------- */

.section { padding: 72px 0; }
.section--quote { padding: 0; }

.wrap {
  width: min(620px, 100% - var(--edge) * 2);
  margin-inline: auto;
}

.section__head { text-align: center; margin-bottom: 34px; }

.section__head h2 {
  font-size: clamp(30px, 9vw, 44px);
  font-style: italic;
  margin-top: 10px;
}

.quote {
  margin: 0;
  padding: 74px 0;
  text-align: center;
  border-block: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 253, 248, .7), transparent);
}

.quote p {
  font-size: clamp(19px, 5.4vw, 24px);
  font-style: italic;
  line-height: 1.6;
  max-width: 30ch;
  margin: 0 auto;
  color: #3b322b;
}

.quote cite {
  display: block;
  margin-top: 22px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 9px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------------- couple ---------------- */

.person { text-align: center; }

.portrait {
  width: min(230px, 62vw);
  aspect-ratio: 3 / 4;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 25%, #fffdf8, var(--bg-2) 70%);
  border: 1px solid var(--line);
  outline: 1px solid rgba(222, 208, 185, .5);
  outline-offset: 6px;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 46px;
  color: var(--gold);
  opacity: .78;
}

.person h3 {
  font-size: 27px;
  font-style: italic;
}

.person p {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
}

.ig {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .3s, border-color .3s;
}

.ig:hover { color: var(--gold); border-color: var(--gold); }

.amp-mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 34px;
  color: var(--gold);
  text-align: center;
  margin: 34px 0;
}

/* ---------------- event ---------------- */

.section--event {
  background: linear-gradient(180deg, transparent, rgba(239, 231, 215, .55) 40%, transparent);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin: 30px 0 34px;
  border: 1px solid var(--line);
  background: var(--card);
}

.countdown > div {
  padding: 18px 4px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.countdown > div:last-child { border-right: 0; }

.countdown b {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 8vw, 34px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown span {
  display: block;
  margin-top: 8px;
  font-size: 8.5px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--muted);
}

.event-card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 26px 22px;
  text-align: center;
  margin-bottom: 16px;
}

.event-card h3 {
  font-size: 22px;
  font-style: italic;
}

.event-card .time {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--gold);
}

.event-card .place {
  margin: 16px 0 0;
  font-family: var(--serif);
  font-size: 18px;
}

.event-card .addr {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

.event-card .map {
  margin-top: 18px;
  font-size: 9.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 26px;
}

.actions .btn { flex: 1 1 180px; padding: 14px 18px; }

/* ---------------- gallery ---------------- */

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tile {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #fffdf8, var(--bg-2));
  border: 1px solid var(--line);
  padding: 0;
  cursor: zoom-in;
  display: grid;
  place-items: center;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.tile:hover img { transform: scale(1.06); }

.tile span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
  color: var(--gold);
  opacity: .6;
}

/* ---------------- form ---------------- */

.form {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 26px 20px;
  display: grid;
  gap: 16px;
}

.form label {
  display: grid;
  gap: 7px;
  font-size: 9.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}

.form input,
.form textarea {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  padding: 12px 14px;
  width: 100%;
  border-radius: 0;
}

.form textarea { resize: vertical; min-height: 92px; }

.form input::placeholder,
.form textarea::placeholder { color: #a99e92; }

.choice {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.choice legend {
  font-size: 9.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0;
  margin-bottom: 9px;
}

.choice label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}

.choice input { width: auto; accent-color: var(--gold); }

.choice label:has(input:checked) { border-color: var(--gold); background: #fdfaf3; }

.form .btn { justify-self: start; }

.form__status {
  margin: 0;
  font-size: 12px;
  color: var(--sage);
  min-height: 1em;
}

.form__note {
  margin: 0;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------------- wishes ---------------- */

.wishes {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.wishes li {
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold-soft);
  background: rgba(255, 253, 248, .7);
  padding: 16px 18px;
}

.wishes .who {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.wishes .who b {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
}

.wishes .who span {
  font-size: 8.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}

.wishes p {
  margin: 6px 0 0;
  font-size: 13px;
  color: #4a4038;
  line-height: 1.7;
}

/* ---------------- gift ---------------- */

.gift {
  display: grid;
  gap: 12px;
}

.gift__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 18px;
}

.gift__row div { min-width: 0; }

.gift__row b {
  display: block;
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.gift__row em {
  display: block;
  font-style: normal;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: .06em;
  margin: 4px 0 2px;
}

.gift__row small { color: var(--muted); font-size: 11.5px; }

.gift__row button {
  border: 1px solid var(--line);
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 9px 12px;
  cursor: pointer;
  white-space: nowrap;
}

.gift__row button:hover { border-color: var(--gold); color: var(--gold); }

/* ---------------- footer ---------------- */

.footer {
  text-align: center;
  padding: 64px var(--edge) 96px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(239, 231, 215, .6));
}

.footer p { margin: 0 0 8px; font-size: 12.5px; max-width: 30ch; margin-inline: auto; }

.credit {
  font-size: 9px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 22px !important;
}

/* ---------------- chrome ---------------- */

.sound {
  position: fixed;
  z-index: 70;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, .82);
  color: var(--gold);
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: opacity .4s;
}

.sound.is-off { color: var(--muted); opacity: .65; }

.nav {
  position: fixed;
  z-index: 65;
  bottom: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 9px 6px calc(9px + env(safe-area-inset-bottom));
  background: rgba(247, 242, 233, .93);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
  transform: translateY(110%);
  transition: transform .6s var(--ease);
}

.nav.is-shown { transform: none; }

.nav a {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 4px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 8.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: color .3s;
}

.nav svg { width: 20px; height: 20px; }

.nav a.is-active { color: var(--gold); }
.nav a.is-active svg { transform: translateY(-1px); }

main { padding-bottom: 74px; }

/* ---------------- lightbox ---------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  background: rgba(26, 21, 17, .94);
  padding: 24px;
}

.lightbox img {
  max-width: 100%;
  max-height: 82vh;
  border: 1px solid rgba(255, 255, 255, .18);
}

.lightbox button {
  position: absolute;
  background: none;
  border: 0;
  color: #f7f2e9;
  font-size: 30px;
  line-height: 1;
  padding: 12px;
  cursor: pointer;
  opacity: .8;
}

.lightbox button:hover { opacity: 1; }

.lightbox__x { top: 12px; right: 12px; font-size: 28px; }
.lightbox__p { left: 6px; }
.lightbox__n { right: 6px; }

/* ---------------- motion ---------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}

[data-reveal].in { opacity: 1; transform: none; }

.petal {
  position: absolute;
  top: -8vh;
  z-index: 2;
  width: 8px;
  height: 8px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, #f3d8dc, #e3bfc4);
  opacity: 0;
  pointer-events: none;
  animation: fall linear forwards;
}

@keyframes fall {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0); }
  10% { opacity: .75; }
  100% { opacity: 0; transform: translate3d(var(--drift, 40px), 108vh, 0) rotate(420deg); }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .petal { display: none; }
}

/* ---------------- wide ---------------- */

@media (min-width: 720px) {
  body { font-size: 15.5px; --edge: 40px; }

  .section { padding: 96px 0; }

  .grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }

  .countdown > div { padding: 24px 8px; }

  .event-card { padding: 34px 30px; }

  .nav {
    left: 50%;
    right: auto;
    bottom: 18px;
    width: 460px;
    transform: translate(-50%, 150%);
    border: 1px solid var(--line);
    border-radius: 2px;
    grid-template-columns: repeat(5, 1fr);
  }

  .nav.is-shown { transform: translate(-50%, 0); }

  main { padding-bottom: 0; }

  .footer { padding-bottom: 120px; }

  .gate__card { padding: 46px 44px; }

  .hero__mark { bottom: 172px; }
  .cue { bottom: 98px; }

  .arch { width: min(580px, 86vw); height: 82%; }
}
