/* CaspiAgro — site styles
   Tokens → base → layout → components → sections → motion → responsive */

:root {
  --green: #3dae49;
  --green-deep: #1d7a2f;
  --lime: #c8f36d;
  --gold: #f0b940;
  --rust: #d9542f;
  --sky: #5fb8d6;

  --night: #08160e;
  --night-2: #0e2317;
  --night-3: #163323;
  --paper: #f4f6ef;
  --paper-2: #e9eee1;
  --card: #ffffff;

  --ink: #0c1f15;
  --ink-2: #33423a;
  --muted: #56655c;
  --on-night: #eef5ea;
  --on-night-muted: #a9bcae;
  --line: rgba(12, 31, 21, 0.12);
  --line-night: rgba(238, 245, 234, 0.14);

  --font-display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --shadow: 0 1px 2px rgba(12, 31, 21, 0.06), 0 12px 32px -12px rgba(12, 31, 21, 0.18);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms;
  --t-med: 320ms;
  --t-slow: 700ms;

  --header-h: 72px;
  --z-header: 100;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; text-wrap: balance; overflow-wrap: break-word; }
h2 { font-size: clamp(1.6rem, 1.05rem + 2.4vw, 2.75rem); font-weight: 600; letter-spacing: -0.02em; }
h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

.skip {
  position: fixed; top: 12px; left: 12px; z-index: 1000;
  padding: 12px 18px; border-radius: var(--r-sm);
  background: var(--lime); color: var(--ink); font-weight: 600; text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

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

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 26px;
  border: 1.5px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none;
  cursor: pointer; touch-action: manipulation;
  transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast),
              transform var(--t-fast) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn .icon { transition: transform var(--t-med) var(--ease-out); }
.btn:hover .icon { transform: translateX(4px); }
.btn--primary { background: var(--lime); color: var(--ink); }
.btn--primary:hover { background: #d9fb8e; }
.btn--ghost { border-color: var(--line-night); color: var(--on-night); }
.btn--ghost:hover { border-color: var(--on-night); background: rgba(238, 245, 234, 0.06); }
.btn--dark { background: var(--ink); color: var(--on-night); }
.btn--dark:hover { background: var(--night-3); }
.btn--sm { min-height: 44px; padding: 10px 20px; font-size: 0.9375rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: progress; }

.eyebrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-bottom: 18px;
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--green-deep);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.eyebrow--light { color: var(--lime); }

.tag {
  display: inline-block; padding: 4px 10px; border-radius: 999px; vertical-align: middle;
  background: rgba(200, 243, 109, 0.16); color: var(--lime);
  font-family: var(--font-body); font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
}
.tag--green { background: rgba(61, 174, 73, 0.14); color: var(--green-deep); }

