:root {
  color-scheme: dark;
  --bg: #050706;
  --bg-elevated: #080b0a;
  --surface: rgba(13, 18, 16, 0.88);
  --surface-solid: #0d1210;
  --surface-soft: #101714;
  --surface-bright: #151f1b;
  --ink: #f4f8f6;
  --muted: #9ba9a4;
  --muted-strong: #c2ccc8;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #63e6b4;
  --accent-strong: #35cf96;
  --accent-soft: rgba(99, 230, 180, 0.12);
  --accent-glow: rgba(99, 230, 180, 0.28);
  --cyan: #79d7ff;
  --danger: #ff8585;
  --warning: #ffd58a;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 16px 44px rgba(0, 0, 0, 0.24);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 2%, rgba(99, 230, 180, 0.11), transparent 27rem),
    radial-gradient(circle at 92% 18%, rgba(121, 215, 255, 0.08), transparent 24rem),
    linear-gradient(180deg, #050706 0%, #060908 48%, #040605 100%);
  color: var(--ink);
  line-height: 1.6;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255,255,255,.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.024) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}
body::after {
  content: "";
  position: fixed;
  inset: auto -12rem -14rem auto;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  background: rgba(99, 230, 180, 0.06);
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; }
::selection { background: rgba(99, 230, 180, .26); color: #fff; }

.section-shell { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }

/* Opening assembly */
.assembly-intro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 46%, rgba(99, 230, 180, .12), transparent 16rem),
    #030504;
  animation: intro-exit .46s cubic-bezier(.7,0,.3,1) 1.55s forwards;
}
.assembly-stage {
  position: relative;
  width: 280px;
  height: 190px;
  filter: drop-shadow(0 22px 44px rgba(0,0,0,.55));
}
.assembly-piece {
  position: absolute;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px;
  opacity: 0;
  background: linear-gradient(145deg, rgba(99,230,180,.9), rgba(44,160,122,.52));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.26),
    0 0 28px rgba(99,230,180,.12);
  transform: translate(var(--from-x), var(--from-y)) rotate(var(--from-r)) scale(.64);
  animation: piece-lock .72s cubic-bezier(.16,.84,.28,1.08) var(--delay) forwards;
}
.assembly-piece:nth-child(3n) {
  background: linear-gradient(145deg, rgba(121,215,255,.9), rgba(44,134,160,.5));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 0 28px rgba(121,215,255,.12);
}
.piece-1 { left: 52px; top: 28px; --from-x: -170px; --from-y: -110px; --from-r: -36deg; --delay: .05s; }
.piece-2 { left: 108px; top: 28px; --from-x: 12px; --from-y: -170px; --from-r: 28deg; --delay: .11s; }
.piece-3 { left: 164px; top: 28px; --from-x: 180px; --from-y: -82px; --from-r: 42deg; --delay: .16s; }
.piece-4 { left: 52px; top: 84px; --from-x: -210px; --from-y: 18px; --from-r: 26deg; --delay: .12s; }
.piece-5 { left: 108px; top: 84px; --from-x: 0; --from-y: 150px; --from-r: -48deg; --delay: .20s; }
.piece-6 { left: 164px; top: 84px; --from-x: 205px; --from-y: 24px; --from-r: -26deg; --delay: .09s; }
.piece-7 { left: 80px; top: 56px; --from-x: -145px; --from-y: 135px; --from-r: 56deg; --delay: .24s; }
.piece-8 { left: 136px; top: 56px; --from-x: 155px; --from-y: 142px; --from-r: -52deg; --delay: .26s; }
.piece-9 {
  left: 108px;
  top: 56px;
  z-index: 2;
  width: 48px;
  height: 76px;
  --from-x: 0;
  --from-y: -210px;
  --from-r: 0deg;
  --delay: .30s;
  background: linear-gradient(180deg, #d9fff1, #63e6b4);
  box-shadow: 0 0 42px rgba(99,230,180,.32);
}
.assembly-name {
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: max-content;
  opacity: 0;
  color: #edf8f4;
  font-weight: 800;
  font-size: .92rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  transform: translate(-50%, 12px);
  animation: assembly-name .5s ease .76s forwards;
}
@keyframes piece-lock {
  0% { opacity: 0; transform: translate(var(--from-x), var(--from-y)) rotate(var(--from-r)) scale(.64); }
  64% { opacity: 1; }
  100% { opacity: 1; transform: translate(0,0) rotate(0) scale(1); }
}
@keyframes assembly-name { to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes intro-exit { to { opacity: 0; visibility: hidden; } }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px max(20px, calc((100vw - 1160px) / 2));
  background: rgba(5, 7, 6, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 6px);
  grid-template-rows: repeat(2, 6px);
  gap: 2px;
  width: 16px;
  height: 16px;
}
.brand-mark i { display: block; border-radius: 2px; background: var(--accent); box-shadow: 0 0 12px rgba(99,230,180,.28); }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { background: var(--cyan); }
nav { display: flex; gap: 26px; font-size: 0.92rem; color: var(--muted); }
nav a { position: relative; transition: color 180ms ease; }
nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -7px;
  height: 1px;
  background: var(--accent);
  transition: right 180ms ease;
}
nav a:hover, .footer a:hover { color: var(--accent); }
nav a:hover::after { right: 0; }

