/* Online invitation (LORYN collaboration, 2026-11-28): ivory paper, blush and beige, gold foil and glitter.
   Phone first; the page is a column of paper cards. Fonts: Great Vibes (names, headings), Cormorant Garamond (text),
   Inter (labels and form). */
:root {
  --ivory: #fbf5ee;
  --paper: #fffaf4;
  --beige: #efe1cf;
  --blush: #f5dcd6;
  --rose: #d9a49d;
  --rose-d: #b4786f;
  --gold: #c39a5c;
  --gold-d: #9c7740;
  --gold-l: #ead3a2;
  --ink: #574239;
  --muted: #8f776b;
  --line: rgba(195, 154, 92, 0.45);
  --foil: linear-gradient(105deg, #a9793b 0%, #e9cf94 18%, #b88748 34%, #fbecc4 50%, #c0904f 66%, #edd59e 82%, #a9793b 100%);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --script: 'Great Vibes', 'Snell Roundhand', cursive;
  --sans: 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.inv {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 400 19px/1.6 var(--serif);
  background:
    radial-gradient(1200px 700px at 110% -10%, rgba(245, 220, 214, 0.75), transparent 60%),
    radial-gradient(900px 600px at -20% 30%, rgba(239, 225, 207, 0.8), transparent 60%),
    radial-gradient(900px 700px at 120% 75%, rgba(245, 220, 214, 0.6), transparent 60%),
    var(--ivory);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--rose-d); }
.script { font-family: var(--script); font-weight: 400; }
.label {
  margin: 0;
  font: 500 11px/1.4 var(--sans);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-d);
}

/* Gold foil text that slowly shimmers */
.names, .h2 .script, .end-names, .wreath span, .family-names.script, .ev-time, .env-seal span, .rsvp-thanks .script {
  background: var(--foil);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: foil 7s linear infinite;
}
@keyframes foil { to { background-position: -250% 0; } }

.glitter { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }

.inv-main { position: relative; z-index: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 120px 22px 70px;
  text-align: center;
  overflow: hidden;
}
.flora { position: absolute; top: 0; width: min(62vw, 430px); mix-blend-mode: multiply; pointer-events: none; opacity: 0.95; }
.flora-tl { left: 0; }
.flora-tr { right: 0; transform: scaleX(-1); }
.hero-in { position: relative; max-width: 620px; }
@media (max-width: 759px) { .hero { place-items: start center; padding-top: calc(min(62vw, 430px) * 0.74); } }
.eyebrow { margin: 0 auto 6px; max-width: 30ch; font-style: italic; font-size: 20px; color: var(--muted); }
.names {
  margin: 0;
  font: 400 clamp(62px, 17vw, 124px)/1.05 var(--script);
  padding: 0.12em 0.1em 0.18em;
}
.names .amp { display: block; font-size: 0.55em; line-height: 0.9; }
.hero-date { display: grid; gap: 2px; margin: 14px 0 26px; }
.hero-date span { font: 500 12px/1.5 var(--sans); letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted); }
.hero-date b { font-weight: 600; font-size: clamp(26px, 6.6vw, 36px); letter-spacing: 0.04em; color: var(--ink); }

