/* =========================================================================
   Base – reset, typography scale and utilities
   ========================================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-default);
  font-family: var(--font-body);
  font-size: var(--font-size-16);
  line-height: var(--line-medium-150);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
code, pre { font-family: var(--font-body); }

:focus-visible { outline: none; box-shadow: var(--focus-ring); }

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

/* ---------- Icon ---------- */
.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm { width: 16px; height: 16px; }
.icon--md { width: 20px; height: 20px; }
.icon--lg { width: 44px; height: 44px; }

/* ---------- Typography scale (from Figma text styles) ---------- */
.t-display {            /* 88/104 Rubik */
  font-family: var(--font-display);
  font-weight: var(--font-weight-400);
  font-size: clamp(var(--font-size-44), 9vw, var(--font-size-88));
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}
.t-h2 {                 /* 48/60 Rubik */
  font-family: var(--font-display);
  font-weight: var(--font-weight-400);
  font-size: clamp(var(--font-size-32), 5vw, var(--font-size-48));
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text-default);
}
.t-h3 {                 /* 38/44 Rubik */
  font-family: var(--font-display);
  font-weight: var(--font-weight-400);
  font-size: clamp(var(--font-size-28), 4vw, 38px);
  line-height: 1.16;
  color: var(--text-default);
}
.t-h4 {                 /* 28/36 Rubik */
  font-family: var(--font-display);
  font-weight: var(--font-weight-500);
  font-size: clamp(var(--font-size-22), 3vw, var(--font-size-28));
  line-height: 1.29;
  color: var(--text-muted);
}
.t-body-0 { font-size: clamp(var(--font-size-18), 2.4vw, var(--font-size-24)); line-height: 1.33; }   /* 24/32 */
.t-body-1 { font-size: clamp(var(--font-size-16), 2vw, var(--font-size-20)); line-height: 1.5; }      /* 20/30 */
.t-body-2 { font-size: var(--font-size-18); line-height: 28px; }
.t-body-3 { font-size: var(--font-size-16); line-height: 24px; }
.t-body-4 { font-size: var(--font-size-15); line-height: 21px; }
.t-caption { font-size: var(--font-size-14); line-height: 18px; letter-spacing: 0.02em; }
.t-body-5 { font-size: var(--font-size-12); line-height: 20px; letter-spacing: 0.02em; }

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

/* ---------- 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;
}
.skip-link {
  position: absolute;
  left: var(--space-16);
  top: -100px;
  z-index: 100;
  padding: var(--space-8) var(--space-16);
  background: var(--surface-inverse);
  color: var(--color-neutral-0);
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--space-16); }
