/* ==========================================================================
   ТЕССЕРА — дизайн-система
   Один источник правды для цвета, шрифта, ритма и движения.
   Здесь нет ни одного правила про конкретный блок — только словарь.
   ========================================================================== */

@import url('../fonts/cormorant.css');
@import url('../fonts/golos.css');
@import url('../fonts/clash.css');

:root {
  /* --- Материалы плиток -------------------------------------------------
     Металл — это фактура рисунка, цвет — фон под ним. Два независимых
     свойства, поэтому и переменные раздельные. */
  --metal-gold: linear-gradient(145deg, #f7e7b0 0%, #c9a227 38%, #8a6a15 62%, #f0d98a 100%);
  --metal-silver: linear-gradient(145deg, #ffffff 0%, #c9ced6 38%, #7d848f 62%, #eef1f5 100%);
  --metal-copper: linear-gradient(145deg, #f6c9a8 0%, #c07a4a 38%, #8a4a26 62%, #edb891 100%);
  --metal-steel: linear-gradient(145deg, #dfe6ec 0%, #8e9aa6 38%, #4d5763 62%, #cdd6de 100%);
  --metal-blackened: linear-gradient(145deg, #6e737a 0%, #33373d 38%, #15171a 62%, #565c64 100%);

  --metal-gold-solid: #c9a227;
  --metal-silver-solid: #c9ced6;
  --metal-copper-solid: #c07a4a;
  --metal-steel-solid: #8e9aa6;
  --metal-blackened-solid: #33373d;

  --tint-cobalt: #14335f;
  --tint-emerald: #10493a;
  --tint-wine: #55202e;
  --tint-graphite: #26282c;
  --tint-ivory: #e7ddc9;

  /* --- Поверхности ---------------------------------------------------- */
  --ink: #08080a;          /* лак, на котором лежит всё */
  --ink-soft: #101116;
  --ink-raised: #16171d;
  --line: rgba(233, 226, 211, 0.14);
  --line-strong: rgba(233, 226, 211, 0.28);

  --paper: #f2ede4;        /* светлые секции — обратная сторона той же вещи */
  --paper-warm: #e8e0d2;

  --text: #ece6da;
  --text-dim: rgba(236, 230, 218, 0.62);
  --text-faint: rgba(236, 230, 218, 0.38);
  --text-on-paper: #14141a;
  --text-on-paper-dim: rgba(20, 20, 26, 0.6);

  --gold: #c9a227;
  --gold-bright: #e3c77b;
  --gold-glow: rgba(201, 162, 39, 0.22);

  /* --- Шрифт -----------------------------------------------------------
     Кегль привязан к ширине окна, как на студийных сайтах, но зажат
     clamp'ом: без него на 4K заголовок превращается в баннер, а на 320px
     в нечитаемую крупу. */
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-ui: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mark: 'Clash Display', var(--font-ui);

  --step--1: clamp(0.72rem, 0.68rem + 0.2vw, 0.84rem);
  --step-0: clamp(0.9rem, 0.84rem + 0.3vw, 1.05rem);
  --step-1: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem);
  --step-2: clamp(1.4rem, 1.1rem + 1.4vw, 2.4rem);
  --step-3: clamp(1.9rem, 1.2rem + 3.2vw, 4.2rem);
  --step-4: clamp(2.6rem, 1rem + 7vw, 8rem);
  --step-5: clamp(3.2rem, 0.5rem + 11vw, 14rem);

  /* --- Ритм ------------------------------------------------------------ */
  --gutter: clamp(1.15rem, 0.6rem + 2.6vw, 4.5rem);
  --section: clamp(5rem, 2rem + 12vw, 14rem);
  --rule: 1px;
  --radius: 3px;
  --radius-tile: clamp(5px, 0.5vw, 10px);

  --shell: min(100% - var(--gutter) * 2, 1720px);

  /* --- Движение --------------------------------------------------------
     Одна кривая на всё: резкий старт, длинный выкат. Именно она делает
     интерфейс «дорогим», а не длительность. */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast: 0.28s;
  --dur: 0.62s;
  --dur-slow: 1.1s;

  --z-cursor: 90;
  --z-nav: 70;
  --z-overlay: 80;
}

/* ==========================================================================
   Сброс — ровно столько, сколько нужно
   ========================================================================== */

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

* {
  margin: 0;
}

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

/* Плавную прокрутку ведёт Lenis; нативную гасим, иначе они спорят. */
html.lenis {
  scroll-behavior: auto;
}

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

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

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-weight: 400;
  line-height: 1;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

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

/* ==========================================================================
   Утилиты
   ========================================================================== */

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.display {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 0.92;
}

.serif-italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ==========================================================================
   Доступность: уважаем просьбу убрать движение
   ========================================================================== */

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