/* ============================================================
   GOOGLE FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700&family=Barlow:wght@400;500;600&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400;1,8..60,600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Colour */
  --bg:        #E1F5FE;
  --surface:   #FDF8F3;
  --ink:       #263238;
  --slate:     #607D8B;
  --teal:      #76B2B7;
  --crease:    #CFD8DC;
  --rose:      #D69588;
  --dark-bg:   #042940;
  --dark-text: #FFFFFF;

  /* Typography */
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-ui:      'Barlow', Arial, sans-serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Type scale */
  --text-display:  4rem;      /* 64px */
  --text-h1:       3.188rem;  /* 51px */
  --text-h2:       2.563rem;  /* 41px */
  --text-h3:       1.625rem;  /* 26px */
  --text-body-lg:  1.25rem;   /* 20px */
  --text-body:     1.125rem;  /* 18px */
  --text-ui:       0.875rem;  /* 14px */
  --text-caption:  0.75rem;   /* 12px */
  --text-overline: 0.6875rem; /* 11px */

  /* Spacing (4px base) */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Layout */
  --content-max: 740px;
  --site-max:    1200px;
  --nav-height:  64px;
  --radius:      6px;
  --radius-lg:   8px;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */
.overline {
  font-family: var(--font-ui);
  font-size: var(--text-overline);
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--teal);
}
.display {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}
h1, .h1 {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  font-weight: 700;
  line-height: 1.10;
  letter-spacing: -0.015em;
  color: var(--ink);
}
h2, .h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h3, .h3 {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}
.lead {
  font-family: var(--font-body);
  font-size: var(--text-body-lg);
  font-style: italic;
  color: var(--slate);
  line-height: 1.6;
}
.caption {
  font-family: var(--font-ui);
  font-size: var(--text-caption);
  color: var(--slate);
  letter-spacing: 0.02em;
}
.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--surface);
  border-bottom: 1px solid var(--crease);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 var(--space-xl);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--site-max);
  margin: 0 auto;
}
.nav__logo img { height: 36px; width: auto; }
.nav__links {
  display: flex;
  gap: var(--space-xl);
  list-style: none;
}
.nav__links a {
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 200ms ease-out, color 200ms ease-out;
}
.nav__links a:hover { opacity: 1; color: var(--teal); text-decoration: none; }
.nav__links a[aria-current="page"] { opacity: 1; color: var(--teal); }
.nav__links a:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* hamburger — hidden on desktop */
.nav__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  color: var(--ink);
  align-items: center;
}
.nav__drawer {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
}
.nav__drawer.is-open { display: flex; }
.nav__drawer a {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.nav__drawer a:hover { color: var(--teal); }
.nav__drawer-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-xl);
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--ink);
  line-height: 1;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background-color: var(--dark-bg);
  color: var(--dark-text);
  padding: var(--space-3xl) var(--space-xl) var(--space-xl);
}
.footer__inner {
  max-width: var(--site-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2xl);
  flex-wrap: wrap;
}
.footer__brand img { height: 48px; width: auto; margin-bottom: var(--space-md); }
.footer__tagline {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--teal);
  font-size: var(--text-body);
}
.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  list-style: none;
}
.footer__links a {
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 200ms ease-out;
}
.footer__links a:hover { color: var(--teal); }
.footer__bottom {
  max-width: var(--site-max);
  margin: var(--space-2xl) auto 0;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255,255,255,0.1);
  font-family: var(--font-ui);
  font-size: var(--text-caption);
  color: rgba(255,255,255,0.4);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  height: 44px;
  padding: 0 var(--space-lg);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 200ms ease-out, transform 200ms ease-out;
  border: 1px solid transparent;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.btn--primary   { background: var(--ink);  color: #fff;        border-color: var(--ink); }
.btn--secondary { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn--ghost     { background: transparent; color: var(--slate); border-color: var(--crease); }
.btn--teal      { background: var(--teal); color: #fff;        border-color: var(--teal); }
.btn--dark-secondary { background: transparent; color: var(--teal); border-color: var(--teal); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--crease);
  border-radius: var(--radius-lg);
  box-shadow: 3px 3px 0 var(--crease);
  padding: var(--space-xl);
}

/* ============================================================
   BLOCKQUOTE
   ============================================================ */
blockquote {
  border-left: 4px solid var(--teal);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-xl) 0;
  font-style: italic;
  font-size: var(--text-body-lg);
  color: var(--slate);
  background: rgba(118,178,183,0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ============================================================
   SECTION LAYOUTS
   ============================================================ */
.section {
  padding: var(--space-4xl) var(--space-xl);
}
.section--dark {
  background-color: var(--dark-bg);
  color: var(--dark-text);
}
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark .display { color: var(--dark-text); }
.section--dark .lead { color: rgba(255,255,255,0.75); }
.section--dark blockquote {
  color: rgba(255,255,255,0.85);
  border-left-color: var(--teal);
  background: rgba(118,178,183,0.08);
}

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

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  font-family: var(--font-ui);
  font-size: var(--text-caption);
  color: var(--slate);
  margin-bottom: var(--space-md);
}
.breadcrumb a { color: var(--slate); text-decoration: underline; }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb__sep { margin: 0 var(--space-xs); opacity: 0.5; }

/* ============================================================
   STATUS TAG
   ============================================================ */
.tag {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: var(--text-overline);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px var(--space-sm);
  border-radius: 4px;
}
.tag--live     { background: rgba(118,178,183,0.15); color: var(--teal); }
.tag--upcoming { background: rgba(96,125,139,0.12);  color: var(--slate); }

/* ============================================================
   TEXT COLOUR UTILITIES
   ============================================================ */
.text-teal  { color: var(--teal); }
.text-white { color: #fff; }
.text-slate { color: var(--slate); }
.text-rose  { color: var(--rose); }

/* Spacing utilities */
.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-xl  { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

/* Required asterisk & optional label */
.required-star { color: var(--rose); }
.field-optional { font-weight: 400; color: var(--slate); margin-left: var(--space-xs); }

/* Pillar teaser — overline spacing */
.pillar-teaser .overline { margin-top: var(--space-sm); }

/* Pillars strip section label */
.pillars-strip__label {
  max-width: var(--site-max);
  margin: 0 auto var(--space-xl);
  display: block;
}

/* Image grid as native list */
.image-grid { list-style: none; }

/* ============================================================
   ARTICLE BODY (shared by pillar pages)
   ============================================================ */
.article-body h2 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}
.article-body p {
  margin-bottom: var(--space-lg);
}
.article-body p:last-child { margin-bottom: 0; }
.article-body a { color: var(--teal); text-decoration: underline; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767px) {
  :root {
    --text-display: 2.25rem;  /* 36px */
    --text-h1:      1.75rem;  /* 28px */
    --text-h2:      1.5rem;   /* 24px */
    --text-body:    1rem;     /* 16px */
  }
  .nav__links    { display: none; }
  .nav__hamburger { display: flex; }
  .section       { padding: var(--space-3xl) var(--space-md); }
}

@media (min-width: 768px) and (max-width: 1279px) {
  :root {
    --text-display: 3rem;
    --text-h1:      2.25rem;
  }
}
