* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #050b18;
  --bg-soft: #071105;
  --surface: rgba(10, 20, 40, 0.74);
  --surface-strong: rgba(5, 11, 24, 0.92);
  --text: #efffe3;
  --muted: #baccd9;
  --muted-2: #8798b6;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(60, 75, 53, 0.82);
  --neon: #39ff14;
  --cyan: #00d9ff;
  --danger: #ff5577;
  --warning: #ffcc66;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --ease: cubic-bezier(.22, .72, .2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 15% 10%, rgba(57, 255, 20, 0.16), transparent 26rem),
    radial-gradient(circle at 85% 15%, rgba(0, 110, 255, 0.18), transparent 28rem),
    var(--bg);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1200;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--neon), var(--cyan));
}

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

.section {
  padding: clamp(72px, 8vw, 104px) 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(5, 11, 24, .78);
  backdrop-filter: blur(18px);
}

.brand img {
  width: 154px;
  height: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  transition: .2s var(--ease);
}

.nav-links a:hover {
  color: var(--neon);
  background: rgba(255, 255, 255, .06);
}

.nav-cta {
  color: #04130a !important;
  background: var(--neon) !important;
}

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .06);
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--text);
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 130px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr .92fr;
  gap: 42px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--neon);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero h1,
.section-head h2,
.cta-box h2 {
  margin-bottom: 22px;
  font-size: clamp(42px, 6vw, 82px);
  line-height: .98;
  letter-spacing: -.06em;
}

.hero p,
.section-head p,
.cta-box p {
  max-width: 650px;
  color: var(--muted);
  font-size: 17px;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  font-weight: 950;
  transition: .22s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.primary {
  color: #04130a;
  background: var(--neon);
}

.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, .06);
}

.dark {
  color: var(--neon);
  background: #04130a;
}

.hero-panel,
.calculator-card,
.results,
.guide-card,
.cta-box,
.formula-cards {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, var(--surface), var(--surface-strong));
  box-shadow: var(--shadow);
}

.hero-panel,
.calculator-card,
.results {
  padding: 22px;
}

.panel-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.red { background: var(--danger); }
.yellow { background: var(--warning); }
.green { background: var(--neon); }

.panel-top p {
  margin-left: 8px;
  overflow: hidden;
  color: var(--muted-2);
  font-family: monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mock-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.mock-card,
.mock-chart {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 22px;
  background: rgba(255, 255, 255, .05);
}

.mock-card.big {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(57, 255, 20, .18), rgba(0, 110, 255, .18));
}

.mock-card small,
.result-card small {
  display: block;
  color: #95a5bd;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.mock-card strong {
  display: block;
  margin: 12px 0;
  font-size: 40px;
  line-height: 1;
}

.mock-card em {
  color: var(--neon);
  font-style: normal;
  font-weight: 800;
}

.mock-chart {
  grid-column: span 2;
  height: 170px;
  display: flex;
  align-items: end;
  gap: 12px;
}

.mock-chart i {
  flex: 1;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, var(--neon), var(--cyan));
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr .9fr;
  gap: 22px;
  align-items: start;
}

.calculator-card,
.results {
  padding: 32px;
}

.compact h2 {
  font-size: clamp(30px, 4vw, 48px);
}

.form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 850;
}

.field {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .04);
}

.prefix {
  padding: 0 16px;
  color: var(--neon);
  font-weight: 950;
  border-right: 1px solid var(--line);
}

input {
  width: 100%;
  padding: 17px 15px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

input::placeholder {
  color: #5f6f89;
}

.result-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.result-card {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 22px;
  background: rgba(255, 255, 255, .045);
}

.result-card.highlight {
  background: linear-gradient(135deg, rgba(57, 255, 20, .2), rgba(0, 110, 255, .14));
}

.result-card.good { border-color: rgba(57, 255, 20, .45); }
.result-card.bad { border-color: rgba(255, 85, 119, .45); }
.result-card.wide { grid-column: span 2; }

.result-card strong {
  display: block;
  margin: 10px 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.08;
}

.result-card p {
  color: #9fb0ca;
  font-size: 13px;
}

.guide-grid,
.formula-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.guide-card {
  padding: 26px;
}

.guide-card span {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--neon);
  background: rgba(57, 255, 20, .12);
  font-family: monospace;
  font-weight: 900;
}

.guide-card h3 {
  margin-bottom: 8px;
  font-size: 24px;
}

.guide-card p {
  color: var(--muted);
}

.formula-grid {
  align-items: start;
}

.formula-grid .section-head {
  grid-column: span 1;
}

.formula-cards {
  grid-column: span 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 24px;
}

.formula-cards div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .04);
}

.formula-cards strong,
.formula-cards span {
  display: block;
}

.formula-cards strong {
  margin-bottom: 6px;
  color: var(--neon);
  font-size: 18px;
}

.formula-cards span {
  color: var(--muted);
  font-size: 14px;
}

.cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 42px;
  color: #04130a;
  background: var(--neon);
}

.cta-box .eyebrow,
.cta-box p {
  color: #07320c;
}

.cta-box h2 {
  font-size: clamp(32px, 4.5vw, 58px);
}

.footer {
  padding: 32px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: #8d9bb4;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
}

.footer a {
  color: var(--neon);
  font-weight: 850;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: .55s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 82px;
    left: 20px;
    right: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--bg-soft);
  }

  .nav-links.open {
    display: flex;
  }

  .menu-btn {
    display: block;
  }

  .hero-grid,
  .calc-grid,
  .cta-box,
  .formula-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .result-list,
  .guide-grid,
  .formula-cards {
    grid-template-columns: 1fr;
  }

  .formula-grid .section-head,
  .formula-cards,
  .result-card.wide {
    grid-column: auto;
  }

  .cta-box {
    align-items: start;
  }
}

@media (max-width: 540px) {
  .container {
    width: calc(100% - 28px);
  }

  .brand img {
    width: 130px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .btn {
    width: 100%;
  }

  .hero-panel,
  .calculator-card,
  .results,
  .cta-box,
  .formula-cards {
    border-radius: 24px;
    padding: 20px;
  }

  .mock-dashboard {
    grid-template-columns: 1fr;
  }

  .mock-card.big,
  .mock-chart {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
