/* Haywebs prototype — design tokens. Variables only: every page loads this
   file first, then base.css. Values are the plan's section 1, verbatim. */

:root {
  /* dark base */
  --bg: #08080a;
  --surface: #0d0e11;
  --surface-2: #111216;
  --text: #ffffff;
  --text-2: #9ca0a8;
  --text-3: #8b8f97;
  --line: rgb(255 255 255 / 0.09);
  --line-strong: rgb(255 255 255 / 0.16);
  --accent: #4fc98a;
  --danger: #ff8b7b; /* a field the server sent back: 8.8:1 on the form's plate */
  /* the one light chapter */
  --paper: #f1efea;
  --paper-2: #e9e6df;
  --ink: #0a0a0c;
  --ink-2: #5e6168;
  --rule: rgb(0 0 0 / 0.1);
  /* logo ramp, as "r g b" triplets for rgb(var(--c-blue) / a) */
  --c-blue: 43 127 224;
  --c-cyan: 58 197 232;
  --c-green: 79 201 138;
  /* type */
  --serif: "Prata", "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, sans-serif;
  /* the wordmark's face, set in ExtraBold Italic: the logo and the titles */
  --brand: "Montserrat", "Manrope", system-ui, sans-serif;
  --fs-hero: clamp(40px, 7.5vw, 116px); /* home hero, 3 lines */
  --fs-title: clamp(36px, 5.4vw, 84px); /* prices / blog / post h1, 1–2 lines */
  --fs-chapter: clamp(34px, 5vw, 80px); /* chapter h2 (Кейсы) */
  --fs-h2: clamp(28px, 3.6vw, 56px); /* dark section h2 */
  --fs-h3: clamp(19px, 1.6vw, 24px); /* Manrope 600 */
  --fs-lead: 17px;
  --fs-body: 17px;
  --fs-small: 14px;
  --fs-label: 12px;
  --lh-display: 1;
  --lh-body: 1.6;
  --ls-display: -0.03em; /* tighter, two «д» would meet in a hairline seam */
  --ls-label: 0.16em;
  /* layout */
  --g: clamp(20px, 3.9vw, 56px); /* side gutter */
  --measure: 1600px; /* content never wider */
  --hdr: 76px; /* 64px below 860px */
  --r: 4px;
  --r-pill: 999px; /* plates are sharp; buttons are pills */
  /* motion */
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
  --soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-fast: 0.35s;
  --t-base: 0.8s;
  --t-slow: 1.2s;
  /* every entrance duration and delay is multiplied by this; motion.js sets
     html.again on a repeat visit in the same session, which halves them */
  --tempo: 1;
  /* static film grain, shared by the plates and the dark scenes */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

html.again {
  --tempo: 0.5;
}

/* The type table's 1024 and 390 columns. The display sizes switch to a
   steeper vw slope on phones; the title and chapter caps meet their desktop
   curves at 760px, the hero's keeps its own. */
@media (max-width: 1180px) {
  :root {
    --fs-body: 16px;
  }
}

@media (max-width: 860px) {
  :root {
    --hdr: 64px;
  }
}

@media (max-width: 760px) {
  :root {
    --fs-hero: clamp(28px, 9.4vw, 52px);
    --fs-title: clamp(28px, 9.2vw, 41px);
    --fs-chapter: clamp(26px, 7.8vw, 38px);
    --fs-lead: 16px;
    --fs-small: 13px;
    --fs-label: 11px;
  }
}

/* asked for more contrast: hairlines become the strong ones */
@media (prefers-contrast: more) {
  :root {
    --line: var(--line-strong);
    --rule: rgb(0 0 0 / 0.22);
  }
}