.hero {
  min-height: 76vh;
  display: grid;
  grid-template-columns: 1.45fr .82fr;
  gap: 72px;
  align-items: center;
  padding-block: 104px 84px;
}
.hero-enter {
  opacity: 0;
  transform: translateY(26px);
  animation: hero-enter .72s cubic-bezier(.2,.75,.22,1) 1.42s forwards;
}
.hero-enter-late { animation-delay: 1.56s; }
@keyframes hero-enter { to { opacity: 1; transform: translateY(0); } }

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .15em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 860px;
  margin-bottom: 28px;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  line-height: .97;
  letter-spacing: -.058em;
  text-wrap: balance;
  background: linear-gradient(110deg, #fff 0%, #edf8f4 48%, #a8d7c6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2 {
  max-width: 800px;
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.45rem);
  line-height: 1.05;
  letter-spacing: -.042em;
  text-wrap: balance;
}
h3 { line-height: 1.2; }
.lead { max-width: 720px; font-size: 1.12rem; color: var(--muted-strong); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 12px 18px;
  font-weight: 790;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.button.primary {
  color: #04110c;
  background: linear-gradient(135deg, #8ef1cc 0%, var(--accent) 44%, #45d8a2 100%);
  box-shadow: 0 12px 32px rgba(99,230,180,.18), inset 0 1px 0 rgba(255,255,255,.35);
}
.button.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(99,230,180,.25), inset 0 1px 0 rgba(255,255,255,.4); }
.button.secondary { color: var(--ink); background: rgba(255,255,255,.035); border-color: var(--line-strong); }
.button.secondary:hover { transform: translateY(-2px); border-color: rgba(99,230,180,.48); background: rgba(99,230,180,.055); }
.button[aria-disabled="true"], button:disabled { opacity: .46; pointer-events: none; }

.api-state {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 23px;
  padding: 8px 11px;
  color: var(--muted);
  font-size: .86rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #6d7773; }
.status-dot.online { background: var(--accent); box-shadow: 0 0 0 4px rgba(99,230,180,.10), 0 0 18px rgba(99,230,180,.4); }
.status-dot.offline { background: var(--danger); }

.hero-card {
  position: relative;
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 26px;
  padding: 30px;
  background:
    linear-gradient(145deg, rgba(21,31,27,.94), rgba(8,12,10,.96)),
    var(--surface-solid);
  box-shadow: var(--shadow);
}
.hero-card::before {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  right: -82px;
  top: -84px;
  border-radius: 50%;
  background: rgba(99,230,180,.16);
  filter: blur(20px);
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .24;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom left, black, transparent 72%);
}
.hero-card > * { position: relative; z-index: 1; }
.hero-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.card-kicker { color: #aebbb7; font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid rgba(99,230,180,.2);
  border-radius: 999px;
  background: rgba(99,230,180,.07);
  color: #bdf6df;
  font-size: .72rem;
  font-weight: 760;
}
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgba(99,230,180,.7); }
.hero-card > strong { display: block; font-size: 3.25rem; margin: 7px 0 24px; letter-spacing: -.05em; }
dl { margin: 0; }
.hero-card dl div, .result-meta div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.10); }
dt { color: #aebbb7; }
dd { margin: 0; text-align: right; }

.section { padding-block: 82px; }
.section-heading { margin-bottom: 36px; }
.section-heading > p:not(.eyebrow) { color: var(--muted); max-width: 760px; }

.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .68s ease, transform .68s cubic-bezier(.2,.75,.22,1);
}
.motion-ready [data-reveal].is-visible { opacity: 1; transform: translateY(0); }

