/* =============================================================================
   Your Tech Navigator — one stylesheet.
   Design tokens (copied verbatim from the design system) followed by the
   page styles. Editing note: change values in the :root token blocks to
   re-tune the whole site; the page rules below only arrange the sections.
   ============================================================================= */

/* --- tokens/fonts.css -----------------------------------------------------
   Self-hosted per the brief (no third-party font CDN). Files live in
   /assets/fonts/. Paths are relative to this stylesheet. */
@font-face {
  font-family: "Source Sans 3";       /* headings + buttons */
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/SourceSans3-Variable.woff2") format("woff2-variations");
}
@font-face {
  font-family: "iA Writer Quattro";   /* body — matches the leaflet blog */
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/IAWriterQuattro-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "iA Writer Quattro";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/IAWriterQuattro-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "iA Writer Quattro";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/IAWriterQuattro-Italic.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/IBMPlexMono-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/IBMPlexMono-Medium.woff2") format("woff2");
}

/* --- tokens/colors.css --------------------------------------------------- */
:root {
  /* Ground — the knolling backdrop. Light neutral gray, never white. */
  --gray-100: #F2F2F0;
  --gray-200: #E7E7E4;  /* page ground */
  --gray-300: #DCDCD8;  /* recessed / alternate band */
  --gray-400: #C9C9C4;  /* hairline rule */
  --gray-500: #A8A8A2;  /* disabled ink, tick marks */

  /* Ink */
  --ink-900: #16181A;   /* headlines, primary text */
  --ink-700: #3C4044;   /* body */
  --ink-500: #6A6F74;   /* secondary, captions */
  --ink-300: #9A9EA2;   /* placeholder */

  /* Blue — deliberate brand accent, chosen for the card blue, not sampled
     from a template. Used at small scale against the gray. */
  --blue-700: #0F3A66;  /* pressed */
  --blue-600: #1A4E8A;  /* primary accent */
  --blue-400: #4E7FB4;  /* hover on dark, focus ring outer */
  --blue-100: #DDE6F1;  /* faint wash, selected field */

  --white: #FFFFFF;

  /* Semantic aliases — prefer these in components. */
  --surface-page: var(--gray-200);
  --surface-band: var(--gray-300);
  --surface-raised: var(--gray-100);
  --surface-field: var(--white);
  --surface-invert: var(--ink-900);

  --text-strong: var(--ink-900);
  --text-body: var(--ink-700);
  --text-muted: var(--ink-500);
  --text-placeholder: var(--ink-300);
  --text-accent: var(--blue-600);
  --text-on-invert: var(--gray-100);
  --text-on-accent: var(--white);

  --line-hairline: var(--gray-400);
  --line-strong: var(--ink-900);

  --accent: var(--blue-600);
  --accent-hover: var(--blue-700);
  --focus-ring: var(--blue-600);
}

/* --- tokens/typography.css ----------------------------------------------- */
:root {
  --font-heading: "Source Sans 3", "Helvetica Neue", Helvetica, "Segoe UI", system-ui, sans-serif;
  --font-sans: "iA Writer Quattro", "Helvetica Neue", Helvetica, "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Scale — one large anchor, a field of small parts. */
  --size-display: clamp(2.75rem, 6.2vw, 4.75rem); /* hero only */
  --size-h2: clamp(1.5rem, 2.4vw, 2rem);
  --size-h3: 1.1875rem;
  --size-lead: clamp(1.0625rem, 1.35vw, 1.25rem);
  --size-body: 1.0625rem;
  --size-small: 0.9375rem;
  --size-label: 0.75rem;   /* mono, tracked, sentence case */

  --leading-display: 1.02;
  --leading-tight: 1.18;
  --leading-body: 1.55;
  --leading-loose: 1.65;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  --tracking-display: -0.022em;
  --tracking-heading: -0.014em;
  --tracking-body: 0em;
  --tracking-label: 0.08em;

  --measure-lead: 34ch;
  --measure-body: 62ch;
  --measure-quote: 46ch;
}

