/* STYLE.CSS: THE LOOK OF THE WHOLE WEBSITE */


/* 1. SETTINGS (DESIGN VARIABLES) */
:root {
  /* Accent color: the main color of the site */
  --accent: #36cfff;

  /* The text color that sits ON the accent color (the words on the main button). */
  --color-on-accent: #04121f;

  /* Second color for small details (badge dot, "Today" timeline dot). */
  --accent-2: #ffb547;

  /* --- Backgrounds --- */
  --color-bg: #0a1628;             /* main page background */
  --color-bg-alt: #0c1b31;         /* every other section */
  --color-surface: #0f2038;        /* cards and panels */
  --color-surface-raised: #142a47; /* drop-down menu and form fields */

  /* --- Lines --- */
  --color-border: #22385a;         /* thin dividing lines */
  --color-border-strong: #5d7598;  /* form fields and outline buttons */

  /* --- Text --- */
  --color-heading: #f3f7fc;        /* headings */
  --color-text: #dce6f3;           /* normal paragraphs */
  --color-text-muted: #a3b4cb;     /* softer supporting text */

  /* --- Colors made from the accent --- */
  --color-link: var(--accent);
  --color-button: var(--accent);
  --color-focus: var(--accent);
  --color-accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --color-accent-line: color-mix(in srgb, var(--accent) 45%, transparent);
  --grid-minor: color-mix(in srgb, var(--accent) 7%, transparent);
  --grid-major: color-mix(in srgb, var(--accent) 14%, transparent);
  --color-header-bg: color-mix(in srgb, var(--color-bg) 85%, transparent);
  --shadow-raised: 0 24px 48px -32px rgba(0, 0, 0, 0.9);

  /* Fonts */
  --font-body: "Lato", "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
  --font-heading: "Lato", "Gill Sans", "Gill Sans MT", Calibri, sans-serif;

  /* Text sizes (keep 16px / 1rem or larger) */
  --text-sm: 1rem;                                          /* 16px: smallest text */
  --text-base: 1.125rem;                                    /* 18px: paragraphs */
  --text-lg: 1.3125rem;                                     /* 21px: intro text */
  --text-xl: 1.5rem;                                        /* 24px: h3 headings */
  --text-2xl: clamp(1.875rem, 1.4rem + 1.6vw, 2.25rem);     /* 30-36px: h2 */
  --text-3xl: clamp(2.25rem, 1.6rem + 2.6vw, 3rem);         /* 36-48px: page titles */
  --text-hero: clamp(2.75rem, 1.6rem + 4.8vw, 4.5rem);      /* 44-72px: home headline */

  /* Spacing scale */
  --space-2xs: 0.25rem;  /* 4px */
  --space-xs: 0.5rem;    /* 8px */
  --space-sm: 0.75rem;   /* 12px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-section: clamp(4rem, 2.5rem + 5vw, 7rem); /* top and bottom of each section */

  /* Rounded corners */
  --radius-sm: 8px;      /* buttons and form fields */
  --radius-md: 12px;     /* cards */
  --radius-lg: 16px;     /* large panels and pictures */
  --radius-pill: 999px;  /* fully rounded badges and tags */

  /* Page width */
  --container-width: 1180px;                     /* widest the content gets */
  --container-narrow: 780px;                     /* narrow column (timeline) */
  --container-padding: clamp(1rem, 4vw, 2rem);   /* space at the screen edges */
  --header-height: 4.5rem;                       /* height of the top bar */

  /* Animation speed and distance */
  --speed-fast: 150ms;
  --speed: 250ms;
  --speed-slow: 650ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);  /* starts fast, ends gently */
  --reveal-distance: 18px;                 /* how far items rise as they fade in */
  --hover-lift: -4px;                      /* how far cards rise on hover */

  /* Tells the browser to draw scrollbars and form controls dark. */
  color-scheme: dark;
}


