/* =========================================================
   СВЕЖО — базовые стили, шрифты и дизайн-токены
   ========================================================= */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/manrope-cyrillic-400-normal.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-normal.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: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/manrope-cyrillic-500-normal.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: 500;
  font-display: swap;
  src: url('../fonts/manrope-latin-500-normal.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: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/manrope-cyrillic-600-normal.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: 600;
  font-display: swap;
  src: url('../fonts/manrope-latin-600-normal.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: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/manrope-cyrillic-700-normal.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-normal.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: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/manrope-cyrillic-800-normal.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: 800;
  font-display: swap;
  src: url('../fonts/manrope-latin-800-normal.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: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/cormorant-cyrillic-500-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/cormorant-latin-500-normal.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: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/cormorant-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: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/cormorant-latin-500-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;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/cormorant-cyrillic-600-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/cormorant-latin-600-normal.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: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/cormorant-cyrillic-600-italic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/cormorant-latin-600-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 {
  --bg: #f5f1e8;
  --paper: #fffdf8;
  --ink: #12231e;
  --ink-2: #3c5048;
  --muted: #66766e;
  --forest: #173f35;
  --forest-deep: #0d2a23;
  --forest-soft: #28594c;
  --sage: #d9e6da;
  --sage-deep: #b9d0be;
  --mint: #e7f1e5;
  --sand: #e9ddc9;
  --accent: #d96b45;
  --accent-dark: #bf5431;
  --accent-soft: #f6e2d6;
  --gold: #b89a63;
  --white: #ffffff;
  --line: rgba(18, 35, 30, 0.13);
  --line-soft: rgba(18, 35, 30, 0.075);
  --success: #2f7a5a;
  --warning: #a96f1f;
  --danger: #b44935;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --radius-xl: 40px;
  --radius-lg: 30px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --shadow-sm: 0 2px 8px rgba(24, 45, 37, 0.04), 0 10px 30px rgba(24, 45, 37, 0.045);
  --shadow-md: 0 18px 60px rgba(16, 41, 33, 0.12);
  --shadow-lg: 0 32px 90px rgba(13, 42, 35, 0.18);
  --container: 1240px;
  --header-h: 84px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll {
  overflow: hidden;
}

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

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

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

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

p,
h1,
h2,
h3,
h4,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--forest);
  color: var(--paper);
}

h1,
h2,
h3,
h4 {
  font-weight: 500;
  line-height: 1.05;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
}

.container {
  width: min(var(--container), calc(100% - 64px));
  margin: 0 auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--forest);
  color: var(--paper);
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}
.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Типографика ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 0.93;
  letter-spacing: -0.025em;
}

