/* ---------- Шрифты (локально, без Google Fonts) ---------- */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/manrope-latin-ext.woff2') format('woff2');
  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: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2');
  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;
}

/* Noto Serif Display: оставлены начертания 300–400; latin-ext урезан до Latin Extended-A — для чешского этого достаточно */

@font-face {
  font-family: 'Noto Serif Display';
  font-style: normal;
  font-weight: 300 400;
  font-display: swap;
  src: url('../fonts/noto-serif-display-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-017F, U+2020, U+20A0-20AB, U+20AD-20C0;
}

@font-face {
  font-family: 'Noto Serif Display';
  font-style: normal;
  font-weight: 300 400;
  font-display: swap;
  src: url('../fonts/noto-serif-display-latin.woff2') format('woff2');
  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: 'Noto Serif Display';
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url('../fonts/noto-serif-display-latin-ext-italic.woff2') format('woff2');
  unicode-range: U+0100-017F, U+2020, U+20A0-20AB, U+20AD-20C0;
}

@font-face {
  font-family: 'Noto Serif Display';
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url('../fonts/noto-serif-display-latin-italic.woff2') format('woff2');
  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 {
  /* Палитра */
  --c-bg: #f6f3ec;
  --c-surface: #ffffff;
  --c-sand: #eee8dc;
  --c-sand-2: #e5dccb;
  --c-ink: #13241f;
  --c-ink-2: #3e4f48;
  --c-muted: #66746d;
  --c-line: #e3ddd0;
  --c-line-strong: #cfc6b4;

  --c-forest: #12332b;
  --c-forest-2: #1b3a33;
  --c-forest-3: #26493f;
  --c-forest-deep: #0c2520;
  --c-on-dark: #f3efe6;
  --c-on-dark-2: #b9c8c0;
  --c-line-dark: rgb(243 239 230 / 0.12);

  --c-brass: #b58d4a;
  --c-brass-ink: #7c5c2a;
  --c-brass-light: #e2c99a;

  /* Цвета из логотипа клиента */
  --c-logo-green: #104d2a;
  --c-logo-gold: #d0a649;

  --c-wa: #25d366;
  --c-wa-ink: #05361c;

  /* Цвета диаграммы калькулятора (проверены на различимость при дальтонизме) */
  --c-chart-net: #b58d2d;
  --c-chart-fee: #0a8e7a;
  --c-chart-portal: #8c7dd5;
  --c-chart-cost: #cc624e;

  /* Шрифты */
  --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Noto Serif Display', Georgia, 'Times New Roman', serif;
  --fw-display: 300; /* крупные заголовки — светлое начертание */

  /* Шкала размеров текста */
  --fs-xs: 12px; /* подписи капсом, сноски */
  --fs-sm: 13px; /* подсказки, мелкие подписи */
  --fs-ui: 14px; /* навигация, чипы, служебный текст */
  --fs-md: 15px; /* текст карточек, кнопки */
  --fs-lg: 17px; /* вводные абзацы */
  --fs-xl: 20px; /* заголовки карточек */
  --caps-track: 0.16em; /* разрядка подписей капсом */

  /* Геометрия */
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --container: 1220px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(80px, 11vw, 140px);
  --header-h: 76px;

  --shadow-sm: 0 1px 2px rgb(19 36 31 / 0.05), 0 2px 10px rgb(19 36 31 / 0.04);
  --shadow: 0 2px 6px rgb(19 36 31 / 0.04), 0 18px 40px -12px rgb(19 36 31 / 0.12);
  --shadow-lg: 0 40px 90px -30px rgb(12 37 32 / 0.38);

  /* Движение: мягкое замедление в конце; цвет и тени меняются быстрее, чем двигаются блоки */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-ui: 0.35s;
  --dur-move: 0.6s;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 450;
  line-height: 1.6;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

img {
  height: auto;
}

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

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

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul[role='list'],
ol[role='list'] {
  list-style: none;
  padding: 0;
}

/* Без «висячих» коротких строк в конце абзаца */
p,
li,
dd,
summary {
  text-wrap: pretty;
}

:focus-visible {
  outline: 2px solid var(--c-brass);
  outline-offset: 3px;
}

::selection {
  background: var(--c-brass-light);
  color: var(--c-ink);
}

.body-lock {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--c-forest);
  color: #fff;
  font-weight: 600;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Layout ---------- */

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-y);
}

.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;
}