/* 2. LIGHT THEME COLORS */
:root[data-theme="light"] {
  --color-bg: #f4f7fb;             /* main page background */
  --color-bg-alt: #eaf0f7;         /* every other section */
  --color-surface: #ffffff;        /* cards and panels */
  --color-surface-raised: #ffffff; /* drop-down menu and form fields */
  --color-border: #d3dce8;         /* thin dividing lines */
  --color-border-strong: #6c7d95;  /* form fields and outline buttons */
  --color-heading: #0a1628;        /* headings */
  --color-text: #1a2638;           /* normal paragraphs */
  --color-text-muted: #4a5a72;     /* softer supporting text */

  /* The accent mixed with 45% black: a deeper shade that is easy to read on white. */
  --color-link: color-mix(in srgb, var(--accent) 55%, #000000);
  --color-button: var(--color-link);
  --color-focus: var(--color-link);
  --color-on-accent: #ffffff;
  --color-accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --color-accent-line: color-mix(in srgb, var(--color-link) 40%, transparent);
  --grid-minor: color-mix(in srgb, var(--color-link) 7%, transparent);
  --grid-major: color-mix(in srgb, var(--color-link) 13%, transparent);
  --shadow-raised: 0 24px 48px -32px rgba(10, 22, 40, 0.45);

  color-scheme: light;
}


/* 3. BASE STYLES */
*,
*::before,
*::after {
  box-sizing: border-box; /* widths include padding and borders: easier math */
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Leaves room for the sticky header when a link jumps down the page. */
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  margin: 0;
  min-height: 100vh;
  /* "Flexbox" in a column: with main { flex: 1 } below, this keeps the footer at the bottom of the screen on short pages. */
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

/* The skip link sends keyboard focus to <main>. */
main:focus {
  outline: none;
}

h1,
h2,
h3 {
  margin: 0 0 var(--space-md);
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-heading);
  text-wrap: balance; /* evens out line lengths in newer browsers */
}

h1 {
  font-size: var(--text-3xl);
  line-height: 1.1;
}

h2 {
  font-size: var(--text-2xl);
}

h3 {
  font-size: var(--text-xl);
}

p {
  margin: 0 0 var(--space-md);
}

/* Pictures shrink to fit their space and keep their shape. */
img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* The outline people see when they move around with the Tab key. */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

/* Highlight color when you select text with the mouse. */
::selection {
  background-color: var(--color-accent-line);
  color: var(--color-heading);
}

/* Lists marked role="list" in the HTML lose their bullets and indent. */
:where(ul[role="list"], ol[role="list"]) {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Form controls use the page font instead of the browser default. */
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}


/* 4. ACCESSIBILITY 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;
}

.skip-link {
  position: absolute;
  top: 0;
  left: var(--space-md);
  z-index: 200;
  padding: var(--space-sm) var(--space-md);
  font-weight: 700;
  color: var(--color-on-accent);
  background-color: var(--color-button);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transform: translateY(-150%); /* parked just above the screen */
}

.skip-link:focus {
  transform: translateY(var(--space-sm)); /* slides into view */
}


/* 5. LAYOUT HELPERS */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto; /* equal space left and right = centered */
  padding-inline: var(--container-padding);
}

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

.section {
  padding-block: var(--space-section);
}

.section--alt {
  background-color: var(--color-bg-alt);
}

/* A thin top line with a short accent "tick" at the left, like a measurement on a technical drawing. */
.section-header {
  display: grid;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  background: linear-gradient(var(--color-link), var(--color-link)) 0 0 / 4rem 2px no-repeat border-box;
}

.section-header h2,
.section-header p {
  margin: 0;
}

