/* ==========================================================================
   style.css — Global styles
   Design tokens (custom properties), reset, base typography, layout utilities.
   ========================================================================== */

/* 1. Design tokens
   ========================================================================== */
:root {
  /* Colour — dark theme from the Figma home page design */
  --color-bg: #000000;
  --color-surface: #1a1a1a;
  --color-ink: #ffffff;
  --color-ink-soft: #cccccc;
  --color-muted: #999999;
  --color-line: rgba(255, 255, 255, 0.12);
  --color-hover: rgba(255, 255, 255, 0.06);
  --color-accent: #ff4719;

  --color-dark: #000000;
  --color-on-dark: #ffffff;
  --color-on-dark-muted: #cccccc;
  --color-line-dark: rgba(255, 255, 255, 0.12);
  /* Text on light fills (white buttons, badges) */
  --color-on-light: #000000;

  /* Typography — Google Sans Flex for headings, Poppins for body text (loaded from Google Fonts in each page head) */
  --font-sans: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Google Sans Flex", "Poppins", ui-sans-serif, system-ui, sans-serif;

  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;  /* 15px — nav, buttons, small copy */
  --fs-base: 1rem;     /* 16px — body copy */
  --fs-lg: 1.125rem;   /* 18px — eyebrows, lead */
  --fs-xl: 1.25rem;    /* 20px — card titles */
  --fs-2xl: clamp(1.25rem, 1.05rem + 0.6vw, 1.5rem);      /* 24px */
  --fs-3xl: clamp(1.5rem, 1.2rem + 1vw, 2rem);            /* 32px */
  --fs-section: clamp(1.875rem, 1.3rem + 1.8vw, 3rem);    /* 48px — section titles */
  --fs-stat: clamp(2.25rem, 1.6rem + 2vw, 3.5rem);        /* 56px */
  --fs-display: clamp(3.25rem, 0.5rem + 12vw, 11rem);     /* 176px — hero wordmark */

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Shape & depth */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);

  /* Layout */
  --container: 1320px;
  --gutter: clamp(1rem, 4vw, 3.75rem);
  --header-h: 90px;
  --section-space: clamp(4.5rem, 2.5rem + 5vw, 8rem); /* space above AND below every section: 128px each on desktop, 72px on phones */

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 160ms;
  --dur: 280ms;

  /* Layers */
  --z-header: 100;
}

/* 2. Reset / base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  line-height: 1.75;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
  /* Room for the fixed header. The home hero runs underneath it instead. */
  padding-top: var(--header-h);
}

.page-home main {
  padding-top: 0;
}

img,
picture,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  flex-shrink: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* :where() keeps this at zero specificity so component classes can set margins */
:where(ul, ol)[class] {
  list-style: none;
  margin: 0;
  padding: 0;
}

address {
  font-style: normal;
}

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

/* Lock page scroll while the mobile menu is open */
html.nav-open,
html.nav-open body {
  overflow: hidden;
}

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

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

/* 3. Typography
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

/* Section label, e.g. "About us" */
.eyebrow {
  font-size: var(--fs-lg);
  line-height: 1.75;
  color: var(--color-accent);
}

.eyebrow--on-dark {
  color: var(--color-on-dark-muted);
}

/* 4. Layout (container, grid, sections)
   ========================================================================== */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

/* Label on the left, large title from ~36% across (480px of 1320px in the design) */
.section-head {
  display: grid;
  grid-template-columns: 4fr 7fr;
  align-items: start;
  gap: var(--space-8);
  margin-bottom: clamp(3rem, 2rem + 3vw, 6.25rem);
}

.section-head__title {
  font-size: var(--fs-section);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.card-grid {
  display: grid;
  gap: var(--space-6);
}

.card-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Dot-separated tag row (hero and CTA) */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.75;
  text-transform: uppercase;
  color: var(--color-ink-soft);
}

.tag-row__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

/* 5. Utilities
   ========================================================================== */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Stand-in for images that haven't been supplied yet */
.media-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border: 1px dashed var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
