/* ============================================================
   A & M — wedding invitation, Tinder edition
   ============================================================ */

:root {
  --ink: #17100f;
  --ink-soft: #4a3d3c;
  --cream: #fff7f0;
  --cream-2: #f8e9de;
  --rose: #fd267a;
  --orange: #ff6036;
  --pink-soft: #ffd9e4;
  --white: #fffdfb;
  --line: rgba(23, 16, 15, .12);
  --shadow: 0 24px 60px -20px rgba(20, 8, 12, .55);
  --font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #120c10;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }

/* ---------- grain ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: .16;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* ============================================================
   STAGE — swipe deck
   ============================================================ */

.stage {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: calc(14px + var(--safe-top)) 16px calc(18px + var(--safe-bottom));
  background:
    radial-gradient(120% 80% at 15% 0%, rgba(253, 38, 122, .42), transparent 55%),
    radial-gradient(110% 70% at 90% 25%, rgba(255, 96, 54, .26), transparent 55%),
    radial-gradient(90% 60% at 50% 110%, rgba(120, 30, 70, .55), transparent 60%),
    #120c10;
  overflow: hidden;
  isolation: isolate;
}

.stage::before,
.stage::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.stage::before {
  width: 44vmax; height: 44vmax;
  top: -22vmax; left: -10vmax;
  background: radial-gradient(circle, rgba(253, 38, 122, .28), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate;
}

.stage::after {
  width: 36vmax; height: 36vmax;
  bottom: -18vmax; right: -12vmax;
  background: radial-gradient(circle, rgba(255, 138, 61, .22), transparent 70%);
  animation: drift 22s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(3vmax, 4vmax, 0) scale(1.08); }
}

.topbar,
.deck-wrap,
.controls,
.hint,
.skip { position: relative; z-index: 2; }

.stage-side { display: none; }

@media (min-width: 1080px) {
  .stage-side {
    display: block;
    position: absolute;
    z-index: 1;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cream);
    pointer-events: none;
  }

  .stage-side--left {
    left: clamp(30px, 6vw, 100px);
    width: 240px;
  }

  .stage-side--left::before {
    content: "";
    display: block;
    width: 46px;
    height: 1px;
    margin-bottom: 20px;
    background: rgba(255, 247, 240, .38);
  }

  .stage-side__kicker {
    margin: 0;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: rgba(255, 217, 228, .8);
  }

  .stage-side__names {
    margin: 18px 0 20px;
    font-family: var(--font-display);
    font-size: clamp(48px, 4.4vw, 70px);
    font-weight: 400;
    line-height: .88;
    letter-spacing: -.01em;
  }

  .stage-side__names span { color: var(--rose); font-style: italic; }

  .stage-side__date {
    margin: 0;
    font-size: 10.5px;
    letter-spacing: .32em;
    color: rgba(255, 247, 240, .45);
  }

  .stage-side--right { right: clamp(20px, 3.4vw, 58px); }

  .stage-side__vertical {
    margin: 0;
    writing-mode: vertical-rl;
    font-size: 9.5px;
    letter-spacing: .36em;
    text-transform: uppercase;
    color: rgba(255, 247, 240, .38);
  }
}

.topbar {
  width: min(100%, 430px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--cream);
}

.monogram {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: .06em;
  font-weight: 500;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .35);
}

.monogram span {
  font-size: .62em;
  color: var(--pink-soft);
  transform: translateY(-2px);
}

.topbar__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.date-pill {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 247, 240, .26);
  background: rgba(255, 247, 240, .08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-weight: 500;
}

.counter {
  font-variant-numeric: tabular-nums;
  color: rgba(255, 247, 240, .62);
  letter-spacing: .1em;
}

/* ---------- deck ---------- */

.deck-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.deck {
  position: relative;
  width: min(88vw, 384px, calc((100svh - 310px) * .74));
  aspect-ratio: 3 / 4.08;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.deck-empty {
  max-width: 300px;
  color: var(--cream);
  text-align: center;
  font-size: 15px;
  opacity: .8;
}

.card {
  position: absolute;
  inset: 0;
  border-radius: 26px;
  overflow: hidden;
  background: #2a1a20;
  box-shadow: var(--shadow), 0 2px 0 rgba(255, 255, 255, .18) inset;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--white);
  will-change: transform, opacity;
  transform-origin: 50% 90%;
  transition: transform .45s cubic-bezier(.2, .8, .25, 1), opacity .35s ease;
  cursor: grab;
  backface-visibility: hidden;
}

