/* АТОМ — токены лендинга (full-width redesign).
   Шрифты — локальные variable woff2. */

/* ---- Webfonts: Onest + JetBrains Mono ---- */
@font-face { font-family: 'Onest'; src: url('../fonts/onest-cyrillic-ext.woff2') format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Onest'; src: url('../fonts/onest-cyrillic.woff2') format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; src: url('../fonts/onest-latin-ext.woff2') format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Onest'; src: url('../fonts/onest-latin.woff2') format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/jetbrains-mono-cyrillic-ext.woff2') format('woff2-variations'); font-weight: 100 800; font-style: normal; font-display: swap; unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/jetbrains-mono-cyrillic.woff2') format('woff2-variations'); font-weight: 100 800; font-style: normal; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/jetbrains-mono-greek.woff2') format('woff2-variations'); font-weight: 100 800; font-style: normal; font-display: swap; unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/jetbrains-mono-vietnamese.woff2') format('woff2-variations'); font-weight: 100 800; font-style: normal; font-display: swap; unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2-variations'); font-weight: 100 800; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2-variations'); font-weight: 100 800; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* ---- Surfaces ---- */
  --bg: #161616;
  --graphite: #0E0F11;
  --panel: #212121;
  --elevated: #161616;
  --snow: #FFFAFA;
  --silence: #929091;
  --hairline: #2E2E2E;
  --hairline-2: #252525;
  --ink-tertiary: #6A6A6C;
  --ink-quaternary: #48484A;
  --fill: #2A2A2A;

  /* ---- Accent (blue from redesign) ---- */
  --signal: #3349F5;
  --signal-hover: #4A5FF7;
  --signal-active: #2436D4;
  --signal-ink: #0E0F11;
  --signal-bg: #14151C;
  --signal-border: #3349F5;
  /* no light-blue tints — only pure signal for accents */
  --signal-text: var(--signal);
  --signal-soft: var(--signal);

  --danger: #EA6464;
  --scrim: rgba(22, 22, 22, 0.86);
  --focus-ring: rgba(51, 73, 245, 0.4);

  /* ---- Type families ---- */
  --font-display: "Onest", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* ---- Fluid type (clamp): scales with viewport ----
     Reference: Figma artboard 1200px.
     min @ ~360–480, preferred vw, max @ 1200+  */
  --text-label: clamp(0.6875rem, 0.15vw + 0.65rem, 1.125rem);       /* 11–12 */
  --text-sm: clamp(0.75rem, 0.2vw + 0.7rem, 1.2188rem);            /* 12–13 */
  --text-base: clamp(0.9375rem, 0.25vw + 0.85rem, 1.5rem);            /* 15–16 */
  --text-md: clamp(1rem, 0.35vw + 0.85rem, 1.6875rem);               /* 16–18 */
  --text-lg: clamp(1.125rem, 0.5vw + 0.9rem, 1.875rem);              /* 18–20 */
  --text-title: clamp(1.5rem, 1.2vw + 1rem, 3rem);                  /* 24–32 */
  --text-hero-sub: clamp(1.5rem, 1.4vw + 1rem, 3rem);               /* 24–32 */
  --text-display: clamp(2.5rem, 8vw + 0.5rem, 15rem);               /* АТОМ 40–160 */
  --text-giant: clamp(3.5rem, 11vw + 0.25rem, 16.875rem);            /* для себя 56–180 */

  --leading-body: 1.4;
  --leading-heading: 1.1;
  --leading-tight: 1.05;

  --tracking-display: -0.03em;
  --tracking-title: -0.005em;
  --tracking-label: 0.08em;

  /* ---- Layout ---- */
  --page-pad: clamp(1.25rem, 3.33vw, 3.75rem);   /* 20 → 40 @ 1200 */
  --section-pad-y: clamp(2.5rem, 5vw, 5.25rem);
  --gap: clamp(0.75rem, 1.5vw, 1.5rem);
  --gap-lg: clamp(1.5rem, 3vw, 3.75rem);
  --col-gap: clamp(1rem, 2vw, 2.25rem);

  --radius: 4px;
  --radius-sm: 3px;

  --duration-fast: 0.1s;
  --duration-mid: 0.2s;
  --duration-slow: 0.3s;
  --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
  --ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);
}

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

html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--snow);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-title);
  color: var(--snow);
  margin: 0;
}

p { margin: 0; text-wrap: pretty; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out), border-color var(--duration-mid) var(--ease-out), background var(--duration-mid) var(--ease-out);
}

code, pre, kbd, samp { font-family: var(--font-mono); }

::selection { background: var(--signal); color: var(--snow); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
