:root {
  --bg: #0a0d14;
  --bg-2: #111622;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.18);
  --text: #e8ebf1;
  --muted: #a3aab8;
  --dim: #5f6675;
  --accent: #7ff0c4;
  --accent-2: #b8f7dd;
  --white: #ffffff;
  --font: 'Space Grotesk', 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', 'Courier New', monospace;
  --pad: clamp(20px, 5vw, 72px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
h1, h2, h3, p { margin: 0; }
.mono { font-family: var(--mono); }
.wrap { max-width: 1280px; margin: 0 auto; padding-inline: var(--pad); }
.label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
  color: var(--bg);
  background: var(--accent);
  padding: 16px 28px;
  border-radius: 6px;
  border: 0;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-2); color: var(--bg); transform: translateY(-1px); }
.btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.btn-ghost { color: var(--text); padding: 16px 20px; font-size: 16px; }
.btn-ghost:hover { color: var(--white); }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand:hover { color: var(--white); }
.brand i { width: 10px; height: 10px; background: var(--accent); border-radius: 2px; display: block; }
.brand span { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a.link { font-size: 14px; color: var(--muted); }
.nav a.link:hover { color: var(--white); }
.nav .btn { padding: 10px 18px; font-size: 14px; }
.lang {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
}
.lang button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 6px 9px;
  border-radius: 4px;
  cursor: pointer;
  min-height: 32px;
}
.lang button:hover { color: var(--white); }
.lang button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.1); color: var(--white); }
.lang svg { width: 18px; height: 12px; border-radius: 2px; display: block; }

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before {
  content: "";
  position: absolute;
  top: -280px;
  right: -200px;
  width: 820px;
  height: 820px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(127, 240, 196, 0.16) 0%, rgba(127, 240, 196, 0) 65%);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  padding-block: clamp(72px, 10vw, 136px) clamp(64px, 8vw, 104px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.hero h1 {
  font-size: clamp(40px, 6.4vw, 88px);
  line-height: 1.0;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--white);
  max-width: 1000px;
  text-wrap: balance;
}
.hero p { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; color: var(--muted); max-width: 660px; }
.hero-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.reveal { opacity: 0; transform: translateY(14px); animation: reveal 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.reveal:nth-child(2) { animation-delay: 0.08s; }
.reveal:nth-child(3) { animation-delay: 0.16s; }
.reveal:nth-child(4) { animation-delay: 0.24s; }
@keyframes reveal { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; opacity: 1; transform: none; } }

/* Model switch */
.model-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 40px; }
.model-head .lead { display: flex; flex-direction: column; gap: 12px; max-width: 520px; }
.seg {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--bg-2);
  flex-shrink: 0;
}
.seg button {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 5px;
  padding: 10px 16px;
  min-height: 44px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.seg button:hover { color: var(--white); }
.seg button[aria-selected="true"] { background: var(--accent); color: var(--bg); }
.mode { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mode { animation: none; } }

/* Sections */
section { border-bottom: 1px solid var(--line); }
section .wrap { padding-block: clamp(56px, 7vw, 88px); }
.split { display: flex; gap: clamp(32px, 5vw, 64px); align-items: flex-start; }
.split .lead { width: 320px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }
.split .body { flex-grow: 1; min-width: 0; }
h2 { font-size: clamp(28px, 3vw, 38px); line-height: 1.1; letter-spacing: -0.02em; color: var(--white); text-wrap: balance; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.card.accent { border-color: var(--accent); }
.card .num { font-family: var(--mono); font-size: 28px; color: var(--accent); line-height: 1; }
.card h3 { font-size: 18px; font-weight: 700; color: var(--white); }
.card p { font-size: 15px; line-height: 1.55; color: var(--muted); }
.card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 16px; color: var(--muted); }
.card li { display: flex; gap: 12px; }
.card li::before { content: "—"; color: var(--accent); flex-shrink: 0; }

.stat { display: flex; flex-direction: column; gap: 10px; padding: 32px 0; border-top: 2px solid var(--accent); }
.stat.soft { border-top-color: var(--line-2); }
.stat .big { font-size: clamp(44px, 5vw, 64px); font-weight: 700; letter-spacing: -0.035em; color: var(--white); line-height: 1; }
.stat .mid { font-size: 22px; font-weight: 700; line-height: 1.3; color: var(--white); }
.stat .sub { font-size: 15px; line-height: 1.5; color: var(--muted); }
.source { font-family: var(--mono); font-size: 12px; color: var(--dim); margin-top: 24px; }

.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chips span { padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 100px; font-size: 14px; color: var(--text); }
.body p.lg { font-size: 18px; line-height: 1.55; color: var(--muted); margin-bottom: 24px; }
.note { font-size: 15px; color: var(--dim); margin-top: 24px; }

/* Calculator */
.calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.calc-inputs { display: flex; flex-direction: column; gap: 28px; padding: 36px; border-right: 1px solid var(--line); }
.calc-field { display: flex; flex-direction: column; gap: 10px; }
.calc-field .row-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.calc-field label { font-size: 14px; color: var(--muted); }
.calc-field output { font-family: var(--mono); font-size: 16px; color: var(--white); }
.calc-field input[type="range"] {
  width: 100%;
  height: 32px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.calc-field input[type="range"]::-webkit-slider-runnable-track { height: 3px; background: var(--line-2); border-radius: 2px; }
.calc-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px; margin-top: -9.5px;
  background: var(--accent); border-radius: 50%; border: 3px solid var(--bg-2);
  box-shadow: 0 0 0 1px var(--accent);
}
.calc-field input[type="range"]::-moz-range-track { height: 3px; background: var(--line-2); border-radius: 2px; }
.calc-field input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; background: var(--accent); border-radius: 50%; border: 3px solid var(--bg-2); box-shadow: 0 0 0 1px var(--accent); }
.calc-out { display: flex; flex-direction: column; justify-content: center; gap: 24px; padding: 36px; background: radial-gradient(circle at 100% 0%, rgba(127, 240, 196, 0.12), rgba(127, 240, 196, 0) 60%); }
.calc-out .line { display: flex; flex-direction: column; gap: 6px; }
.calc-out .line .k { font-size: 14px; color: var(--muted); }
.calc-out .line .v { font-family: var(--mono); font-size: 22px; color: var(--white); }
.calc-out .line.total { padding-top: 24px; border-top: 1px solid var(--line-2); }
.calc-out .line.total .v { font-family: var(--font); font-size: clamp(40px, 4.4vw, 56px); font-weight: 700; letter-spacing: -0.035em; color: var(--accent); line-height: 1; }
.calc-out .hint { font-size: 14px; line-height: 1.5; color: var(--muted); }