/* --- tokens/spacing.css -------------------------------------------------- */
:root {
  /* 4px base. Gaps run large — separation is the whole idea. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;
  --space-11: 176px;

  --section-y: clamp(72px, 11vw, 176px);
  --gutter: clamp(20px, 5vw, 64px);
  --page-max: 1240px;
  --grid-columns: 12;
  --grid-gap: clamp(20px, 3.2vw, 48px);
}

/* --- tokens/surface.css -------------------------------------------------- */
:root {
  /* Near-square corners. Nothing floats: no card shadows anywhere. */
  --radius-none: 0px;
  --radius-sm: 2px;
  --radius-md: 3px;
  --radius-pill: 999px;   /* status dot / count chip only */

  --border-hairline: 1px solid var(--line-hairline);
  --border-strong: 1px solid var(--line-strong);
  --border-field: 1px solid var(--gray-500);

  --shadow-none: none;
  /* The single permitted elevation: a printed-plate offset, used only on the
     submit button press state. Never a blurred drop shadow under a card. */
  --shadow-plate: 2px 2px 0 var(--ink-900);

  --focus-width: 2px;
  --focus-offset: 3px;
}

/* --- tokens/motion.css --------------------------------------------------- */
:root {
  --ease-out: cubic-bezier(0.2, 0.6, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 120ms;
  --dur-base: 240ms;
  --dur-slow: 520ms;   /* exploded-layout reveal */
  --translate-reveal: 14px;
}
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0ms;
    --dur-base: 0ms;
    --dur-slow: 0ms;
    --translate-reveal: 0px;
  }
}

/* --- tokens/base.css ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: var(--size-body);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, figure, blockquote { margin: 0; }
h1, h2, h3 { color: var(--text-strong); font-weight: var(--weight-semibold); font-family: var(--font-heading); }

a {
  color: var(--text-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--ink-900); }

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: var(--focus-width) solid var(--focus-ring);
  outline-offset: var(--focus-offset);
}

img { max-width: 100%; display: block; }

::selection { background: var(--blue-100); color: var(--ink-900); }

/* =============================================================================
   PAGE STYLES — arrangement only. Colours, type and spacing come from tokens.
   ============================================================================= */

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: var(--space-3);
  top: -60px;
  z-index: 10;
  background: var(--surface-page);
  color: var(--text-strong);
  padding: var(--space-3) var(--space-4);
  border: var(--border-hairline);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: var(--space-3); }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--size-body);
  font-weight: var(--weight-medium);
  letter-spacing: -0.005em;
  line-height: 1;
  padding: 18px 28px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.btn--primary { background: var(--accent); color: var(--text-on-accent); }
.btn--primary:hover { background: var(--accent-hover); color: var(--text-on-accent); }
.btn--secondary {
  background: transparent;
  color: var(--text-strong);
  border-color: var(--ink-900);
}
.btn--secondary:hover { background: var(--ink-900); color: var(--gray-100); }
.btn--sm { padding: 12px 18px; font-size: var(--size-small); }
.btn--lg { padding: 22px 34px; }

/* --- Header (sticky, opaque, never blurred) ------------------------------ */
.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-5);
  padding: var(--space-5) var(--gutter);
  border-bottom: var(--border-hairline);
  background: var(--surface-page);
}
.nav__brand {
  font-family: var(--font-mono);
  font-size: var(--size-small);
  letter-spacing: 0.02em;
  color: var(--text-strong);
  text-decoration: none;
}
.nav__brand:hover { color: var(--text-strong); }
/* Header CTA pair: secondary "Read the blog" + primary "Get unblocked". */
.nav__actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); }

/* --- Section shells with a photograph behind a frosted panel ------------- */
.band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(40px, 5vw, 72px) var(--gutter);
}
.band--about { background: var(--surface-band); }

/* Full-bleed photograph layer (an <img> so it can lazy-load + use <picture>) */
.band__photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.band__photo--hero { object-position: center; filter: grayscale(0.2) contrast(1.02); }
.band__photo--how  { object-position: center 35%; filter: grayscale(0.2); }
.band__photo--about{ object-position: center 45%; filter: grayscale(0.2); }

/* Veils tuned per section (see design system) */
.band__veil { position: absolute; inset: 0; z-index: -1; }
.band__veil--hero  { background: rgba(22, 24, 26, 0.18); }
.band__veil--how   { background: rgba(22, 24, 26, 0.14); }
.band__veil--about { background: rgba(22, 24, 26, 0.18); }

/* The three frosted panels share one geometry. */
.panel {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(28px, 3.5vw, 44px);
  border-radius: var(--radius-sm);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}
.panel--light { background: rgba(231, 231, 228, 0.82); }
.panel--ink   { background: rgba(22, 24, 26, 0.82); }

