/* ==========================================================================
   Leetol booth giveaway — styles
   Palette sampled from the Leetol logo; type mirrors leetol.ca (Poppins)
   ========================================================================== */

:root {
  /* brand */
  --teal:        #13a89e;
  --teal-deep:   #0e8a82;
  --teal-soft:   #d8f0ed;
  --green:       #8cc63f;
  --green-soft:  #e6f3d5;
  --orange:      #f7941d;
  --orange-soft: #ffeacc;
  --coral:       #f1592a;
  --coral-soft:  #fde0d5;
  --ink:         #3d3d3f;   /* wordmark grey, darkened a touch for body copy */
  --ink-2:       #6b6b6e;
  --ink-3:       #9a9a9e;
  --mint:        #eef7f5;   /* page */
  --mint-2:      #dbebe7;   /* hairlines */
  --white:       #ffffff;
  --danger:      #d64520;
  --danger-soft: #fdeae4;

  /* type */
  --font-display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Nunito", "Segoe UI", system-ui, sans-serif;

  /* shape + motion */
  --r-card: 20px;
  --r-ctl:  12px;
  --shadow: 0 1px 2px rgba(19, 60, 56, .05), 0 8px 24px -12px rgba(19, 60, 56, .18);
  --ease:   cubic-bezier(.2, .8, .2, 1);
  --dur:    .22s;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mint);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
img { max-width: 100%; display: block; }
a { color: var(--teal-deep); }
button, input { font: inherit; color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

/* Layout ---------------------------------------------------------------- */
.page {
  width: min(100% - 32px, 480px);
  margin: 0 auto;
  padding: 20px 0 48px;
}
@media (min-width: 640px) {
  .page { width: min(100% - 48px, 560px); padding-top: 40px; }
}

/* Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  padding: 8px 4px 24px;
}
.hero__logo { display: inline-block; margin-bottom: 26px; }
.hero__logo img { width: 156px; height: auto; }

.eyebrow {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal-deep);
}
.hero__title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(52px, 16vw, 72px);
  line-height: .96;
  letter-spacing: -.025em;
  color: var(--ink);
}
.hero__lede {
  margin: 0 0 16px;
  font-size: 17px;
  color: var(--ink-2);
  max-width: 34ch;
}
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 0;
  padding: 7px 12px 7px 10px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--mint-2);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--teal-deep);
}
.pill__icon { width: 15px; height: 15px; stroke-width: 2.2; flex: 0 0 auto; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
/* The deadline reads as time-sensitive, so it borrows the warm accent. */
.pill--deadline {
  background: var(--orange-soft);
  border-color: #f5d8a8;
  color: #8a4a02;
}

/* the logo's scattered dots, reused as the page's one flourish */
.hero__dots { position: absolute; inset: 0; pointer-events: none; }
.dot {
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
}
.dot--sm { width: 7px; height: 7px; }
.dot--teal   { background: var(--teal); }
.dot--green  { background: var(--green); }
.dot--orange { background: var(--orange); }
.dot--coral  { background: var(--coral); }
.hero__dots .dot:nth-child(1) { top: 138px; right: 16%; }
.hero__dots .dot:nth-child(2) { top: 176px; right: 5%;  width: 16px; height: 16px; }
.hero__dots .dot:nth-child(3) { top: 228px; right: 24%; }
.hero__dots .dot:nth-child(4) { top: 276px; right: 10%; }
.hero__dots .dot:nth-child(5) { top: 158px; right: 32%; }
.hero__dots .dot:nth-child(6) { top: 258px; right: 38%; }

@media (min-width: 640px) {
  .hero { padding-bottom: 32px; }
  .hero__logo img { width: 176px; }
  .hero__title { font-size: 72px; }
}

/* Cards ----------------------------------------------------------------- */
.card {
  background: var(--white);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  padding: 22px 18px;
}
@media (min-width: 640px) { .card { padding: 26px 24px; } }
.entry { display: grid; gap: 14px; }

/* Steps ----------------------------------------------------------------- */
.step__head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.step__num {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
}
.step__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -.01em;
}
.step__hint { margin: -6px 0 14px; color: var(--ink-2); font-size: 15px; }

/* Rules list */
.rules { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.rule {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--mint);
}
.rule__icon {
  flex: 0 0 auto;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--white);
  color: var(--teal-deep);
}
.rule__icon svg { width: 20px; height: 20px; }
.rule__text { font-size: 15px; padding-top: 6px; }
.rule__text strong { color: var(--ink); font-weight: 700; }

/* Prize cards ----------------------------------------------------------- */
.prizes { display: grid; gap: 10px; }
.prizes__loading { margin: 0; color: var(--ink-3); font-size: 14px; }

.prize { position: relative; }
.prize__input {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
}
.prize__card {
  display: grid;
  grid-template-columns: 48px 1fr 26px;
  gap: 12px;
  align-items: center;
  padding: 12px 12px 12px 12px;
  border-radius: 16px;
  border: 2px solid var(--mint-2);
  background: var(--white);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), transform var(--dur) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.prize__card:active { transform: scale(.985); }
