/* ============================================================
   Nadia & Carlos — Wedding Site
   Cream-paper / hand-drawn / sketch aesthetic
   Single centered column — faithful to the original card.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Caveat+Brush&family=Caveat:wght@500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap");

:root {
  --paper:    #f3ede0;
  --paper-2:  #ece5d4;
  --paper-3:  #e6ddc9;
  --ink:      #1a1714;
  --ink-soft: #3a342c;
  --ink-mute: #6e6557;
  --line:     rgba(26, 23, 20, 0.22);
  --line-2:   rgba(26, 23, 20, 0.12);
  --sheet-w:  600px;
}


* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { position: relative; overflow-x: hidden; }

button, input { font-family: inherit; }
img { -webkit-user-drag: none; user-select: none; }
::selection { background: var(--ink); color: var(--paper); }

/* ---------- Paper grain over the whole page ---------- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.09  0 0 0 0 0.07  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
  mix-blend-mode: multiply;
  opacity: 0.55;
}
.topbar, .sheet { position: relative; z-index: 2; }

/* ---------- Decorative asterisks ---------- */
.aster {
  position: absolute;
  color: var(--ink);
  z-index: 2;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  opacity: 0.8;
}
.aster svg { display: block; width: 100%; height: 100%; }
.aster.float { animation: asterFloat 5.5s ease-in-out infinite; }
.aster.float.b { animation-delay: 1.4s; }
.aster.float.c { animation-delay: 2.8s; }
.aster.float.d { animation-delay: 4s; }
@keyframes asterFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-7px) rotate(16deg); }
}

/* Desktop-only asterisks — fixed to viewport, spread outside the card */
.desk-aster { position: fixed; }
@media (max-width: 700px) { .desk-aster { display: none; } }

/* Hand-drawn stickers (transparent black-ink PNGs) */
.sticker { position: absolute; pointer-events: none; z-index: 2; }

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px clamp(20px, 5vw, 56px);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-2);
  letter-spacing: 0.3em;
  font-size: 11px;
  text-transform: uppercase;
}
.topbar .tb-left  { font-weight: 600; letter-spacing: 0.3em; }
.topbar .tb-right { font-family: "Caveat", cursive; font-size: 18px; letter-spacing: 0.04em; text-transform: none; }
.topbar .tb-mid {
  font-family: "Caveat", cursive;
  font-size: 19px;
  letter-spacing: 0.06em;
  text-transform: none;
  white-space: nowrap;
  color: var(--ink-soft);
}
@media (max-width: 560px) {
  .topbar { letter-spacing: 0.2em; }
  .topbar .tb-mid { display: none; }
}

/* ============================================================
   SHEET — the centered card column
   ============================================================ */
.sheet {
  max-width: var(--sheet-w);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 76px) clamp(24px, 6vw, 40px) clamp(48px, 7vw, 72px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 1 · eyebrow */
.eyebrow {
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 0.4em;
  font-size: clamp(12px, 1.6vw, 15px);
  font-weight: 500;
  text-transform: uppercase;
  margin: 0 0 clamp(14px, 2.4vw, 22px);
  color: var(--ink-soft);
  white-space: nowrap;
}

/* 2 · names (stacked: Nadia / & / Carlos) */
.names {
  font-family: "Caveat Brush", cursive;
  color: var(--ink);
  font-size: clamp(60px, 13vw, 124px);
  line-height: 0.9;
  letter-spacing: 0.16em;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0px, 0.6vw, 6px);
}
.names .amp {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 0.46em;
  letter-spacing: 0;
  color: var(--ink);
  margin: -0.06em 0;
}

/* 3 · date */
.date-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: clamp(22px, 4vw, 34px);
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  letter-spacing: 0.24em;
  font-size: clamp(15px, 2.2vw, 22px);
  text-transform: uppercase;
  color: var(--ink);
}
.date-sep {
  display: inline-block;
  width: 1px; height: 0.95em;
  background: var(--ink);
  opacity: 0.5;
  margin: 0 clamp(14px, 2.4vw, 22px);
}