.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.metric {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 46%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: .72;
}
.metric:hover { transform: translateY(-4px); border-color: rgba(99,230,180,.24); background: linear-gradient(145deg, rgba(99,230,180,.055), rgba(255,255,255,.014)); }
.metric span, .metric small { display: block; color: var(--muted); }
.metric strong { display: block; margin: 8px 0; font-size: 2rem; letter-spacing: -.045em; color: #f9fffc; }

.diagnostic-card {
  margin-top: 22px;
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  gap: 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  box-shadow: var(--shadow-soft);
}
.diagnostic-card p { color: var(--muted); margin-bottom: 0; }
.diagnostic-frame {
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  background: #f7f8f7;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.05), 0 16px 36px rgba(0,0,0,.24);
}
.diagnostic-card img { border-radius: 10px; }

.demo-section { scroll-margin-top: 80px; }
.demo-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.75fr); gap: 22px; align-items: start; }
.prediction-form, .result-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  background: linear-gradient(145deg, rgba(17,24,21,.94), rgba(8,12,10,.96));
  box-shadow: var(--shadow-soft);
}
.prediction-form { position: relative; overflow: hidden; }
.prediction-form::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,230,180,.55), transparent);
}
.form-toolbar { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.form-toolbar strong, .form-toolbar span { display: block; }
.form-toolbar span { color: var(--muted); font-size: .9rem; }
.text-button { border: 0; background: transparent; color: var(--accent); font-weight: 770; cursor: pointer; transition: color 160ms ease; }
.text-button:hover { color: #a0f4d4; }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.form-field label { display: block; margin-bottom: 6px; color: #dbe4e0; font-size: .84rem; font-weight: 760; }
.form-field small { display: block; color: var(--muted); font-size: .75rem; margin-top: 5px; }
.form-field input, .form-field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255,255,255,.105);
  border-radius: 11px;
  padding: 9px 11px;
  background: rgba(2,5,4,.72);
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.form-field input:hover, .form-field select:hover { border-color: rgba(255,255,255,.18); }
.form-field input:focus, .form-field select:focus {
  outline: none;
  border-color: rgba(99,230,180,.68);
  background: rgba(7,14,11,.95);
  box-shadow: 0 0 0 4px rgba(99,230,180,.09), 0 0 24px rgba(99,230,180,.06);
}
.advanced-fields { margin: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; }
.advanced-fields summary { cursor: pointer; font-weight: 760; color: var(--muted-strong); }
.advanced-fields > p { color: var(--muted); font-size: .86rem; margin: 10px 0 18px; }
.submit-button { width: 100%; min-height: 52px; }
.form-note { color: var(--muted); font-size: .81rem; margin: 10px 0 0; text-align: center; }

.result-panel {
  position: sticky;
  top: 88px;
  min-height: 390px;
  overflow: hidden;
}
.result-panel::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -80px;
  bottom: -85px;
  border-radius: 50%;
  background: rgba(121,215,255,.075);
  filter: blur(10px);
  pointer-events: none;
}
.result-panel > * { position: relative; z-index: 1; }
.result-panel h3 { font-size: 1.7rem; letter-spacing: -.03em; }
.result-panel p { color: var(--muted); }
.result-label { display: block; color: var(--muted); margin-top: 28px; }
.estimated-price {
  display: block;
  margin: 8px 0 30px;
  font-size: clamp(2.4rem,6vw,4.2rem);
  line-height: 1;
  letter-spacing: -.058em;
  color: var(--accent);
  text-shadow: 0 0 28px rgba(99,230,180,.13);
}
.result-meta div { border-color: var(--line); }
.result-meta dt { color: var(--muted); }
.result-meta dd { max-width: 62%; overflow-wrap: anywhere; font-size: .86rem; }
.result-warning {
  margin-top: 24px;
  border: 1px solid rgba(255,213,138,.13);
  border-radius: 11px;
  padding: 12px;
  background: rgba(255,213,138,.065);
  color: #e8cf9e !important;
  font-size: .83rem;
}
.hidden { display: none !important; }
.spinner {
  width: 34px;
  height: 34px;
  margin: 48px 0 22px;
  border: 3px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  box-shadow: 0 0 20px rgba(99,230,180,.08);
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-state { border-left: 3px solid var(--danger); padding-left: 18px; }
.error-state h3 { color: var(--danger); }

.limits-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.limits-grid article {
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  background: rgba(255,255,255,.025);
  transition: transform 180ms ease, border-color 180ms ease;
}
.limits-grid article:hover { transform: translateY(-3px); border-color: rgba(121,215,255,.22); }
.limits-grid strong { color: #e8f0ed; }
.limits-grid p { color: var(--muted); margin: 8px 0 0; }

.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 14px; }
.flow div {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 21px 14px;
  background: linear-gradient(145deg, rgba(255,255,255,.032), rgba(255,255,255,.012));
  text-align: center;
  font-weight: 770;
}
.flow div::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: linear-gradient(var(--accent), transparent); opacity: .7; }
.flow small { color: var(--muted); font-weight: 500; }
.flow span { color: var(--accent); font-size: 1.45rem; text-shadow: 0 0 16px rgba(99,230,180,.24); }