.prize__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 14px;
  color: var(--ink);
}
.prize__icon svg { width: 24px; height: 24px; }
.prize__icon img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.prize--teal   .prize__icon { background: var(--teal-soft);   color: var(--teal-deep); }
.prize--green  .prize__icon { background: var(--green-soft);  color: #5f8f1c; }
.prize--orange .prize__icon { background: var(--orange-soft); color: #c26a05; }
.prize--coral  .prize__icon { background: var(--coral-soft);  color: #c93f14; }
.prize__body { min-width: 0; }
.prize__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1.25;
  color: var(--ink);
}
.prize__detail { display: block; margin-top: 3px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }

/* the heart is the "radio": outlined until chosen, then filled teal with a single beat */
.prize__heart {
  width: 26px; height: 26px;
  color: var(--mint-2);
  transition: color var(--dur) var(--ease);
}
.prize__heart svg { width: 100%; height: 100%; stroke-width: 2; }
.prize__input:checked + .prize__card {
  border-color: var(--teal);
  background: #f4fbfa;
}
.prize__input:checked + .prize__card .prize__heart {
  color: var(--teal);
  animation: beat .5s var(--ease);
}
.prize__input:checked + .prize__card .prize__heart svg { fill: currentColor; }
.prize__input:focus-visible + .prize__card {
  outline: 3px solid rgba(19, 168, 158, .45);
  outline-offset: 2px;
}
@keyframes beat {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.35); }
  55%  { transform: scale(.92); }
  100% { transform: scale(1); }
}

/* Fields ---------------------------------------------------------------- */
.field { margin-bottom: 14px; }
.field__label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
}
.field__input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border-radius: var(--r-ctl);
  border: 1.5px solid var(--mint-2);
  background: var(--white);
  font-size: 16px;   /* ≥16px stops iOS zooming on focus */
  color: var(--ink);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field__input::placeholder { color: var(--ink-3); }
.field__input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(19, 168, 158, .16);
}
.field--invalid .field__input { border-color: var(--danger); }
.field--invalid .field__input:focus { box-shadow: 0 0 0 4px rgba(214, 69, 32, .14); }
.field__affix { position: relative; }
.field__prefix {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-display); font-weight: 600; color: var(--ink-3);
}
.field__affix .field__input { padding-left: 32px; }
.field__error {
  margin: 6px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--danger);
}

/* honeypot — off-screen, not display:none (bots check for that) */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Consent --------------------------------------------------------------- */
.consent {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
  margin: 18px 0 4px;
  cursor: pointer;
}
.consent__box { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.consent__check {
  width: 24px; height: 24px; margin-top: 1px;
  border-radius: 7px;
  border: 2px solid var(--mint-2);
  background: var(--white);
  color: var(--white);
  display: grid; place-items: center;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.consent__check svg { width: 14px; height: 14px; stroke-width: 3; opacity: 0; transition: opacity var(--dur); }
.consent__box:checked + .consent__check { background: var(--teal); border-color: var(--teal); }
.consent__box:checked + .consent__check svg { opacity: 1; }
.consent__box:focus-visible + .consent__check { outline: 3px solid rgba(19, 168, 158, .45); outline-offset: 2px; }
.consent__text { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.consent--invalid .consent__check { border-color: var(--danger); }

/* Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 14px;
  border: 2px solid transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease), color var(--dur) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:focus-visible { outline: 3px solid rgba(19, 168, 158, .45); outline-offset: 2px; }
.btn--block { width: 100%; }
.btn__icon { width: 20px; height: 20px; flex: 0 0 auto; }
.btn--primary { background: var(--teal); color: var(--white); }
.btn--primary:hover { background: var(--teal-deep); }
.btn--ghost { background: var(--white); border-color: var(--mint-2); color: var(--teal-deep); }
.btn--ghost:hover { border-color: var(--teal); }

.btn--submit { margin-top: 18px; position: relative; }
.btn__spinner {
  display: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: var(--white);
  animation: spin .7s linear infinite;
}
.btn.is-busy { pointer-events: none; opacity: .9; }
.btn.is-busy .btn__spinner { display: block; }
.btn.is-busy .btn__label { opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }

.link-btn {
  background: none; border: 0; padding: 6px 0 0;
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 13.5px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.link-btn:hover { color: var(--ink-2); }

.form__error {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: var(--r-ctl);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
}

/* Success / already-entered states -------------------------------------- */
.card--state {
  position: relative;
  text-align: center;
  padding: 34px 22px 26px;
  overflow: hidden;
  display: grid;
  gap: 8px;
  justify-items: center;
}
.state__heart {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  margin-bottom: 6px;
}
.state__heart svg { width: 32px; height: 32px; stroke-width: 2; }
.state__heart--filled svg { fill: currentColor; animation: beat .6s var(--ease) .15s both; }
.state__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.state__text { margin: 0; color: var(--ink-2); font-size: 15.5px; max-width: 34ch; }
.state__text strong { color: var(--ink); }
.state__reminder {
  margin: 8px 0 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--orange-soft);
  color: #8a4a02;
  font-size: 14px;
}
.state__reminder strong { color: inherit; }
.card--state .btn { min-width: 220px; }

/* success burst: the logo dots fly outward once */
.state__burst { position: absolute; inset: 0; pointer-events: none; }
.state__burst .dot { top: 60px; left: 50%; margin-left: -6px; opacity: 0; }
.state__burst .dot:nth-child(1) { --dx: -90px; --dy: -34px; }
.state__burst .dot:nth-child(2) { --dx:  84px; --dy: -46px; }
.state__burst .dot:nth-child(3) { --dx: -56px; --dy:  46px; }
.state__burst .dot:nth-child(4) { --dx:  64px; --dy:  40px; }
.state__burst .dot:nth-child(5) { --dx: -120px;--dy:  6px; }
.state__burst .dot:nth-child(6) { --dx: 118px; --dy: -8px; }
#success:not([hidden]) .state__burst .dot { animation: burst 1.1s var(--ease) .1s forwards; }
@keyframes burst {
  0%   { transform: translate(0,0) scale(.4); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1); opacity: 0; }
}

/* Fine print + footer --------------------------------------------------- */
.fine {
  margin-top: 26px;
  padding: 0 6px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-3);
}
.fine p { margin: 0 0 8px; }
.fine a { color: inherit; }
.fine__brand { font-family: var(--font-display); font-weight: 500; }

