/* ── Wedding RSVP + Photo Share — pressed-flower stationery ─────────
   Blush and cream with dusty sage, hand-drawn botanical line art,
   tall romantic serif with an italic ampersand, keepsake prints with
   cream mats and soft shadows, tiny gold-foil dot accents. */

:root {
  --cream: #fdf9f4;
  --blush: #f6e8e2;
  --blush-deep: #e8cfc4;
  --sage: #8ba188;
  --sage-deep: #5f7a5c;
  --ink: #4a4340;
  --ink-soft: #8d827c;
  --gold: #c9a24b;
  --err: #b3543f;
  --serif: 'Playfair Display', serif;
  --sans: 'Karla', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.hidden { display: none !important; }

body {
  font-family: var(--sans);
  background:
    radial-gradient(ellipse at 15% 0%, var(--blush) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 100%, var(--blush) 0%, transparent 45%),
    var(--cream);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.page { display: flex; flex-direction: column; min-height: 100vh; }

.wrap { width: 100%; max-width: 700px; margin: 0 auto; padding: 0 24px; }

main { flex: 1 0 auto; padding-bottom: 70px; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  text-align: center;
  padding: 74px 24px 30px;
  overflow: hidden;
}

.botanical {
  position: absolute;
  width: 110px;
  height: 190px;
  color: var(--sage);
  opacity: 0.55;
}

.bot-left { left: 4%; top: 26px; transform: rotate(-8deg); }
.bot-right { right: 4%; top: 26px; transform: rotate(8deg); }

.eyebrow {
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 10vw, 4.4rem);
  line-height: 1.08;
  color: var(--ink);
}

.amp {
  font-style: italic;
  font-weight: 500;
  color: var(--sage-deep);
  padding: 0 0.08em;
}

.date-line {
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-top: 22px;
  color: var(--ink);
}

.venue-line { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--ink-soft); margin-top: 8px; }

.note-line { font-size: 0.92rem; color: var(--ink-soft); margin-top: 14px; }

.gold-dots { display: inline-flex; gap: 9px; margin-top: 24px; }

.gold-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  display: block;
}

.gold-dots i:nth-child(2) { transform: translateY(-3px); }

/* ── Tabs ─────────────────────────────────────────────────────────── */
.tabs { display: flex; justify-content: center; gap: 30px; margin: 26px 0 26px; border-bottom: 1px solid var(--blush-deep); }

.tab {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 12px 4px 14px;
  background: none;
  color: var(--ink-soft);
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s ease;
  margin-bottom: -1px;
}

.tab:hover { color: var(--ink); }

.tab.is-active { color: var(--sage-deep); border-bottom-color: var(--sage-deep); }

/* ── Cards ────────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid var(--blush-deep);
  border-radius: 4px;
  padding: 36px 32px;
  margin-bottom: 18px;
  box-shadow: 0 14px 34px rgba(74, 67, 64, 0.07);
}

.card h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.7rem;
  margin-bottom: 6px;
  text-align: center;
}

.card-sub { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 24px; text-align: center; max-width: 440px; margin-left: auto; margin-right: auto; }

.note {
  margin: 18px 0;
  padding: 16px 20px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid var(--blush-deep);
  border-left: 4px solid var(--sage);
  text-align: center;
}

/* ── Fields ───────────────────────────────────────────────────────── */
.field { margin-bottom: 18px; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

label, legend {
  display: block;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 7px;
  color: var(--ink);
}

.optional {
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 13px 15px;
  font-size: 1rem;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--blush-deep);
  border-radius: 3px;
  transition: border-color 0.15s ease;
}

input:focus { outline: none; border-color: var(--sage-deep); }
input.error { border-color: var(--err); }
input::placeholder { color: #bfb3ab; }

.attending { border: none; margin: 4px 0 18px; }

.attend-row { display: flex; gap: 12px; }

.attend-opt { position: relative; flex: 1; cursor: pointer; margin: 0; }

.attend-opt input { position: absolute; opacity: 0; }

.attend-opt span {
  display: block;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-soft);
  padding: 12px 10px;
  border: 1px solid var(--blush-deep);
  border-radius: 3px;
  transition: all 0.18s ease;
}

.attend-opt input:checked + span {
  color: #fff;
  background: var(--sage-deep);
  border-color: var(--sage-deep);
}

.attend-opt input:focus-visible + span { outline: 2px solid var(--sage-deep); outline-offset: 3px; }

