:root {
  --cream: #FFFAF1;
  --brick: #C9503F;
  --gutter: clamp(1rem, 4vw, 2rem);
  --white: #fff;
  --ink: #1D2440;
  --ink-soft: #6A6258;
  --field: #fff;
  --line: #ECE3D3;
  --red: #D92B3A;
  --red-deep: #A81B28;
  --green: #178453;
  --green-deep: #0E5E3A;
  --gold: #FFC94A;
  --gold-deep: #E0A520;
  --font: "Fredoka", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 450;
  line-height: 1.45;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, p, dl, dd, fieldset { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
legend { padding: 0; }
button, input, textarea { font: inherit; color: inherit; }
svg { display: block; }
.sprite { position: absolute; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- Motion shared across the page ---------- */

@keyframes hat-drop {
  0% { transform: translateY(-260%) rotate(25deg); opacity: 0; }
  20% { opacity: 1; }
  60% { transform: translateY(10%) rotate(-25deg); }
  80% { transform: translateY(-12%) rotate(-13deg); }
  100% { transform: rotate(-18deg); }
}
@keyframes wave {
  from { transform: rotate(-14deg); }
  to { transform: rotate(18deg); }
}

/* ---------- Page ---------- */

.page {
  position: relative; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  background: var(--cream);
}

/* Slow snowfall behind the form. Flakes are icy blue so they show on the pale page:
   round dots, and six-armed crystals that turn as they fall. */
.snowfall { position: fixed; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.snowfall i {
  position: absolute; top: -28px; border-radius: 50%; background: #A6CBEE;
  animation: fall linear infinite;
}
.snowfall i.crystal {
  border-radius: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238FBCE8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg id='a'%3E%3Cpath d='M12 12V2.5M9.5 4.8 12 7.2l2.5-2.4'/%3E%3C/g%3E%3Cuse href='%23a' transform='rotate(60 12 12)'/%3E%3Cuse href='%23a' transform='rotate(120 12 12)'/%3E%3Cuse href='%23a' transform='rotate(180 12 12)'/%3E%3Cuse href='%23a' transform='rotate(240 12 12)'/%3E%3Cuse href='%23a' transform='rotate(300 12 12)'/%3E%3C/svg%3E") center / contain no-repeat;
}
@keyframes fall {
  to { transform: translate(var(--drift), 112vh) rotate(var(--spin, 0deg)); }
}

.bar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 100%; max-width: 62rem; margin-inline: auto;
  padding: 1.3rem clamp(1rem, 4vw, 2rem) .9rem;
}
.brand {
  position: relative; display: inline-block;
  font-weight: 700; font-size: 1.5rem; line-height: 1.2; color: var(--ink); text-decoration: none;
}
/* A Santa hat hangs off the first letter of the name */
.brand__hat {
  position: absolute; left: -.5em; top: -.28em;
  width: 1.25em; height: .65em; overflow: visible;
  transform: rotate(-18deg);
}

main {
  position: relative; z-index: 2; flex: 1;
  padding: 0 0 15rem;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* Santa peeks over a snowy brick wall that runs across the page */
.wall {
  position: relative; z-index: 2; height: 3rem;
  background: var(--brick) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='32'%3E%3Cpath d='M0 1h64M0 17h64M16 1v16M48 1v16M0 17v15M32 17v15M64 17v15' stroke='%23E9AE9C' stroke-width='2' fill='none'/%3E%3C/svg%3E") 50% 0 / 4rem 2rem;
}
.wall::before {
  content: ""; position: absolute; left: 0; right: 0; top: -.5rem; height: 1.4rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='22'%3E%3Cpath d='M0 0h80v10q-6 10-14 2t-13-1-13 3-13-2-14 1-13-3z' fill='%23fff'/%3E%3C/svg%3E") 50% 0 / 5rem 1.4rem repeat-x;
  filter: drop-shadow(0 2px 0 rgba(90, 50, 30, .2));
}

.stage { max-width: calc(35rem + 2 * var(--gutter)); margin: 1.9rem auto 0; padding-inline: var(--gutter); }

/* Santa and his speech bubble */
.host {
  position: relative; display: flex; align-items: flex-end; gap: .6rem; height: 6.2rem;
  max-width: calc(35rem + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter);
}
.host__peek { flex: none; width: 7.5rem; height: 6.75rem; margin-bottom: -.75rem; overflow: hidden; }
.host__santa { display: block; transition: transform .7s var(--spring) .55s; }
.host__santa svg { width: 100%; height: auto; transform-origin: 50% 100%; animation: sway 2.6s ease-in-out infinite alternate; }
.host__santa.is-hopping { animation: hop .45s ease; }
@keyframes sway {
  from { transform: rotate(-3deg); }
  to { transform: rotate(3deg); }
}
@keyframes hop { 40% { transform: translateY(-9%); } }
.host__mitt {
  position: absolute; z-index: 3; bottom: -.6rem;
  width: 1.75rem; height: 1.35rem; border-radius: .8rem .8rem .6rem .6rem;
  background: var(--green);
  transition: transform .4s var(--spring) .75s;
}
.host__mitt--left { left: calc(var(--gutter) + .2rem); }
.host__mitt--right { left: calc(var(--gutter) + 5.6rem); }
.host__bubble {
  position: relative; margin-bottom: 1.1rem; padding: .6rem .95rem;
  max-width: 17rem;
  border-radius: 1.2rem 1.2rem 1.2rem .35rem;
  background: var(--white); font-weight: 600; line-height: 1.25;
  box-shadow: 0 4px 0 var(--line);
  transform-origin: 0 100%;
  transition: transform .45s var(--spring) .95s, opacity .2s linear .95s;
  overflow-wrap: anywhere;
}
.host__bubble.is-popping { animation: bubble .4s var(--spring); }
@keyframes bubble { from { transform: scale(.7); } }

/* The form sits straight on the page */
.sheet { transition: transform .6s var(--spring) .2s, opacity .3s linear .2s; }
form { display: grid; gap: 1.35rem; }

.field > label, .field > legend, .picks > legend {
  display: block; margin-bottom: .5rem; font-weight: 600; font-size: 1.1rem;
}
.field input[type="text"], .field input[type="tel"], .field textarea {
  display: block; width: 100%; padding: .8rem 1rem;
  border: 2.5px solid var(--line); border-radius: 1.1rem;
  background: var(--field); font-size: 1.1rem; font-weight: 500;
  transition: border-color .15s, background-color .15s;
}
.field textarea { resize: vertical; min-height: 5.5rem; }
.field input[type="text"]:focus, .field input[type="tel"]:focus, .field textarea:focus, .stepper input:focus {
  outline: none; border-color: var(--ink); background: var(--white);
}
.field ::placeholder { color: #A39A8B; }
.field [aria-invalid="true"] { border-color: var(--red); animation: nope .35s; }
@keyframes nope {
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
/* Phone number with a fixed country code in front */
.phone {
  display: flex; align-items: center;
  border: 2.5px solid var(--line); border-radius: 1.1rem; background: var(--field);
  transition: border-color .15s, background-color .15s;
}
.phone:focus-within { border-color: var(--ink); background: var(--white); }
.phone:has([aria-invalid="true"]) { border-color: var(--red); animation: nope .35s; }
.phone__code {
  flex: none; margin-left: 1rem; padding-right: .7rem;
  border-right: 2px solid var(--line);
  font-size: 1.1rem; font-weight: 600;
}
.field .phone input[type="tel"] {
  flex: 1; min-width: 0; width: auto; padding-left: .7rem;
  border: 0; border-radius: 0 1rem 1rem 0; background: transparent; animation: none;
}

.field__error { margin-top: .4rem; color: var(--red-deep); font-weight: 600; }
.field__hint { margin-top: .35rem; color: var(--ink-soft); font-size: .9rem; }
.field-row { display: grid; grid-template-columns: 1fr auto; gap: 1.35rem 1.5rem; align-items: start; }
.quip { margin-top: -.7rem; color: var(--ink-soft); min-height: 1.45em; }

/* Who it's for, with a character popping out of each choice */
.picks__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-top: 4.5rem; }
.pick { position: relative; cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick__peek {
  position: absolute; left: 0; right: 0; bottom: calc(100% - .55rem); height: 5rem;
  display: flex; justify-content: center; align-items: flex-start;
  overflow: hidden; pointer-events: none;
}
.pick__peek svg { width: 4.7rem; height: auto; transform: translateY(62%); transition: transform .5s var(--spring); }
.pick:hover .pick__peek svg { transform: translateY(36%); }
.pick:has(input:checked) .pick__peek svg { transform: translateY(2%); }
.pick__body {
  position: relative; display: grid; gap: .05rem; padding: .75rem .3rem .8rem;
  border-radius: 1.15rem; background: var(--field); text-align: center;
  box-shadow: 0 4px 0 var(--line);
  transition: transform .15s, background-color .15s, color .15s, box-shadow .15s;
}
.pick__body b { font-size: 1.15rem; font-weight: 600; line-height: 1.2; }
.pick__body small { font-size: .85rem; color: var(--ink-soft); }
.pick:has(input:checked) .pick__body small { color: inherit; }
.pick:has(input:focus-visible) .pick__body { outline: 3px solid var(--ink); outline-offset: 3px; }
.pick:active .pick__body { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.pick--kid:has(input:checked) .pick__body { background: var(--gold); box-shadow: 0 4px 0 var(--gold-deep); }
.pick--friend:has(input:checked) .pick__body { background: var(--red); color: var(--white); box-shadow: 0 4px 0 var(--red-deep); }
.pick--self:has(input:checked) .pick__body { background: var(--green); color: var(--white); box-shadow: 0 4px 0 var(--green-deep); }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: block; padding: .55rem 1rem; border-radius: 999px;
  background: var(--field); box-shadow: inset 0 0 0 2.5px var(--line); font-weight: 600;
  transition: transform .25s var(--spring), background-color .15s, color .15s;
}
.chip input:checked + span { background: var(--ink); color: var(--white); box-shadow: none; transform: scale(1.06); }
.chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }

/* Time of day on Christmas Eve */
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.slot { position: relative; cursor: pointer; }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot span {
  display: grid; justify-items: center; gap: .2rem; padding: .7rem .3rem .75rem;
  border-radius: 1.15rem; background: var(--field); box-shadow: 0 4px 0 var(--line);
  font-weight: 600; text-align: center;
  transition: transform .15s, background-color .15s, color .15s, box-shadow .15s;
}
.slot svg { width: 2.1rem; height: 2.1rem; transition: transform .45s var(--spring); }
.slot:hover svg { transform: translateY(-3px); }
.slot:active span { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.slot input:checked + span { background: var(--ink); color: var(--white); box-shadow: 0 4px 0 #0A0F26; }
.slot input:checked + span svg { transform: scale(1.25) rotate(-10deg); }
.slot input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }

.stepper { display: flex; align-items: center; gap: .4rem; }
.stepper button {
  width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%;
  background: var(--field); box-shadow: 0 3px 0 var(--line);
  font-size: 1.5rem; font-weight: 600; line-height: 1; cursor: pointer;
}
.stepper button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.stepper input {
  width: 4.2rem; padding: .25rem 0; text-align: center;
  border: 2.5px solid var(--line); border-radius: 1rem; background: var(--field);
  font-size: 1.7rem; font-weight: 700;
  -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input.is-bumped { animation: bump .35s var(--spring); }
@keyframes bump { from { transform: scale(1.3); } }

.btn {
  display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%;
  padding: 1.05rem 1.5rem; border: 0; border-radius: 1.3rem;
  background: var(--red); color: var(--white);
  font-weight: 700; font-size: 1.3rem; line-height: 1.2; cursor: pointer;
  box-shadow: 0 6px 0 var(--red-deep);
  transition: transform .12s, box-shadow .12s;
}
.btn svg { width: 1.35rem; height: 1.35rem; flex: none; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--red-deep); }
.btn:hover svg { animation: ringing .5s ease-in-out infinite; }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--red-deep); }
.btn[disabled] { opacity: .75; cursor: progress; }
@keyframes ringing {
  25% { transform: rotate(-14deg); }
  75% { transform: rotate(14deg); }
}
.btn--quiet { background: var(--field); color: var(--ink); box-shadow: 0 5px 0 var(--line); font-size: 1.1rem; }
.btn--quiet:hover { box-shadow: 0 7px 0 var(--line); }
.btn--quiet:active { box-shadow: 0 2px 0 var(--line); }


/* Payment: a wallet button (Apple Pay or Google Pay) above the card button when the device has one */
.pay { display: grid; gap: .8rem; }
.pay__wallet { visibility: hidden; height: 0; overflow: hidden; }
.pay.has-wallet .pay__wallet { visibility: visible; height: auto; overflow: visible; }
.pay.has-wallet .btn svg { display: none; }
.pay__error { color: var(--red-deep); font-weight: 600; text-align: center; }

.fine { margin-top: -.4rem; text-align: center; font-size: .9rem; color: var(--ink-soft); }
.fine a { color: var(--ink); font-weight: 600; text-underline-offset: .2em; }

/* Confirmation */
.booked { display: grid; justify-items: center; gap: .6rem; text-align: center; }
.booked:focus { outline: none; }
.booked__face {
  position: relative; display: grid; place-items: center;
  width: 8rem; height: 8rem; margin-bottom: .6rem; border-radius: 50%; background: var(--gold);
  animation: pop .6s var(--spring);
}
.booked__face svg { position: relative; width: 6.4rem; height: auto; }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--gold); animation: ring 1.8s ease-out infinite; }
.ring + .ring { animation-delay: .6s; }
@keyframes ring {
  from { transform: scale(1); opacity: .9; }
  to { transform: scale(1.7); opacity: 0; }
}
@keyframes pop { from { transform: scale(0); } }
.booked h2 { font-size: clamp(2rem, 6vw, 2.6rem); font-weight: 700; line-height: 1.1; }
.booked__lede { font-size: 1.15rem; overflow-wrap: anywhere; }
.booked__list {
  display: grid; grid-template-columns: auto 1fr; gap: .45rem 1.25rem;
  width: 100%; margin-block: .8rem 1rem; padding: 1rem 1.2rem;
  border-radius: 1.2rem; background: var(--field); box-shadow: 0 4px 0 var(--line); text-align: left;
}
.booked__list dt { color: var(--ink-soft); }
.booked__list dd { font-weight: 600; overflow-wrap: anywhere; }

.confetti { position: fixed; z-index: 50; pointer-events: none; }

/* Snowy ground */
.scene { position: absolute; inset: auto 0 0 0; height: 13rem; pointer-events: none; }
.scene__hills { position: absolute; inset: 0; width: 100%; height: 100%; }
.prop {
  position: absolute; left: var(--x); bottom: var(--b); width: var(--s); height: auto; overflow: visible;
  transform-origin: 50% 100%;
  transition: transform .6s var(--spring) var(--delay);
}
.wave { transform-box: fill-box; transform-origin: 0% 100%; animation: wave 1s ease-in-out infinite alternate; }

/* Footer: sits on the snow on the booking page, and in the flow on the privacy and terms pages */
.foot {
  position: absolute; left: 0; right: 0; bottom: .7rem; z-index: 3;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .15rem 1.4rem;
  padding-inline: var(--gutter);
  font-size: .9rem; color: var(--ink-soft); text-align: center;
}
.foot nav { display: flex; gap: 1.1rem; }
.foot a { color: var(--ink); font-weight: 600; text-underline-offset: .2em; }
.foot--plain { position: static; margin-top: auto; padding-block: 1.5rem; }

/* ---------- Privacy and terms pages ---------- */

.legal {
  flex: none; width: 100%; max-width: calc(40rem + 2 * var(--gutter)); margin-inline: auto;
  padding: 1.2rem var(--gutter) 3rem;
}
.legal h1 { font-size: clamp(2.1rem, 6vw, 2.9rem); font-weight: 700; line-height: 1.1; }
.legal__updated { margin-top: .4rem; color: var(--ink-soft); }
.legal h2 { margin-top: 2.1rem; font-size: 1.35rem; font-weight: 600; line-height: 1.2; }
.legal p, .legal ul { margin-top: .7rem; }
.legal ul { margin-bottom: 0; padding-left: 1.25rem; }
.legal li + li { margin-top: .35rem; }
.legal a { color: inherit; font-weight: 600; text-underline-offset: .2em; }
.legal mark { padding: 0 .25em; border-radius: .3em; background: var(--gold); color: var(--ink); }
.legal .legal__back { margin-top: 2.4rem; }

/* Everything pops in when the page opens */
.js:not(.is-ready) .brand__hat { opacity: 0; }
.js.is-ready .brand__hat { animation: hat-drop .5s cubic-bezier(.3, .6, .4, 1) .1s both; }
.js:not(.is-ready) .sheet { opacity: 0; transform: translateY(28px); }
.js:not(.is-ready) .host__santa { transform: translateY(105%); }
.js:not(.is-ready) .host__mitt, .js:not(.is-ready) .prop { transform: scale(0); }
.js:not(.is-ready) .host__bubble { opacity: 0; transform: scale(0); }
.js:not(.is-ready) .pick__peek svg { transform: translateY(105%); }

@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .prop--snowman { display: none; }
  main { padding-bottom: 13rem; }
}

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