/* Big Dawg Housewarming: night sky, string lights, neon, mustard. Always dark,
   on purpose: it's a party at night in December. */
:root {
  color-scheme: dark;
  --night: #0b1026;
  --night-2: #141b3d;
  --snow: #f6f3ea;
  --red: #e2283b;
  --pine: #128a52;
  --mustard: #ffcf1f;
  --ketchup: #c8402f;
  --pink: #ff3db8;
  --ink: #1d0f08;
  --muted: #b9bfdc;
  --neon: "Monoton", "Bungee", system-ui, sans-serif;
  --block: "Bungee", system-ui, sans-serif;
  --xmas: "Mountains of Christmas", cursive; /* only for "Housewarming" */
  --body: "DM Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--snow);
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, #2a2f6b 0%, transparent 60%),
    radial-gradient(ellipse 80% 40% at 50% 110%, #3a0f2a 0%, transparent 70%),
    var(--night);
  background-attachment: fixed;
  overflow-x: clip;
}
a { color: var(--mustard); }
h1, h2, h3 { line-height: 1.1; margin: 0 0 0.6rem; }
h2 { font-family: var(--block); font-size: clamp(1.7rem, 6vw, 2.6rem); color: var(--mustard); text-shadow: 3px 3px 0 var(--red); }
main { position: relative; z-index: 1; max-width: 46rem; margin: 0 auto; padding: 0 16px; }

/* Snow: two layers of dots drifting down at different speeds. */
.snow, .snow::after {
  position: fixed;
  inset: -20vh 0 0;
  pointer-events: none;
  z-index: 3;
  background-image:
    radial-gradient(3px 3px at 20px 30px, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 90px 120px, #fff 50%, transparent 51%),
    radial-gradient(3px 3px at 160px 60px, #ffffffcc 50%, transparent 51%),
    radial-gradient(2px 2px at 230px 170px, #fff 50%, transparent 51%),
    radial-gradient(4px 4px at 300px 90px, #ffffffaa 50%, transparent 51%);
  background-size: 320px 220px;
  animation: snow 14s linear infinite;
  opacity: 0.8;
}
.snow::after {
  content: "";
  inset: 0;
  background-size: 210px 170px;
  animation-duration: 22s;
  opacity: 0.6;
}
@keyframes snow { to { background-position: 60px 440px, -40px 440px, 30px 440px, -20px 440px, 50px 440px; } }

/* String lights along the top. */
.lights {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  list-style: none;
  margin: 0;
  padding: 0 4px;
  height: 46px;
  border-top: 3px solid #2b2b2b;
  overflow: hidden;
}
.lights li {
  position: relative;
  width: 12px;
  height: 22px;
  margin-top: 12px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 4px 18px 4px var(--red);
  animation: twinkle 1.6s ease-in-out infinite;
}
.lights li::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 2px;
  width: 8px;
  height: 7px;
  background: #444;
  border-radius: 2px;
}
.lights li:nth-child(4n + 2) { background: var(--pine); box-shadow: 0 4px 18px 4px var(--pine); animation-delay: 0.4s; }
.lights li:nth-child(4n + 3) { background: var(--mustard); box-shadow: 0 4px 18px 4px var(--mustard); animation-delay: 0.8s; }
.lights li:nth-child(4n) { background: #3fa9ff; box-shadow: 0 4px 18px 4px #3fa9ff; animation-delay: 1.2s; }
.lights li:nth-child(odd) { margin-top: 18px; }
@keyframes twinkle { 50% { opacity: 0.35; box-shadow: none; } }

/* Hero */
.hero {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 5.5rem 16px 2.5rem;
}
.kicker { font-weight: 900; color: var(--snow); font-size: clamp(1.15rem, 4.6vw, 1.5rem); line-height: 1.3; margin: 0; }
.neon {
  font-family: var(--neon);
  font-weight: 400;
  font-size: clamp(3.4rem, 17vw, 8.5rem);
  line-height: 1;
  margin: 0.4rem 0 0;
  color: #fff6fb;
  text-shadow:
    0 0 6px #fff,
    0 0 14px var(--pink),
    0 0 30px var(--pink),
    0 0 60px var(--pink),
    0 0 90px var(--red);
  animation: flicker 6s infinite;
}
.neon span { display: inline-block; }
.neon span:last-child { color: #fffbe6; text-shadow: 0 0 6px #fff, 0 0 14px var(--mustard), 0 0 30px var(--mustard), 0 0 60px #ff9d00; animation: flicker 7.3s infinite reverse; }
@keyframes flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.55; text-shadow: none; }
}
.script {
  font-family: var(--xmas);
  font-size: clamp(2.6rem, 11vw, 4.8rem);
  color: var(--red);
  -webkit-text-stroke: 1px #fff;
  text-shadow: 3px 3px 0 var(--pine), 6px 6px 0 #00000055;
  margin: -0.4rem 0 0.6rem;
  transform: rotate(-3deg);
}
.kicker strong { color: var(--mustard); }
.where { font-weight: 900; font-size: clamp(1.1rem, 4.6vw, 1.4rem); margin: 0.1rem 0 0; color: var(--snow); }
.when { font-family: var(--block); font-size: clamp(1.1rem, 4.6vw, 1.6rem); margin: 0; letter-spacing: 0.02em; }
.countdown {
  display: inline-block;
  font-family: var(--block);
  font-size: 1.15rem;
  color: var(--ink);
  background: var(--mustard);
  padding: 0.15rem 0.9rem;
  border-radius: 999px;
  transform: rotate(2deg);
  margin: 0.8rem 0 0.5rem;
}
.santa-dog {
  display: block;
  width: min(250px, 62vw);
  margin: 0.6rem auto 1.4rem;
  filter: drop-shadow(0 10px 0 #00000055);
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-12px) rotate(-3deg); } }

.btn {
  display: inline-block;
  font-family: var(--block);
  font-size: 1.1rem;
  color: var(--ink);
  background: var(--mustard);
  border: 4px solid var(--ink);
  border-radius: 14px;
  padding: 0.7rem 1.3rem;
  text-decoration: none;
  box-shadow: 0 6px 0 var(--red), 0 10px 26px #ffcf1f55;
  cursor: pointer;
  transition: transform 0.1s;
}
.btn:hover { transform: translateY(-2px) rotate(-1deg); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--red); }
.btn.big { font-size: 1.35rem; padding: 0.9rem 1.7rem; }

/* Ticker */
.ticker {
  position: relative;
  z-index: 2;
  overflow: hidden;
  background: var(--red);
  border-block: 4px solid var(--snow);
  transform: rotate(-2deg);
  margin: 1rem -10px 3rem;
  box-shadow: 0 0 40px #e2283b88;
}
.ticker div { display: flex; width: max-content; animation: tick 28s linear infinite; }
.ticker span { font-family: var(--block); white-space: nowrap; padding: 0.55rem 0; font-size: 1.05rem; }
@keyframes tick { to { transform: translateX(-50%); } }

/* Plea */
.plea { text-align: center; margin-bottom: 3rem; }
.huge { font-family: var(--block); font-size: clamp(1.7rem, 7vw, 2.6rem); line-height: 1.15; margin: 0 0 1.1rem; }
.huge em { color: var(--mustard); font-style: normal; }
.warm { font-size: clamp(1.2rem, 4.8vw, 1.4rem); line-height: 1.5; margin: 0 0 1rem; }
.sig { font-weight: 900; font-size: 1.4rem; color: var(--snow); margin: 0; }
.sig span { color: var(--red); }

/* Cards */
.cards { display: grid; gap: 1.25rem; margin-bottom: 3.5rem; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.card {
  color: var(--ink);
  border: 4px solid var(--ink);
  border-radius: 20px;
  padding: 1.1rem 1.1rem 0.6rem;
  box-shadow: 8px 8px 0 #00000088;
}
.card h3 { font-family: var(--block); font-size: 1.25rem; }
.card:nth-child(1) { transform: rotate(-1.5deg); }
.card:nth-child(2) { transform: rotate(1deg); }
.card:nth-child(3) { transform: rotate(-0.5deg); }
.card .emoji { font-size: 2.8rem; margin: 0; line-height: 1; }
.mustard { background: var(--mustard); }
.pink { background: var(--pink); }
.pine { background: #4fd18b; }
.snowy { background: var(--snow); }
.card:nth-child(4) { transform: rotate(1.5deg); }
.bounce { font-family: var(--block); font-size: 1.35rem; line-height: 1.6; }
.bounce span { display: inline-block; transition: transform 0.15s, color 0.15s; }
.bounce span.on { transform: translateY(-8px) scale(1.15); color: #fff; text-shadow: 2px 2px 0 var(--ink); }

/* Photos */
.gallery { text-align: center; margin-bottom: 3.5rem; }
.polaroids { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem; margin: 1rem 0 2.5rem; }
.polaroid {
  width: min(13rem, 40vw);
  margin: 0;
  padding: 0.6rem 0.6rem 0.4rem;
  background: #fffdf6;
  color: var(--ink);
  box-shadow: 0 10px 25px #000a;
  transform: rotate(-3deg);
  transition: transform 0.2s;
}
.polaroid:nth-child(2) { transform: rotate(2.5deg) translateY(10px); }
.polaroid:nth-child(3) { transform: rotate(-1deg); }
.polaroid:hover { transform: rotate(0) scale(1.06); z-index: 2; }
.polaroid img, .polaroid .ph { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.ph {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #eee7d4 0 12px, #f6f1e3 12px 24px);
  font-weight: 700;
  color: #8a7f68;
  font-size: 0.9rem;
}
.ph span { font-size: 3rem; }
.polaroid figcaption { font-weight: 700; padding-top: 0.4rem; font-size: 1rem; line-height: 1.3; }

/* RSVP */
.rsvp {
  position: relative;
  background: var(--night-2);
  border: 4px solid var(--mustard);
  border-radius: 26px;
  padding: 1.5rem 1.1rem;
  margin-bottom: 3.5rem;
  box-shadow: 0 0 0 8px var(--red), 0 0 0 12px var(--snow), 0 0 50px #ff3db855;
  scroll-margin-top: 2rem;
}
.rsvp-title { font-family: var(--neon); font-weight: 400; font-size: clamp(3rem, 14vw, 4.5rem); color: #fff; text-shadow: 0 0 10px var(--pink), 0 0 30px var(--pink); text-align: center; }
.lede { text-align: center; color: var(--muted); }
.form { display: grid; gap: 1.9rem; }
.field { display: grid; gap: 0.6rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.label { font-family: var(--block); font-size: 1rem; line-height: 1.3; color: var(--mustard); padding: 0; }
legend.label { margin-bottom: 0.6rem; } /* a legend sits outside the grid gap */
.label em { font-family: var(--body); font-style: normal; color: var(--muted); font-size: 0.9rem; }
.form input:not([type="radio"]), .form select, .form textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--snow);
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
}
/* The fields are cream, so their native popups (the dropdown list, its
   highlight, the date pickers) must draw in light mode, not the page's dark. */
.form input, .form select, .form textarea { color-scheme: light; }
.form select option { color: var(--ink); background: var(--snow); }
.form input:focus, .form select:focus, .form textarea:focus { outline: 4px solid var(--pink); outline-offset: 1px; }
.help { font-size: 0.95rem; color: var(--muted); }
.help strong { color: var(--pink); }
.mic input { border-color: var(--pink) !important; box-shadow: 0 0 18px #ff3db866; }
.choices { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: block;
  font-weight: 700;
  padding: 0.55rem 0.85rem;
  color: var(--snow);
  border: 3px solid var(--muted);
  border-radius: 999px;
  transition: transform 0.1s;
}
.status .choice span { font-family: var(--block); font-weight: 400; font-size: 1.05rem; }
.choice input:checked + span { color: var(--ink); background: var(--mustard); border-color: var(--ink); transform: rotate(-2deg) scale(1.05); box-shadow: 0 4px 0 var(--red); }
.choice input:focus-visible + span { outline: 3px solid var(--pink); outline-offset: 2px; }
.if-coming { display: grid; gap: 1.9rem; }
.form.not-coming .if-coming { display: none; }
.form .btn { justify-self: center; }
.oops { background: var(--red); color: #fff; font-weight: 700; padding: 0.6rem 0.9rem; border-radius: 12px; margin: 0; }
.hp { position: absolute; left: -9999px; }

.confirm { text-align: center; }
.confirm h2 { font-size: clamp(1.9rem, 8vw, 3rem); }
.confirm.no h2 { color: #8fc9ff; text-shadow: 3px 3px 0 #233a8a; }
.facts { list-style: none; padding: 0; margin: 0 0 1.4rem; font-size: 1.15rem; display: grid; gap: 0.35rem; }
.change { margin-top: 1.6rem; }
.change summary { cursor: pointer; font-weight: 700; color: var(--mustard); text-align: center; margin-bottom: 1rem; }

/* Queue */
.queue { text-align: center; margin-bottom: 3rem; }
.heads { font-family: var(--block); font-size: 1.3rem; }
.heads strong { font-size: 2.4rem; color: var(--mustard); text-shadow: 3px 3px 0 var(--red); }
.songs {
  text-align: left;
  display: inline-block;
  margin: 0.5rem auto;
  padding: 1rem 1.2rem 1rem 2.6rem;
  background: #000;
  border: 3px solid var(--pink);
  border-radius: 14px;
  box-shadow: 0 0 24px #ff3db866;
  font-family: var(--block);
  font-size: 1rem;
  color: #7dfcff;
  text-shadow: 0 0 8px #00e5ff;
}
.songs li { padding: 0.15rem 0; }
.empty { font-weight: 700; font-size: 1.2rem; color: var(--pink); }
.fine { color: var(--muted); font-size: 0.85rem; }
footer { position: relative; z-index: 1; text-align: center; font-family: var(--block); padding: 2rem 16px 3rem; color: var(--muted); }

/* Admin */
.admin { padding-top: 4rem; max-width: 70rem; }
.admin h1 { font-family: var(--block); color: var(--mustard); }
.stats strong { font-size: 1.6rem; color: var(--mustard); }
.table { overflow-x: auto; }
.admin table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.admin th, .admin td { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid #ffffff22; vertical-align: top; }
.admin tr.no td { opacity: 0.55; }
.admin tr.maybe td:nth-child(2) { color: var(--mustard); }
.admin tr.yes td:nth-child(2) { color: #4fd18b; }
.login { max-width: 20rem; margin: 0 auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