/* ---------- Typography ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--caps-track);
  text-transform: uppercase;
  color: var(--c-brass-ink);
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.h2 {
  font-family: var(--font-serif);
  font-weight: var(--fw-display);
  font-size: clamp(36px, 4.6vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.h2 em,
.display em {
  font-style: italic;
  color: var(--c-brass-ink);
}

.on-dark {
  color: var(--c-on-dark);
}

.on-dark .eyebrow {
  color: var(--c-brass-light);
}

.on-dark .h2 em,
.on-dark .display em {
  color: var(--c-brass-light);
}

/* ---------- Section head ---------- */

.head {
  display: grid;
  gap: 20px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.head__main {
  display: grid;
  gap: 18px;
}

.head__text {
  max-width: 560px;
  font-size: var(--fs-lg);
  color: var(--c-ink-2);
}

.on-dark .head__text {
  color: var(--c-on-dark-2);
}

.head--center {
  justify-items: center;
  text-align: center;
}

.head--center .head__main {
  justify-items: center;
  max-width: 820px;
}

.head--center .eyebrow::after {
  content: '';
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

@media (min-width: 900px) {
  .head--split {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: end;
    gap: 64px;
  }

  .head--split .head__text {
    padding-bottom: 8px;
  }
}

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--c-forest);
  --btn-fg: #fff;
  --btn-bd: var(--btn-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  border: 1px solid var(--btn-bd);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  transition:
    transform var(--dur-move) var(--ease),
    background-color var(--dur-ui),
    border-color var(--dur-ui),
    box-shadow var(--dur-ui),
    color var(--dur-ui);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -14px rgb(12 37 32 / 0.6);
}

.btn:active {
  transform: translateY(0);
}

.btn .icon {
  width: 18px;
  height: 18px;
  flex: none;
  transition: transform var(--dur-move) var(--ease);
}

.btn:hover .icon--arrow {
  transform: translateX(4px);
}

.btn--brass {
  --btn-bg: var(--c-brass-light);
  --btn-fg: var(--c-forest-deep);
}

.btn--brass:hover {
  --btn-bg: #ead6b0;
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--c-ink);
  --btn-bd: var(--c-line-strong);
}

.btn--ghost:hover {
  --btn-bg: var(--c-surface);
  --btn-bd: var(--c-surface);
  box-shadow: var(--shadow);
}

.btn--ghost-light {
  --btn-bg: transparent;
  --btn-fg: var(--c-on-dark);
  --btn-bd: rgb(243 239 230 / 0.3);
}

.btn--ghost-light:hover {
  --btn-bg: rgb(243 239 230 / 0.08);
  --btn-bd: rgb(243 239 230 / 0.5);
}

.btn--wa {
  --btn-bg: var(--c-wa);
  --btn-fg: var(--c-wa-ink);
}

.btn--wa:hover {
  --btn-bg: #3ee07c;
}

.btn--light {
  --btn-bg: #fff;
  --btn-fg: var(--c-forest);
}

.btn--sm {
  min-height: 44px;
  padding: 0 20px;
  font-size: var(--fs-ui);
}

.btn--block {
  width: 100%;
}

.btn[aria-busy='true'] {
  pointer-events: none;
  opacity: 0.7;
}

/* ---------- Forms ---------- */

.field {
  display: grid;
  gap: 8px;
  align-content: start;
}

.label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-ink);
}

.label small {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--c-muted);
}

.input {
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  color: var(--c-ink);
  font-size: 16px; /* меньше 16px — iOS увеличивает страницу при фокусе */
  line-height: 1.4;
  appearance: none;
  transition:
    border-color var(--dur-ui),
    box-shadow var(--dur-ui);
}

.input::placeholder {
  color: #9aa49f;
}

.input:hover {
  border-color: #b6ac97;
}

.input:focus {
  outline: none;
  border-color: var(--c-forest-3);
  box-shadow: 0 0 0 4px rgb(38 73 63 / 0.14);
}

select.input {
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2313241f' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

textarea.input {
  min-height: 132px;
  resize: vertical;
}

.input[type='number'] {
  -moz-appearance: textfield;
}

.input-affix {
  position: relative;
}

.input-affix .input {
  padding-right: 52px;
}

.input-affix span {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--fs-ui);
  font-weight: 600;
  color: var(--c-muted);
  pointer-events: none;
}

.input:user-invalid {
  border-color: #b4532f;
  box-shadow: 0 0 0 4px rgb(180 83 47 / 0.12);
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 16px;
}

@media (min-width: 520px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Reveal on scroll ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    opacity 1.1s var(--ease),
    transform 1.4s var(--ease);
  transition-delay: var(--d, 0s);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