/* About */
.about { display: flex; gap: clamp(32px, 5vw, 64px); align-items: flex-start; }
.about .photo {
  width: 320px;
  flex-shrink: 0;
  aspect-ratio: 4 / 5;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-2);
}
.about .photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; }
.about .text { display: flex; flex-direction: column; gap: 20px; }
.about .text p { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 640px; }
.about .text p strong { color: var(--white); font-weight: 500; }

/* FAQ */
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--white);
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 22px;
  color: var(--accent);
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { font-size: 16px; line-height: 1.6; color: var(--muted); padding: 0 48px 24px 0; max-width: 760px; }

/* Contact */
.contact .wrap { display: flex; gap: clamp(32px, 5vw, 64px); align-items: flex-start; }
.contact .lead { width: 380px; flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; }
.contact .lead p { font-size: 18px; line-height: 1.55; color: var(--muted); }
form { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; color: var(--muted); }
.field input, .field textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  padding: 14px 16px;
  min-height: 50px;
  outline: none;
  transition: border-color 0.15s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { font-size: 15px; padding: 14px 16px; border-radius: 6px; display: none; }
.form-msg.ok { display: block; background: rgba(127, 240, 196, 0.12); color: var(--accent); }
.form-msg.err { display: block; background: rgba(255, 120, 120, 0.12); color: #ff9c9c; }

/* Footer */
footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 40px;
  font-size: 13px;
  color: var(--dim);
}
footer a { color: var(--dim); }
footer a:hover { color: var(--text); }
footer nav { display: flex; gap: 24px; }

/* Legal pages */
.legal .wrap { padding-block: clamp(56px, 7vw, 96px); max-width: 860px; }
.legal h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.1; letter-spacing: -0.03em; color: var(--white); margin-bottom: 40px; }
.legal h2 { font-size: 22px; margin: 40px 0 12px; }
.legal h3 { font-size: 17px; color: var(--white); margin: 24px 0 8px; }
.legal p, .legal li { font-size: 16px; line-height: 1.65; color: var(--muted); }
.legal p { margin-bottom: 12px; }
.legal ul { padding-left: 20px; margin: 0 0 12px; }
.legal .ph { font-family: var(--mono); color: var(--accent); }
.legal .back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 32px; }
.legal .back:hover { color: var(--white); }

@media (max-width: 900px) {
  .nav a.link { display: none; }
  .model-head { flex-direction: column; align-items: flex-start; }
  .split, .contact .wrap, .about { flex-direction: column; }
  .split .lead, .contact .lead { width: auto; }
  .about .photo { width: 240px; }
  .grid-3 { grid-template-columns: 1fr; }
  .calc { grid-template-columns: 1fr; }
  .calc-inputs { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .grid-2, .row { grid-template-columns: 1fr; }
  .nav .btn { display: none; }
  .lang button span { display: none; }
  .lang button { padding: 6px 8px; }
  .header .wrap { height: 64px; }
  .stat { padding: 24px 0; }
  .hero-actions .btn { width: 100%; }
  .seg { display: flex; width: 100%; }
  .seg button { flex: 1; white-space: normal; padding: 10px 8px; font-size: 13px; }
  .calc-inputs, .calc-out { padding: 24px; }
  .faq details p { padding-right: 0; }
}