.card:active { cursor: grabbing; }

.card:focus-visible {
  outline: 3px solid #ffd166;
  outline-offset: 3px;
}

.card.is-top { z-index: 10; }
.card.is-dragging { transition: none; }

.card.is-gone { transition: transform .42s cubic-bezier(.3, .7, .3, 1), opacity .42s ease; opacity: 0; }

.card__media,
.card__art,
.card__photo {
  position: absolute;
  inset: 0;
}

.card__media {
  background: linear-gradient(160deg, #f7c9b6, #d8577a 60%, #5c1b34);
  z-index: 0;
}

.card__art {
  background:
    radial-gradient(60% 45% at 28% 22%, var(--a1, #ffd9c0), transparent 70%),
    radial-gradient(55% 50% at 78% 18%, var(--a2, #ff8fa3), transparent 70%),
    radial-gradient(70% 60% at 70% 85%, var(--a3, #7d2447), transparent 75%),
    linear-gradient(155deg, var(--a4, #ffc2a8), var(--a5, #b03a63) 70%, #4a1228);
  filter: saturate(1.08);
}

.card__art::before,
.card__art::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: soft-light;
}

.card__art::before {
  width: 62%; aspect-ratio: 1;
  top: 6%; right: -14%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .85), transparent 62%);
}

.card__art::after {
  width: 48%; aspect-ratio: 1;
  bottom: 12%; left: -8%;
  background: radial-gradient(circle at 60% 40%, rgba(255, 235, 220, .5), transparent 65%);
}

.card__pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cpath d='M18 24c-3-4.5-10 0-6.5 4.5L18 35l6.5-6.5C28 24 21 19.5 18 24z' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='1'/%3E%3Ccircle cx='52' cy='54' r='2' fill='rgba(255,255,255,0.45)'/%3E%3C/svg%3E");
  background-size: 72px 72px;
}

.card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.card__shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(to top, rgba(18, 8, 12, .92) 0%, rgba(18, 8, 12, .55) 36%, rgba(18, 8, 12, .08) 62%, rgba(18, 8, 12, .18) 100%);
}

.card__body {
  position: relative;
  z-index: 3;
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.card__kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--pink-soft);
}

.card__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 8.4vw, 38px);
  line-height: 1.02;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.card__title em {
  font-style: italic;
  color: #ffd7c4;
}

.card__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 247, 240, .84);
  max-width: 32ch;
}

.card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.card__chips li {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .02em;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 247, 240, .28);
  background: rgba(255, 247, 240, .1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
}

