/* CHIRON — public home page styles
   Tokens and brand rules per the CHIRON design brief. */

/* ---------- Tokens ---------- */
:root {
  --navy: #003078;
  --blue: #0060a8;
  --sky: #2888b8;
  --sky-pale: #b8d8e8;
  --green: #307038;
  --green-mid: #508858;
  --sage: #b8c8b8;
  --teal: #0890b0;
  --yellow: #f8b010;
  --orange: #f06018;
  --paper: #f3f7fb;
  --card: #ffffff;
  --ink: #0e2340;
  --muted: #56687f;
  --line: #dee7f1;
  --tint: #eaf2f8;
  --shadow-tile: 0 10px 24px rgba(13, 38, 76, .10);
  --shadow-lift: 0 16px 32px rgba(13, 38, 76, .16);

  /* Derived (not in the palette proper) */
  --tint-yellow: #fcf2d6;
  --btn-primary-ink: #ffffff;
  /* The loop band stays deep navy in both themes (white text on it). */
  --band-bg: #003078;
  --band-ink: #ffffff;
  --band-label: #b8d8e8;

  --radius-sm: 8px;
  --radius-lg: 14px;
  --radius-petal: 28px;
  --radius-pill: 999px;

  --font-display: 'Jost', Arial, 'Helvetica Neue', sans-serif;
  --font-body: Arial, 'Helvetica Neue', sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #8fb6ea;
    --blue: #5ea3dc;
    --sky: #58abd6;
    --sky-pale: #1c3850;
    --green: #6fb07e;
    --sage: #2e4038;
    --teal: #3fb6cf;
    --orange: #f07a40;
    --paper: #0e1826;
    --card: #16263b;
    --ink: #e9f0f8;
    --muted: #9dafc5;
    --line: #263a52;
    --tint: #1b2f45;
    --tint-yellow: #38301c;
    --btn-primary-ink: #0e1826;
    --band-bg: #132a4d;
  }
}
:root[data-theme="dark"] {
  --navy: #8fb6ea;
  --blue: #5ea3dc;
  --sky: #58abd6;
  --sky-pale: #1c3850;
  --green: #6fb07e;
  --sage: #2e4038;
  --teal: #3fb6cf;
  --orange: #f07a40;
  --paper: #0e1826;
  --card: #16263b;
  --ink: #e9f0f8;
  --muted: #9dafc5;
  --line: #263a52;
  --tint: #1b2f45;
  --tint-yellow: #38301c;
  --btn-primary-ink: #0e1826;
  --band-bg: #132a4d;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/22px var(--font-body);
}

img { max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(32px, 4.5vw, 52px); line-height: 1.15; }
h2 { font-size: clamp(26px, 3.2vw, 34px); line-height: 1.24; }
h3 { font-size: 20px; line-height: 26px; }

p { margin: 0; max-width: 65ch; }
.small { font-size: 13px; line-height: 18px; }
.muted { color: var(--muted); }

.label {
  font: 600 12px/16px var(--font-display);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 0;
}

a { color: var(--blue); }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  background: var(--card);
  color: var(--navy);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 8px; }

.container {
  width: min(100% - 32px, 1200px);
  margin-inline: auto;
}
@media (min-width: 1280px) {
  .container { width: min(100% - 192px, 1248px); }
}

section { padding-block: 48px; }
@media (min-width: 900px) {
  section { padding-block: 72px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: 600 15px/20px var(--font-display);
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-tile); }

.btn-primary {
  background: var(--navy);
  color: var(--btn-primary-ink);
}
.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
/* On the navy band: white ground, navy text, in both themes. */
.btn-onband {
  background: #ffffff;
  color: #003078;
}

/* ---------- Petal device ---------- */
.petal-tr { border-radius: var(--radius-sm) var(--radius-petal) var(--radius-sm) var(--radius-sm); }

.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm) var(--radius-petal) var(--radius-sm) var(--radius-sm);
  background: var(--tint);
  color: var(--teal);
  flex: none;
}
.icon-chip svg { width: 26px; height: 26px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  position: relative;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-right: auto;
}
.brand-symbol { width: 44px; height: auto; }
.brand-name {
  display: block;
  font: 600 19px/22px var(--font-display);
  letter-spacing: 3px;
  color: var(--navy);
}
.brand-sub {
  display: block;
  font-size: 12px;
  line-height: 16px;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-nav > a:not(.btn) {
  font: 600 15px/20px var(--font-display);
  color: var(--ink);
  text-decoration: none;
}
.site-nav > a:not(.btn):hover { color: var(--navy); text-decoration: underline; }
.site-nav .btn { padding: 12px 32px; }

.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--navy);
  padding: 8px;
  cursor: pointer;
}
.menu-btn svg { width: 22px; height: 22px; display: block; }

@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: -16px;
    right: -16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    padding: 16px 24px 24px;
    box-shadow: var(--shadow-tile);
  }
  .site-nav.open { display: flex; }
}

/* ---------- Hero ---------- */
.hero { padding-block: 48px; }
@media (min-width: 900px) { .hero { padding-block: 72px; } }

