/* ==========================================================================
   asflagon.com · metro – base: fonts, tokens, reset, typography, layout
   ========================================================================== */

@font-face {
  font-family: 'Overpass';
  src: url('../fonts/overpass-latin-var.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Overpass Mono';
  src: url('../fonts/overpass-mono-latin-var.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* surfaces */
  --paper: #f6f4ee;
  --paper-2: #edeae1;
  --card: #ffffff;
  --night: #0e1422;
  --night-2: #182033;
  --rule: #dcd8cc;
  --grid: rgba(17, 24, 39, 0.045);

  /* ink */
  --ink: #111827;
  --ink-2: #434a58;
  --ink-3: #636b7a;
  --on-night: #eef1f7;
  --on-night-2: #aab3c5;

  /* line colours – every line of the network has its own */
  --c-violet: #6a3de8;
  --c-green: #0a8f64;
  --c-orange: #f26a1b;
  --c-blue: #1d5bff;
  --c-yellow: #f4b400;
  --c-cyan: #0098bd;
  --c-pink: #d93a82;
  --c-brown: #9a6b3f;
  --c-slate: #5b6472;
  --c-ink: #111827;

  /* page line (overridden per page via body[data-line]) */
  --line: var(--c-violet);

  --font: 'Overpass', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'Overpass Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --wrap: 1160px;
  --gutter: 24px;
  --radius: 20px;
  --radius-sm: 12px;
  --header-h: 72px;
  --shadow: 0 1px 0 rgba(17, 24, 39, 0.04), 0 18px 40px -22px rgba(17, 24, 39, 0.28);
  --shadow-lg: 0 2px 0 rgba(17, 24, 39, 0.04), 0 40px 80px -40px rgba(17, 24, 39, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-line='2'] { --line: var(--c-green); }
body[data-line='3'] { --line: var(--c-orange); }

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--hh, var(--header-h)) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: -1px -1px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; }

h1, h2, h3, h4 { margin: 0; line-height: 1.08; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(2.3rem, 1.4rem + 3.6vw, 3.9rem); letter-spacing: -0.035em; line-height: 1.02; }
h2 { font-size: clamp(1.85rem, 1.25rem + 2.4vw, 3rem); letter-spacing: -0.03em; }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem); line-height: 1.2; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 750; }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--c-blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --header-h: 62px; }
  body { font-size: 1rem; }
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  padding: 10px 16px; border-radius: 10px;
  background: var(--ink); color: #fff; text-decoration: none; font-weight: 700;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------- reveal on scroll (only when JS confirmed IntersectionObserver) ---------- */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js-reveal .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .js-reveal .reveal { opacity: 1; transform: none; }
}