/* ------------------------------------------------------------ header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-header);
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color var(--t-med), border-color var(--t-med), backdrop-filter var(--t-med);
}
.site-header.is-stuck, .site-header.is-open {
  background: rgba(8, 22, 14, 0.86);
  border-bottom-color: var(--line-night);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
.site-header__row { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 24px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { height: 32px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav__links { display: flex; gap: 4px; }
.site-nav__links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border-radius: 999px; color: var(--on-night-muted);
  font-size: 0.9375rem; font-weight: 500; text-decoration: none;
  transition: color var(--t-fast), background-color var(--t-fast);
}
.site-nav__links a:hover, .site-nav__links a.is-active { color: var(--on-night); background: rgba(238, 245, 234, 0.08); }

.lang-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line-night); border-radius: 999px; }
.lang-switch a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 36px; padding: 0 10px; border-radius: 999px;
  color: var(--on-night-muted); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em;
  text-decoration: none; transition: color var(--t-fast), background-color var(--t-fast);
}
.lang-switch a:hover { color: var(--on-night); }
.lang-switch a[aria-current="true"] { background: var(--on-night); color: var(--ink); }

.nav-toggle {
  display: none; width: 48px; height: 48px; padding: 0;
  border: 1px solid var(--line-night); border-radius: 14px; background: transparent; cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 20px; height: 2px; margin-inline: auto; border-radius: 2px;
  background: var(--on-night); transition: transform var(--t-med) var(--ease-out), opacity var(--t-fast);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* -------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding-top: calc(var(--header-h) + clamp(32px, 6vw, 72px));
  background: var(--night); color: var(--on-night);
}
.hero__glow {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 55% at 78% 38%, rgba(61, 174, 73, 0.28), transparent 70%),
    radial-gradient(40% 40% at 8% 4%, rgba(200, 243, 109, 0.10), transparent 70%),
    linear-gradient(180deg, transparent 60%, rgba(8, 22, 14, 0.9));
}
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(24px, 4vw, 64px); align-items: center;
  padding-bottom: clamp(40px, 6vw, 88px);
}
.hero__title {
  font-size: clamp(2rem, 0.9rem + 4.6vw, 4.25rem);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1.04;
}
.hero__title em { font-style: normal; color: var(--lime); }
.hero__lead { max-width: 34rem; margin-top: 24px; color: var(--on-night-muted); font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero__visual { position: relative; min-width: 0; }
.scan { perspective: 1400px; perspective-origin: 50% 20%; padding: 4% 0 10%; }
.scan__plane {
  transform: rotateX(54deg) rotateZ(-24deg) scale(1.02);
  transform-style: preserve-3d;
  border-radius: 22px; overflow: hidden;
  box-shadow: 0 60px 80px -30px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(200, 243, 109, 0.18);
}
.scan canvas { width: 100%; height: auto; aspect-ratio: 4 / 3; background: var(--night-2); }

.hud { position: absolute; inset: 0; pointer-events: none; }
.hud__chip {
  position: absolute; min-width: 132px; padding: 10px 14px;
  border: 1px solid var(--line-night); border-radius: 14px;
  background: rgba(8, 22, 14, 0.72);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.hud__chip dt { display: flex; align-items: center; gap: 8px; color: var(--on-night-muted); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.hud__chip dd { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.3; }
.hud__chip:nth-child(1) { top: 6%; left: 2%; }
.hud__chip:nth-child(2) { top: 30%; right: 0; }
.hud__chip:nth-child(3) { bottom: 16%; left: 10%; }
.hud__chip--live dd { color: var(--lime); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; transform: scale(0.7); } }
.hero__note { margin-top: -4%; text-align: right; color: var(--on-night-muted); font-size: 0.8125rem; }

.band {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0;
  border-top: 1px solid var(--line-night);
  padding: 20px; color: var(--on-night-muted);
  font-size: 0.875rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
}
.band li { display: flex; align-items: center; }
.band li + li::before { content: ""; width: 6px; height: 6px; margin: 0 22px; border-radius: 50%; background: var(--green); }

/* ---------------------------------------------------------- sections */
.section { padding-block: clamp(72px, 9vw, 136px); }
.section--tint { background: var(--paper-2); }
.section--night { background: var(--night); color: var(--on-night); }
.section__head { max-width: 46rem; margin-bottom: clamp(36px, 5vw, 64px); }
.section__sub { max-width: 40rem; margin-top: 18px; color: var(--muted); font-size: 1.125rem; }
.section--night .section__sub { color: var(--on-night-muted); }

