/* =========================
   Global Base Styles
   ========================== */

/* Core palette & layout */
:root {
  --catlap-yellow: #fef100;
  --catlap-blue:   #00a3e6;
  --catlap-pink:   #f4519d;
  --catlap-green:  #66c343;
  --catlap-orange: #ff7b25;
  --catlap-brown:  #9c4d18;
  --catlap-black:  #000000;

  --page-bg: var(--catlap-yellow);
  --ink: #000000;
  --ink-soft: #222222;

  --max-width: 1100px;
}

/* Custom font used across site */
@font-face {
  font-family: "MyUploadedFont";
  src: url("../fonts/phosphate.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Reset-ish */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

/* =========================
   Focus styles (keyboard accessibility)
   ========================== */

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

/* Make sure we don't kill outlines for keyboard users */
button:focus-visible,
a:focus-visible,
.nav-toggle:focus-visible,
.nav-link:focus-visible,
.catlap-btn:focus-visible,
.faq-question:focus-visible {
  outline: 3px solid var(--catlap-pink);
  outline-offset: 3px;
}

/* Global body background + base font */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 5% 25%,  rgba(0,163,230,0.95) 0 20%,  transparent 24%),
    radial-gradient(circle at 95% 40%, rgba(244,81,157,0.95) 0 22%, transparent 26%),
    radial-gradient(circle at 15% 95%, rgba(102,195,67,0.95) 0 18%, transparent 22%),
    var(--page-bg);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Typography base */
h1,
h2,
h3 {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Arial, sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
}

p {
  margin: 0 0 0.8rem;
  line-height: 1.5;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

/* Simple container helper if you want it */
.page-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =========================
   Global Mobile Tweaks
   ========================== */

@media (max-width: 720px) {
  /* Slightly smaller base type */
  html {
    font-size: 93.75%; /* effectively ~15px default */
  }

  /* Shared padding for all primary page containers */
  .page-main,
  .race-main,
  .course-main,
  .register-main,
  .lifetime-main,
  .home-main {
    padding: 1.5rem 1rem 2.5rem;
  }

  /* So headings don’t dominate tiny screens */
  h1 {
    font-size: 2rem;
    text-shadow: 2px 2px 0 #000000;
  }

  h2 {
    font-size: 1.5rem;
    text-shadow: 2px 2px 0 #000000;
  }

  /* Make any “card grid” behave nicely by default */
  .two-col-grid,
  .card-grid,
  .course-notes-grid,
  .race-how-grid,
  .race-vibe-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Kill ridiculous margins that look fine on desktop but bad on phones */
  .stack-tight,
  .race-section-header,
  .course-section-header {
    margin-bottom: 1rem;
  }
}

/* Very small devices */

@media (max-width: 400px) {
  h1 {
    font-size: 1.7rem;
  }

  h2 {
    font-size: 1.3rem;
  }
}

/* Ensure tables don't suck at tiny widths */
@media (max-width: 480px) {
  table {
    font-size: 0.85rem;
  }

  th,
  td {
    padding: 0.5rem 0.4rem;
  }
}

/* =========================
   Global site footer
   ========================== */

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
  font-size: 0.8rem;
  color: var(--catlap-brown);
  font-weight: 600;
  text-align: center;
}

.site-footer a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.site-footer a:hover {
  text-decoration: none;
}
