/* ============================================================
   Primary Coding Hubs — site stylesheet
   Built from the Primary Coding League design system
   (tokens + Button/Card/Badge/SectionHeading/Input components).
   ============================================================ */

/* ---------- Webfonts ---------- */
/* Montserrat is loaded from Google Fonts (see <head> of each page). */
@font-face {
  font-family: 'Lazydog';
  src: url('../assets/fonts/Lazydog.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Brand core */
  --pcl-gold: #ae853e;
  --pcl-gold-bright: #f59f18;
  --pcl-ink: #000000;
  --pcl-white: #ffffff;

  /* Neutrals */
  --pcl-grey-900: #000000;
  --pcl-grey-800: #1a1a1a;
  --pcl-grey-700: #393939;
  --pcl-grey-600: #585555;
  --pcl-grey-400: #8a8786;
  --pcl-grey-200: #d8d5d2;
  --pcl-grey-100: #efece8;
  --pcl-grey-50:  #f7f5f1;

  /* Bright accents */
  --pcl-red:    #e10000;
  --pcl-green:  #00bf63;
  --pcl-pink:   #ff66c4;
  --pcl-blue:   #38b6ff;
  --pcl-orange: #f59f18;
  --pcl-flame:  #ff751f;

  --pcl-gold-grad: linear-gradient(135deg, #c9a25a 0%, #ae853e 55%, #8a6a2e 100%);

  /* Semantic */
  --color-brand: var(--pcl-gold);
  --color-brand-strong: #8a6a2e;
  --color-accent: var(--pcl-gold-bright);
  --text-strong: var(--pcl-grey-900);
  --text-body: var(--pcl-grey-700);
  --text-muted: var(--pcl-grey-600);
  --text-on-dark: var(--pcl-white);
  --text-on-gold: var(--pcl-ink);
  --text-link: #1f7fc4;
  --surface-page: var(--pcl-white);
  --surface-card: var(--pcl-white);
  --surface-muted: var(--pcl-grey-50);
  --surface-sunken: var(--pcl-grey-100);
  --surface-ink: var(--pcl-ink);
  --surface-ink-2: var(--pcl-grey-800);
  --border-subtle: var(--pcl-grey-200);
  --border-strong: var(--pcl-grey-700);
  --border-gold: var(--pcl-gold);
  --focus-ring: var(--pcl-blue);

  /* Type */
  --font-display: 'Lazydog', 'Montserrat', system-ui, sans-serif;
  --font-sans: 'Montserrat', system-ui, -apple-system, sans-serif;
  --fs-display-xl: 5rem;
  --fs-display-l: 3.5rem;
  --fs-display-m: 2.5rem;
  --fs-h1: 2.25rem;
  --fs-h2: 1.75rem;
  --fs-h3: 1.375rem;
  --fs-h4: 1.125rem;
  --fs-body-lg: 1.125rem;
  --fs-body: 1rem;
  --fs-sm: 0.875rem;
  --fs-xs: 0.75rem;
  --lh-tight: 1.05;
  --lh-snug: 1.2;
  --lh-normal: 1.5;
  --lh-relaxed: 1.65;
  --ls-display: 0.01em;
  --ls-tight: -0.01em;
  --ls-label: 0.08em;
  --ls-eyebrow: 0.16em;

  /* Space / radius / shadow / motion */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20, 14, 0, 0.08);
  --shadow-md: 0 4px 14px rgba(20, 14, 0, 0.10);
  --shadow-lg: 0 12px 34px rgba(20, 14, 0, 0.14);
  --shadow-gold: 0 8px 24px rgba(174, 133, 62, 0.35);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 360ms;
  --container: 1200px;
  --container-narrow: 760px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

.container { max-width: var(--container); margin: 0 auto; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
  color: var(--text-on-gold);
  background: var(--pcl-gold);
  border: 2px solid var(--pcl-gold);
  border-radius: var(--radius-md);
  padding: 13px 22px;
  min-height: 46px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-gold);
  transition: filter var(--dur-base) var(--ease-out), transform var(--dur-fast) var(--ease-bounce), background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(0.96); filter: brightness(0.97); }
.btn .lucide, .btn svg { width: 17px; height: 17px; }

.btn-sm { padding: 9px 16px; min-height: 38px; font-size: 14px; }
.btn-lg { padding: 16px 28px; min-height: 52px; font-size: 16px; }

.btn-outline {
  background: transparent;
  color: var(--text-strong);
  border-color: var(--pcl-grey-700);
  box-shadow: none;
}
.btn-outline:hover { filter: none; border-color: var(--pcl-gold); color: var(--color-brand-strong); }

.btn-outline-dark {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: none;
}
.btn-outline-dark:hover { filter: none; border-color: var(--pcl-gold); color: var(--pcl-gold); }

.btn-ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--color-brand-strong);
  padding-left: 0;
  padding-right: 0;
  min-height: 32px;
}
.btn-ghost:hover { filter: none; color: var(--pcl-gold); }

