:root {
  color-scheme: dark;
  --ink: #101418;
  --panel: #181e24;
  --line: #2b343d;
  --text: #f4f6f8;
  --muted: #a8b3bd;
  --lime: #c6f135;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--ink); color: var(--text); font: 17px/1.6 var(--sans); }
main { flex: 1; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.wrap { width: min(1040px, 100% - 32px); margin-inline: auto; }

/* Header */
header { position: sticky; top: 0; z-index: 5; background: var(--ink); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: block; width: 70px; flex: none; }
.brand svg { display: block; width: 100%; height: auto; }
.bar-right { display: flex; align-items: center; gap: 20px; }
nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; font-size: 15px; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover, nav a[aria-current="page"] { color: var(--lime); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.lang button { border: 0; background: none; color: var(--muted); font: 13px var(--mono); padding: 6px 10px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--lime); color: var(--ink); }
.menu-button { display: none; background: none; color: var(--text); border: 1px solid var(--line); border-radius: 6px; font: 14px var(--sans); padding: 6px 12px; cursor: pointer; }
#progress { height: 2px; background: var(--lime); transform: scaleX(0); transform-origin: left; margin-bottom: -1px; }

/* Hero */
.hero-area { position: relative; overflow: hidden; }
#sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero { position: relative; padding: 72px 0 64px; pointer-events: none; }
.hero.big { padding: 104px 0 96px; }
.hero a { pointer-events: auto; }
.hero > * { animation: rise .7s cubic-bezier(.2, .8, .2, 1) backwards; }
.hero > :nth-child(2) { animation-delay: .1s; }
.hero > :nth-child(3) { animation-delay: .2s; }
.hero > :nth-child(4) { animation-delay: .3s; }
.hero > :nth-child(5) { animation-delay: .4s; }
.eyebrow { font: 14px var(--mono); color: var(--lime); margin: 0 0 20px; }
h1 { font-size: clamp(36px, 6vw, 56px); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 20px; max-width: 18ch; }
.big h1 { font-size: clamp(38px, 7vw, 68px); max-width: 16ch; }
.lead { color: var(--muted); font-size: 20px; max-width: 56ch; margin: 0 0 32px; }
.hero .lead:last-child { margin-bottom: 0; }
.typed { font: 16px/1.5 var(--mono); min-height: 24px; margin: 0 0 32px; }
.typed .prompt { color: var(--lime); }
.cursor { display: inline-block; width: 9px; height: 1.05em; margin-left: 3px; vertical-align: -2px; background: var(--lime); animation: blink 1s steps(1) infinite; }
.score { font: 16px var(--mono); color: var(--lime); margin: 0 0 24px; }

/* Buttons */
.button { display: inline-block; background: var(--lime); color: var(--ink); font: 600 17px var(--sans); text-decoration: none; padding: 13px 22px; border: 1px solid var(--lime); border-radius: 6px; cursor: pointer; transition: transform .2s ease, background-color .2s ease, border-color .2s ease; }
.button:hover { background: #d5f95f; transform: translateY(-3px) rotate(-1.5deg); }
.button:active { transform: scale(.96); }
.button.ghost { background: none; color: var(--text); border-color: var(--line); }
.button.ghost:hover { border-color: var(--lime); }

/* Sections */
section.block { padding: 68px 0; border-top: 1px solid var(--line); }
h2 { font-size: 30px; line-height: 1.2; margin: 0 0 28px; }
h3 { font-size: 19px; margin: 0 0 8px; }
.block .lead { font-size: 18px; margin-bottom: 24px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 24px; text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card:hover { transform: translateY(-6px) rotate(-.6deg); border-color: var(--lime); }
.card:nth-child(even):hover { transform: translateY(-6px) rotate(.6deg); }
.review-name { margin: 18px 0 2px; }
.more { display: block; margin-top: 14px; font: 14px var(--mono); color: var(--lime); }
.project { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.project p { max-width: 60ch; }
.project .tags { font: 13px var(--mono); color: var(--lime); margin-top: 12px; }
.project a { white-space: nowrap; color: var(--lime); }
.note { color: var(--muted); margin: 20px 0 0; }
.prose p { color: var(--muted); max-width: 62ch; margin: 0 0 14px; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 40px; }
.checks li { position: relative; padding-left: 28px; color: var(--muted); }
.checks li::before { content: "^"; position: absolute; left: 0; top: 2px; font: 700 20px/1.3 var(--mono); color: var(--lime); }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 48px; }
.steps li { counter-increment: step; display: flex; gap: 16px; color: var(--muted); }
.steps li::before { content: counter(step, decimal-leading-zero); font: 14px/1.9 var(--mono); color: var(--lime); }

.timeline { list-style: none; counter-reset: stage; margin: 0; padding: 0; max-width: 720px; }
.timeline li { counter-increment: stage; position: relative; padding: 0 0 34px 64px; }
.timeline li::before { content: counter(stage); position: absolute; left: 0; top: 0; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); color: var(--ink); font: 700 16px var(--mono); }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 44px; bottom: 4px; width: 2px; background: var(--line); }
.timeline p { margin: 0; color: var(--muted); }

details { border-bottom: 1px solid var(--line); max-width: 760px; }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 600; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "^"; font: 700 20px/1.2 var(--mono); color: var(--lime); transform: rotate(180deg); transition: transform .2s ease; }
details[open] summary::after { transform: none; }
details p { margin: 0 0 18px; color: var(--muted); max-width: 64ch; }

.cta { text-align: center; }
.cta h2 { margin-bottom: 12px; }
.cta p { color: var(--muted); margin: 0 auto 26px; max-width: 52ch; }

/* Forms */
.form { display: grid; gap: 18px; max-width: 680px; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.calc-inputs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 760px; }
label { display: grid; gap: 6px; font-size: 15px; color: var(--muted); }
input, select, textarea { width: 100%; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 6px; font: 16px var(--sans); padding: 11px 12px; }
textarea { min-height: 130px; resize: vertical; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.status { min-height: 26px; margin: 0; color: var(--lime); font-size: 15px; }
.calc-result { margin-top: 26px; }
.calc-number { font: 700 clamp(44px, 8vw, 68px)/1.1 var(--mono); color: var(--lime); }
.calc-label { font-size: 18px; margin-left: 8px; color: var(--text); }
.calc-result p { margin: 8px 0 0; color: var(--muted); }
.contacts { display: flex; flex-wrap: wrap; gap: 12px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 15px; }
.foot { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.foot h3 { font-size: 14px; color: var(--text); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--lime); }
.foot p { margin: 0 0 6px; }

/* Animation */
.brand polygon { transform-box: fill-box; transform-origin: bottom; animation: hop .7s .5s backwards; }
.brand:hover polygon { animation: hop .6s; }
.reveal > .wrap > * { opacity: 0; transform: translateY(26px); }
.reveal.in > .wrap > * { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.reveal.in > .wrap > :nth-child(2) { transition-delay: .1s; }
.reveal.in > .wrap > :nth-child(3) { transition-delay: .2s; }
.reveal.in .card, .reveal.in .steps li, .reveal.in .checks li, .reveal.in .timeline li { animation: rise .6s ease backwards; }
.reveal.in :nth-child(2).card, .reveal.in .steps li:nth-child(2), .reveal.in .checks li:nth-child(2), .reveal.in .timeline li:nth-child(2) { animation-delay: .1s; }
.reveal.in :nth-child(3).card, .reveal.in .steps li:nth-child(3), .reveal.in .checks li:nth-child(3), .reveal.in .timeline li:nth-child(3) { animation-delay: .2s; }
.reveal.in :nth-child(n+4).card, .reveal.in .steps li:nth-child(n+4), .reveal.in .checks li:nth-child(n+4), .reveal.in .timeline li:nth-child(n+4) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes hop { 0%, 100% { transform: none; } 40% { transform: translateY(-22%) scaleY(1.08); } 70% { transform: scaleY(.92); } }

@media (max-width: 860px) {
  .menu-button { display: block; }
  nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  nav.open { display: block; }
  nav ul { flex-direction: column; gap: 0; font-size: 17px; }
  nav li a { display: block; padding: 10px 0; }
  .hero, .hero.big { padding: 60px 0; }
  .lead { font-size: 18px; }
  section.block { padding: 50px 0; }
  .grid, .grid.two, .steps, .checks, .form-row, .calc-inputs { grid-template-columns: 1fr; }
  .project { flex-direction: column; gap: 12px; }
  .foot { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .button:hover, .card:hover, .card:nth-child(even):hover { transform: none; }
}