/* ------------------------------------------------------------- cards */
.cards { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.card {
  position: relative; grid-column: span 5; overflow: hidden;
  display: flex; flex-direction: column; gap: 14px;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--card);
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med), border-color var(--t-med);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(61, 174, 73, 0.45); }
.card--feature { grid-column: span 7; }
.card:nth-child(n + 3) { grid-column: span 4; }
.card--feature {
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(61, 174, 73, 0.16), transparent 60%),
    var(--card);
}
.card--dark { background: var(--night-2); border-color: var(--night-3); color: var(--on-night); }
.card--dark p, .card--dark .ticks { color: var(--on-night-muted); }
.card--dark .card__icon { color: var(--lime); background: rgba(200, 243, 109, 0.1); }
.card--dark .card__num { color: rgba(238, 245, 234, 0.1); }
.card--dark .ticks .icon { color: var(--lime); }
.card__num {
  position: absolute; top: 18px; right: 26px;
  font-family: var(--font-display); font-size: 3.25rem; font-weight: 700; line-height: 1;
  color: rgba(12, 31, 21, 0.07);
}
.card__icon { width: 56px; height: 56px; padding: 12px; border-radius: 16px; color: var(--green-deep); background: rgba(61, 174, 73, 0.12); }
.card h3 { margin-top: 6px; font-size: 1.3125rem; }
.card p { color: var(--ink-2); max-width: 36rem; }
.ticks { display: grid; gap: 8px; margin-top: auto; padding-top: 10px; color: var(--ink-2); font-size: 0.9688rem; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .icon { margin-top: 0.2em; color: var(--green-deep); }

/* ------------------------------------------------------------- steps */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.step { position: relative; padding-top: 34px; }
.step::before { content: ""; position: absolute; top: 0; left: 0; right: -24px; height: 2px; background: var(--line); }
.step:last-child::before { right: 0; }
.step::after {
  content: ""; position: absolute; top: -6px; left: 0; width: 14px; height: 14px; border-radius: 50%;
  background: var(--paper-2); border: 3px solid var(--green);
}
.step__num { display: block; margin-bottom: 14px; font-family: var(--font-display); font-size: 0.875rem; font-weight: 600; color: var(--green-deep); letter-spacing: 0.08em; }
.step h3 { margin-bottom: 10px; font-size: 1.25rem; }
.step p { color: var(--ink-2); }

/* -------------------------------------------------------------- demo */
.demo { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.demo__main { min-width: 0; }
.layers { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.layers label { position: relative; cursor: pointer; }
.layers input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.layers span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line-night); border-radius: 999px;
  color: var(--on-night-muted); font-size: 0.9375rem; font-weight: 500;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.layers label:hover span { color: var(--on-night); border-color: var(--on-night-muted); }
.layers input:checked + span { background: var(--lime); border-color: var(--lime); color: var(--ink); font-weight: 600; }
.layers input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 3px; }

.demo__map { border: 1px solid var(--line-night); border-radius: var(--r-lg); background: var(--night-2); overflow: hidden; }
#field-map { width: 100%; height: auto; }
.parcel { cursor: pointer; outline: none; }
.parcel path { stroke: rgba(8, 22, 14, 0.55); stroke-width: 1.5; transition: fill var(--t-med), stroke var(--t-fast), stroke-width var(--t-fast); }
.parcel text { fill: #08160e; font-family: var(--font-body); font-size: 15px; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; font-variant-numeric: tabular-nums; }
.parcel:hover path, .parcel:focus-visible path { stroke: #ffffff; stroke-width: 3; }
.parcel[aria-pressed="true"] path { stroke: #ffffff; stroke-width: 4.5; }

.legend { display: flex; align-items: center; gap: 12px; margin-top: 16px; color: var(--on-night-muted); font-size: 0.8125rem; }
.legend__bar { flex: 1; max-width: 260px; height: 8px; border-radius: 999px; background: linear-gradient(90deg, #b5452c, #e8b33f, #9bd04a, #2e9e48); }
.legend__bar[data-layer="moisture"] { background: linear-gradient(90deg, #e9d9a6, #6fc3d8, #1e6fa8); }
.legend__bar[data-layer="risk"] { background: linear-gradient(90deg, #3dae49 0 33%, #f0b940 33% 66%, #d9542f 66%); }
.demo__note { margin-top: 10px; color: var(--on-night-muted); font-size: 0.8125rem; }

.panel { padding: 28px; border: 1px solid var(--line-night); border-radius: var(--r-lg); background: var(--night-2); min-height: 360px; }
.panel__empty { color: var(--on-night-muted); }
.panel__kicker { color: var(--lime); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.panel__title { margin-top: 6px; font-size: 1.5rem; }
.metrics { display: grid; gap: 18px; margin-top: 24px; }
.metrics > div { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: baseline; }
.metrics dt { color: var(--on-night-muted); font-size: 0.9375rem; }
.metrics dd { font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.meter { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: rgba(238, 245, 234, 0.1); overflow: hidden; }
.meter__fill { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--green); transform-origin: left; transform: scaleX(0); transition: transform var(--t-slow) var(--ease-out); }
.meter__fill--blue { background: var(--sky); }
.advice { margin-top: 24px; padding: 18px; border-radius: var(--r-md); background: rgba(200, 243, 109, 0.08); border: 1px solid rgba(200, 243, 109, 0.2); }
.advice__label { color: var(--lime); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.advice__text { margin-top: 6px; }
.risk-pill { display: inline-flex; align-items: center; gap: 8px; }
.risk-pill::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.risk-pill[data-risk="mid"]::before { background: var(--gold); border-radius: 2px; }
.risk-pill[data-risk="high"]::before { background: var(--rust); border-radius: 0; transform: rotate(45deg); }

/* ---------------------------------------------------------- platform */
.platform { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.features { display: grid; gap: 22px; margin: 32px 0 36px; }
.features li { padding-left: 20px; border-left: 2px solid var(--green); }
.features h3 { font-size: 1.0625rem; }
.features p { margin-top: 4px; color: var(--ink-2); }

.mock { min-width: 0; }
.mock__bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-radius: var(--r-md) var(--r-md) 0 0; background: var(--night); }
.mock__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--night-3); }
.mock__bar span { margin-left: 12px; padding: 3px 14px; border-radius: 999px; background: var(--night-2); color: var(--on-night-muted); font-size: 0.75rem; }
.mock__body { display: flex; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-md) var(--r-md); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.mock__side { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 14px; background: var(--night-2); }
.mock__side b { width: 26px; height: 26px; border-radius: 8px; background: var(--night-3); }
.mock__side b.is-on { background: var(--green); }
.mock__main { flex: 1; min-width: 0; display: grid; gap: 14px; padding: 16px; background: var(--paper); }
.mock__row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; }
.mock__card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.mock__label { margin-bottom: 10px; color: var(--muted); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.spark { width: 100%; height: 90px; }
.spark__line { stroke-dasharray: 420; stroke-dashoffset: 0; }
.mock__axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: 0.6875rem; }
.mock__fields { display: grid; gap: 9px; font-size: 0.8125rem; font-weight: 600; }
.mock__fields li { display: flex; align-items: center; gap: 8px; }
.mock__fields em { flex: 1; height: 6px; border-radius: 999px; background: var(--paper-2); }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot--g { background: var(--green); } .dot--y { background: var(--gold); } .dot--r { background: var(--rust); }
.mock__tasks { display: grid; gap: 10px; font-size: 0.875rem; color: var(--ink-2); }
.mock__tasks li { display: flex; align-items: center; gap: 10px; }
.box { flex: none; width: 16px; height: 16px; border: 2px solid var(--line); border-radius: 5px; }
.box--done { border-color: var(--green); background: var(--green); }
.mock__caption { margin-top: 12px; color: var(--muted); font-size: 0.8125rem; text-align: center; }

/* ----------------------------------------------------------- contact */
.contact { position: relative; overflow: hidden; isolation: isolate; }
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(50% 60% at 0% 100%, rgba(61, 174, 73, 0.22), transparent 70%);
}
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.mail { display: inline-flex; align-items: center; gap: 14px; margin-top: 36px; padding: 14px 22px 14px 16px; border: 1px solid var(--line-night); border-radius: var(--r-md); text-decoration: none; font-weight: 600; font-size: 1.0625rem; transition: border-color var(--t-fast), background-color var(--t-fast); }
.mail:hover { border-color: var(--lime); background: rgba(200, 243, 109, 0.06); }
.mail .icon { width: 28px; height: 28px; color: var(--lime); }
.mail small { display: block; color: var(--on-night-muted); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }

.form { display: grid; gap: 20px; padding: clamp(22px, 3vw, 36px); border: 1px solid var(--line-night); border-radius: var(--r-lg); background: var(--night-2); }
.field { display: grid; gap: 8px; }
.field label { font-size: 0.9375rem; font-weight: 600; }
.req { color: var(--lime); }
.opt { color: var(--on-night-muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%; min-height: 52px; padding: 14px 16px;
  border: 1.5px solid var(--line-night); border-radius: var(--r-sm);
  background: rgba(8, 22, 14, 0.6); color: var(--on-night); font-size: 1rem;
  transition: border-color var(--t-fast), background-color var(--t-fast);
}
.field textarea { resize: vertical; min-height: 132px; line-height: 1.5; }
.field input:hover, .field textarea:hover { border-color: var(--on-night-muted); }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-color: var(--lime); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #ff9d85; }
.field__hint { color: var(--on-night-muted); font-size: 0.8125rem; }
.field__error { color: #ffb4a1; font-size: 0.875rem; font-weight: 500; }
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { padding: 14px 16px; border-radius: var(--r-sm); font-weight: 500; }
.form__status.is-ok { background: rgba(200, 243, 109, 0.12); border: 1px solid rgba(200, 243, 109, 0.4); color: var(--lime); }
.form__status.is-err { background: rgba(217, 84, 47, 0.14); border: 1px solid rgba(255, 157, 133, 0.5); color: #ffc7b8; }
.form__privacy { color: var(--on-night-muted); font-size: 0.8125rem; }

/* ------------------------------------------------------------ footer */
.site-footer { padding-block: 56px 28px; background: #050f09; color: var(--on-night-muted); }
.site-footer__row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 32px; }
.site-footer__tag { margin-top: 14px; max-width: 22rem; font-size: 0.9375rem; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.site-footer__nav a, .site-footer__base a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; text-decoration: none; transition: color var(--t-fast); }
.site-footer__nav a:hover, .site-footer__base a:hover { color: var(--on-night); }
.site-footer__base { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line-night); font-size: 0.875rem; }

/* --------------------------------------------------------------- 404 */
.nf { min-height: 100dvh; display: grid; place-items: center; background: var(--night); color: var(--on-night); }
.nf__box { width: min(100% - 40px, 34rem); display: grid; justify-items: start; gap: 18px; padding-block: 48px; }
.nf__box img { height: 36px; width: auto; margin-bottom: 24px; }
.nf__code { font-family: var(--font-display); font-size: clamp(4rem, 18vw, 8rem); font-weight: 700; line-height: 1; color: var(--lime); }
.nf__box p { color: var(--on-night-muted); }

/* ------------------------------------------------------------ motion */
.js [data-reveal], .js [data-reveal-group] > * {
  opacity: 0; transform: translateY(24px);
  transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out);
}
.js [data-reveal].is-in, .js [data-reveal-group].is-in > * { opacity: 1; transform: none; }
.js [data-reveal-group].is-in > :nth-child(2) { transition-delay: 70ms; }
.js [data-reveal-group].is-in > :nth-child(3) { transition-delay: 140ms; }
.js [data-reveal-group].is-in > :nth-child(4) { transition-delay: 210ms; }
.js [data-reveal-group].is-in > :nth-child(5) { transition-delay: 280ms; }
.js .mock .spark__line { stroke-dashoffset: 420; transition: stroke-dashoffset 1.6s var(--ease-out) 0.3s; }
.js .mock.is-in .spark__line { stroke-dashoffset: 0; }

.hero__copy > * { animation: rise 0.9s var(--ease-out) both; }
.hero__copy > :nth-child(2) { animation-delay: 80ms; }
.hero__copy > :nth-child(3) { animation-delay: 160ms; }
.hero__copy > :nth-child(4) { animation-delay: 240ms; }
.hero__visual { animation: rise 1.1s var(--ease-out) 200ms both; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js [data-reveal], .js [data-reveal-group] > * { opacity: 1; transform: none; }
  .js .mock .spark__line { stroke-dashoffset: 0; }
}

/* -------------------------------------------------------- responsive */
@media (max-width: 1024px) {
  .site-nav { gap: 16px; }
  .site-nav__links a { padding: 0 10px; }
  .card, .card--feature, .card:nth-child(n + 3) { grid-column: span 6; }
  .card:last-child { grid-column: 1 / -1; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .step:nth-child(2)::before { right: 0; }
  .demo { grid-template-columns: 1fr; }
  .panel { min-height: 0; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    display: none; flex-direction: column; align-items: stretch; gap: 20px;
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    padding: 20px 20px 28px;
    background: var(--night); border-bottom: 1px solid var(--line-night);
  }
  .site-header.is-open .site-nav { display: flex; }
  .site-nav__links { flex-direction: column; gap: 2px; }
  .site-nav__links a { min-height: 52px; padding: 0 14px; font-size: 1.0625rem; }
  .lang-switch { align-self: flex-start; }

  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 560px; margin-inline: auto; width: 100%; }
  .platform, .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .container { width: min(100% - 32px, 1200px); }
  .card, .card--feature, .card:nth-child(n + 3) { grid-column: 1 / -1; }
  .steps { grid-template-columns: 1fr; }
  .step::before { right: 0; }
  .hero__actions .btn { width: 100%; }
  .hud__chip { min-width: 0; padding: 8px 12px; }
  .hud__chip dd { font-size: 1.0625rem; }
  .band { flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px 16px; }
  .band li::before { content: ""; width: 6px; height: 6px; margin: 0 12px 0 0; border-radius: 50%; background: var(--green); }
  .band li + li::before { margin: 0 12px 0 0; }
  .parcel text { font-size: 19px; }
  .mock__row { grid-template-columns: 1fr; }
  .mock__side { display: none; }
  .site-footer__row { flex-direction: column; }
}

/* ------------------------------------------------- cookie bar and policy page */

.cookie-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  max-width: 980px; margin-inline: auto; padding: 18px 22px;
  border: 1px solid var(--line-night); border-radius: var(--r-md);
  background: var(--night-2); color: var(--on-night);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
}
.cookie-bar[hidden] { display: none; }
.cookie-bar p { flex: 1 1 320px; font-size: 0.9375rem; line-height: 1.5; color: var(--on-night-muted); }
.cookie-bar p a { color: var(--lime); text-underline-offset: 3px; }
.cookie-bar__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.form__privacy a { color: inherit; text-underline-offset: 3px; }
.site-footer__base { flex-wrap: wrap; }

.doc { display: flex; flex-direction: column; min-height: 100dvh; }
.doc-header { background: var(--night); color: var(--on-night); }
.doc-header__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); }
.doc-main { flex: 1; padding-block: clamp(40px, 6vw, 80px); }
.doc-body { max-width: 760px; }
.doc-body h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); font-weight: 600; letter-spacing: -0.02em; }
.doc-body h2 { margin-top: 44px; font-size: 1.25rem; letter-spacing: -0.01em; }
.doc-body p, .doc-body ul { margin-top: 14px; color: var(--ink-2); }
.doc-body ul { display: grid; gap: 10px; padding-left: 22px; list-style: disc; }
.doc-body li::marker { color: var(--green); }
.doc-updated { margin-top: 0; font-size: 0.875rem; color: var(--muted); }
.doc-lead { font-size: 1.125rem; color: var(--ink); }
.doc-back { margin-top: 48px; }

@media (max-width: 640px) {
  .cookie-bar { left: 10px; right: 10px; bottom: 10px; padding: 16px; }
  .cookie-bar__actions { width: 100%; }
  .cookie-bar__actions .btn { flex: 1 1 auto; }
}
.cookie-bar .btn--ghost { background: transparent; }