.section-header p {
  max-width: 62ch;
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

/* Wide screens: heading on the left, intro on the right. */
@media (min-width: 900px) {
  .section-header {
    grid-template-columns: 5fr 7fr;
    gap: var(--space-2xl);
  }

  /* Keeps heading and intro stacked (used in narrow columns). */
  .section-header--stacked {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* "Grid" is a CSS layout tool for rows and columns. */
.grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 900px) {
  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 equal columns */
  }
}


/* 6. BUTTONS AND LINKS */
.button-row {
  display: flex;
  flex-wrap: wrap; /* buttons drop to a new line on narrow screens */
  gap: var(--space-sm);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px; /* a large, easy-to-tap target */
  padding: 0.75rem 1.4rem;
  font-size: var(--text-base);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent; /* shows up as a real border in high-contrast mode */
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn--primary {
  color: var(--color-on-accent);
  background-color: var(--color-button);
}

.btn--primary:hover {
  background-color: color-mix(in srgb, var(--color-button) 82%, var(--color-heading));
}

.btn--secondary {
  color: var(--color-heading);
  background-color: transparent;
  border-color: var(--color-border-strong);
}

.btn--secondary:hover {
  background-color: var(--color-accent-soft);
  border-color: var(--color-link);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}


/* 7. SITE HEADER AND NAVIGATION */
.site-header {
  position: sticky; /* sticks to the top of the screen while scrolling */
  top: 0;
  z-index: 100;     /* sits above the page content */
  background-color: var(--color-bg);
  border-bottom: 1px solid transparent;
}

/* Frosted-glass effect, only in browsers that support it. */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header {
    background-color: var(--color-header-bg);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
  }
}

/* js/main.js adds "is-scrolled" once the page moves. */
.site-header.is-scrolled {
  border-bottom-color: var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-heading);
  text-decoration: none;
}

.brand-logo {
  width: 36px;
  height: 36px;
}

.site-nav {
  margin-left: auto; /* pushes the menu to the right side */
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.nav-link:hover {
  color: var(--color-heading);
  background-color: var(--color-accent-soft);
}

/* The page you are on. */
.nav-link[aria-current="page"] {
  color: var(--color-link);
  background-color: var(--color-accent-soft);
}

/* An underline as well, so color isn't the only clue. */
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0.85rem;
  bottom: 0.35rem;
  left: 0.85rem;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
}

/* Shared look for the two round icon buttons. */
.theme-toggle,
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--color-heading);
  background-color: transparent;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.theme-toggle:hover,
.nav-toggle:hover {
  background-color: var(--color-accent-soft);
  border-color: var(--color-link);
}

/* Dark mode shows the sun ("switch to light"); light mode shows the moon. */
.icon-moon {
  display: none;
}

:root[data-theme="light"] .icon-sun {
  display: none;
}

:root[data-theme="light"] .icon-moon {
  display: block;
}

/* The hamburger: three bars that turn into an X when the menu opens. */
.nav-toggle {
  display: none; /* hidden on wide screens; shown on small screens below */
  flex-direction: column;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Without JavaScript the buttons can't work, so hide them. */
.no-js .theme-toggle,
.no-js .nav-toggle {
  display: none;
}

/* SMALL SCREENS ONLY (767px wide and narrower). */
@media (max-width: 767px) {
  /* With JavaScript: show the hamburger; fold the links away. */
  .js .nav-toggle {
    display: inline-flex;
  }

  .js .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    gap: var(--space-2xs);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    padding: var(--space-md) var(--container-padding) var(--space-lg);
    background-color: var(--color-surface-raised);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-raised);
  }

  /* js/main.js adds "is-open" to the header when the menu is open. */
  .js .site-header.is-open .nav-list {
    display: flex;
  }

  .js .nav-link {
    width: 100%;
    padding-block: 0.75rem;
    font-size: var(--text-base);
  }

  .js .nav-link[aria-current="page"]::after {
    right: auto;
    width: 2rem;
  }

  /* Without JavaScript: show the links on their own row instead, so nobody is ever locked out of the menu. */
  .no-js .header-inner {
    flex-wrap: wrap;
  }

  .no-js .site-nav {
    flex-basis: 100%;
    margin-left: 0;
    padding-bottom: var(--space-sm);
  }
}


/* 8. HOME PAGE HERO */
.hero {
  position: relative;
  isolation: isolate; /* keeps the grid layer behind the hero content */
  overflow: hidden;
  padding-block: clamp(3rem, 1.5rem + 6vw, 6.5rem) var(--space-section);
  border-bottom: 1px solid var(--color-border);
}

/* The blueprint grid: small squares every 32px and stronger lines every 128px, drawn with stacked "linear-gradient" stripes. */
.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size: 128px 128px, 128px 128px, 32px 32px, 32px 32px;
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent 95%);
  mask-image: linear-gradient(to bottom, #000 35%, transparent 95%);
}

