:root {
  --blue: #00a8e0;
  --blue-dark: #0057b8;
  --pink: #ff3ea5;
  --yellow: #ffe000;
  --purple: #7c3aed;
  --cream: #fff8f0;
  --ink: #14171a;
  --ink-soft: #4a4f57;
  --white: #ffffff;
  --radius: 18px;
  --shadow-pop: 6px 6px 0 var(--ink);
  --font-display: "Archivo Black", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(circle at 92% 8%, rgba(255, 62, 165, 0.12) 0, transparent 40%),
    radial-gradient(circle at 6% 85%, rgba(0, 168, 224, 0.14) 0, transparent 45%);
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

a { color: var(--blue-dark); }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0 0 0.5em;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--cream);
  border-bottom: 4px solid var(--ink);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

/* Animated pixel mark: a striped globe tumbles and becomes a heart.
   20 frames on one sprite sheet, played with steps() so it stays frame-stepped
   pixel art rather than a smooth tween. No JS.
   The resting state below is the LAST frame, so if the animation never runs
   (reduced motion, print, an old browser) the heart is what shows. */
.brand-mark {
  --mark-size: 42px;
  --mark-frames: 20;
  display: inline-block;
  width: var(--mark-size);
  height: var(--mark-size);
  flex: 0 0 auto;
  background-image: url("/images/brand-mark-sheet.svg");
  background-repeat: no-repeat;
  background-size: auto 100%;
  background-position-x: calc(var(--mark-size) * -19);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(3px 3px 0 var(--ink));
  animation: brand-intro 1.5s steps(19) 1 both;
}

@keyframes brand-intro {
  from { background-position-x: 0; }
  to   { background-position-x: calc(var(--mark-size) * -19); }
}

/* Already seen this session: no intro, the resting frame (the heart) shows. */
.mark-seen .brand-mark { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .brand-mark { animation: none; }
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.brand-text span { color: var(--pink); }

.site-nav {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  padding-bottom: 4px;
  border-bottom: 3px solid transparent;
}

.site-nav a:hover,
.site-nav a.active {
  border-bottom-color: var(--pink);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 0;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 22px;
  height: 3px;
  background: var(--ink);
  margin: 4px auto;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 0 24px 16px;
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--white);
}

.mobile-nav a.active { background: var(--yellow); }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-pop);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--ink);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn-primary { background: var(--yellow); color: var(--ink); }
.btn-secondary { background: var(--white); color: var(--ink); }
.btn-pink { background: var(--pink); color: var(--white); }
.btn-blue { background: var(--blue); color: var(--white); }

/* Hero */
.hero {
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--purple);
  color: var(--white);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
}

.hero h1 .accent { color: var(--pink); }

.hero p.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 16px 0 28px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-art {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  border: 4px solid var(--ink);
  box-shadow: var(--shadow-pop);
  background:
    repeating-linear-gradient(45deg, var(--blue) 0 24px, var(--blue-dark) 24px 48px);
  position: relative;
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 25%, var(--yellow) 0 60px, transparent 61px),
    radial-gradient(circle at 80% 70%, var(--pink) 0 46px, transparent 47px);
  mix-blend-mode: normal;
  opacity: 0.95;
}

/* Stat strip */
.stat-strip {
  border-top: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
  background: var(--ink);
  color: var(--white);
}

.stat-strip .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 28px 24px;
  text-align: center;
}

.stat-strip .stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--yellow);
}

.stat-strip .stat-label {
  font-size: 0.85rem;
  color: #d8dce1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Sections */
.section { padding: 64px 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.section-head p { color: var(--ink-soft); max-width: 54ch; margin: 8px 0 0; }

/* Card grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
  border-bottom: 3px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-align: center;
  padding: 12px;
}

.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }

.card-body h3 { font-size: 1.15rem; }

.card-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 3px 10px;
}

.card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 2px dashed #d8b8c8;
  font-weight: 700;
}

/* Forms */
.panel {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  padding: 32px;
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--cream);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid var(--purple);
  outline-offset: 1px;
}

.form-msg {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  font-weight: 600;
  display: none;
}

.form-msg.show { display: block; }
.form-msg.ok { background: #d9f7c9; }
.form-msg.err { background: #ffd0d8; }

/* Footer */
.site-footer {
  border-top: 4px solid var(--ink);
  background: var(--ink);
  color: #d8dce1;
  padding: 40px 0;
  margin-top: 40px;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer a { color: var(--yellow); }

.footer-fine { font-size: 0.8rem; color: #9aa0aa; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .stat-strip .container { grid-template-columns: repeat(2, 1fr); }
  .site-nav { display: none; }
  .nav-toggle { display: block; }
  .header-cta { display: none; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
}

/* Required-field marker, countdowns and the Turnstile mount. */
.req { font-weight: 600; font-size: 12px; color: var(--ink-soft); }
.turnstile-mount { margin: 4px 0 14px; min-height: 0; }
.deadline-note {
  margin: 4px 0 14px; padding: 10px 12px; border: 2px solid var(--ink);
  border-radius: 10px; background: var(--yellow); font-weight: 700; font-size: 14px;
}
.deadline-note.is-closed { background: var(--ink); color: #fff; }
.card-countdown {
  display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--yellow);
  font-size: 12px; font-weight: 700;
}
.card-countdown.is-closed { background: var(--ink); color: #fff; }
