/* =============================================================================
   BASE  —  reset, design tokens, typography, layout primitives
   -----------------------------------------------------------------------------
   The colour tokens below are DEFAULTS. site-core.js overwrites them at runtime
   from config.theme.colors, so the site can be re-skinned from config.js alone.
   ========================================================================== */

:root {
  --brand:       #1361c4;
  --brand-dark:  #0d4a99;
  --brand-light: #eaf1fb;
  --accent:      #2f80ed;
  --gold:        #f2a516;
  --gold-dark:   #cf8a08;
  --ink:         #16202c;
  --body:        #3a4553;
  --muted:       #6b7684;
  --bg:          #ffffff;
  --bg-alt:      #f4f7fb;
  --header-bg:   #ffffff;
  --hero-overlay:#0d1b2e;
  --footer-bg:   #0f1b2d;
  --footer-text: #c3cfdd;
  --line:        #e4e8ec;

  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 1160px;
  --gutter: clamp(16px, 4vw, 40px);

  --shadow-sm: 0 1px 3px rgba(16,32,54,.08), 0 1px 2px rgba(16,32,54,.04);
  --shadow:    0 10px 30px rgba(16,32,54,.10), 0 2px 8px rgba(16,32,54,.06);
  --shadow-lg: 0 24px 60px rgba(16,32,54,.18);

  --font-heading: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

  --ease: cubic-bezier(.4, 0, .2, 1);
  --header-h: 74px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}

/* Hide content until the engine has rendered, to avoid a flash of unstyled
   template placeholders. site-core.js adds .site-ready to <html>. */
html:not(.site-ready) [data-render] { visibility: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1rem; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Default icon size — every .ico gets a sane size unless a more specific rule
   (e.g. .btn .ico) overrides it. Without this, an inline SVG with only a
   viewBox falls back to its huge intrinsic size. */
.ico { width: 1.25em; height: 1.25em; flex-shrink: 0; vertical-align: middle; display: inline-block; }

/* --------------------------------------------------------------- layout */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(48px, 8vw, 96px); }
.section--alt { background: var(--bg-alt); }
.section--tight { padding-block: clamp(32px, 5vw, 56px); }

.section-head { max-width: 720px; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .6rem;
}
.section-head p { color: var(--muted); font-size: 1.08rem; margin: 0; }

.grid { display: grid; gap: clamp(18px, 3vw, 30px); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- helpers */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.text-center { text-align: center; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* Broken / missing images degrade to a subtle branded placeholder instead of a
   broken-image icon. site-core.js sets .img-missing when an image fails. */
.img-missing {
  background: linear-gradient(135deg, var(--brand-light), #dfe9f7) !important;
  position: relative;
  min-height: 160px;
}
.img-missing::after {
  content: "⚡";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--brand); opacity: .5;
}
img.img-missing { display: block; }

/* reveal-on-scroll */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