/* 4 · countdown */
.countdown {
  width: 100%;
  margin: clamp(34px, 5vw, 52px) 0 0;
  padding: clamp(26px, 4vw, 38px) 0;
}
.cd-eyebrow {
  font-family: "Caveat", cursive;
  font-size: clamp(22px, 3vw, 30px);
  color: var(--ink-soft);
  margin: 0 0 clamp(16px, 2.4vw, 24px);
  letter-spacing: 0.02em;
}
.cd-grid {
  display: flex;
  justify-content: center;
  max-width: 480px;
  margin: 0 auto;
}
.cd-cell {
  flex: 1;
  padding: 4px clamp(8px, 3vw, 22px);
  border-right: 1px solid var(--line);
}
.cd-cell:last-child { border-right: none; }
.cd-num {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(44px, 9vw, 76px);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cd-lab {
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 0.22em;
  font-size: clamp(9px, 1.3vw, 12px);
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: clamp(8px, 1.4vw, 13px);
}

/* 5 · illustration */
.illo {
  position: relative;
  width: 100%;
  height: clamp(270px, 46vw, 372px);
  margin: clamp(26px, 4vw, 40px) 0 clamp(6px, 1.5vw, 12px);
}
.illo .wine {
  width: clamp(150px, 25vw, 205px);
  left: 50%;
  bottom: 0;
  transform: translateX(-56%) rotate(-3deg);
}
.illo .pom {
  width: clamp(78px, 13vw, 110px);
  right: 8%;
  bottom: 6px;
  transform: rotate(5deg);
}

/* 6 · calendar button — full width, matches the form below */
.cal-row { width: 100%; margin: clamp(8px, 2vw, 16px) 0 clamp(14px, 2.4vw, 20px); }
.btn-ink {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}
.btn-ink svg { width: 16px; height: 16px; }
.btn-ink:active { transform: scale(0.97); }

/* shared ink-button pattern */
.btn-ink,
.rsvp-submit {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 150ms, background 200ms, color 200ms;
}
.btn-ink:hover,
.rsvp-submit:hover { background: transparent; color: var(--ink); }

/* 7 · RSVP form */
.rsvp-form {
  width: 100%;
  text-align: left;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(24px, 4vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 15px;
  box-shadow: 0 1px 0 var(--line-2), 0 24px 50px -42px rgba(26,23,20,0.5);
}
.rsvp-pill {
  align-self: flex-start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--ink);
}
.rsvp-h {
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
  font-size: clamp(34px, 5vw, 46px);
  margin: 6px 0 0;
  line-height: 1;
  color: var(--ink);
}
.rsvp-sub {
  font-size: clamp(14px, 1.7vw, 16px);
  color: var(--ink-mute);
  margin: 0 0 6px;
  font-style: italic;
}
.rsvp-field { display: flex; flex-direction: column; gap: 7px; }
.rsvp-lab {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
.rsvp-text {
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  width: 100%;
  outline: none;
  transition: border-color 180ms;
}
.rsvp-text:focus { border-color: var(--ink); }
.rsvp-text::placeholder { color: var(--ink-mute); opacity: 0.7; }

.rsvp-choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rsvp-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  color: var(--ink-soft);
  transition: all 170ms;
}
.rsvp-choice:hover { border-color: var(--ink-soft); color: var(--ink); }
.rsvp-choice:active { transform: scale(0.98); }
.rsvp-choice.sel { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.rsvp-choice svg { width: 22px; height: 22px; }
.rsvp-choice-label { font-size: 14px; font-weight: 500; }

.rsvp-error {
  font-style: italic;
  font-size: 13.5px;
  color: #b54a2c;
  background: rgba(181, 74, 44, 0.07);
  border: 1px solid rgba(181, 74, 44, 0.25);
  border-radius: 10px;
  padding: 9px 12px;
  text-align: center;
}

.rsvp-submit {
  padding: 15px 24px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.16em;
  margin-top: 4px;
}
.rsvp-submit:active { transform: scale(0.985); }

/* Guest rows */
.rsvp-guest-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.rsvp-guest-row .rsvp-text { flex: 1; margin: 0; }
.rsvp-remove-guest {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-mute);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 150ms, color 150ms, border-color 150ms;
  padding: 0;
}
.rsvp-remove-guest:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}
.rsvp-add-guest {
  background: none;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  width: 100%;
  color: var(--ink-soft);
  font-size: 13px;
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 0.08em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: border-color 150ms, color 150ms;
}
.rsvp-add-guest:hover { border-color: var(--ink-soft); color: var(--ink); }
.rsvp-add-guest svg { flex-shrink: 0; }

/* Thanks state */
.rsvp-thanks { align-items: flex-start; }
.rsvp-mini-link {
  background: none;
  border: none;
  color: var(--ink-mute);
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 4px 0;
  align-self: center;
}
.rsvp-mini-link:hover { color: var(--ink); }

/* 8 · signature */
.foot-rule {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  margin: clamp(34px, 5vw, 48px) auto 0;
  width: 100%;
  max-width: 420px;
}
.foot-rule .ln { flex: 1; height: 1px; background: var(--ink); opacity: 0.35; }
.foot-rule .sig {
  font-family: "Caveat", cursive;
  font-size: clamp(18px, 2.6vw, 24px);
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--paper);
  font-family: "Cormorant Garamond", serif;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 200ms, transform 250ms;
  pointer-events: none;
  z-index: 80;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 1; transform: none; }
html.anim .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms ease, transform 700ms ease;
}
html.anim .reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 80ms; }
.reveal.d2 { transition-delay: 160ms; }
.reveal.d3 { transition-delay: 240ms; }
@media (prefers-reduced-motion: reduce) {
  html.anim .reveal { opacity: 1; transform: none; transition: none; }
  .aster.float { animation: none; }
}
