/* Palette pulled from newcity.life/christmas */
:root {
  --red: #9C3018;
  --red-dark: #7d2613;
  --red-soft: #f6e9e3;
  --sage: #6E7A56;
  --sage-soft: #e9ecdf;
  --cream: #EDE6CF;
  --paper: #F8F5EE;
  --ink: #333746;
  --night: #0d0d0e;
  --muted: #6c6f78;
  --card: #ffffff;
  --line: #e4dcc6;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
/* Dark canvas so the iOS/macOS overscroll bounce matches the black header and footer */
html { background: var(--night); }
body { min-height: 100vh; display: flow-root; }
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, .display { font-family: "Anton", Impact, sans-serif; font-weight: 400; line-height: 1.05; letter-spacing: .01em; text-transform: uppercase; }
a { color: var(--red); }

/* Hero */
.hero {
  background: var(--night);
  color: var(--cream);
  padding: 52px 16px 84px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before { /* soft string-light bokeh */
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 12% 22%, rgba(156,48,24,.55) 0 3px, transparent 10px),
    radial-gradient(circle at 86% 18%, rgba(237,230,207,.5) 0 2px, transparent 9px),
    radial-gradient(circle at 78% 70%, rgba(110,122,86,.6) 0 3px, transparent 11px),
    radial-gradient(circle at 22% 78%, rgba(237,230,207,.35) 0 2px, transparent 8px),
    radial-gradient(circle at 50% 8%, rgba(156,48,24,.35) 0 2px, transparent 9px),
    radial-gradient(circle at 94% 52%, rgba(156,48,24,.4) 0 2px, transparent 8px),
    radial-gradient(circle at 5% 55%, rgba(110,122,86,.45) 0 2px, transparent 9px);
}
.hero > * { position: relative; }
.eyebrow { text-transform: uppercase; letter-spacing: .32em; font-size: 12px; font-weight: 700; color: rgba(237,230,207,.75); margin: 0 0 14px; }
.hero h1 {
  font-size: clamp(64px, 20vw, 120px);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: .95;
}
.hero h1 .w1 { display: block; font-size: .42em; letter-spacing: .14em; color: var(--cream); margin-bottom: .1em; }
.hero h1 .c1 { color: var(--red); }
.hero h1 .c2 { color: var(--sage); }
.hero h1 .c3 { color: var(--cream); }
.hero h1 .c1, .hero h1 .c2 { filter: brightness(1.25); }

.datebadge {
  display: inline-block;
  margin-top: 22px;
  padding: 10px 22px;
  border: 1px solid rgba(237,230,207,.55);
  border-radius: 999px;
  font-size: clamp(18px, 4.6vw, 22px);
  font-weight: 700;
  color: var(--cream);
}
.datebadge small { display: block; font-size: 13px; font-weight: 400; letter-spacing: .04em; color: rgba(237,230,207,.75); }
.hero p.lede { max-width: 520px; margin: 18px auto 0; color: rgba(237,230,207,.85); font-size: 17px; }

/* Progress */
.progress-card {
  max-width: 528px;
  margin: -44px 16px 0;
  background: var(--cream);
  border-radius: 24px;
  padding: 22px 24px 24px;
  box-shadow: 0 12px 30px rgba(13,13,14,.18);
  position: relative;
}
@media (min-width: 560px) { .progress-card { margin: -44px auto 0; } }
.progress-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.progress-num { font-family: "Anton", Impact, sans-serif; font-size: 46px; line-height: 1; color: var(--red); }
.progress-num .of { color: var(--ink); font-size: 22px; }
.progress-sub { color: var(--ink); font-size: 14px; opacity: .8; }
.bar { height: 12px; background: rgba(51,55,70,.12); border-radius: 99px; overflow: hidden; margin-top: 14px; }
.bar > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--sage), var(--red)); border-radius: 99px; transition: width 1s ease; }

/* Layout */
main { max-width: 560px; margin: 0 auto; padding: 36px 16px 56px; }
section { margin-bottom: 40px; }
section h2 { font-size: 30px; margin: 0 0 14px; }
.h2date { margin: -10px 0 14px; color: var(--sage); font-weight: 700; }