.card__badge {
  position: absolute;
  z-index: 4;
  top: 16px;
  left: 16px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(18, 8, 12, .4);
  border: 1px solid rgba(255, 247, 240, .28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* stamps */

.card__stamp {
  position: absolute;
  z-index: 5;
  top: 30%;
  padding: 8px 14px;
  border: 3px solid currentColor;
  border-radius: 8px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
}

.card__stamp--like {
  left: 20px;
  color: #4ade80;
  transform: rotate(-14deg);
  opacity: var(--like-op, 0);
}

.card__stamp--nope {
  right: 20px;
  color: #ff5d73;
  transform: rotate(14deg);
  opacity: var(--nope-op, 0);
}

/* controls */

.controls {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 2px;
}

.ctrl {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 0;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .7);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  -webkit-tap-highlight-color: transparent;
}

.ctrl svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ctrl:hover { transform: translateY(-3px) scale(1.04); }
.ctrl:active { transform: scale(.94); }
.ctrl:focus-visible { outline: 3px solid #ffd166; outline-offset: 3px; }

.ctrl--nope { color: #ff4d6d; }
.ctrl--like {
  width: 68px; height: 68px;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  color: #fff;
  box-shadow: 0 18px 40px -12px rgba(253, 38, 122, .75);
}
.ctrl--like svg { fill: currentColor; stroke: none; }
.ctrl--info { width: 50px; height: 50px; color: #e0a11c; }
.ctrl--info svg { width: 22px; height: 22px; }

.ctrl:disabled { opacity: .35; pointer-events: none; }

.hint {
  margin: 0;
  font-size: 12px;
  letter-spacing: .04em;
  color: rgba(255, 247, 240, .52);
  text-align: center;
}

.hint span { color: var(--rose); }

.guest-note {
  margin: 0;
  max-width: min(90vw, 380px);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 247, 240, .22);
  background: rgba(255, 247, 240, .08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffd9e4;
  font-size: 11.5px;
  letter-spacing: .03em;
  text-align: center;
}

.guest-note::before {
  content: "♥";
  margin-right: 7px;
  color: var(--rose);
}

.skip {
  border: 0;
  background: none;
  color: rgba(255, 247, 240, .62);
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  padding: 2px 6px;
}

.skip:hover { color: var(--cream); }

/* ============================================================
   MATCH overlay
   ============================================================ */

.match {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 6, 10, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: fadeIn .35s ease both;
}

.match__card {
  position: relative;
  z-index: 2;
  width: min(100%, 420px);
  padding: 40px 28px 26px;
  border-radius: 30px;
  text-align: center;
  color: var(--ink);
  background:
    radial-gradient(120% 90% at 50% -10%, #ffe3cf, transparent 60%),
    var(--cream);
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .75);
  animation: popIn .5s cubic-bezier(.2, 1.4, .4, 1) both;
}

.match__kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--rose);
}

.match__card h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(40px, 12vw, 54px);
  font-weight: 500;
  line-height: .95;
  letter-spacing: -.02em;
}

.match__card h2::after {
  content: "♥";
  display: block;
  font-size: .42em;
  color: var(--rose);
  margin-top: 12px;
  animation: heartbeat 1.6s ease-in-out infinite;
}

.match__card p {
  margin: 0 auto 24px;
  max-width: 30ch;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.match__btn {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 16px 20px;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  cursor: pointer;
  box-shadow: 0 16px 34px -12px rgba(253, 38, 122, .8);
  transition: transform .18s ease, box-shadow .18s ease;
}

.match__btn:hover { transform: translateY(-2px); }
.match__btn:active { transform: scale(.98); }

.match__skip {
  margin-top: 10px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 6px;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.18); }
  28% { transform: scale(1); }
  42% { transform: scale(1.12); }
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(24px) scale(.94); }
  to   { opacity: 1; transform: none; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* confetti */

.confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti--page {
  position: fixed;
  z-index: 70;
}

.confetti i {
  position: absolute;
  top: -8vh;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  opacity: .95;
  animation: confettiFall var(--dur, 3s) linear var(--delay, 0s) forwards;
}

@keyframes confettiFall {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { transform: translate3d(var(--drift, 0px), 112vh, 0) rotate(var(--spin, 540deg)); }
}

/* ============================================================
   CONTENT
   ============================================================ */

.content {
  display: none;
  background:
    radial-gradient(90% 30% at 50% 0%, #ffe9db, transparent 70%),
    var(--cream);
}

body.is-revealed .content { display: block; }

body.is-revealed .stage {
  min-height: auto;
  padding-bottom: 34px;
}

body.is-revealed .deck-wrap,
body.is-revealed .controls,
body.is-revealed .hint { display: none; }

body.is-revealed .skip { display: none; }

.section {
  width: min(100%, 940px);
  margin: 0 auto;
  padding: clamp(36px, 7vw, 72px) clamp(18px, 5vw, 40px);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}

.section.is-visible {
  opacity: 1;
  transform: none;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--rose);
}

.section-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 6.5vw, 50px);
  line-height: 1.02;
  letter-spacing: -.015em;
  text-wrap: balance;
}

.lead {
  margin: 0 0 28px;
  max-width: 52ch;
  color: var(--ink-soft);
  font-size: 16px;
}

/* countdown */

.section--countdown {
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.section--countdown .eyebrow { margin-bottom: 16px; }

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 2vw, 16px);
  max-width: 620px;
  margin: 0 auto;
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: clamp(12px, 3vw, 20px) 4px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .6);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px -20px rgba(60, 20, 30, .5);
}

