/* ===========================================================
   Pudding Run 2026 — pudding-dog themed running event
   Palette: pudding yellow + caramel brown + soft cream
   =========================================================== */

:root {
  --yellow:      #FFD400;   /* pudding body */
  --yellow-deep: #FBC02D;
  --cream:       #FFF8E1;
  --caramel:     #6B4226;   /* beret / caramel */
  --caramel-soft:#8D6E63;
  --ink:         #4A3B2A;
  --white:       #ffffff;
  --pink:        #FF8FA3;   /* bow accent */
  --shadow:      0 10px 30px rgba(107, 66, 38, .14);
  --shadow-sm:   0 4px 14px rgba(107, 66, 38, .12);
  --radius:      22px;
  --radius-lg:   34px;
  --maxw:        1120px;
  --sans:        'Mali', 'Itim', system-ui, -apple-system, sans-serif;
  --display:     'Itim', 'Mali', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(var(--maxw), 92%); margin-inline: auto; }

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

a { color: inherit; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--caramel);
  color: var(--cream);
  text-align: center;
  font-size: .9rem;
  padding: 8px 14px;
  letter-spacing: .2px;
}
.topbar-bow { margin-right: 6px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 248, 225, .92);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--yellow);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; font-family: var(--display);
  font-size: 1.5rem; color: var(--caramel);
}
.brand-mark { font-size: 1.7rem; }
.brand-text { line-height: 1; }
.brand-year {
  display: inline-block; margin-left: 6px;
  background: var(--yellow); color: var(--caramel);
  border-radius: 999px; padding: 1px 10px; font-size: 1rem;
}
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { text-decoration: none; font-weight: 600; color: var(--ink); transition: color .15s; }
.nav-links a:hover { color: var(--yellow-deep); }
.nav-cta {
  background: var(--caramel); color: var(--cream) !important;
  padding: 8px 18px; border-radius: 999px;
}
.nav-cta:hover { background: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; cursor: pointer; border: none;
  font-family: var(--sans); font-weight: 700; text-decoration: none;
  padding: 13px 26px; border-radius: 999px; font-size: 1rem;
  transition: transform .12s ease, box-shadow .15s ease, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--caramel); color: var(--cream);
  box-shadow: 0 6px 0 #4d2f1a;
}
.btn-primary:hover { background: #5a3720; }
.btn-ghost {
  background: var(--white); color: var(--caramel);
  border: 2px solid var(--yellow); box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { background: var(--cream); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-lg { padding: 16px 34px; font-size: 1.1rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 400px at 80% -10%, #FFE680 0%, transparent 60%),
    var(--yellow);
  padding: 56px 0 90px;
  overflow: hidden;
}
.hero-inner {
  display: grid; grid-template-columns: 1.05fr .95fr;
  align-items: center; gap: 30px;
}
.hero-eyebrow {
  font-weight: 700; color: var(--caramel);
  background: rgba(255,255,255,.55); display: inline-block;
  padding: 5px 16px; border-radius: 999px; margin: 0 0 14px;
}
.hero-title {
  font-family: var(--display); color: var(--caramel);
  font-size: clamp(2.8rem, 7vw, 4.8rem); line-height: .95; margin: 0;
}
.hero-title span { color: var(--white); -webkit-text-stroke: 2px var(--caramel); }
.hero-tagline {
  font-family: var(--display); font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--ink); margin: 14px 0 22px;
}
.hero-facts { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 8px; }
.hero-facts li {
  background: rgba(255,255,255,.6); border-radius: 14px;
  padding: 9px 16px; font-weight: 600; width: fit-content; max-width: 100%;
}
.hero-facts-ico { margin-right: 6px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-art { display: flex; justify-content: center; }
.mascot-wrap { width: min(420px, 90%); animation: bob 4s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.hero-wave {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 60px;
  background: var(--cream);
  -webkit-mask: radial-gradient(40px 60px at 40px 0, transparent 98%, #000) repeat-x;
  mask: radial-gradient(40px 60px at 40px 0, transparent 98%, #000) repeat-x;
  -webkit-mask-size: 80px 60px; mask-size: 80px 60px;
}

/* ---------- Sections ---------- */
.section { padding: 70px 0; }
.section-soft { background: #FFFCEF; }
.section-title {
  font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--caramel); margin: 0 0 10px;
}
.section-title--center { text-align: center; }
.section-title .dot { color: var(--yellow-deep); }
.section-lead { font-size: 1.1rem; max-width: 760px; margin: 0 0 36px; color: var(--caramel-soft); }
.section-lead--center { margin-inline: auto; text-align: center; }

/* ---------- Feature grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card {
  background: var(--white); border-radius: var(--radius);
  padding: 28px 24px; box-shadow: var(--shadow-sm);
  border: 2px solid #FCEFA0; text-align: center;
}
.feature-ico { font-size: 2.6rem; margin-bottom: 10px; }
.feature-card h3 { margin: 6px 0 8px; color: var(--caramel); font-size: 1.25rem; }
.feature-card p { margin: 0; color: var(--caramel-soft); }

/* ---------- Categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.cat-card {
  position: relative; background: var(--white); border-radius: var(--radius-lg);
  padding: 30px 26px 28px; box-shadow: var(--shadow); border: 3px solid #FCEFA0;
  display: flex; flex-direction: column; text-align: center;
}
.cat-card--featured { border-color: var(--yellow); transform: translateY(-8px); }
.cat-flag {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--pink); color: var(--white); font-weight: 700;
  padding: 5px 18px; border-radius: 999px; font-size: .9rem; white-space: nowrap;
}
.cat-badge {
  align-self: center; background: var(--cream); color: var(--caramel-soft);
  font-weight: 700; letter-spacing: 1px; font-size: .75rem;
  padding: 4px 14px; border-radius: 999px;
}
.cat-dist { font-family: var(--display); font-size: 3rem; color: var(--caramel); line-height: 1; margin: 12px 0 4px; }
.cat-card h3 { margin: 0 0 4px; color: var(--ink); }
.cat-desc { color: var(--caramel-soft); margin: 0 0 16px; flex: 1; }
.cat-price { font-family: var(--display); font-size: 2rem; color: var(--yellow-deep); margin-bottom: 18px; }

/* ---------- Race pack ---------- */
.pack-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pack-item {
  background: var(--white); border-radius: var(--radius); padding: 26px 20px;
  text-align: center; box-shadow: var(--shadow-sm); border: 2px solid #FCEFA0;
}
.pack-ico { font-size: 2.4rem; margin-bottom: 8px; }
.pack-item h3 { margin: 4px 0 6px; color: var(--caramel); font-size: 1.1rem; }
.pack-item p { margin: 0; color: var(--caramel-soft); font-size: .95rem; }

/* ---------- Timeline ---------- */
.timeline { max-width: 640px; margin: 0 auto; display: grid; gap: 14px; }
.tl-row {
  display: grid; grid-template-columns: 86px 1fr; align-items: center; gap: 18px;
  background: var(--white); border-radius: 16px; padding: 14px 20px;
  box-shadow: var(--shadow-sm); border-left: 6px solid var(--yellow);
}
.tl-time { font-family: var(--display); font-size: 1.3rem; color: var(--caramel); }
.tl-text { color: var(--ink); }

/* ---------- Register ---------- */
.section-register { background: linear-gradient(180deg, #FFFCEF, var(--cream)); }
.register-shell {
  max-width: 880px; margin: 0 auto; background: var(--white);
  border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow);
  border: 3px solid var(--yellow);
}
/* Gate: shown before the user opts in to loading Checkrace */
.register-gate { text-align: center; padding: 50px 24px; }
.gate-ico { font-size: 3rem; margin-bottom: 8px; }
.register-gate h3 { color: var(--caramel); margin: 6px 0 8px; font-size: 1.6rem; }
.register-gate p { color: var(--caramel-soft); max-width: 480px; margin: 0 auto 22px; }
.gate-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.gate-note { font-size: .9rem; color: var(--caramel-soft); margin: 22px auto 0; max-width: 460px; opacity: .9; }

.register-frame-wrap { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 620px; background: var(--cream); }
.register-frame { width: 100%; height: 760px; border: 0; display: block; }
.register-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; color: var(--caramel-soft);
}
.mini-spinner {
  width: 42px; height: 42px; border-radius: 50%;
  border: 5px solid #FCEFA0; border-top-color: var(--caramel);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.register-fallback { text-align: center; padding: 50px 24px; }
.fallback-ico { font-size: 3rem; margin-bottom: 8px; }
.register-fallback h3 { color: var(--caramel); margin: 6px 0 8px; font-size: 1.5rem; }
.register-fallback p { color: var(--caramel-soft); max-width: 460px; margin: 0 auto 22px; }

.register-help { text-align: center; color: var(--caramel-soft); margin: 16px 0 4px; font-size: .95rem; }
.register-help a { color: var(--yellow-deep); font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { background: var(--caramel); color: var(--cream); padding: 40px 0; text-align: center; }
.footer-inner { display: grid; gap: 8px; justify-items: center; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 1.4rem; }
.footer-note { margin: 4px 0 0; opacity: .9; }
.footer-copy { margin: 6px 0 0; opacity: .7; font-size: .9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .nav-links { gap: 12px; font-size: .9rem; }
  .nav-links a:not(.nav-cta) { display: none; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { order: 2; }
  .hero-art { order: 1; }
  .hero-eyebrow, .hero-facts li { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .feature-grid, .cat-grid { grid-template-columns: 1fr; }
  .cat-card--featured { transform: none; }
  .pack-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .pack-grid { grid-template-columns: 1fr; }
  .register-frame { height: 680px; }
}