.steps { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.steps li { display: flex; gap: 14px; padding: 18px 18px; border-top: 1px solid var(--line); align-items: flex-start; }
.steps li:first-child { border-top: 0; }
.steps .icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--sage-soft); color: var(--sage);
  display: grid; place-items: center;
}
.steps .icon svg { width: 22px; height: 22px; }
.steps h3 { margin: 0 0 2px; font-size: 19px; font-weight: 700; line-height: 1.3; }
.steps p { margin: 0; color: var(--ink); }
.steps li.rule { background: var(--red-soft); box-shadow: inset 4px 0 0 var(--red); }
.steps li.rule .icon { background: #fff; color: var(--red); }
.steps li.rule h3 { color: var(--red); }

/* Form */
form.card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 22px 20px; }
.field { margin-bottom: 20px; }
.field > label, .field > .label { display: block; font-weight: 700; margin-bottom: 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: 14px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search], select {
  width: 100%; font: inherit; padding: 12px 14px; border: 1px solid #d7cfb8; border-radius: 12px; background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--sage); outline-offset: 1px; border-color: var(--sage); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row .field { margin-bottom: 8px; }
@media (max-width: 480px) { .row { grid-template-columns: 1fr; gap: 0; } .row .field { margin-bottom: 14px; } }

.choices { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
#dozenChoices { grid-template-columns: repeat(5, 1fr); gap: 6px; }
#dozenChoices .choice span { padding: 12px 2px; font-size: 19px; }
#dozenChoices .choice span small { font-size: 11px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: block; text-align: center; padding: 12px 8px; border: 1px solid #d7cfb8; border-radius: 12px; cursor: pointer; background: #fff;
  font-weight: 700;
}
.choice span small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.choice input:checked + span { border-color: var(--sage); background: var(--sage); color: #fff; }
.choice input:checked + span small { color: rgba(255,255,255,.85); }
.choice input:focus-visible + span { outline: 2px solid var(--sage); outline-offset: 2px; }

.diets { display: flex; flex-wrap: wrap; gap: 8px; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: inline-block; padding: 9px 16px; border: 1px solid #d7cfb8; border-radius: 999px; cursor: pointer; font-weight: 700; background: #fff; }
.pill input:checked + span { background: var(--sage); border-color: var(--sage); color: #fff; }
.pill input:checked + span::before { content: "✓ "; }
.pill input:focus-visible + span { outline: 2px solid var(--sage); outline-offset: 2px; }

.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 400; }
.field > label.check { font-weight: 400; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--red); flex: none; }
.check.required { background: var(--red-soft); border: 1px solid var(--red); border-radius: 14px; padding: 14px; }

button, .btn {
  font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 14px 22px; cursor: pointer;
  background: var(--red); color: #fff; text-decoration: none; display: inline-block; letter-spacing: .02em;
}
button:hover, .btn:hover { background: var(--red-dark); }
button:disabled { opacity: .6; cursor: default; }
button.wide { width: 100%; font-size: 17px; padding: 16px 22px; }
button.ghost, .btn.ghost { background: transparent; color: var(--ink); border: 1px solid #d7cfb8; }
button.ghost:hover { background: var(--cream); }

.error { color: var(--red); font-size: 14px; margin-top: 10px; font-weight: 700; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.thanks { text-align: center; background: var(--sage); color: #fff; border-radius: 24px; padding: 34px 22px; }
.thanks .big { font-size: 56px; line-height: 1; }
.thanks h2 { font-size: 36px; margin: 12px 0 8px; color: #fff; }
.thanks p { font-size: 17px; }
.recap { text-align: left; background: rgba(255,255,255,.12); border-radius: 16px; padding: 4px 16px; margin: 18px 0; }
.recap div { padding: 10px 0; border-top: 1px solid rgba(255,255,255,.18); }
.recap div:first-child { border-top: 0; }
.recap span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.contact { background: var(--paper); color: var(--ink); border-radius: 16px; padding: 16px; margin-bottom: 18px; }
.contact p { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.contact .btn { width: 100%; white-space: nowrap; }
.thanks button.ghost { color: #fff; border-color: rgba(255,255,255,.6); }
.thanks button.ghost:hover { background: rgba(255,255,255,.12); }

footer { text-align: center; background: var(--night); color: rgba(237,230,207,.75); font-size: 14px; padding: 28px 16px 36px; }
footer strong { color: var(--cream); font-family: "Anton", Impact, sans-serif; font-weight: 400; text-transform: uppercase; letter-spacing: .03em; font-size: 20px; display: block; margin-bottom: 4px; }
[hidden] { display: none !important; }
.steps p.strong-rec { margin-top: 8px; padding: 8px 12px; background: var(--sage-soft); border-radius: 10px; font-size: 15px; }

/* ================= Polish & motion ================= */
:root {
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { text-rendering: optimizeLegibility; }
::selection { background: var(--sage); color: #fff; }
.contact-hint { margin: 0 0 20px; }

/* Hero lights: two layers that breathe out of sync */
.hero::before { animation: twinkle 6s ease-in-out infinite alternate; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 34% 14%, rgba(237,230,207,.45) 0 2px, transparent 8px),
    radial-gradient(circle at 66% 32%, rgba(156,48,24,.5) 0 2px, transparent 9px),
    radial-gradient(circle at 8% 88%, rgba(156,48,24,.35) 0 2px, transparent 8px),
    radial-gradient(circle at 90% 86%, rgba(237,230,207,.35) 0 2px, transparent 8px),
    radial-gradient(circle at 58% 92%, rgba(110,122,86,.5) 0 2px, transparent 9px);
  animation: twinkle 7.5s ease-in-out -3s infinite alternate;
}
.hero::before, .hero::after { will-change: opacity, transform; z-index: 0; }
.hero > * { z-index: 1; }
#thanks, #form { scroll-margin-top: 16px; }
@keyframes twinkle {
  0%   { opacity: .45; transform: translateY(0) scale(1); }
  100% { opacity: 1;   transform: translateY(-6px) scale(1.02); }
}
/* soft glow behind the title */
.hero h1 { text-shadow: 0 0 40px rgba(237,230,207,.08); }

/* Entrance: elements rise in, staggered */
.intro { opacity: 0; transform: translateY(14px); }
body.ready .intro { animation: rise .9s var(--ease-out) forwards; }
body.ready .intro[data-d="0"] { animation-delay: .05s; }
body.ready .intro[data-d="1"] { animation-delay: .15s; }
body.ready .intro[data-d="3"] { animation-delay: .55s; }
body.ready .intro[data-d="4"] { animation-delay: .68s; }
body.ready .intro[data-d="5"] { animation-delay: .8s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* SUNDAY letters drop in one by one */
.hero h1 .word { display: inline-block; }
.hero h1 .l { display: inline-block; opacity: 0; transform: translateY(.35em) rotate(-4deg); }
body.ready .hero h1 .l { animation: letter .75s var(--ease-spring) forwards; }
body.ready .hero h1 .l[data-i="0"] { animation-delay: .25s; }
body.ready .hero h1 .l[data-i="1"] { animation-delay: .31s; }
body.ready .hero h1 .l[data-i="2"] { animation-delay: .37s; }
body.ready .hero h1 .l[data-i="3"] { animation-delay: .43s; }
body.ready .hero h1 .l[data-i="4"] { animation-delay: .49s; }
body.ready .hero h1 .l[data-i="5"] { animation-delay: .55s; }
@keyframes letter { to { opacity: 1; transform: none; } }
.hero h1 .c1.l, .hero h1 .c2.l { filter: brightness(1.25); }

/* Date badge: faint glass */
.datebadge { background: rgba(237,230,207,.06); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

/* Progress card */
.progress-card { transition: box-shadow .4s var(--ease-out); }
.progress-num #dozens { display: inline-block; min-width: 1ch; font-variant-numeric: tabular-nums; }
.progress-sub { opacity: 0; transform: translateY(4px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.progress-sub.in { opacity: .8; transform: none; }
.bar > div { position: relative; transition: width 1.4s var(--ease-out); overflow: hidden; }
.bar > div::after { /* gentle shimmer */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.45) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: shimmer 3.2s ease-in-out 2s infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 45%, 100% { transform: translateX(100%); } }

/* Scroll reveals */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.steps li { opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out), background-color .3s; transition-delay: calc(var(--i, 0) * 90ms + 120ms); }
.steps li.in { opacity: 1; transform: none; }
.steps .icon { transition: transform .4s var(--ease-spring); }
.steps li:hover .icon { transform: rotate(-6deg) scale(1.06); }

/* Inputs */
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search], select {
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
input:hover { border-color: #c7bd9f; }
input:focus, select:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 4px rgba(110,122,86,.18); }

/* Choice tiles + pills */
.choice span, .pill span {
  transition: background-color .25s var(--ease-out), border-color .25s, color .25s, transform .25s var(--ease-spring), box-shadow .25s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.choice span:hover, .pill span:hover { border-color: var(--sage); transform: translateY(-1px); }
.choice input:checked + span, .pill input:checked + span { box-shadow: 0 6px 16px -6px rgba(110,122,86,.6); }
.choice input:active + span, .pill input:active + span, .choice span:active, .pill span:active { transform: scale(.96); }
.choice input:focus-visible + span, .pill input:focus-visible + span { outline: none; box-shadow: 0 0 0 4px rgba(110,122,86,.3); }
.check.required { transition: background-color .25s, border-color .25s; }
.check.required:has(input:checked) { background: var(--sage-soft); border-color: var(--sage); }
.check input { accent-color: var(--sage); }

/* Invalid highlight */
.invalid input[type=text], .invalid input[type=email], .invalid input[type=tel] { border-color: var(--red); background: #fffafa; }
.invalid .choice span, .invalid.check.required { border-color: var(--red); }
.row.invalid input { border-color: var(--red); }

/* Buttons */
button, .btn { transition: background-color .2s, transform .2s var(--ease-spring), box-shadow .25s, opacity .2s; -webkit-tap-highlight-color: transparent; }
button:not(:disabled):hover, .btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(156,48,24,.7); }
button.ghost:not(:disabled):hover { box-shadow: none; }
button:not(:disabled):active, .btn:active { transform: translateY(0) scale(.98); }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline: 3px solid rgba(110,122,86,.5); outline-offset: 3px; }

#submit { position: relative; }
#submit .spinner {
  position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%;
  opacity: 0; transition: opacity .2s;
}
#submit .btn-label { transition: opacity .2s; }
#submit.loading { opacity: 1; }
#submit.loading .btn-label { opacity: 0; }
#submit.loading .spinner { opacity: 1; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.shake { animation: shake .4s var(--ease-out); }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.error:not(:empty) { animation: riseIn .35s var(--ease-out) both; }

/* Form → thanks transition */
form.card { transition: opacity .28s ease, transform .28s ease; }
form.card.leaving { opacity: 0; transform: translateY(-8px) scale(.985); }
.pop { animation: pop .6s var(--ease-out) both; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.thanks { outline: none; box-shadow: 0 20px 40px -20px rgba(51,55,70,.45); }
.thanks.pop .big { animation: cookie 1s var(--ease-spring) .15s both; }
@keyframes cookie { from { opacity: 0; transform: translateY(-20px) rotate(-90deg) scale(.6); } to { opacity: 1; transform: none; } }
.thanks.pop h2, .thanks.pop > p, .thanks.pop .recap, .thanks.pop .contact { animation: riseIn .7s var(--ease-out) both; }
@keyframes riseIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.thanks.pop h2 { animation-delay: .25s; }
.thanks.pop > p { animation-delay: .32s; }
.thanks.pop .recap { animation-delay: .42s; }
.thanks.pop .contact { animation-delay: .52s; }

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .intro, .hero h1 .l, .reveal, .steps li, .progress-sub { opacity: 1 !important; transform: none !important; }
}
