:root {
  --bg: #07111f;
  --text: #f8fbff;
  --muted: #aebdd0;
  --glass: rgba(255, 255, 255, 0.11);
  --glass-strong: rgba(255, 255, 255, 0.17);
  --border: rgba(255, 255, 255, 0.18);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --primary: #7c5cff;
  --secondary: #00d4ff;
  --success: #2fffa8;
  --warning: #ffd166;
  --danger: #ff6b6b;
}

body.light {
  --bg: #eef4ff;
  --text: #101827;
  --muted: #5d6a7c;
  --glass: rgba(255, 255, 255, 0.64);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --border: rgba(15, 23, 42, 0.12);
  --shadow: 0 24px 70px rgba(31, 54, 92, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(124, 92, 255, 0.38), transparent 34%),
    radial-gradient(circle at 85% 18%, rgba(0, 212, 255, 0.22), transparent 32%),
    radial-gradient(circle at 50% 100%, rgba(47, 255, 168, 0.16), transparent 40%),
    var(--bg);
  overflow-x: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.orb {
  position: fixed;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.38;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}
.orb-one { top: 90px; left: -80px; background: var(--primary); }
.orb-two { top: 220px; right: -100px; background: var(--secondary); animation-delay: 1.8s; }
.orb-three { bottom: 20px; left: 38%; background: var(--success); animation-delay: 3s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-28px); } }

.glass-panel {
  background: linear-gradient(145deg, var(--glass), rgba(255,255,255,0.055));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-radius: 28px;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 20;
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 48px; height: 48px; border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; font-weight: 900; font-size: 24px;
}
.brand h1 { margin: 0; font-size: 18px; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
nav { display: flex; align-items: center; gap: 18px; }
nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; opacity: 0.86; }
nav a:hover { opacity: 1; }
.icon-btn {
  border: 1px solid var(--border); background: var(--glass); color: var(--text);
  width: 40px; height: 40px; border-radius: 14px; cursor: pointer; font-size: 18px;
}