.countdown__num {
  font-family: var(--font-display);
  font-size: clamp(30px, 9vw, 46px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.countdown__label {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* info grid */

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 640px) {
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.info-card {
  position: relative;
  padding: 24px 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .66);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px -30px rgba(60, 20, 30, .6);
  transition: transform .25s ease, box-shadow .25s ease;
}

.info-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 50px -30px rgba(60, 20, 30, .7);
}

.info-card__icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 13px;
  font-size: 20px;
  background: linear-gradient(135deg, #ffe1d6, #ffd0dd);
}

.info-card__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #b0134f;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.info-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.1;
}

.info-card p {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

.info-card p strong {
  color: var(--ink);
  font-weight: 600;
}

.info-card .info-card__note {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: #7a6664;
}

.text-link {
  display: inline-block;
  margin-top: 2px;
  color: var(--rose);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(253, 38, 122, .35);
  padding-bottom: 1px;
}

.text-link:hover { border-bottom-color: var(--rose); }

/* timeline */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 640px;
  counter-reset: step;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 18px;
  padding: 0 0 28px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 86px;
  top: 6px;
  bottom: -6px;
  width: 1px;
  background: linear-gradient(to bottom, rgba(253, 38, 122, .5), transparent);
}

.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }

.timeline time {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--rose);
  letter-spacing: .01em;
  padding-top: 1px;
}

.timeline h3 {
  margin: 0 0 3px;
  font-size: 16px;
  font-weight: 700;
}

.timeline p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

/* gift note */

.note-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: clamp(22px, 4vw, 32px);
  border-radius: 26px;
  background: linear-gradient(135deg, #2a121c, #451a2b 55%, #63203a);
  color: var(--cream);
  box-shadow: 0 30px 60px -30px rgba(40, 10, 20, .8);
}

.note-card__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255, 247, 240, .1);
  border: 1px solid rgba(255, 247, 240, .16);
}

.note-card__icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #ffd9e4;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.note-card h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
}

.note-card p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 247, 240, .8);
  max-width: 60ch;
}

/* ============================================================
   RSVP
   ============================================================ */

.section--rsvp {
  max-width: 720px;
}

.rsvp {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: clamp(20px, 4vw, 32px);
  border-radius: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px -40px rgba(60, 20, 30, .6);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.field > label,
.field legend {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0;
}

.field > label[for] { margin-bottom: -2px; }

input[type="text"],
textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(23, 16, 15, .16);
  background: #fffaf6;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  resize: vertical;
}

input[type="text"]::placeholder,
textarea::placeholder { color: #a8928c; }

input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--rose);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(253, 38, 122, .12);
}

input[type="text"][readonly] {
  color: var(--ink-soft);
  border-style: dashed;
  background: rgba(23, 16, 15, .035);
  cursor: default;
}

.field.has-error input[type="text"] {
  border-color: #e11d48;
  box-shadow: 0 0 0 4px rgba(225, 29, 72, .1);
}

.field__error {
  margin: 0;
  font-size: 12.5px;
  color: #d01545;
}

.choice-row {
  display: flex;
  gap: 10px;
}

.choice-row--wrap { flex-wrap: wrap; }

.choice {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}

.choice input,
.chip-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 52px;
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(23, 16, 15, .14);
  background: #fffaf6;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.choice span:hover { border-color: rgba(253, 38, 122, .5); }

.choice input:checked + span {
  border-color: var(--rose);
  background: linear-gradient(135deg, rgba(253, 38, 122, .1), rgba(255, 96, 54, .1));
  color: #b0134f;
  font-weight: 600;
}

.choice input:focus-visible + span,
.chip-check input:focus-visible + span {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

.chip-check span {
  display: inline-flex;
  align-items: center;
  padding: 10px 15px;
  border-radius: 999px;
  border: 1px solid rgba(23, 16, 15, .14);
  background: #fffaf6;
  font-size: 13.5px;
  cursor: pointer;
  transition: all .18s ease;
}

.chip-check input:checked + span {
  border-color: transparent;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  color: #fff;
  box-shadow: 0 10px 20px -12px rgba(253, 38, 122, .9);
}

.check-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 2px 0;
}

.check-line input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--rose);
  cursor: pointer;
  flex: none;
}

.submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 17px 20px;
  border: 0;
  border-radius: 16px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  cursor: pointer;
  box-shadow: 0 18px 36px -14px rgba(253, 38, 122, .8);
  transition: transform .18s ease, box-shadow .18s ease;
}