.display em {
  font-style: italic;
  font-weight: 500;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 4.5vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.section-title em {
  font-style: italic;
  color: var(--forest-soft);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

.eyebrow--light {
  color: rgba(255, 253, 248, 0.66);
}

.lead {
  color: var(--ink-2);
  font-size: clamp(1rem, 1.3vw, 1.09rem);
  line-height: 1.75;
}

.text-muted {
  color: var(--muted);
}

/* ---------- Кнопки ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 25px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    transform 0.25s var(--ease),
    box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

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

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.btn--primary {
  background: var(--forest);
  color: var(--paper);
  box-shadow: 0 12px 26px rgba(23, 63, 53, 0.16);
}

.btn--primary:hover {
  background: var(--forest-deep);
  box-shadow: 0 16px 34px rgba(23, 63, 53, 0.22);
}

.btn--light {
  background: var(--paper);
  color: var(--ink);
}

.btn--light:hover {
  background: var(--white);
}

.btn--outline {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}

.btn--outline:hover {
  border-color: var(--forest);
  background: rgba(255, 255, 255, 0.45);
}

.btn--ghost-light {
  border-color: rgba(255, 253, 248, 0.28);
  color: var(--paper);
  background: transparent;
}

.btn--ghost-light:hover {
  border-color: rgba(255, 253, 248, 0.6);
  background: rgba(255, 255, 255, 0.06);
}

.btn--accent {
  background: var(--accent);
  color: var(--white);
}

.btn--accent:hover {
  background: var(--accent-dark);
}

.btn--sm {
  min-height: 42px;
  padding: 0 18px;
  font-size: 13px;
}

.btn--lg {
  min-height: 58px;
  padding: 0 30px;
  font-size: 15px;
}

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

.btn[disabled] {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
}

.btn .btn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  margin-right: -8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.btn .btn-arrow svg {
  width: 13px;
  height: 13px;
}

/* ---------- Формы ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.field__label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.input,
.textarea,
.select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.input::placeholder,
.textarea::placeholder {
  color: #97a39d;
  font-weight: 400;
}

.input:hover,
.textarea:hover,
.select:hover {
  border-color: rgba(18, 35, 30, 0.25);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--forest);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(23, 63, 53, 0.1);
}

.input[aria-invalid='true'],
.textarea[aria-invalid='true'],
.select[aria-invalid='true'] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(180, 73, 53, 0.09);
}

.textarea {
  height: auto;
  min-height: 112px;
  padding: 14px 16px;
  resize: vertical;
  line-height: 1.55;
}

.select {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2355655d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

.select:invalid {
  color: #97a39d;
}

.field__error {
  display: none;
  color: var(--danger);
  font-size: 11.5px;
  font-weight: 550;
}

.field.has-error .field__error {
  display: block;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
  cursor: pointer;
}

.checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox__box {
  display: grid;
  place-items: center;
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--white);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.checkbox__box svg {
  width: 11px;
  height: 11px;
  color: var(--white);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.18s ease, transform 0.18s var(--ease);
}

.checkbox input:checked + .checkbox__box {
  border-color: var(--forest);
  background: var(--forest);
}

.checkbox input:checked + .checkbox__box svg {
  opacity: 1;
  transform: scale(1);
}

.checkbox input:focus-visible + .checkbox__box {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}

.checkbox a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch__track {
  position: relative;
  width: 46px;
  height: 26px;
  flex: none;
  border-radius: 999px;
  background: #cfd7d1;
  transition: background-color 0.22s ease;
}

.switch__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 5px rgba(18, 35, 30, 0.2);
  transition: transform 0.22s var(--ease);
}

.switch input:checked + .switch__track {
  background: var(--forest);
}

.switch input:checked + .switch__track::after {
  transform: translateX(20px);
}

.switch input:focus-visible + .switch__track {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
}

/* ---------- Бейджи, утилиты ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--forest);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge--accent {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.badge--dark {
  background: var(--forest);
  color: var(--paper);
}

.badge--muted {
  background: #eceae3;
  color: var(--muted);
}

.spark {
  width: 18px;
  height: 18px;
  color: var(--gold);
}

.grain {
  position: relative;
  isolation: isolate;
}

.grain::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.035;
  pointer-events: none;
  background-image: 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='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
}

.icon {
  width: 22px;
  height: 22px;
  flex: none;
}

.icon--sm {
  width: 17px;
  height: 17px;
}

/* ---------- Анимации ---------- */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shake {
  10%,
  90% {
    transform: translateX(-1px);
  }
  20%,
  80% {
    transform: translateX(2px);
  }
  30%,
  50%,
  70% {
    transform: translateX(-3px);
  }
  40%,
  60% {
    transform: translateX(3px);
  }
}

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.spinner {
  width: 17px;
  height: 17px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@media (max-width: 900px) {
  .container {
    width: calc(100% - 40px);
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 70px;
    --radius-xl: 30px;
    --radius-lg: 24px;
  }

  .container {
    width: calc(100% - 32px);
  }

  .btn {
    min-height: 50px;
    padding: 0 21px;
  }

  .section-title {
    font-size: clamp(2.35rem, 10vw, 3.4rem);
  }
}

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

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

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