main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.hero {
  min-height: 650px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
}
.badge {
  display: inline-flex; padding: 8px 14px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--border); color: var(--secondary);
  font-weight: 800; letter-spacing: 0.02em; margin-bottom: 18px;
}
.hero h2 { font-size: clamp(42px, 7vw, 78px); line-height: 0.96; margin: 0 0 22px; letter-spacing: -0.06em; }
.hero h2 span { background: linear-gradient(135deg, var(--secondary), var(--primary), var(--success)); -webkit-background-clip: text; color: transparent; }
.hero p { max-width: 650px; color: var(--muted); font-size: 18px; line-height: 1.7; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.primary-btn, .secondary-btn {
  border: 0; border-radius: 17px; padding: 14px 20px; font-weight: 800;
  text-decoration: none; display: inline-flex; justify-content: center; align-items: center;
  cursor: pointer; transition: transform .2s ease, box-shadow .2s ease;
}
.primary-btn { color: white; background: linear-gradient(135deg, var(--primary), var(--secondary)); box-shadow: 0 18px 40px rgba(124,92,255,0.28); }
.secondary-btn { color: var(--text); background: var(--glass); border: 1px solid var(--border); }
.primary-btn:hover, .secondary-btn:hover { transform: translateY(-2px); }
.full { width: 100%; margin-top: 12px; }

.hero-card { padding: 28px; transform: rotate(1.5deg); }
.mini-chart { height: 230px; display: flex; align-items: end; gap: 14px; padding: 18px; border-radius: 22px; background: rgba(255,255,255,.08); }
.mini-chart span { flex: 1; border-radius: 999px 999px 8px 8px; background: linear-gradient(180deg, var(--secondary), var(--primary)); }
.hero-card h3 { font-size: 28px; margin: 22px 0 8px; }
.metric-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.metric-row div { padding: 16px; border-radius: 20px; background: rgba(255,255,255,.08); }
.metric-row strong { display:block; font-size: 26px; }
.metric-row small { color: var(--muted); }

.estimator-grid { display: grid; grid-template-columns: 430px 1fr; gap: 24px; align-items: start; padding-top: 20px; }
.form-card, .result-header, .cost-panel, .comparison-panel, .info-card, .tech-section { padding: 24px; }
.section-title p { margin: 0 0 6px; color: var(--secondary); font-weight: 800; text-transform: uppercase; font-size: 12px; letter-spacing: 0.12em; }
.section-title h2 { margin: 0 0 22px; font-size: 28px; letter-spacing: -0.04em; }
.section-title.small h2 { font-size: 22px; }
.centered { text-align: center; }
label { display: grid; gap: 8px; color: var(--muted); font-weight: 700; font-size: 14px; margin-bottom: 16px; }
input, select {
  width: 100%; border: 1px solid var(--border); outline: none; color: var(--text);
  background: rgba(255,255,255,.09); border-radius: 16px; padding: 14px 15px;
  font: inherit; font-weight: 700;
}
body.light input, body.light select { background: rgba(255,255,255,.75); }
input:focus, select:focus { border-color: var(--secondary); box-shadow: 0 0 0 4px rgba(0,212,255,.12); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.eaf-box { display: none; padding: 14px; border-radius: 20px; background: rgba(255,255,255,.07); border: 1px solid var(--border); margin-bottom: 12px; }
.eaf-box.show { display: block; }
.eaf-box p { color: var(--muted); margin: -6px 0 4px; font-size: 13px; line-height: 1.5; }
.results-area { display: grid; gap: 18px; }
.result-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.result-header p { color: var(--muted); margin: 0 0 4px; }
.result-header h2 { margin: 0; font-size: 28px; }
.status-pill { padding: 10px 15px; border-radius: 999px; background: rgba(47,255,168,.15); color: var(--success); font-weight: 900; border: 1px solid rgba(47,255,168,.25); white-space: nowrap; }
.status-pill.medium { background: rgba(255,209,102,.14); color: var(--warning); border-color: rgba(255,209,102,.28); }
.status-pill.high { background: rgba(255,107,107,.14); color: var(--danger); border-color: rgba(255,107,107,.28); }
.cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.result-card { padding: 18px; }
.result-card span { font-size: 26px; }
.result-card p { color: var(--muted); margin: 12px 0 4px; font-weight: 700; font-size: 13px; }
.result-card h3 { margin: 0; font-size: 22px; }
.cost-panel p { color: var(--muted); margin: 0; }
.cost-panel h2 { margin: 8px 0 16px; font-size: clamp(30px, 5vw, 52px); letter-spacing: -0.05em; }
.progress-wrap { height: 12px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; }
.progress-wrap div { height: 100%; width: 30%; border-radius: inherit; background: linear-gradient(90deg, var(--success), var(--secondary), var(--primary)); transition: width .35s ease; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--secondary); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
td { color: var(--text); font-weight: 700; }
.info-section { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 72px 0 24px; }
ol { color: var(--muted); line-height: 1.9; padding-left: 22px; }
ol strong { color: var(--text); }
.tech-section { margin: 48px 0; }
.tech-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tech-grid div { padding: 18px; border-radius: 20px; background: rgba(255,255,255,.08); border: 1px solid var(--border); }
.tech-grid strong { display: block; margin-bottom: 7px; }
.tech-grid span { color: var(--muted); }
footer { text-align: center; color: var(--muted); padding: 32px 16px 46px; }

@media (max-width: 980px) {
  .hero, .estimator-grid, .info-section { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding: 86px 0 42px; }
  .cards-grid, .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .form-card { position: static; }
}
@media (max-width: 640px) {
  nav a { display: none; }
  .site-header { top: 8px; width: calc(100% - 18px); }
  .two-col, .cards-grid, .tech-grid { grid-template-columns: 1fr; }
  .hero-card { transform: none; }
  .result-header { align-items: flex-start; flex-direction: column; }
}

@media print {
  .site-header, .hero, .form-card, footer, .orb, .noise { display: none !important; }
  body { background: white; color: #111; }
  main { width: 100%; }
  .glass-panel { box-shadow: none; border: 1px solid #ddd; background: white; color: #111; }
  .estimator-grid { display: block; }
  .results-area { display: block; }
}
