:root {
  --bg: #0e1014;
  --bg-alt: #14171d;
  --surface: #1a1e26;
  --border: #2a303b;
  --text: #eef0f4;
  --muted: #9aa3b2;
  --fire-1: #ffd166;
  --fire-2: #ff6b2c;
  --fire-3: #d62828;
  --water: #4cc9f0;
  --drone: #b8f35a;
  --radius: 14px;
  --max: 1160px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; max-width: 22em; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); font-size: .8rem; }
.grad {
  background: linear-gradient(90deg, var(--fire-1), var(--fire-2) 50%, var(--fire-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--fire-2); margin-bottom: 1em;
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--fire-2);
  box-shadow: 0 0 0 0 rgba(255,107,44,.6); animation: pulse 2s infinite;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85em 1.5em; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 1rem var(--font); color: #1a0d05;
  background: linear-gradient(90deg, var(--fire-1), var(--fire-2));
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(255,107,44,.7); }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn--ghost:hover { border-color: var(--fire-2); box-shadow: none; }
.btn--small { padding: .55em 1.1em; font-size: .9rem; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14,16,20,.75); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }
.brand strong { color: var(--fire-2); }
.nav__menu { display: flex; align-items: center; gap: 28px; font-size: .95rem; }
.nav__menu a:not(.btn) { color: var(--muted); transition: color .2s; }
.nav__menu a:not(.btn):hover { color: var(--text); }
.nav__toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav__toggle span { display: block; width: 22px; height: 2px; margin: 5px 0; background: var(--text); transition: .3s; }

/* Hero */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 60vw; height: 60vw;
  background: radial-gradient(circle, rgba(255,107,44,.18), transparent 60%);
  pointer-events: none;
}
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 2em 0 1.6em; }
.hero__tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.hero__tags li {
  font-size: .8rem; color: var(--muted); padding: .35em .8em;
  border: 1px solid var(--border); border-radius: 999px;
}

.map {
  position: relative; aspect-ratio: 5 / 4.2; border-radius: 20px; overflow: hidden;
  background: radial-gradient(ellipse at 30% 30%, #1d222c, #101318);
  border: 1px solid var(--border);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,107,44,.05);
}
.map svg { width: 100%; height: 100%; }
#contours path { fill: none; stroke: #3a4352; stroke-width: 1; }
#contours path.major { stroke: #55607280; stroke-width: 1.4; }
#fire .front { fill: url(#fireGrad); }
#fire .edge { fill: none; stroke: var(--fire-2); stroke-width: 1.5; stroke-dasharray: 4 4; animation: dash 1.5s linear infinite; }
#hydrants circle { fill: var(--water); }
#hydrants .halo { fill: none; stroke: var(--water); opacity: .4; }
.drone__ring { fill: none; stroke: var(--drone); stroke-width: 1.2; opacity: .6; }
.drone__core { fill: var(--drone); }
.map__hud { position: absolute; display: flex; gap: 6px; flex-wrap: wrap; }
.map__hud--tl { top: 14px; left: 14px; color: var(--muted); background: rgba(14,16,20,.7); padding: .3em .7em; border-radius: 8px; }
.map__hud--br { bottom: 14px; right: 14px; }
.pill { font-size: .72rem; padding: .3em .7em; border-radius: 999px; background: rgba(14,16,20,.8); border: 1px solid; }
.pill--fire { color: var(--fire-2); }
.pill--water { color: var(--water); }
.pill--drone { color: var(--drone); }

/* Sections */
.section { padding: 104px 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.cards { display: grid; gap: 20px; margin-top: 48px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: border-color .3s, transform .3s;
}
.card:hover { border-color: rgba(255,107,44,.5); transform: translateY(-4px); }
.card p { color: var(--muted); margin: 0; }
.card__icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(255,107,44,.12);
}
.card__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--fire-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card--usage { border-top: 3px solid var(--fire-2); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 48px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.feature { background: var(--bg-alt); padding: 32px; transition: background .3s; }
.feature:hover { background: var(--surface); }
.feature__num { color: var(--fire-2); display: block; margin-bottom: 14px; }
.feature p { color: var(--muted); margin: 0; }

.steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: s; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 22px; left: 22px; right: 22px; height: 2px;
  background: linear-gradient(90deg, var(--fire-1), var(--fire-2), var(--fire-3)); opacity: .4;
}
.step { position: relative; }
.step p { color: var(--muted); }
.step__badge {
  position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; background: var(--bg); border: 2px solid var(--fire-2); color: var(--fire-2); margin-bottom: 20px;
}

.timeline { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.timeline__item { padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.timeline__item p { color: var(--muted); margin: 0; font-size: .95rem; }
.timeline__state {
  display: inline-block; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
  padding: .25em .7em; border-radius: 999px; margin-bottom: 14px; color: var(--muted); border: 1px solid var(--border);
}
.is-done .timeline__state { color: var(--drone); border-color: rgba(184,243,90,.4); }
.is-current { border-color: rgba(255,107,44,.6); box-shadow: 0 0 0 4px rgba(255,107,44,.08); }
.is-current .timeline__state { color: var(--fire-2); border-color: rgba(255,107,44,.5); }

/* Contact */
.section--cta { background: linear-gradient(180deg, var(--bg), #1a1210); }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.form { display: grid; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 32px; }
.form label { display: grid; gap: 6px; font-size: .9rem; font-weight: 500; color: var(--muted); }
.form input, .form textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: .75em .9em; resize: vertical; transition: border-color .2s;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--fire-2); }
.form .is-invalid { border-color: var(--fire-3); }
.form__status { margin: 0; font-size: .9rem; min-height: 1.4em; color: var(--muted); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--muted); font-size: .9rem; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer p { margin: 0; }
.footer__links a:hover { color: var(--text); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255,107,44,0); } 100% { box-shadow: 0 0 0 0 rgba(255,107,44,0); } }
@keyframes dash { to { stroke-dashoffset: -16; } }

/* Responsive */
@media (max-width: 960px) {
  .hero__grid, .contact { grid-template-columns: 1fr; }
  .cards--3, .features { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .container { padding: 0 16px; }
  .nav__toggle { display: block; }
  .nav__menu {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 16px 20px;
    display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu a { padding: 12px 0; }
  .nav__menu .btn { margin-top: 8px; }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .section { padding: 72px 0; }
  .hero { padding: 40px 0 64px; }
  .cards--3, .features, .steps, .timeline { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  .form { padding: 22px; }
}

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