.hero-inner {
  display: grid;
  gap: var(--space-2xl);
  align-items: center;
}

@media (min-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
}

/* The small rounded announcement above the headline. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin: 0 0 var(--space-lg);
  padding: 0.35rem 0.9rem;
  font-size: var(--text-sm);
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
}

.badge-dot {
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--accent-2);
  border-radius: 50%;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 22%, transparent);
}

.hero-title {
  max-width: 16ch; /* "ch" = the width of one character */
  margin-bottom: var(--space-lg);
  font-size: var(--text-hero);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* Larger, softer intro paragraph (used in every page header). */
.lead {
  max-width: 58ch;
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

.hero .lead {
  margin-bottom: var(--space-xl);
}


/* 9. INNER PAGE HEADERS AND BREADCRUMBS */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem);
  border-bottom: 1px solid var(--color-border);
}

.page-hero h1 {
  max-width: 20ch;
}

.page-hero .lead {
  margin-bottom: 0;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
}

/* A slanted divider line between items (drawn, so it isn't read aloud). */
.breadcrumb li + li::before {
  content: "";
  width: 1px;
  height: 1em;
  margin-inline: 0.75rem;
  background-color: var(--color-border-strong);
  transform: rotate(20deg);
}

.breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-width: 44px; /* a comfortable tap area, even for short words */
  min-height: 44px;
  color: var(--color-text-muted);
}

.breadcrumb a:hover {
  color: var(--color-link);
}

.breadcrumb [aria-current="page"] {
  font-weight: 700;
  color: var(--color-heading);
}


/* 10. FEATURE CARDS */
.card {
  padding: var(--space-xl);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.card p {
  color: var(--color-text-muted);
}

/* No extra space under the last thing inside a card. */
.card > :last-child {
  margin-bottom: 0;
}

/* The small square that holds an icon. */
.card-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  margin-bottom: var(--space-lg);
  color: var(--color-link);
  background-color: var(--color-accent-soft);
  border: 1px solid var(--color-accent-line);
  border-radius: var(--radius-sm);
}

.card-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}


/* 11. IMAGE FRAME (CORNER MARKS) */
.frame {
  position: relative;
  padding: var(--space-sm);
}

.frame::before {
  --mark-color: var(--color-link);
  --mark-length: 22px;
  --mark-width: 2px;
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Eight thin bars (two per corner), each one a tiny gradient. */
  background:
    linear-gradient(var(--mark-color), var(--mark-color)) top left / var(--mark-length) var(--mark-width),
    linear-gradient(var(--mark-color), var(--mark-color)) top left / var(--mark-width) var(--mark-length),
    linear-gradient(var(--mark-color), var(--mark-color)) top right / var(--mark-length) var(--mark-width),
    linear-gradient(var(--mark-color), var(--mark-color)) top right / var(--mark-width) var(--mark-length),
    linear-gradient(var(--mark-color), var(--mark-color)) bottom left / var(--mark-length) var(--mark-width),
    linear-gradient(var(--mark-color), var(--mark-color)) bottom left / var(--mark-width) var(--mark-length),
    linear-gradient(var(--mark-color), var(--mark-color)) bottom right / var(--mark-length) var(--mark-width),
    linear-gradient(var(--mark-color), var(--mark-color)) bottom right / var(--mark-width) var(--mark-length);
  background-repeat: no-repeat;
}

.frame img {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
}


/* 12. SPLIT SECTIONS (IMAGE + TEXT) */
.split {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
}

/* Space between one split row and the next. */
.split + .split {
  margin-top: var(--space-section);
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(2rem, 5vw, 5rem);
  }

  .split--reverse .split-media {
    order: 2; /* moves the picture after the text, onto the right */
  }
}

.split-content p {
  max-width: 62ch;
}

.split-content > :last-child {
  margin-bottom: 0;
}

.checklist {
  display: grid;
  gap: var(--space-sm);
  margin: var(--space-lg) 0;
}

.checklist li {
  position: relative;
  padding-left: 2rem;
}

/* A check mark drawn with two borders of a small rotated box. */
.checklist li::before {
  content: "";
  position: absolute;
  top: 0.3em;
  left: 0.4rem;
  width: 0.45rem;
  height: 0.85rem;
  border: solid var(--color-link);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}


