:root {
  --pine-900: #0c241a;
  --pine-800: #12321f;
  --pine-700: #17402e;
  --pine-600: #1f5139;
  --pine-500: #2c6a4b;
  --berry: #b9302b;
  --berry-dark: #8f2320;
  --gold: #e8b95a;
  --gold-soft: #f3d79a;
  --cream: #fbf3e2;
  --cream-2: #f2e6cc;
  --ink: #2a1f17;
  --ink-soft: #6b5a48;
  --radius: 18px;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  color: var(--cream);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(232, 185, 90, 0.16), transparent 60%),
    radial-gradient(800px 500px at 100% 40%, rgba(185, 48, 43, 0.12), transparent 60%),
    linear-gradient(180deg, var(--pine-700) 0%, var(--pine-800) 55%, var(--pine-900) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

a { color: var(--gold-soft); }

img { display: block; max-width: 100%; }

button, input, textarea { font: inherit; }

.snow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(1080px, 100% - 32px);
  margin: 0 auto;
}

.narrow { width: min(680px, 100% - 32px); }

.kicker {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold);
  margin: 0;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.6rem, 9vw, 4.8rem); }
h2 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
h3 { font-size: 1.25rem; }

.gold-text {
  background: linear-gradient(180deg, #fbe7b4 0%, var(--gold) 55%, #c9913a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.muted { color: rgba(251, 243, 226, 0.72); }

.sparkle-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  margin: 0 auto;
  max-width: 260px;
}
.sparkle-rule::before, .sparkle-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding: 56px 0 28px;
}
.hero h1 { margin: 10px 0 12px; }
.hero .lede { font-size: 1.12rem; max-width: 36ch; margin: 0 auto 18px; }

/* ---------- Stat cards ---------- */

.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 12px 0 8px;
}
@media (min-width: 720px) {
  .stats { grid-template-columns: 1fr 1.6fr; }
}

.card {
  background: rgba(12, 36, 26, 0.55);
  border: 1px solid rgba(232, 185, 90, 0.28);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.card.paper {
  background: var(--cream);
  color: var(--ink);
  border-color: rgba(0, 0, 0, 0.06);
}
.card.paper .muted { color: var(--ink-soft); }
.card.paper a { color: var(--berry); }

.budget {
  display: flex;
  align-items: center;
  gap: 16px;
}
.budget-amount {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1;
  color: var(--gold);
}
.budget-label { font-weight: 700; line-height: 1.3; }

.countdown-card .when { font-weight: 700; margin: 2px 0 12px; }

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.countdown .unit {
  background: linear-gradient(180deg, var(--berry) 0%, var(--berry-dark) 100%);
  border-radius: 12px;
  padding: 10px 4px 8px;
  text-align: center;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 4px 10px rgba(0, 0, 0, 0.2);
}
.countdown .num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 7vw, 2.3rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown .lbl {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-top: 4px;
}
.countdown.done { display: block; text-align: center; font-family: var(--font-display); font-size: 1.6rem; color: var(--gold); }

/* ---------- Pills ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  background: rgba(232, 185, 90, 0.14);
  border: 1px solid rgba(232, 185, 90, 0.4);
  color: var(--gold-soft);
}
.pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}
.pill.ok .dot { background: #8fd18a; box-shadow: 0 0 10px #8fd18a; }

/* ---------- Portrait wall ---------- */

.section { padding: 36px 0; }
.section-head { text-align: center; margin-bottom: 22px; }
.section-head h2 { margin-top: 6px; }

.portraits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 14px;
}

.polaroid {
  width: calc(50% - 7px);
  max-width: 220px;
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  padding: 8px 8px 0;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.3s ease;
}
.polaroid:hover { transform: rotate(0deg) translateY(-4px) scale(1.03); }
.polaroid .frame {
  aspect-ratio: 1;
  border-radius: 3px;
  overflow: hidden;
  background: var(--pine-700);
}
.polaroid img { width: 100%; height: 100%; object-fit: cover; }
.polaroid .name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  text-align: center;
  padding: 8px 0 10px;
}
@media (min-width: 720px) {
  .polaroid { width: calc(25% - 11px); }
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  counter-reset: step;
}
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding-top: 26px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -16px; left: 20px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--berry);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 800;
  box-shadow: 0 0 0 3px var(--pine-800), 0 0 0 4px var(--gold);
}
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; }

.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.rules li { display: flex; gap: 10px; align-items: flex-start; }
.rules li::before { content: "✦"; color: var(--gold); flex: none; }

footer {
  text-align: center;
  padding: 36px 0 48px;
  font-size: 0.9rem;
}

/* ---------- Buttons & forms ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  min-height: 46px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(180deg, #d23d36 0%, var(--berry) 60%, var(--berry-dark) 100%);
  color: var(--cream);
  box-shadow: 0 6px 16px rgba(143, 35, 32, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.15s ease, filter 0.15s ease;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.gold {
  background: linear-gradient(180deg, #f7d88e 0%, var(--gold) 60%, #c58e36 100%);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(197, 142, 54, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn.ghost {
  background: transparent;
  color: inherit;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.btn.small { padding: 8px 14px; min-height: 38px; font-size: 0.92rem; }

.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 0.9rem; }
.input, textarea.input {
  width: 100%;
  border-radius: 12px;
  border: 1.5px solid rgba(42, 31, 23, 0.18);
  background: #fffaf0;
  color: var(--ink);
  padding: 11px 13px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 185, 90, 0.35); }
textarea.input { min-height: 84px; resize: vertical; }

.form-status { font-weight: 700; font-size: 0.92rem; min-height: 1.4em; }
.form-status.error { color: var(--berry); }
.form-status.ok { color: var(--pine-500); }

/* ---------- States ---------- */

.center-state {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 0;
}
.spinner {
  width: 52px; height: 52px;
  margin: 0 auto 14px;
  color: var(--gold);
  animation: spin 2.4s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

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