/* Малахитовая Тайга · Сфера ожиданий
   База: токены, типографика, поверхности, формы, кнопки. */

@font-face {
  font-family: 'Golos Text';
  src: url('/assets/fonts/GolosText-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Golos Text';
  src: url('/assets/fonts/GolosText-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Golos Text';
  src: url('/assets/fonts/GolosText-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Russo One';
  src: url('/assets/fonts/RussoOne-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --deep: #06251f;
  --deep-2: #041b17;
  --forest: #073f35;
  --pine: #0a2f27;
  --moss: #123b31;
  --ink: #103e34;
  --paper: #f4f6ed;
  --mint: #b8f3cd;
  --mint-soft: #d8fbe5;
  --malachite: #3fbf8f;
  --malachite-deep: #176857;
  --text: #eaf3ec;
  --muted: #8aa79a;
  --muted-2: #6e8b7f;
  --line: rgba(184, 243, 205, 0.14);
  --line-strong: rgba(184, 243, 205, 0.28);
  --glow: rgba(63, 191, 143, 0.35);
  --gold: #e5b45a;
  --danger: #e06b5f;
  --danger-soft: rgba(224, 107, 95, 0.14);
  --warn: #e5b45a;
  --info: #6fb6c9;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.24), 0 18px 48px rgba(2, 20, 16, 0.32);
  --shadow-soft: 0 10px 30px rgba(2, 20, 16, 0.22);
  --font-ui: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Russo One', var(--font-ui);
  --topbar-h: 76px;
}

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

[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--deep);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 800px at 12% -10%, rgba(23, 104, 87, 0.55), transparent 60%),
    radial-gradient(1000px 700px at 92% 10%, rgba(10, 47, 39, 0.9), transparent 55%),
    linear-gradient(180deg, #06251f 0%, #04201b 55%, #031713 100%);
}

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

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--mint); text-decoration-color: rgba(184, 243, 205, 0.35); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--mint); }

h1, h2, h3, h4, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

::selection { background: rgba(184, 243, 205, 0.25); color: #fff; }

:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.container {
  width: min(1180px, 100% - 48px);
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--mint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

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

.h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 6.4vw, 76px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.015em;
}

.h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.01em;
}

.h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.lead {
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.55;
}

.muted { color: var(--muted); }
.mint { color: var(--mint); }
.gold { color: var(--gold); }
.nowrap { white-space: nowrap; }

/* ── Фон ─────────────────────────────────────────────────────────────────── */

.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.42;
  animation: drift 26s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) {
  width: 52vw; height: 52vw;
  left: -16vw; top: -22vw;
  background: radial-gradient(circle, rgba(63, 191, 143, 0.55), transparent 65%);
}
.aurora span:nth-child(2) {
  width: 42vw; height: 42vw;
  right: -14vw; top: 8vh;
  background: radial-gradient(circle, rgba(184, 243, 205, 0.22), transparent 68%);
  animation-delay: -9s;
  animation-duration: 32s;
}
.aurora span:nth-child(3) {
  width: 60vw; height: 46vw;
  left: 20vw; bottom: -34vw;
  background: radial-gradient(circle, rgba(23, 104, 87, 0.65), transparent 65%);
  animation-delay: -16s;
}
@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.032;
  mix-blend-mode: overlay;
  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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

/* ── Бренд ───────────────────────────────────────────────────────────────── */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}
.brand__mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(6, 37, 31, 0.55);
  padding: 4px;
  object-fit: contain;
}
.brand__text { display: grid; line-height: 1.15; }
.brand__text b {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand__text small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}
.btn--primary {
  background: linear-gradient(180deg, #c7f8d9 0%, #8fe3b4 100%);
  border-color: rgba(184, 243, 205, 0.5);
  color: #05231d;
  box-shadow: 0 10px 24px rgba(63, 191, 143, 0.18);
}
.btn--primary:hover { box-shadow: 0 14px 30px rgba(63, 191, 143, 0.28); }
.btn--secondary {
  border-color: var(--line-strong);
  color: var(--mint);
  background: rgba(184, 243, 205, 0.04);
}
.btn--secondary:hover { background: rgba(184, 243, 205, 0.08); border-color: var(--mint); }
.btn--ghost { color: var(--muted); }
.btn--ghost:hover { color: var(--text); background: rgba(184, 243, 205, 0.05); }
.btn--danger {
  border-color: rgba(224, 107, 95, 0.4);
  color: #ffd9d4;
  background: var(--danger-soft);
}
.btn--danger:hover { background: rgba(224, 107, 95, 0.22); }
.btn--lg { min-height: 54px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn--block { width: 100%; }
.btn--loading { pointer-events: none; }
.btn--loading .btn__label { opacity: 0.45; }
.btn__spinner {
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Поверхности ─────────────────────────────────────────────────────────── */

.card {
  background: linear-gradient(180deg, rgba(10, 47, 39, 0.92), rgba(6, 37, 31, 0.86));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.card--glass {
  background: linear-gradient(180deg, rgba(184, 243, 205, 0.075), rgba(184, 243, 205, 0.025));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.card--pad { padding: 24px; }

/* ── Формы ───────────────────────────────────────────────────────────────── */

.field { display: grid; gap: 8px; }
.field__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.label {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}
.label__req { color: var(--mint); }
.hint { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.counter { color: var(--muted-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.counter.is-over { color: var(--danger); }

.input,
.select,
.textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(4, 27, 23, 0.62);
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: #658176; }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(184, 243, 205, 0.24); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(184, 243, 205, 0.12);
  background: rgba(4, 27, 23, 0.85);
}
.input[aria-invalid='true'], .select[aria-invalid='true'] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(224, 107, 95, 0.1);
}
.textarea { min-height: 92px; resize: vertical; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238aa79a' stroke-width='2' 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;
  padding-right: 42px;
}
.select option { background: #0a2f27; color: var(--text); }
.input--initial { text-align: center; font-size: 20px; font-weight: 700; text-transform: uppercase; padding-inline: 8px; }

.field__error {
  display: none;
  color: #ffb3aa;
  font-size: 12.5px;
  line-height: 1.35;
}
.field.has-error .field__error { display: block; }
.field.has-error .input,
.field.has-error .select { border-color: var(--danger); }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}
.consent input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--malachite);
  cursor: pointer;
}
.consent a { color: var(--mint); }

.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-error {
  display: none;
  padding: 12px 14px;
  border: 1px solid rgba(224, 107, 95, 0.35);
  border-radius: 12px;
  background: var(--danger-soft);
  color: #ffd9d4;
  font-size: 13.5px;
}
.form-error.is-visible { display: block; }

/* ── Служебное ───────────────────────────────────────────────────────────── */

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

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--malachite);
  box-shadow: 0 0 0 4px rgba(63, 191, 143, 0.12);
}

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

@media (max-width: 640px) {
  .container { width: min(100% - 32px, 1180px); }
}