/* 13. ABOUT PAGE: PILLARS, STATS, TIMELINE */
.pillars {
  display: grid;
  gap: var(--space-xl);
}

@media (min-width: 900px) {
  .pillars {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.pillar {
  padding-top: var(--space-lg);
  border-top: 2px solid var(--color-link);
}

.pillar p {
  margin: 0;
  color: var(--color-text-muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--color-border);
  border-left: 1px solid var(--color-border);
}

@media (min-width: 900px) {
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stat {
  padding: var(--space-xl) var(--space-lg);
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.stat-number {
  display: block;
  margin-bottom: var(--space-sm);
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1;
  color: var(--color-heading);
  font-variant-numeric: tabular-nums; /* digits line up evenly */
}

.stat-label {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.timeline {
  position: relative;
  display: grid;
  gap: var(--space-xl);
  padding-left: 2.5rem;
}

/* The vertical line. */
.timeline::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: calc(0.6875rem - 1px);
  width: 2px;
  background-color: var(--color-border-strong);
}

.timeline-item {
  position: relative;
}

/* The dot for each milestone, centered on the line. */
.timeline-item::before {
  content: "";
  position: absolute;
  top: 0.3rem;
  left: -2.5rem;
  width: 1.375rem;
  height: 1.375rem;
  background-color: var(--color-bg-alt);
  border: 2px solid var(--color-link);
  border-radius: 50%;
}

.timeline-item--now::before {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-2) 22%, transparent);
}

.timeline-date {
  margin: 0 0 var(--space-2xs);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-link);
}

.timeline-item h3 {
  margin-bottom: var(--space-xs);
}

.timeline-item p:last-child {
  margin: 0;
  color: var(--color-text-muted);
}


/* 14. SHOWCASE CARDS */
@media (min-width: 600px) {
  .grid--showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .grid--showcase {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.media-card {
  display: flex;
  flex-direction: column;
  overflow: hidden; /* trims the zoomed picture on hover */
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.media-card-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}

.media-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* fills the space; trims edges if needed */
}

.media-card-body {
  padding: var(--space-lg);
}

.media-card-body h3 {
  margin-bottom: var(--space-xs);
}

.media-card-body p:last-child {
  margin: 0;
  color: var(--color-text-muted);
}

/* The small category label on each card. */
.tag {
  display: inline-block;
  margin: 0 0 var(--space-sm);
  padding: 0.1rem 0.75rem;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-link);
  background-color: var(--color-accent-soft);
  border-radius: var(--radius-pill);
}


/* 15. CALL-TO-ACTION PANEL */
.cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: var(--space-xl);
  align-items: center;
  padding: clamp(2rem, 1rem + 4vw, 3.5rem);
  background:
    linear-gradient(var(--color-link), var(--color-link)) var(--radius-lg) 0 / 6rem 3px no-repeat border-box,
    var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

/* The faint grid, fading in from the right side. */
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: linear-gradient(to left, #000, transparent 60%);
  mask-image: linear-gradient(to left, #000, transparent 60%);
}

@media (min-width: 900px) {
  .cta {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.cta h2 {
  margin-bottom: var(--space-sm);
}

.cta p {
  max-width: 56ch;
  margin: 0;
  color: var(--color-text-muted);
}


/* 16. CONTACT PAGE AND FORM */
.contact-layout {
  display: grid;
  gap: var(--space-xl);
  align-items: start;
}

@media (min-width: 960px) {
  .contact-layout {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }
}

/* A large box for grouped content. */
.panel {
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.panel h2 {
  font-size: var(--text-xl);
}

.form {
  display: grid;
  gap: var(--space-lg);
}

/* Two fields side by side on wider screens. */
.form-row {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.form-field {
  display: grid;
  gap: var(--space-xs);
}

.form-label {
  font-weight: 700;
  color: var(--color-heading);
}

.form-label-note {
  font-weight: 400;
  color: var(--color-text-muted);
}

.form-input {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 1rem;
  color: var(--color-text);
  background-color: var(--color-surface-raised);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
}

textarea.form-input {
  min-height: 10rem;
  resize: vertical; /* visitors can drag it taller, not wider */
}

.form-input:hover {
  border-color: var(--color-text-muted);
}

.form-input:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-color: var(--color-link);
}

.form-hint {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* The note at the top of the form panel needs room before the fields. */
.panel > .form-hint {
  margin-bottom: var(--space-lg);
}

/* The message box that appears after pressing the button (demo). */
.form-status {
  margin: 0;
}

.form-status:not(:empty) {
  padding: var(--space-md) var(--space-lg);
  color: var(--color-text);
  background-color: var(--color-accent-soft);
  border-left: 4px solid var(--color-link);
  border-radius: var(--radius-sm);
}

.contact-list {
  display: grid;
  gap: var(--space-lg);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.contact-item .card-icon {
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
}

.contact-label {
  display: block;
  font-weight: 700;
  color: var(--color-heading);
}


/* 17. SITE FOOTER */
.site-footer {
  padding-top: var(--space-2xl);
  background-color: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
}

.footer-grid {
  display: grid;
  gap: var(--space-xl);
  padding-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  }
}

.footer-tagline {
  max-width: 40ch;
  margin-top: var(--space-sm);
  color: var(--color-text-muted);
}

.footer-heading {
  margin-bottom: var(--space-xs);
  font-size: var(--text-base);
}

.footer-links a,
.footer-links span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.footer-links a {
  min-width: 44px; /* a comfortable tap area, even for short words */
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-link);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-lg);
  padding-block: var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
}

.footer-bottom p {
  margin: 0;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}


/* 18. MOTION: FADE-INS AND HOVER EFFECTS */

/* Smooth scrolling for links that jump within the page. */
html.motion {
  scroll-behavior: smooth;
}

/* Waiting to be revealed: invisible but still in place. */
.motion .reveal {
  opacity: 0;
}

/* Revealed: plays the "reveal-up" animation once. */
.motion .reveal.is-visible {
  opacity: 1;
  animation: reveal-up var(--speed-slow) var(--ease) var(--reveal-delay, 0ms) backwards;
}

/* "@keyframes" describes an animation. */
@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(var(--reveal-distance));
  }
}

/* Smooth changes ("transitions") for things that react to the mouse. */
.motion .btn,
.motion .nav-link,
.motion .theme-toggle,
.motion .nav-toggle,
.motion .form-input {
  transition:
    background-color var(--speed-fast) ease,
    border-color var(--speed-fast) ease,
    color var(--speed-fast) ease,
    transform var(--speed-fast) ease;
}

.motion .nav-toggle-bar {
  transition: transform var(--speed) var(--ease), opacity var(--speed-fast) ease;
}

.motion .card,
.motion .media-card {
  transition:
    transform var(--speed) var(--ease),
    border-color var(--speed) var(--ease),
    box-shadow var(--speed) var(--ease);
}

.motion .media-card-image img {
  transition: transform var(--speed-slow) var(--ease);
}

.motion .site-header {
  transition: border-color var(--speed) ease;
}

/* The mobile menu slides down a little as it opens. */
.motion .site-header.is-open .nav-list {
  animation: menu-in var(--speed) var(--ease);
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* Hover movement only for devices with a real pointer (mouse or trackpad). */
@media (hover: hover) {
  .motion .btn:hover {
    transform: translateY(-1px);
  }

  .motion .card:hover,
  .motion .media-card:hover {
    transform: translateY(var(--hover-lift));
    border-color: var(--color-accent-line);
    box-shadow: var(--shadow-raised);
  }

  .motion .media-card:hover .media-card-image img {
    transform: scale(1.04);
  }
}


/* 19. REDUCED MOTION, HIGH CONTRAST, AND PRINTING */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .reveal {
    opacity: 1 !important;
  }
}

@media (forced-colors: active) {
  .nav-link[aria-current="page"] {
    text-decoration: underline;
  }
}

@media print {
  .skip-link,
  .site-nav,
  .theme-toggle,
  .back-to-top {
    display: none;
  }

  .reveal {
    opacity: 1 !important;
    animation: none !important;
  }
}
