:root {
  --bg: #f4f4f1;
  --ink: #0e0e0e;
  --red: #e10600;
  --mute: #666;
  --max: #168afd;
  --line: #0e0e0e;
  --yellow: #f5c518;
  --pad: clamp(1.25rem, 3vw, 2rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  line-height: 1.45;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
i { font-style: normal; color: var(--red); }
h1, h2 {
  font-family: "Archivo Black", sans-serif;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.btn-max {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--max);
  color: #fff;
  font-weight: 700;
  padding: 0.9rem 1.3rem;
  border: 2px solid var(--ink);
  transition: transform 0.2s;
}
.btn-max:hover { transform: translateY(-2px); }
.btn-max.sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-family: "IBM Plex Mono", monospace;
}

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem var(--pad);
  background: var(--bg);
  border-bottom: 2px solid var(--line);
}
.logo {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(0.95rem, 2.4vw, 1.25rem);
  white-space: nowrap;
}
.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.2rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.top-nav a:hover { color: var(--red); }

.hero {
  display: grid;
  grid-template-columns: minmax(1.5rem, 1fr) minmax(0, 34rem) minmax(300px, 380px) minmax(1.5rem, 1fr);
  align-items: center;
  column-gap: clamp(1.5rem, 3.5vw, 2.75rem);
  row-gap: 1.5rem;
  padding: 2.75rem 0 3.25rem;
  border-bottom: 2px solid var(--line);
}
.hero-copy {
  grid-column: 2;
  max-width: none;
}
.calc {
  grid-column: 3;
}
.code {
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(0.95rem, 1.7vw, 1.1rem);
  letter-spacing: 0.16em;
  color: var(--mute);
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(3.4rem, 8vw, 6.2rem);
  max-width: 10ch;
  color: var(--ink);
}
.lead {
  margin: 1.4rem 0 0;
  max-width: 28rem;
  font-size: clamp(1.2rem, 2.3vw, 1.45rem);
  line-height: 1.4;
  color: var(--mute);
}
.calc-intro {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
}

.calc {
  display: grid;
  gap: 1rem;
  width: 100%;
  padding: 1.25rem 1.2rem 1.2rem;
  background: #ececeb;
  border: 1px solid rgba(14, 14, 14, 0.08);
  border-radius: 28px;
}
.calc-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1a2a2e;
}
.calc-field select {
  width: 100%;
  appearance: none;
  border: 0;
  border-radius: 14px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231a2a2e' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 0.95rem center;
  padding: 0.9rem 2.2rem 0.9rem 1rem;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  cursor: pointer;
}
.calc-budget { min-width: 0; }
.calc-slider {
  --pct: 10.7%;
  position: relative;
  padding-top: 2.1rem;
}
.calc-bubble {
  position: absolute;
  top: 0;
  left: var(--pct);
  transform: translateX(-50%);
  z-index: 2;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: #1a2a2e;
  color: var(--yellow);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.calc-slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  touch-action: none;
}
.calc-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--yellow) 0%,
    var(--yellow) var(--pct),
    #cfd3d4 var(--pct),
    #cfd3d4 100%
  );
}
.calc-slider input[type="range"]::-moz-range-track {
  height: 8px;
  border: none;
  border-radius: 999px;
  background: #cfd3d4;
}
.calc-slider input[type="range"]::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--yellow);
}
.calc-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -7px;
  border: 0;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  cursor: grab;
}
.calc-slider input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  cursor: grab;
}
.calc-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  font-style: italic;
  color: #8a9396;
}
.calc-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  padding: 0 1.4rem;
  border-radius: 999px;
  background: var(--max);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  transition: filter 0.2s, transform 0.2s;
}
.calc-go:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.advantages,
.terms,
.about,
.contacts {
  padding: 3rem var(--pad);
  border-bottom: 2px solid var(--line);
}
.advantages h2,
.terms h2,
.about h2,
.contacts h2 {
  font-size: clamp(1.9rem, 5vw, 3rem);
  margin-bottom: 1.25rem;
}

.adv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.adv-grid article {
  border: 2px solid var(--line);
  background: #fff;
  padding: 1.25rem 1.1rem;
}
.adv-grid strong {
  display: block;
  color: var(--red);
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}
.adv-grid p {
  color: var(--mute);
  font-size: 0.95rem;
}

.terms { background: #fff; }
.terms-text,
.about-text {
  max-width: 680px;
  display: grid;
  gap: 1rem;
  color: var(--mute);
  font-size: 1.05rem;
}

.about { background: var(--ink); color: #fff; }
.about h2 { color: #fff; }
.about-text { color: rgba(255, 255, 255, 0.72); }

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.contacts-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 0.85rem;
}
.contacts-note {
  margin-top: 0.9rem;
  color: var(--mute);
  max-width: 26rem;
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  color: var(--mute);
  margin-bottom: 0.35rem;
}
.legal-table th,
.legal-table td {
  text-align: left;
  padding: 0.35rem 0.55rem 0.35rem 0;
  border-bottom: 1px solid rgba(14, 14, 14, 0.12);
  vertical-align: top;
  font-weight: 400;
}
.legal-table th {
  width: 7.5rem;
  color: var(--ink);
  font-weight: 500;
}
.privacy-link {
  display: inline-block;
  margin-top: 0.85rem;
  color: var(--max);
  font-weight: 600;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease var(--d, 0s), transform 0.5s ease var(--d, 0s);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 1.75rem var(--pad) 2rem;
    gap: 1.35rem;
  }
  .hero-copy,
  .calc { grid-column: 1; }
  .hero h1 { font-size: clamp(3rem, 12vw, 4.4rem); }
  .calc { border-radius: 22px; }
  .calc-go { height: 54px; }
  .adv-grid,
  .contacts-grid { grid-template-columns: 1fr; }
  .top-nav { display: none; }
  .logo { max-width: 58vw; white-space: normal; line-height: 1; }
}