.btn-block { width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 26px;
}
.card-flush { padding: 0; overflow: hidden; }
.card-accent { border-top: 4px solid var(--pcl-gold); }
.card-dark {
  background: var(--surface-ink);
  border: 2px solid var(--pcl-gold);
  color: rgba(255, 255, 255, 0.85);
}
.card-interactive { transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); }
.card-interactive:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  line-height: 1;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-gold  { background: color-mix(in srgb, var(--pcl-gold) 14%, white);  color: var(--color-brand-strong); border-color: color-mix(in srgb, var(--pcl-gold) 40%, transparent); }
.badge-green { background: color-mix(in srgb, var(--pcl-green) 13%, white); color: #06633a; border-color: color-mix(in srgb, var(--pcl-green) 40%, transparent); }
.badge-blue  { background: color-mix(in srgb, var(--pcl-blue) 14%, white);  color: #0a6aa6; border-color: color-mix(in srgb, var(--pcl-blue) 40%, transparent); }
.badge-orange{ background: color-mix(in srgb, var(--pcl-orange) 16%, white);color: #9a5e00; border-color: color-mix(in srgb, var(--pcl-orange) 45%, transparent); }
.badge-pink  { background: color-mix(in srgb, var(--pcl-pink) 14%, white);  color: #a8327d; border-color: color-mix(in srgb, var(--pcl-pink) 45%, transparent); }
.badge-ink   { background: var(--pcl-grey-100); color: var(--pcl-grey-700); border-color: var(--pcl-grey-200); }
.badge-solid-gold  { background: var(--pcl-gold);  color: var(--pcl-ink); }
.badge-solid-green { background: var(--pcl-green); color: #04331f; }
.badge-solid-blue  { background: var(--pcl-blue);  color: #06344d; }

/* ---------- Section heading ---------- */
.section-heading { display: flex; flex-direction: column; gap: 10px; }
.section-heading .eyebrow {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-brand-strong);
}
.section-heading h2 {
  font-size: var(--fs-h2);
  font-weight: 900;
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-snug);
  color: var(--text-strong);
  margin: 0;
}
.section-heading .lead {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-relaxed);
  color: var(--text-body);
  margin: 0;
  max-width: 62ch;
}
.section-heading.center { align-items: center; text-align: center; margin: 0 auto; }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: var(--fs-sm); font-weight: 700; color: var(--text-strong); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: var(--fs-body);
  color: var(--text-strong);
  padding: 11px 14px;
  background: var(--surface-card);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pcl-blue) 25%, transparent);
}
.field textarea { resize: vertical; }
.field select { cursor: pointer; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 40px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text-strong);
}
.site-header .brand img { height: 48px; width: 48px; object-fit: contain; }
.site-header .brand .brand-name { display: block; font-weight: 900; font-size: 16px; letter-spacing: -0.01em; line-height: 1.1; }
.site-header .brand .brand-sub { display: block; font-weight: 600; font-size: 11px; letter-spacing: 0.03em; color: var(--text-muted); margin-top: 2px; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a:not(.btn) {
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text-body);
  transition: color var(--dur-base) var(--ease-out);
}
.site-nav a:not(.btn):hover { color: var(--pcl-gold); }
.site-nav a.active { color: var(--color-brand-strong); font-weight: 800; }
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px;
  cursor: pointer;
  color: var(--text-strong);
}
.nav-toggle svg { display: block; width: 22px; height: 22px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--surface-ink);
  color: rgba(255, 255, 255, 0.72);
  padding: 54px 40px 34px;
}
.site-footer .cols {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
}
.site-footer .col-title {
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
}
.site-footer a { display: block; text-decoration: none; color: inherit; font-size: 14px; margin-bottom: 9px; transition: color var(--dur-base) var(--ease-out); }
.site-footer a:hover { color: var(--pcl-gold); }
.site-footer .legal {
  max-width: var(--container);
  margin: 30px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- Shared section helpers ---------- */
.section { padding: 72px 40px; }
.dotgrid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--pcl-gold) 18%, transparent) 1px, transparent 0);
  background-size: 26px 26px;
  opacity: 0.6;
  pointer-events: none;
}
.hero-icon {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.hero-icon svg { width: 100%; height: 100%; }

.check-row { display: flex; gap: 9px; align-items: flex-start; font-size: var(--fs-sm); color: var(--text-body); }
.check-row svg { width: 17px; height: 17px; color: var(--pcl-green); flex-shrink: 0; margin-top: 1px; }
.card-dark .check-row { color: rgba(255, 255, 255, 0.85); }
.card-dark .check-row svg { color: var(--pcl-gold); }

.icon-tile { display: grid; place-items: center; border-radius: var(--radius-md); }

/* ---------- Grids ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-icon { display: none; }
}
@media (max-width: 860px) {
  .section { padding: 56px 24px; }
  .grid-3 { grid-template-columns: 1fr; }
  .hero-split, .split-2 { grid-template-columns: 1fr !important; }
  .site-header { padding: 11px 20px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-lg);
    padding: 10px 20px 18px;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 12px 4px; font-size: 16px; border-bottom: 1px solid var(--surface-sunken); }
  .site-nav .btn { margin-top: 14px; }
  .site-footer .cols { flex-direction: column; }
  .site-footer .cols > div:last-child { text-align: left !important; }
  .site-footer .cols > div:last-child .flexend { justify-content: flex-start !important; }
}
@media (max-width: 560px) {
  .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 48px 18px; }
  h1 { font-size: clamp(2rem, 9vw, 3.2rem) !important; }
}