.submit svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}

.submit:hover { transform: translateY(-2px); }
.submit:hover svg { transform: translateX(3px); }
.submit:active { transform: scale(.99); }

.form-note {
  margin: -6px 0 0;
  font-size: 12px;
  color: #8a7672;
  text-align: center;
}

.thanks {
  padding: clamp(26px, 5vw, 40px);
  border-radius: 26px;
  background:
    radial-gradient(110% 90% at 50% 0%, #ffe3d2, transparent 60%),
    var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px -40px rgba(60, 20, 30, .6);
  text-align: center;
  animation: popIn .45s cubic-bezier(.2, 1.2, .4, 1) both;
}

.thanks__heart {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  font-size: 30px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 16px 30px -12px rgba(253, 38, 122, .75);
  animation: heartbeat 1.8s ease-in-out infinite;
}

.thanks h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(28px, 7vw, 36px);
  font-weight: 500;
}

.thanks p {
  margin: 0 auto 22px;
  max-width: 42ch;
  color: var(--ink-soft);
  font-size: 14.5px;
}

.thanks__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.btn {
  padding: 13px 20px;
  border-radius: 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn--light {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 14px 26px -14px rgba(253, 38, 122, .85);
}

.btn--ghost {
  border: 1px solid rgba(23, 16, 15, .16);
  background: transparent;
  color: var(--ink);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.98); }

.thanks__reset {
  margin-top: 18px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  color: #8a7672;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 4px;
}

/* footer */

.footer {
  padding: 46px 20px calc(52px + var(--safe-bottom));
  text-align: center;
  background: #1a1014;
  color: rgba(255, 247, 240, .7);
  font-size: 13px;
}

.footer p { margin: 0 0 6px; }

.footer__monogram {
  font-family: var(--font-display);
  font-size: 34px;
  color: var(--cream);
  letter-spacing: .08em;
  margin-bottom: 12px !important;
}

.footer__small {
  margin-top: 14px !important;
  font-size: 11.5px;
  color: rgba(255, 247, 240, .38);
}

/* toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + var(--safe-bottom));
  z-index: 95;
  transform: translate(-50%, 16px);
  max-width: min(90vw, 360px);
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 253, 251, .96);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .55);
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============================================================
   RESPONSIVE / MOTION
   ============================================================ */

@media (max-width: 520px) {
  .deck { width: min(90vw, calc((100svh - 300px) * .74)); }
  .timeline li { grid-template-columns: 64px 1fr; gap: 14px; }
  .timeline li::before { left: 74px; }
  .timeline time { font-size: 21px; }
  .note-card { flex-direction: column; gap: 14px; }
}

@media (max-width: 360px) {
  .ctrl { width: 52px; height: 52px; }
  .ctrl--like { width: 62px; height: 62px; }
  .card__body { padding: 18px; }
}

@media (orientation: landscape) and (max-height: 620px) {
  .stage {
    flex-direction: row;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    gap: 10px 20px;
    padding: 10px 16px calc(10px + var(--safe-bottom));
  }

  .topbar { flex: 0 0 100%; width: min(100%, 560px); }
  .monogram { font-size: 20px; }
  .date-pill { padding: 4px 9px; }

  .deck-wrap { flex: 0 0 auto; width: auto; }
  .deck { width: max(215px, min(42vw, calc((100svh - 120px) * .74))); }

  .controls { flex-direction: column; gap: 9px; padding-top: 0; }
  .ctrl { width: 44px; height: 44px; }
  .ctrl--like { width: 52px; height: 52px; }
  .ctrl--info { width: 38px; height: 38px; }
  .ctrl svg { width: 20px; height: 20px; }

  .hint, .skip { display: none; }

  .card__body { padding: 13px 15px 15px; gap: 6px; }
  .card__kicker { font-size: 9.5px; }
  .card__title { font-size: 24px; }
  .card__text { font-size: 12px; }
  .card__chips { gap: 5px; }
  .card__chips li { font-size: 9.5px; padding: 4px 8px; }
  .card__badge { top: 10px; left: 10px; font-size: 9px; padding: 5px 9px; }
  .card__stamp { font-size: 18px; padding: 6px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
