/* ============================================================
   Aine — design tokens (v4)
   Подключается ПЕРВЫМ, до style.css.
   ============================================================ */

/* ---------- Manrope: cyrillic + latin, 400/700 ---------- */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/manrope-cyrillic-400.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/manrope-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2191, U+2193, U+2212;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/manrope-cyrillic-700.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/manrope-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2191, U+2193, U+2212;
}

/* ---------- Lora: cyrillic + latin, 500 + italic 500 ---------- */
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/lora-cyrillic-500.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/lora-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122;
}
@font-face {
  font-family: "Lora";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/lora-cyrillic-500-italic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Lora";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/lora-latin-500-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122;
}

/* ---------- Tokens ---------- */
:root {
  /* Шрифты */
  --font:         "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Lora", Georgia, "Times New Roman", serif;

  /* Палитра */
  --pink:         #EC008C;  /* фуксия — фирменный, только декоративно (крупные капсулы, brand-name, мазок) */
  --pink-accent:  #C2185B;  /* функциональный pink — текст, ссылки, иконки, кнопки (AA проходит) */
  --pink-hover:   #9F0F4A;  /* hover для кнопок */
  --pink-soft:    #FAD4E4;  /* мягкая плашка */
  --pink-tint:    #FCEAF3;  /* фон секций / hover-капсул */
  --cream:        #FBF7F4;  /* тёплый офвайт */
  --cream-deep:   #F3EBE4;  /* глубже крем — под statement */
  --white:        #FFFFFF;
  --ink:          #1B1B1F;  /* основной текст */
  --ink-soft:     #5B5B63;  /* вторичный текст */
  --ink-faint:    #737380;  /* приглушённый — INCI italic, captions (AA на cream 4.6:1) */
  --line:         #ECE6E1;  /* разделители */
  --mint:         #B6F1E3;  /* фон mint бейджей */
  --mint-ink:     #0E5B4B;  /* текст mint */
  --mint-tint:    #EAFAF1;  /* очень светлый мятный — фон ing-badge */

  /* Типошкала — ratio 1.2 (minor third) от 16 */
  --fs-72: 72px;
  --fs-60: 60px;
  --fs-50: 50px;
  --fs-42: 42px;
  --fs-35: 35px;
  --fs-29: 29px;
  --fs-24: 24px;
  --fs-20: 20px;
  --fs-17: 17px;
  --fs-14: 14px;
  --fs-12: 12px;

  /* Семантические алиасы — флюидные: clamp(min, calc(px-база + vw), max),
     px-база держит читаемость на десктопе, vw-член реально уменьшает текст
     на узких экранах (а не «застывает» на минимуме, как было раньше). */
  --fs-h1:         clamp(26px, calc(13px + 4.2vw), 60px);
  --fs-h2:         clamp(23px, calc(13px + 2.9vw), 42px);
  --fs-h3:         clamp(20px, calc(15px + 1vw), 24px);
  --fs-statement:  clamp(22px, calc(13px + 2.5vw), 35px);
  --fs-lead:       clamp(16px, calc(13px + 0.9vw), 20px);
  --fs-body:       var(--fs-17);
  --fs-small:      var(--fs-14);
  --fs-micro:      var(--fs-12);
  --fs-eyebrow:    var(--fs-12);
  --lh-body:       1.7;

  /* Ритм / геометрия */
  --container:    1200px;
  --gutter:       24px;
  --section-pad:  clamp(56px, 9vw, 120px);
  --radius:       16px;
  --radius-lg:    24px;
  --pill:         999px;

  /* Тени — только нейтральные */
  --shadow:        0 2px 8px rgba(27,27,31,.05), 0 8px 24px rgba(27,27,31,.04);
  --shadow-lg:     0 24px 56px rgba(27,27,31,.16);
  /* Drop-shadow для PNG-визуалов с прозрачным фоном (hero, oils) — фильтр, не box-shadow */
  --shadow-visual:      drop-shadow(0 24px 56px rgba(27,27,31,.10));
  --shadow-visual-peak: drop-shadow(0 30px 64px rgba(27,27,31,.14));
}

/* ---------- Базовые элементы ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  /* Только вертикальная прокрутка: clip не создаёт скролл-контейнер,
     поэтому sticky-шапка продолжает работать (в отличие от overflow:hidden). */
  overflow-x: clip;
  max-width: 100%;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  margin: 0 0 .4em;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.18;
}
h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.18;
}
h3 { font-size: var(--fs-h3); font-weight: 700; }

p { margin: 0 0 1em; }
a { color: var(--pink-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; padding: 0; margin: 0; }

/* ---------- Контейнер / секции ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.section { padding-block: var(--section-pad); }
.section--white      { background: var(--white); }
.section--cream      { background: var(--cream); }
.section--cream-deep { background: var(--cream-deep); }
.section--tint       { background: var(--pink-tint); }
.section--ink        { background: var(--ink); color: var(--white); }

/* ---------- Акцент-подчёркивание «мазком» (декоративный stroke, фуксия) ---------- */
.u-brush {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3,9 C35,3.5 70,11.5 105,7 C140,2.5 172,10.5 197,5.5' fill='none' stroke='%23EC008C' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% .4em;
  padding: 0 .06em .1em;
}

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--pink-accent);
}
.eyebrow--muted { color: var(--ink-faint); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: var(--pill);
  font-family: var(--font);
  font-weight: 700;
  font-size: var(--fs-small);
  line-height: 1;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--pink-accent); color: var(--white); border-color: var(--pink-accent); }
.btn--primary:hover { background: var(--pink-hover); border-color: var(--pink-hover); box-shadow: 0 8px 20px rgba(27,27,31,.12); }
.btn--lg { padding: 16px 32px; font-size: 16px; }

/* ---------- Section heading helper ---------- */
.section__head {
  max-width: 720px;
  margin: 0 auto clamp(40px, 5vw, 56px);
  text-align: center;
}
.section__lead {
  color: var(--ink-soft);
  font-size: var(--fs-lead);
}

/* ---------- A11y ---------- */
.skip-link {
  position: absolute; left: -9999px;
  width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  position: fixed; left: 16px; top: 16px;
  width: auto; height: auto;
  background: var(--ink); color: var(--white);
  padding: 10px 16px; border-radius: var(--radius);
  z-index: 9999;
}
:focus-visible { outline: 2px solid var(--pink-accent); outline-offset: 2px; }

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