/* Toast ----------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 14px;
  text-align: center;
  background: var(--ink);
  color: var(--white);
  font-size: 13.5px;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.35);
  z-index: 10;
}

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

/* Sponsors --------------------------------------------------------------
   Sits outside the form so it persists through the success and
   already-entered states. Each card is tinted with its sponsor's own
   colour, carried in --sp from config.json. */
.sponsors { margin-top: 14px; }
.sponsors__title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -.01em;
}
.sponsors__lede { margin: 0 0 16px; color: var(--ink-2); font-size: 15px; }
.sponsors__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.sponsor {
  --sp: var(--teal);
  display: grid;
  grid-template-columns: 60px 1fr;
  grid-template-areas:
    "logo body"
    "logo btn";
  gap: 4px 12px;
  align-items: center;
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--mint);                                      /* fallback */
  background: color-mix(in srgb, var(--sp) 7%, #ffffff);
  border: 1.5px solid var(--mint-2);
  border-color: color-mix(in srgb, var(--sp) 24%, #ffffff);
}

.sponsor__logo {
  grid-area: logo;
  position: relative;
  width: 60px; height: 60px;
  align-self: start;
  display: grid; place-items: center;
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid color-mix(in srgb, var(--sp) 18%, #ffffff);
}
.sponsor__mono {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .02em;
  color: var(--sp);
}
/* Sits over the monogram; removed by JS if the file is missing. */
.sponsor__img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .18s var(--ease);
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 4px;
  background: var(--white);
}
.sponsor__img.is-loaded { opacity: 1; }
/* Logos that carry their own background fill the tile edge to edge. */
.sponsor__img--fill { padding: 0; object-fit: cover; }

.sponsor__body { grid-area: body; min-width: 0; align-self: end; }
.sponsor__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}
.sponsor__gift { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }

.sponsor__btn {
  grid-area: btn;
  justify-self: start;
  margin-top: 6px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--sp) 35%, #ffffff);
  background: var(--white);
  color: var(--sp);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.sponsor__btn:hover {
  border-color: var(--sp);
  background: color-mix(in srgb, var(--sp) 8%, #ffffff);
}
.sponsor__btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--sp) 45%, transparent); outline-offset: 2px; }
.sponsor__icon { width: 16px; height: 16px; flex: 0 0 auto; }

/* Stand-down page (dormant.php) ------------------------------------------ */
.dormant-body { display: grid; place-items: center; min-height: 100vh; }
.dormant {
  position: relative;
  width: min(100% - 32px, 440px);
  padding: 32px 0;
  text-align: center;
}
.dormant__logo { display: inline-block; margin-bottom: 22px; }
.dormant__logo img { width: 158px; height: auto; margin: 0 auto; }
.dormant__card { padding: 34px 22px 26px; }
.dormant__card .state__text { margin-bottom: 6px; }
.dormant__card .link-btn { text-decoration: underline; text-underline-offset: 2px; }
.dormant__dots { position: absolute; inset: 0; pointer-events: none; }
.dormant__dots .dot:nth-child(1) { top: 8px;   left: 12%; }
.dormant__dots .dot:nth-child(2) { top: 46px;  right: 14%; width: 15px; height: 15px; }
.dormant__dots .dot:nth-child(3) { top: 96px;  left: 6%; }
.dormant__dots .dot:nth-child(4) { top: 22px;  right: 32%; }