/* ── Dropzone ─────────────────────────────────────────────────────── */
.drop {
  position: relative;
  border: 1.5px dashed var(--sage);
  border-radius: 4px;
  background: rgba(139, 161, 136, 0.06);
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  overflow: hidden;
  transition: background 0.15s ease;
}

.drop:hover { background: rgba(139, 161, 136, 0.12); }

.drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.drop-inner { text-align: center; padding: 18px; }

.drop-icon { font-size: 1.6rem; color: var(--sage-deep); display: block; margin-bottom: 4px; }

.drop-text { font-weight: 600; font-size: 0.95rem; }

.drop-hint { color: var(--ink-soft); font-size: 0.8rem; margin-top: 3px; }

.preview { width: 100%; max-height: 280px; object-fit: cover; display: block; }

.form-error { color: var(--err); font-weight: 600; text-align: center; margin-top: 12px; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 16px 30px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
  line-height: 1.2;
}

.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--sage-deep); outline-offset: 3px; }

.btn-primary { background: var(--sage-deep); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #4c6349; }

.btn-ghost {
  background: transparent;
  color: var(--sage-deep);
  border: 1px solid var(--sage);
  padding: 12px 22px;
}

.btn-block { width: 100%; }

.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Confirmed ────────────────────────────────────────────────────── */
.confirmed { text-align: center; }

.confirmed .gold-dots { margin: 0 0 16px; }

.my-photo {
  max-width: 240px;
  width: 100%;
  border: 8px solid #fff;
  outline: 1px solid var(--blush-deep);
  box-shadow: 0 12px 28px rgba(74, 67, 64, 0.16);
  margin: 6px auto 20px;
  display: block;
  transform: rotate(-1.5deg);
}

/* ── Keepsake wall ────────────────────────────────────────────────── */
.gallery-head { text-align: center; margin-bottom: 24px; }

.gallery-head h2 { font-family: var(--serif); font-weight: 600; font-size: 1.8rem; }

.gallery-sub { color: var(--ink-soft); font-size: 0.85rem; margin-top: 4px; letter-spacing: 0.08em; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.print {
  background: #fff;
  padding: 10px 10px 14px;
  border: 1px solid var(--blush-deep);
  box-shadow: 0 10px 22px rgba(74, 67, 64, 0.1);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.print:nth-child(3n+1) { transform: rotate(-1.2deg); }
.print:nth-child(3n+2) { transform: rotate(0.8deg); }
.print:nth-child(3n) { transform: rotate(-0.4deg); }

.print:hover { transform: rotate(0) translateY(-4px); box-shadow: 0 18px 34px rgba(74, 67, 64, 0.18); }

.print-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.print-caption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.86rem;
  color: var(--ink);
  margin-top: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.print-author {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 5px;
}

/* ── Empty / load more ────────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 46px 20px;
  background: #fff;
  border: 1.5px dashed var(--blush-deep);
  border-radius: 4px;
}

.empty-icon { font-size: 2rem; color: var(--sage-deep); display: block; margin-bottom: 10px; }

.empty-sub { color: var(--ink-soft); margin: 6px 0 20px; }

.load-wrap { text-align: center; margin-top: 28px; }

/* ── Lightbox ─────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(74, 67, 64, 0.88);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lb-content {
  background: #fff;
  padding: 14px 14px 20px;
  max-width: 520px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
}

.lb-img { width: 100%; max-height: 58vh; object-fit: contain; display: block; background: var(--cream); }

.lb-meta { padding: 16px 8px 0; text-align: center; }

.lb-caption { font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--ink); line-height: 1.5; }

.lb-author {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 8px;
}

.lb-close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 2rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  z-index: 2;
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.4rem;
  background: rgba(255, 255, 255, 0.16);
  border: none;
  color: #fff;
  cursor: pointer;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  line-height: 1;
}

.lb-prev { left: 14px; }
.lb-next { right: 14px; }

/* ── Toast ────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sage-deep);
  color: #fff;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 3px;
  z-index: 200;
  box-shadow: 0 10px 26px rgba(74, 67, 64, 0.35);
}

/* ── Footer ───────────────────────────────────────────────────────── */
.footer {
  flex-shrink: 0;
  text-align: center;
  padding: 26px 20px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

#wbx-powered-by-slot { margin-top: 12px; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .field-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .attend-row { flex-direction: column; }
  .botanical { width: 70px; height: 120px; opacity: 0.35; }
  .lb-nav { display: none; }
}
