/* global.css — design tokens, reset and base layout.
   Palette: 2 dark neutrals + 1 accent + 3 discreet semantic colours. */

:root {
  --bg: #080b10;
  --bg-soft: #0c1118;
  --surface: #111821;
  --surface-2: #16202b;
  --surface-3: #1b2836;
  --border: #233243;
  --border-strong: #33475e;

  --text: #eef4fb;
  --text-muted: #9aabbf;
  --text-dim: #70839a;

  --accent: #38bdf8;
  --accent-strong: #7dd3fc;
  --accent-ink: #04121c;

  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;

  --radius-lg: 18px;
  --radius: 13px;
  --radius-sm: 9px;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.38);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.24);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1200px;
  --header-height: 72px;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 650;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
}

h2 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

h3 {
  font-size: 1.15rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-strong);
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

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

::selection {
  background: rgba(56, 189, 248, 0.28);
}

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.container-wide {
  width: min(100% - 2rem, 1440px);
  margin-inline: auto;
}

.section {
  padding-block: clamp(3rem, 6vw, 5.5rem);
}

.section-sm {
  padding-block: clamp(2rem, 4vw, 3.25rem);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.section-head p {
  color: var(--text-muted);
  max-width: 58ch;
  margin-top: 0.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: currentColor;
}

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

.dim {
  color: var(--text-dim);
}

.mono {
  font-family: var(--mono);
  font-size: 0.88em;
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.spread {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.grid {
  display: grid;
  gap: 1.25rem;
}

.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;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin-block: 1.5rem;
}

code {
  font-family: var(--mono);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.1rem 0.35rem;
  border-radius: 5px;
  font-size: 0.88em;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 15px;
  }

  .section-head {
    flex-direction: column;
    align-items: start;
  }
}
