/* ============================================================
   STETT 4 KIDS · CHRISTMAS
   Brand purple + pink, with Christmas red, pine green, and snow.
   ============================================================ */
:root {
  --purple: #3e295c;
  --purple-deep: #2a1b40;
  --plum: #8d479b;
  --pink: #c972ae;
  --lilac: #d2b0d3;
  --lilac-soft: #efe5f1;
  --peri: #8e86c0;
  --red: #b8202f;
  --red-deep: #951826;
  --green: #1f5c45;
  --snow: #fbf8f3;
  --ink: #241733;
  --dim: #6e6280;
  --line: rgba(62, 41, 92, .14);

  --f-head: "Oswald", "Arial Narrow", sans-serif;
  --f-body: "Nunito", system-ui, sans-serif;
  --f-script: "Mountains of Christmas", cursive;
  --r: 18px;
  --maxw: 1160px;
  --shadow: 0 2px 0 var(--line), 0 18px 36px -24px rgba(42, 27, 64, .55);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--f-body); color: var(--ink); background: var(--snow); line-height: 1.55; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.wrap.narrow { max-width: 760px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  font-family: var(--f-body); font-weight: 800; font-size: 1.05rem; text-decoration: none; cursor: pointer;
  padding: .85em 1.6em; border-radius: 999px; border: 0; color: #fff; white-space: nowrap;
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-red { background: var(--red); box-shadow: 0 6px 18px -8px rgba(184, 32, 47, .8); }
.btn-red:hover { background: var(--red-deep); }
.btn-purple { background: var(--purple); }
.btn-purple:hover { background: var(--plum); }
.btn-ghost { background: transparent; border: 2px solid rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-block { width: 100%; }

/* ---------- hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(70% 60% at 50% 0%, rgba(201, 114, 174, .35), transparent 65%),
    radial-gradient(60% 50% at 85% 90%, rgba(142, 134, 192, .3), transparent 60%),
    linear-gradient(180deg, var(--purple-deep), var(--purple));
}
.nav { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: var(--maxw); margin: 0 auto; padding: 18px clamp(16px, 4vw, 32px); }
.nav-logo img { width: clamp(140px, 22vw, 190px); height: auto; }
.nav-links { display: flex; gap: clamp(10px, 2.4vw, 26px); font-weight: 700; font-size: .98rem; }
.nav-links a { text-decoration: none; opacity: .88; }
.nav-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.hero-inner { position: relative; z-index: 2; text-align: center; padding-top: clamp(10px, 3vw, 30px); padding-bottom: clamp(70px, 10vw, 110px); }
.hero-mark { width: clamp(96px, 14vw, 150px); height: auto; margin: 0 auto 14px; filter: drop-shadow(0 10px 24px rgba(0,0,0,.35)); }
.hero-kicker { font-weight: 800; letter-spacing: .24em; text-transform: uppercase; font-size: .82rem; color: var(--lilac); margin: 0 0 6px; }
.hero-title { font-family: var(--f-head); font-weight: 700; text-transform: uppercase; font-size: clamp(2.4rem, 7.5vw, 4.8rem); line-height: 1; margin: 0 0 16px; letter-spacing: .01em; }
.hero-title .script { display: inline-block; font-family: var(--f-script); text-transform: none; color: var(--pink); font-size: 1.15em; transform: rotate(-3deg); letter-spacing: 0; }
.hero-sub { max-width: 620px; margin: 0 auto 22px; font-size: clamp(1.05rem, 2.2vw, 1.22rem); color: #eee6f3; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.progress { max-width: 460px; margin: 0 auto 24px; }
.progress-bar { height: 14px; border-radius: 99px; background: rgba(255,255,255,.16); overflow: hidden; border: 1px solid rgba(255,255,255,.2); }
.progress-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: repeating-linear-gradient(45deg, var(--red) 0 12px, #fff 12px 18px); transition: width 1s ease; }
.progress-label { margin: 8px 0 0; font-size: .98rem; color: #eee6f3; }
.progress-label b { color: #fff; }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; height: 60px; z-index: 1;
  background: var(--snow);
  -webkit-mask: radial-gradient(40px 28px at 40px 0, transparent 98%, #000) 0 0 / 80px 60px repeat-x;
          mask: radial-gradient(40px 28px at 40px 0, transparent 98%, #000) 0 0 / 80px 60px repeat-x; }

/* falling snow: two layers of tiny dots drifting down */
.snow, .snow::after {
  position: absolute; inset: -100% 0 0; pointer-events: none; z-index: 1;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #fff 50%, transparent 51%),
    radial-gradient(3px 3px at 120px 80px, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(2px 2px at 200px 150px, #fff 50%, transparent 51%),
    radial-gradient(2.5px 2.5px at 60px 190px, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(2px 2px at 170px 240px, #fff 50%, transparent 51%);
  background-size: 240px 260px;
  animation: snowfall 18s linear infinite; opacity: .7;
}
.snow::after { content: ""; inset: 0; background-size: 330px 300px; animation-duration: 26s; opacity: .55; }
@keyframes snowfall { to { transform: translateY(50%); } }
@media (prefers-reduced-motion: reduce) { .snow, .snow::after { animation: none; } }

/* ---------- bands ---------- */
.band { padding: clamp(40px, 7vw, 76px) 0; }
.band-snow { background: var(--snow); }
.band-lilac { background: linear-gradient(180deg, var(--lilac-soft), #f7f1f8); }
.sec-title { font-family: var(--f-head); font-weight: 700; text-transform: uppercase; color: var(--purple); font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1.05; margin: 0 0 8px; text-align: center; }
.sec-sub { text-align: center; color: var(--dim); max-width: 640px; margin: 0 auto 26px; font-size: 1.07rem; }

/* how it works */
.steps { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { background: #fff; border-radius: var(--r); padding: 22px 20px; box-shadow: var(--shadow); border-top: 6px solid var(--red); }
.step:nth-child(even) { border-top-color: var(--green); }
.step-n { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--purple); color: #fff; font-family: var(--f-head); font-size: 1.25rem; }
.step h3 { font-family: var(--f-head); font-weight: 600; text-transform: uppercase; color: var(--purple); margin: 12px 0 6px; font-size: 1.3rem; }
.step p { margin: 0; color: var(--dim); }
.step strong { color: var(--ink); }
.dropoff { margin: 22px auto 0; max-width: 760px; background: var(--green); color: #fff; border-radius: var(--r); padding: 16px 22px; text-align: center; font-size: 1.05rem; }
.dropoff p { margin: 4px 0; white-space: pre-line; }

/* filters */
.filters { display: flex; flex-direction: column; gap: 12px; align-items: center; margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; padding: .45rem 1rem; border-radius: 999px; border: 2px solid var(--purple); background: #fff; color: var(--purple); }
.chip.is-on { background: var(--purple); color: #fff; }
.filter-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; width: 100%; }
.filter-row input[type=search] { font: inherit; font-size: 1rem; width: min(380px, 100%); padding: .65rem 1rem; border: 2px solid var(--line); border-radius: 999px; background: #fff; }
.filter-row input[type=search]:focus { outline: none; border-color: var(--plum); }
.toggle { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--purple); cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--red); }
.closed-note { text-align: center; background: #fff3cd; border-radius: 12px; padding: 12px; font-weight: 700; }

/* kid cards */
.kid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.family { grid-column: 1 / -1; background: rgba(255,255,255,.55); border: 2px dashed var(--lilac); border-radius: 22px; padding: 14px; }
.family-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 4px 12px; }
.family-head p { margin: 0; font-weight: 800; color: var(--plum); }
.family-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.btn-fam { font: inherit; font-weight: 800; font-size: .9rem; cursor: pointer; border: 2px solid var(--plum); color: var(--plum); background: #fff; border-radius: 999px; padding: .4rem 1rem; }
.btn-fam:hover, .btn-fam.is-on { background: var(--plum); color: #fff; }
.kid {
  position: relative; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 18px 16px;
  display: flex; flex-direction: column; gap: 10px; border: 3px solid transparent; transition: border-color .15s ease, transform .15s ease;
}
.kid.is-picked { border-color: var(--red); transform: translateY(-2px); }
.kid.is-taken { opacity: .6; }
.kid-top { display: flex; gap: 14px; align-items: center; }
.kid-avatar { width: 76px; height: 76px; flex: none; border-radius: 50%; box-shadow: 0 6px 14px -6px rgba(42,27,64,.5); }
.kid-name { font-family: var(--f-head); font-weight: 600; font-size: 1.6rem; color: var(--purple); line-height: 1; margin: 0; }
.kid-meta { color: var(--dim); font-weight: 700; margin: 4px 0 0; font-size: .95rem; }
.kid-code { font-size: .72rem; font-weight: 800; letter-spacing: .12em; color: var(--red); }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.size { background: var(--lilac-soft); color: var(--purple); border-radius: 8px; padding: 3px 9px; font-size: .86rem; font-weight: 700; }
.size small { font-weight: 800; color: var(--plum); letter-spacing: .04em; margin-right: 3px; }
.wish { margin: 0; font-size: .98rem; }
.wish b { color: var(--green); }
.kid-btn { margin-top: auto; font: inherit; font-weight: 800; cursor: pointer; border-radius: 999px; padding: .65rem 1rem; border: 2px solid var(--red); background: #fff; color: var(--red); }
.kid-btn:hover { background: #fff1f2; }
.kid.is-picked .kid-btn { background: var(--red); color: #fff; }
.kid-btn[disabled] { border-color: var(--line); color: var(--dim); background: #f6f3f8; cursor: default; }
.ribbon { position: absolute; top: 14px; right: -6px; background: var(--green); color: #fff; font-weight: 800; font-size: .78rem; letter-spacing: .06em; padding: 4px 12px; border-radius: 6px 0 0 6px; }
.loading, .empty { grid-column: 1 / -1; text-align: center; color: var(--dim); font-style: italic; padding: 30px; }

/* lookup */
.lookup-form { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lookup-form input { flex: 1 1 260px; font: inherit; font-size: 1.08rem; padding: .8rem 1.1rem; border: 2px solid var(--line); border-radius: 999px; background: #fff; }
.lookup-form input:focus { outline: none; border-color: var(--plum); }
.lookup-hello { text-align: center; font-weight: 800; color: var(--purple); font-size: 1.15rem; margin: 22px 0 10px; }
.lookup-list { display: grid; gap: 14px; }
.lookup-list .kid { box-shadow: var(--shadow); }
.status { display: inline-block; font-size: .78rem; font-weight: 800; padding: 3px 10px; border-radius: 99px; background: var(--lilac-soft); color: var(--plum); }
.status.in { background: #dcefe5; color: var(--green); }

/* forms */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-weight: 800; color: var(--purple); font-size: .95rem; }
.field input { font: inherit; font-size: 1.06rem; padding: .75rem .9rem; border: 2px solid var(--line); border-radius: 12px; background: #fff; }
.field input:focus { outline: none; border-color: var(--plum); box-shadow: 0 0 0 3px rgba(141,71,155,.18); }
.err { color: var(--red); font-size: .92rem; min-height: 1em; margin: 2px 0 0; text-align: center; }
.field .err { text-align: left; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* tray */
.tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px clamp(10px, 3vw, 20px) calc(10px + env(safe-area-inset-bottom)); background: rgba(42,27,64,.96); color: #fff; box-shadow: 0 -10px 30px -10px rgba(0,0,0,.5); animation: up .25s ease both; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
.tray-inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.tray-avatars { display: flex; }
.tray-avatars img { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--purple-deep); margin-left: -10px; }
.tray-avatars img:first-child { margin-left: 0; }
.tray-text { margin: 0; flex: 1; font-weight: 700; }
.tray-clear { background: none; border: 0; color: var(--lilac); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
body.has-tray { padding-bottom: 76px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(30,18,46,.72); backdrop-filter: blur(4px); overflow-y: auto; animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-box { position: relative; width: 100%; max-width: 480px; background: var(--snow); border-radius: 22px; padding: 28px 24px 22px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.6); margin: auto; border-top: 8px solid var(--red); }
.modal-x { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--lilac-soft); color: var(--purple); font-size: 1.1rem; cursor: pointer; }
.modal-title { font-family: var(--f-head); font-weight: 700; text-transform: uppercase; color: var(--purple); font-size: 1.8rem; margin: 0 0 12px; text-align: center; }
.co-kids { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.co-kids li { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 8px 10px; box-shadow: 0 1px 0 var(--line); }
.co-kids img { width: 40px; height: 40px; border-radius: 50%; }
.co-kids b { color: var(--purple); }
.co-kids span { color: var(--dim); font-size: .9rem; }
.co-kids .rm { margin-left: auto; background: none; border: 0; color: var(--dim); cursor: pointer; font-size: 1rem; }
.co-promise { background: var(--lilac-soft); border-radius: 12px; padding: 10px 12px; font-size: .95rem; margin: 6px 0 14px; }
.done-burst { font-size: 3.4rem; text-align: center; }
.done-text { text-align: center; font-size: 1.12rem; font-weight: 700; color: var(--purple); }
.done-small { text-align: center; color: var(--dim); margin-bottom: 18px; }
#coDone { text-align: center; }

/* footer */
.foot { background: var(--purple-deep); color: var(--lilac); text-align: center; }
.foot-wrap { padding: 44px 16px 36px; }
.foot-logo { width: 110px; height: auto; margin: 0 auto 12px; background: var(--snow); border-radius: 50%; padding: 14px 16px; }
.foot-tag { font-family: var(--f-head); text-transform: uppercase; letter-spacing: .04em; color: #fff; font-size: 1.3rem; margin: 0 0 6px; }
.foot-small { margin: 0 0 6px; }
.foot-credit { font-size: .8rem; opacity: .7; margin: 14px 0 0; }

@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .nav-links a:first-child { display: none; }
  .kid-grid, .family-grid { grid-template-columns: 1fr; gap: 12px; }
  .tray-avatars { display: none; }
  .tray .btn { padding: .75em 1.2em; }
  .family { padding: 10px; border-radius: 18px; }
  .kid { padding: 14px 14px 12px; gap: 8px; }
  .kid-avatar { width: 62px; height: 62px; }
  .kid-name { font-size: 1.45rem; }
  .hero-cta .btn { width: min(320px, 100%); }
  /* filter chips scroll sideways instead of wrapping into a tall block */
  .chips { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; width: 100%; padding-bottom: 4px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .family-head .btn-fam { width: 100%; padding: .6rem 1rem; }
  .modal { padding: 0; align-items: end; }
  .modal-title { font-size: 1.5rem; padding: 0 40px; }
  .modal-box { border-radius: 22px 22px 0 0; max-height: 92dvh; overflow-y: auto; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}