/* --- Hero ---------------------------------------------------------------- */
.hero { min-height: clamp(420px, 62vh, 680px); display: grid; align-content: center; }
.hero__panel { display: grid; gap: var(--space-6); }
.hero__title {
  font-size: var(--size-display);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  text-wrap: pretty;
}
.hero__lead {
  font-size: var(--size-lead);
  line-height: 1.42;
  color: var(--text-body);
  max-width: var(--measure-body);
  text-wrap: pretty;
}
/* Hero CTA pair: primary "Get unblocked" + secondary "Read the blog". */
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* --- Section heading ----------------------------------------------------- */
.section-head { display: grid; gap: var(--space-5); }
.section-head__title {
  font-size: var(--size-h2);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-heading);
}
.section-head--invert .section-head__title { color: var(--gray-100); }

/* --- How it works (steps) ------------------------------------------------ */
.how__panel { display: grid; gap: var(--space-6); }
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--grid-gap);
  margin: 0;
  padding: 0;
}
.step { display: grid; gap: var(--space-4); align-content: start; list-style: none; }
.step__n {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  line-height: 1;
  font-weight: var(--weight-regular);
  color: var(--gray-500);
}
.step__title {
  font-size: var(--size-h3);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-heading);
  color: var(--gray-100);
}
.step__body { color: var(--gray-400); text-wrap: pretty; }

/* --- About --------------------------------------------------------------- */
.about__panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: var(--space-5) var(--grid-gap);
  align-items: start;
}
.about__head { grid-column: 1 / -1; }
.about__figure { margin: 0; display: grid; gap: var(--space-3); max-width: 340px; }
.about__photo { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-sm); }
.about__caption {
  font-family: var(--font-mono);
  font-size: var(--size-label);
  letter-spacing: var(--tracking-label);
  /* ink-700 rather than the ink-500 caption token: ink-500 on the light
     ground is ~4.0:1 (below AA) for this small mono text. */
  color: var(--ink-700);
}
.about__bio { display: grid; gap: var(--space-6); align-content: start; }
.about__bio p { text-wrap: pretty; max-width: var(--measure-body); }

/* --- Contact ------------------------------------------------------------- */
.contact { background: var(--surface-invert); padding: clamp(40px, 5vw, 72px) var(--gutter); }
.contact__trust {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.375rem);
  line-height: 1.14;
  letter-spacing: var(--tracking-heading);
  color: var(--gray-100);
  max-width: var(--measure-quote);
  margin: 0 auto var(--space-7);
  text-align: center;
  text-wrap: pretty;
}
.contact__grid {
  max-width: var(--page-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6) var(--space-8);
  color: var(--text-on-invert);
}
.contact__intro { display: grid; gap: var(--space-4); align-content: start; }
.contact__intro h2 {
  color: var(--gray-100);
  font-size: var(--size-h2);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-heading);
  max-width: 20ch;
}
.contact__skip { color: var(--gray-400); max-width: 36ch; }
/* On the ink band, inline links use near-white for an AA-safe contrast. */
.contact__skip a { color: var(--gray-100); }
.contact__skip a:hover { color: var(--white); }

.form { display: grid; gap: var(--space-4); }
.form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
}
.field { display: grid; gap: var(--space-3); }
.field__label {
  font-family: var(--font-mono);
  font-size: var(--size-label);
  letter-spacing: var(--tracking-label);
  color: var(--gray-400);
}
.field__control {
  font-family: var(--font-sans);
  font-size: var(--size-body);
  color: var(--text-strong);
  background: var(--surface-field);
  border: var(--border-field);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  width: 100%;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.field__control:focus { border-color: var(--accent); }
textarea.field__control { resize: vertical; line-height: var(--leading-body); }

/* Visually hidden honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Footer -------------------------------------------------------------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  justify-content: space-between;
  align-items: center;
  padding: var(--space-5) var(--gutter);
  border-top: var(--border-hairline);
}
.foot__cell {
  font-family: var(--font-mono);
  font-size: var(--size-label);
  letter-spacing: var(--tracking-label);
  /* ink-700 for AA: ink-500 on the light ground is ~4.0:1 at this size. */
  color: var(--ink-700);
}
.foot__links { display: flex; gap: var(--space-6); flex-wrap: wrap; }
.foot__links a { color: var(--text-accent); }

/* --- Thanks page --------------------------------------------------------- */
.thanks { min-height: 60vh; display: grid; align-content: center; }
.thanks__inner { max-width: 46ch; margin: 0 auto; text-align: center; display: grid; gap: var(--space-4); }
.thanks__inner h2 { color: var(--gray-100); font-size: var(--size-h2); letter-spacing: var(--tracking-heading); }
.thanks__inner p { color: var(--gray-400); }
.thanks__inner a { color: var(--gray-100); }
.thanks__inner a:hover { color: var(--white); }