.hero-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 48px; }
}
.hero-copy > * + * { margin-top: 16px; }
.hero-copy .lead { font-size: 17px; line-height: 26px; }
.hero-note { color: var(--muted); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.logo-card {
  /* The full lock-up may only sit on white or paper ground — fixed white in both themes. */
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-tile);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-card img { max-width: 320px; width: 100%; }

/* ---------- Cards (How CHIRON works) ---------- */
.card-grid {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}
@media (min-width: 760px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-tile);
}
.card > * + * { margin-top: 12px; }
.card h3 { margin-top: 16px; }

.section-head > * + * { margin-top: 12px; }

/* ---------- The CHIRON loop ---------- */
.band {
  background: var(--band-bg);
  color: var(--band-ink);
}
.band h2 { color: #ffffff; }
.band .label { color: var(--band-label); }
.band p { color: #dbe7f5; }
.band-head {
  display: grid;
  gap: 16px;
  justify-items: start;
}
.loop-list {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
@media (min-width: 900px) {
  .loop-list { grid-template-columns: repeat(5, 1fr); }
}
.loop-step {
  background: #ffffff;
  color: #0e2340;
  border-radius: var(--radius-sm) var(--radius-petal) var(--radius-sm) var(--radius-sm);
  padding: 20px;
  box-shadow: var(--shadow-tile);
}
.loop-step h3 { color: #003078; margin-top: 12px; }
.loop-step p { color: #56687f; margin-top: 8px; font-size: 13px; line-height: 18px; }
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm) var(--radius-petal) var(--radius-sm) var(--radius-sm);
  font: 600 16px/1 var(--font-display);
}
.badge-sky { background: #b8d8e8; color: #003078; }
.badge-sage { background: #b8c8b8; color: #0e2340; }
.badge-yellow { background: #f8b010; color: #0e2340; }

/* ---------- CHIRON Notes ---------- */
.notes-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 24px;
}
.notes-head .section-head { flex: 1 1 auto; }
.all-notes {
  font: 600 15px/20px var(--font-display);
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
}
.all-notes:hover { text-decoration: underline; }

.notes-grid {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}
@media (min-width: 760px) {
  .notes-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}
.note-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-tile);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.note-card .note-link {
  margin-top: auto;
  padding-top: 8px;
  font: 600 15px/20px var(--font-display);
  color: var(--navy);
  text-decoration: none;
}
.note-card .note-link:hover { text-decoration: underline; }
.note-upcoming {
  border: 1px dashed var(--sky-pale);
  box-shadow: none;
}
.note-card .label-accent { color: var(--teal); }
.note-cta {
  background: var(--tint-yellow);
  border-color: transparent;
}
.note-cta p, .note-cta .label { color: var(--ink); }
.note-cta .label { opacity: .75; }
.stamp {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 52px;
  height: 52px;
}

/* ---------- Inside CHIRON ---------- */
.inside {
  background: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.inside-grid {
  display: grid;
  gap: 32px;
  margin-top: 32px;
}
@media (min-width: 980px) {
  .inside-grid { grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
}
.tile-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 560px) {
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
}
.tile {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.tile h3 { margin-top: 16px; font-size: 18px; line-height: 24px; }
.tile p { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 18px; }

.person-example { margin: 0; }
.person-example > figcaption { margin-bottom: 12px; }
.person-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-tile);
}
.person-top { display: flex; align-items: center; gap: 16px; }
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: var(--radius-sm) var(--radius-petal) var(--radius-sm) var(--radius-sm);
  background: var(--sky-pale);
  color: var(--navy);
  font: 600 18px/1 var(--font-display);
}
.person-name { font: 600 17px/22px var(--font-display); color: var(--ink); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  line-height: 18px;
}
.chip-yellow { background: var(--tint-yellow); border-color: transparent; }
.chip-sky { background: var(--tint); border-color: transparent; }

.person-aside > * + * { margin-top: 16px; }

/* ---------- Coming up ---------- */
.webinar-list {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.webinar-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 24px;
}
.webinar-card time {
  font: 600 15px/20px var(--font-display);
  color: var(--navy);
  min-width: 110px;
}
.webinar-card h3 { font-size: 17px; line-height: 24px; flex: 1 1 240px; color: var(--ink); }
.webinar-card .webinar-meta { color: var(--muted); }
.webinar-card .webinar-link {
  font: 600 15px/20px var(--font-display);
  color: var(--navy);
  text-decoration: none;
}
.webinar-card .webinar-link:hover { text-decoration: underline; }

/* ---------- For training centres ---------- */
.centres-panel {
  background: var(--tint);
  border-radius: var(--radius-sm) var(--radius-petal) var(--radius-sm) var(--radius-sm);
  padding: 32px;
}
@media (min-width: 900px) { .centres-panel { padding: 48px; } }
.centres-panel > * + * { margin-top: 16px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--line);
  padding-block: 48px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-brand img { width: 36px; }
.footer-tagline { margin-top: 16px; color: var(--muted); }
.footer-cols {
  display: grid;
  gap: 32px;
  margin-top: 32px;
}
@media (min-width: 760px) {
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
}
.footer-col h3 {
  font-size: 13px;
  line-height: 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}
.footer-col ul { list-style: none; margin: 12px 0 0; padding: 0; }
.footer-col li + li { margin-top: 8px; }
.footer-col a { color: var(--ink); text-decoration: none; }
.footer-col a:hover { color: var(--navy); text-decoration: underline; }

/* ---------- Section label with hairline ---------- */
.label-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.label-row::after {
  content: "";
  flex: 1 1 0;
  height: 1px;
  background: var(--line);
}

/* ---------- Your contact (team) ---------- */
.team-card {
  display: flex;
  align-items: center;
  gap: 48px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  box-shadow: var(--shadow-tile);
}
.team-photo {
  flex: none;
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 96px 96px 96px 14px;
}
.team-body { flex: 1 1 0; }
.team-body > * + * { margin-top: 12px; }
.team-role { font: 500 16px/22px var(--font-display); color: var(--blue); }
.team-card .btn { flex: none; align-self: center; }
@media (max-width: 860px) {
  .team-card { flex-direction: column; align-items: flex-start; padding: 24px; }
  .team-card .btn { align-self: flex-start; }
}

/* ---------- Programme streams ---------- */
.stream-grid {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}
@media (min-width: 860px) {
  .stream-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}
.stream-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-tile);
}
/* Stream headers keep fixed deep grounds with white text in both themes. */
.stream-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  color: #ffffff;
}
.stream-head h3 { color: #ffffff; font-size: 19px; line-height: 24px; }
.stream-head svg { flex: none; }
.stream-navy { background: #003078; }
.stream-blue { background: #0060a8; }
.stream-ink { background: #0e2340; }
.stream-card > p { padding: 20px 24px 24px; color: var(--ink); }

/* ---------- Coming up (events) ---------- */
.events-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-tile);
  margin-top: 24px;
}
.event-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 32px;
  padding: 20px 24px;
}
.event-row + .event-row { border-top: 1px solid var(--line); }
.event-when {
  flex: 0 0 150px;
  font: 600 17px/24px var(--font-display);
  color: var(--navy);
}
.event-main { flex: 1 1 240px; display: flex; flex-direction: column; }
.event-title { font: 600 17px/24px var(--font-display); color: var(--ink); }
.event-sub { font-size: 14px; line-height: 20px; color: var(--muted); }
.event-link {
  font: 600 15px/20px var(--font-display);
  color: var(--blue);
  text-decoration: none;
}
.event-link:hover { text-decoration: underline; }

/* ---------- Knowledge Hub ---------- */
.hub-tiles {
  display: grid;
  gap: 16px;
  margin-top: 8px;
}
@media (min-width: 640px) {
  .hub-tiles { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
.hub-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease;
}
.hub-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.hub-tile h3 { font-size: 17px; line-height: 24px; color: var(--ink); }
.hub-tile p { font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }

/* ---------- Recognition pathway ---------- */
.pathway {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
@media (min-width: 860px) {
  .pathway { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}
.pathway li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm) var(--radius-petal) var(--radius-sm) var(--radius-sm);
  padding: 24px;
  box-shadow: var(--shadow-tile);
}
.pathway li.pathway-next {
  border-style: dashed;
  border-color: var(--sky-pale);
  box-shadow: none;
}
.pathway h3 { font-size: 19px; line-height: 25px; margin-top: 12px; }
.pathway p { font-size: 14px; line-height: 21px; color: var(--muted); margin-top: 8px; }
.badge-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 22px 22px 22px 6px;
  font: 700 18px/1 var(--font-display);
}
.badge-navy { background: #003078; color: #ffffff; }
.badge-blue { background: #0060a8; color: #ffffff; }
.badge-tint { background: var(--tint); color: var(--navy); }

/* ---------- Why CHIRON ---------- */
.why-panel {
  display: flex;
  align-items: center;
  gap: 48px;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
}
.why-panel img { flex: none; width: 180px; height: 180px; }
.why-panel .why-body > * + * { margin-top: 12px; }
@media (max-width: 860px) {
  .why-panel { flex-direction: column; align-items: flex-start; padding: 24px; }
}

/* ---------- For training centres (Open Lab) ---------- */
.centres-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px 64px 14px 14px;
  padding: 40px 48px;
  box-shadow: var(--shadow-tile);
}
.centres-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
}
.centres-head .section-head { max-width: 760px; }
.step-tiles {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
@media (min-width: 860px) {
  .step-tiles { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}
.step-tiles li {
  background: var(--tint);
  border-radius: var(--radius-sm) var(--radius-petal) var(--radius-sm) var(--radius-sm);
  padding: 20px;
}
.step-num { font: 700 15px/20px var(--font-display); color: var(--teal); }
.step-tiles h3 { font-size: 18px; line-height: 24px; margin-top: 8px; }
.step-tiles p { font-size: 14px; line-height: 21px; color: var(--ink); margin-top: 8px; }
@media (max-width: 860px) {
  .centres-card { padding: 24px; border-radius: 14px 40px 14px 14px; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .tile:hover, .btn:hover { transform: none; }
}