.footer {
  min-height: 112px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: .88rem;
}
.footer div { display: flex; gap: 18px; }

@media (max-width: 900px) {
  nav { display: none; }
  .hero, .demo-layout, .diagnostic-card { grid-template-columns: 1fr; }
  .hero { gap: 38px; min-height: auto; padding-top: 78px; }
  .metrics-grid { grid-template-columns: repeat(2,1fr); }
  .limits-grid { grid-template-columns: 1fr; }
  .result-panel { position: static; }
  .flow { grid-template-columns: 1fr; }
  .flow span { transform: rotate(90deg); justify-self: center; }
}

@media (max-width: 580px) {
  .section-shell { width: min(100% - 24px,1160px); }
  .topbar { padding-block: 13px; }
  .brand { font-size: .9rem; }
  .section { padding-block: 56px; }
  .hero { padding-block: 70px 58px; }
  h1 { font-size: clamp(2.55rem, 14vw, 4rem); }
  .metrics-grid, .field-grid { grid-template-columns: 1fr; }
  .prediction-form, .result-panel, .hero-card { padding: 20px; }
  .form-toolbar { flex-direction: column; }
  .footer { flex-direction: column; justify-content: center; align-items: flex-start; gap: 12px; }
  .assembly-stage { transform: scale(.84); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
  }
  .assembly-intro { display: none; }
  .hero-enter, .motion-ready [data-reveal] { opacity: 1; transform: none; }
}