.countdown { display: flex; justify-content: center; gap: 10px; margin: 0 auto 26px; }
.countdown div {
  width: 70px;
  padding: 12px 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px 999px 18px 18px;
  background: rgba(255, 250, 244, 0.75);
  box-shadow: 0 10px 24px -18px rgba(87, 66, 57, 0.6);
}
.countdown b { display: block; font-size: 28px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown span { font: 500 10px/1.4 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.cd-done { font-style: italic; font-size: 24px; color: var(--rose-d); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  font: 600 14px/1 var(--sans);
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s;
}
.btn:active { transform: scale(0.97); }
.btn-gold {
  color: #fff;
  background: linear-gradient(135deg, #c99d5e, #e3c48a 45%, #b9894b);
  box-shadow: 0 12px 26px -14px rgba(156, 119, 64, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  text-shadow: 0 1px 1px rgba(110, 80, 40, 0.35);
}
.btn-gold:hover { box-shadow: 0 16px 30px -14px rgba(156, 119, 64, 1), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.btn-line { color: var(--gold-d); background: rgba(255, 250, 244, 0.7); box-shadow: inset 0 0 0 1px var(--line); }
.btn-wide { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.link { padding: 0; border: 0; background: none; color: var(--rose-d); font: inherit; text-decoration: underline; cursor: pointer; }
:focus-visible { outline: 2px solid var(--rose-d); outline-offset: 3px; }

/* ---------- Sections ---------- */
section { position: relative; padding: 40px 20px; }
.h2 { margin: 0 0 18px; text-align: center; font-weight: 400; line-height: 1.1; }
.h2 .script { font-size: clamp(46px, 12vw, 70px); padding: 0.1em 0.12em 0.2em; }

.quote { max-width: 640px; margin: 0 auto; text-align: center; }
.garland { display: block; width: min(100%, 520px); margin: 0 auto 6px; mix-blend-mode: multiply; }
.quote p { margin: 0 auto; max-width: 32ch; font-style: italic; font-size: 23px; line-height: 1.55; }

.family { display: grid; gap: 22px; max-width: 520px; margin: 0 auto; text-align: center; }
.family-names { margin: 6px 0 0; font-size: 22px; }
.family-names.script { font-size: clamp(40px, 10vw, 56px); line-height: 1.2; padding: 0 0.1em 0.12em; }

/* Event cards */
.ev-list { display: grid; gap: 22px; max-width: 980px; margin: 0 auto; }
@media (min-width: 820px) { .ev-list { grid-template-columns: 1fr 1fr; } }
.ev, .rsvp-card {
  position: relative;
  padding: 34px 22px 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 250, 244, 0.96), rgba(255, 247, 240, 0.92));
  border-radius: 26px;
  box-shadow: 0 30px 60px -40px rgba(87, 66, 57, 0.55), 0 0 0 1px rgba(195, 154, 92, 0.28);
}
.ev::before, .rsvp-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 20px;
  border: 1px solid rgba(195, 154, 92, 0.35);
  pointer-events: none;
}
.ev-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: -62px auto 12px;
  border-radius: 50%;
  color: var(--gold-d);
  background: radial-gradient(circle at 35% 30%, #fff8ee, var(--blush));
  box-shadow: 0 0 0 1px var(--line), 0 10px 20px -12px rgba(156, 119, 64, 0.8);
}
.ev-icon svg { width: 28px; height: 28px; }
.ev-time { margin: 2px 0 0; font-size: 44px; font-weight: 600; line-height: 1.1; }
.ev-place { margin: 8px 0 2px; font-weight: 600; font-size: 25px; line-height: 1.2; }
.ev-addr { margin: 0 0 16px; color: var(--muted); font-size: 18px; }
.ev-map {
  position: relative;
  overflow: hidden;
  height: 190px;
  margin: 0 0 14px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 46%, rgba(217, 164, 157, 0.35), transparent 42%),
    repeating-linear-gradient(32deg, transparent 0 22px, rgba(195, 154, 92, 0.12) 22px 23px),
    repeating-linear-gradient(-58deg, transparent 0 34px, rgba(195, 154, 92, 0.1) 34px 35px),
    #f7ece2;
  box-shadow: inset 0 0 0 1px rgba(195, 154, 92, 0.3);
}
.ev-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ev-map-btn {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  width: 100%;
  border: 0;
  background: none;
  color: var(--ink);
  font: 600 14px/1.3 var(--sans);
  letter-spacing: 0.04em;
  cursor: pointer;
}
.ev-map-btn small { max-width: 26ch; font: 400 11px/1.4 var(--sans); color: var(--muted); letter-spacing: 0; }
.ev-map-pin { color: var(--rose-d); animation: pin 2.4s var(--ease) infinite; }
.ev-map-pin svg { width: 34px; height: 34px; }
@keyframes pin { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-6px); } }
.ev-go { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.btn-map { padding: 12px 10px; color: var(--ink); background: #fff; box-shadow: 0 0 0 1px rgba(195, 154, 92, 0.4), 0 8px 18px -14px rgba(87, 66, 57, 0.7); }

/* RSVP */
.rsvp { padding-top: 56px; }
.rsvp-card { max-width: 560px; margin: 0 auto; padding: 36px 22px 26px; text-align: left; }
.rsvp-card .h2 { margin-bottom: 4px; }
.rsvp-by { margin: 0 0 18px; text-align: center; color: var(--muted); }
.rsvp-by b { color: var(--ink); font-weight: 600; }
.rsvp-form { display: grid; gap: 14px; }
.f { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; font: 500 13px/1.4 var(--sans); color: var(--muted); }
.f input:not([type="radio"]), .f textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(195, 154, 92, 0.45);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: 400 16px/1.4 var(--sans);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.f input:focus, .f textarea:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 4px rgba(217, 164, 157, 0.25); }
.f textarea { resize: vertical; min-height: 84px; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f-choice { gap: 8px; }
.f-choice legend { margin-bottom: 6px; padding: 0; }
.f-count { gap: 8px; }
.f-count legend { margin-bottom: 6px; padding: 0; }
.rsvp-total { margin: 2px 0 0; font-size: 15px; font-weight: 600; color: var(--gold-d); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  display: block;
  padding: 13px 16px 13px 46px;
  border: 1px solid rgba(195, 154, 92, 0.45);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: 500 15px/1.3 var(--sans);
  transition: background-color 0.2s, border-color 0.2s;
}
.choice span::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: #fff;
  transition: box-shadow 0.2s, background-color 0.2s;
}
.choice input:checked + span { border-color: var(--rose); background: #fff4f1; }
.choice input:checked + span::before { background: var(--rose-d); box-shadow: inset 0 0 0 3px #fff; border-color: var(--rose-d); }
.choice input:focus-visible + span { outline: 2px solid var(--rose-d); outline-offset: 2px; }
.rsvp-more { display: grid; gap: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rsvp-err { margin: 0; padding: 10px 14px; border-radius: 12px; background: #fbe9e6; color: #9a4a40; font: 500 14px/1.4 var(--sans); }
.rsvp-privacy { margin: 2px 0 0; text-align: center; font: 400 12px/1.5 var(--sans); color: var(--muted); }
.rsvp-thanks { text-align: center; padding: 10px 0 6px; outline: none; }
.rsvp-thanks .script { margin: 0; font-size: 64px; line-height: 1.2; padding: 0 0.1em 0.12em; }
.rsvp-thanks p:last-child { margin: 0; font-size: 21px; }

/* End */
.end { padding: 30px 20px 46px; text-align: center; }
.wreath { position: relative; width: min(56vw, 230px); margin: 0 auto 10px; }
.wreath img { display: block; width: 100%; }
.wreath span { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(28px, 8vw, 38px); padding-bottom: 4%; }
.end-wait { margin: 0; font-style: italic; font-size: 22px; }
.end-names { margin: 0 0 40px; font-size: clamp(48px, 12vw, 72px); line-height: 1.2; padding: 0 0.1em 0.15em; }
.credit { margin: 0; font: 400 12px/1.8 var(--sans); letter-spacing: 0.04em; color: var(--muted); }
.credit a { color: var(--gold-d); text-decoration: none; border-bottom: 1px solid var(--line); }

/* Privacy dialog */
.privacy {
  max-width: min(520px, calc(100vw - 32px));
  padding: 26px 22px 20px;
  border: 0;
  border-radius: 22px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 80px -30px rgba(87, 66, 57, 0.7);
  font-size: 17px;
}
.privacy::backdrop { background: rgba(87, 66, 57, 0.35); backdrop-filter: blur(3px); }
.privacy h2 { margin: 0 0 8px; font-weight: 600; font-size: 24px; }
.privacy form { margin: 14px 0 0; text-align: right; }

/* ---------- The couple's private list (?lista=) ---------- */
.list-wrap { max-width: 720px; margin: 0 auto; padding: 40px 18px 50px; }
.list-sub { margin: -6px 0 22px; text-align: center; color: var(--muted); font-style: italic; }
.list-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 18px; }
.list-stats div { padding: 14px 6px 10px; text-align: center; border-radius: 18px; background: rgba(255, 250, 244, 0.9); box-shadow: 0 0 0 1px rgba(195, 154, 92, 0.3); }
.list-stats b { display: block; font-size: 32px; font-weight: 600; line-height: 1.1; }
.list-stats span { font: 500 10px/1.4 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.list-actions { text-align: center; margin: 0 0 22px; }
.list-empty { text-align: center; color: var(--muted); }
.list-rows { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 10px; }
.list-rows li { padding: 14px 16px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px rgba(195, 154, 92, 0.3); border-left: 4px solid var(--gold); }
.list-rows li.is-no { border-left-color: var(--rose); opacity: 0.85; }
.list-rows p { margin: 2px 0; font-size: 17px; }
.list-name { font-weight: 600; font-size: 19px !important; }
.list-name span { font-weight: 400; color: var(--muted); font-size: 16px; }
.list-note { font-style: italic; }
.list-meta { font: 400 12px/1.5 var(--sans); color: var(--muted); }
.inv-list .credit { text-align: center; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Envelope ---------- */
.env { display: none; }
.js .env {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 26px;
  padding: 20px;
  background:
    radial-gradient(800px 500px at 50% 40%, #fbe9e3, transparent 70%),
    linear-gradient(160deg, #f7e4dc, #efe0cf);
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}
.env.is-gone { opacity: 0; visibility: hidden; }
.env-box { position: relative; width: min(84vw, 360px); aspect-ratio: 1.45; perspective: 900px; }
.env-back, .env-front, .env-flap { position: absolute; inset: 0; border-radius: 10px; }
.env-back { background: linear-gradient(180deg, #e9cfc4, #e2c2b6); box-shadow: 0 30px 60px -30px rgba(87, 66, 57, 0.7); }
.env-letter {
  z-index: 1;
  position: absolute;
  left: 7%;
  right: 7%;
  top: 8%;
  bottom: 8%;
  display: grid;
  place-content: start center;
  padding-top: 7%;
  gap: 4px;
  text-align: center;
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 6px 16px -10px rgba(87, 66, 57, 0.5);
  transition: transform 1.1s var(--ease) 0.5s;
}
.env-letter .script { font-size: clamp(30px, 9vw, 42px); color: var(--gold-d); line-height: 1.1; }
.env-letter-date { font: 500 10px/1.4 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.env-front {
  z-index: 2;
  background: linear-gradient(170deg, #efd8cd, #e8cbbf);
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%);
}
.env-front::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #f3e0d7, #ecd3c8);
  clip-path: polygon(0 100%, 50% 50%, 100% 100%);
}
.env-flap {
  bottom: auto;
  height: 62%;
  transform-origin: 50% 0;
  background: linear-gradient(180deg, #e6c8bc, #ddb9ac);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 10px 10px 0 0;
  transition: transform 0.8s var(--ease), z-index 0s 0.4s;
  z-index: 3;
}
.env-seal {
  position: absolute;
  left: 50%;
  top: 62%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: -39px 0 0 -39px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #d99a91, #b06a61 60%, #8f4f47);
  box-shadow: 0 8px 18px -6px rgba(110, 50, 44, 0.7), inset 0 2px 4px rgba(255, 255, 255, 0.35), inset 0 -3px 6px rgba(80, 30, 25, 0.4);
  animation: seal 2.4s var(--ease) infinite;
  transition: transform 0.5s var(--ease), opacity 0.5s;
}
.env-seal::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 1px dashed rgba(255, 235, 225, 0.55); }
.env-seal span { font: 400 16px/1 var(--script); letter-spacing: -0.02em; white-space: nowrap; background-image: linear-gradient(105deg, #fff3e6, #f7d9b9 40%, #fff6ea 60%, #f0cfa8); }
@keyframes seal { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.env-hint { margin: 0; font-style: italic; font-size: 19px; color: var(--muted); text-align: center; }
.env.is-open .env-seal { transform: scale(0.4); opacity: 0; animation: none; }
.env.is-open .env-flap { transform: rotateX(180deg); z-index: 0; }
.env.is-open .env-letter { transform: translateY(-64%); }
.env.is-open .env-hint { opacity: 0; transition: opacity 0.4s; }

@media (min-width: 760px) {
  body.inv { font-size: 20px; }
  section { padding: 56px 28px; }
  .hero { padding-top: 90px; }
  .ev, .rsvp-card { padding: 40px 34px 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
