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

:root {
  --navy: #0B1F3A;
  --green: #1A4A2E;
  --green-mid: #2D7A4F;
  --blue: #3B82C4;
  --blue-light: #D6EAF8;
  --water: #EAF4F0;
  --sand: #F6F4EF;
  --text: #0B1F3A;
  --muted: #5A6478;
  --border: rgba(11,31,58,0.1);
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--text); background: #fff; overflow-x: hidden; }

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

/* ── NAV ── */
nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 2.5rem;
  background: rgba(11,31,58,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.nav-logo { font-family: var(--serif); font-size: 1.2rem; color: #fff; letter-spacing: 0.01em; }
.nav-logo span { color: #6BBFA0; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: rgba(255,255,255,0.65); font-size: 0.875rem; font-weight: 400; transition: color .2s; }
.nav-links a:hover { color: #fff; }
.nav-signin { color: rgba(255,255,255,0.45) !important; }
.nav-signin:hover { color: rgba(255,255,255,0.8) !important; }
.nav-cta {
  background: #2D7A4F; color: #fff; border: none;
  padding: 0.55rem 1.25rem; border-radius: 6px;
  font-family: var(--sans); font-size: 0.875rem; font-weight: 500;
  cursor: pointer; transition: background .2s;
  display: inline-block;
}
.nav-cta:hover { background: #1A4A2E; color: #fff; }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  background: var(--navy);
  position: relative;
  display: flex; align-items: center;
  overflow: hidden;
  padding-top: 80px;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 60% 50%, rgba(29,93,75,0.35) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 10% 80%, rgba(59,130,196,0.2) 0%, transparent 60%);
}
.hero-grid {
  position: absolute; inset: 0; opacity: 0.04;
  background-image: linear-gradient(rgba(255,255,255,0.5) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.5) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto; padding: 0 2.5rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px; padding: 0.35rem 1rem;
  font-size: 0.78rem; color: rgba(255,255,255,0.6);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1.5rem;
}
.hero-eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #6BBFA0; }
.hero h1 {
  font-family: var(--serif); font-size: clamp(2.6rem, 5vw, 4rem);
  color: #fff; line-height: 1.1; margin-bottom: 1.5rem;
}
.hero h1 em { font-style: italic; color: #6BBFA0; }
.hero-sub {
  font-size: 1.05rem; color: rgba(255,255,255,0.6);
  line-height: 1.7; margin-bottom: 2.5rem; font-weight: 300;
}
.hero-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.btn-primary {
  background: #2D7A4F; color: #fff; border: none;
  padding: 0.85rem 2rem; border-radius: 8px;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 500;
  cursor: pointer; transition: background .2s, transform .15s;
  display: inline-block;
}
.btn-primary:hover { background: #1A4A2E; color: #fff; transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.85rem 2rem; border-radius: 8px;
  font-family: var(--sans); font-size: 0.95rem; cursor: pointer;
  transition: border-color .2s, color .2s;
  display: inline-block;
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.5); color: #fff; }

/* Hero stat card */
.hero-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; padding: 2rem;
  backdrop-filter: blur(10px);
}
.hero-card-title {
  font-size: 0.78rem; color: rgba(255,255,255,0.45);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1.5rem;
}
.water-reading { display: flex; flex-direction: column; gap: 1rem; }
.reading-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.85rem 1rem; border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
.reading-label { font-size: 0.875rem; color: rgba(255,255,255,0.6); }
.reading-val { display: flex; align-items: center; gap: 8px; }
.reading-num { font-size: 1rem; color: #fff; font-weight: 500; }
.badge { font-size: 0.7rem; padding: 2px 8px; border-radius: 4px; font-weight: 500; }
.badge-ok { background: rgba(45,122,79,0.3); color: #6BBFA0; }
.badge-warn { background: rgba(186,117,23,0.3); color: #F0B84A; }
.badge-bad { background: rgba(180,50,50,0.3); color: #F08080; }
.card-footer {
  margin-top: 1.5rem; padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  font-size: 0.8rem; color: rgba(255,255,255,0.45);
}

/* ── TRUST BAR ── */
.trust-bar {
  background: var(--sand);
  padding: 1.5rem 2.5rem;
  display: flex; justify-content: center; gap: 3rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.trust-item { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--muted); }
.trust-item strong { color: var(--text); font-weight: 500; }
.trust-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--green-mid); }

/* ── SECTIONS ── */
section { padding: 6rem 2.5rem; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-label {
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--green-mid); font-weight: 500; margin-bottom: 1rem;
}
.section-title {
  font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.15; margin-bottom: 1.25rem;
}
.section-sub { font-size: 1.05rem; color: var(--muted); line-height: 1.75; max-width: 560px; font-weight: 300; }

/* ── HOW IT WORKS ── */
.how-it-works { background: var(--water); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3.5rem; }
.step {
  background: #fff; border-radius: 14px; padding: 2rem;
  border: 1px solid var(--border); position: relative;
}
.step-num {
  font-family: var(--serif); font-size: 3rem; color: rgba(11,31,58,0.06);
  position: absolute; top: 1rem; right: 1.5rem; line-height: 1;
}
.step-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--water); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; margin-bottom: 1.25rem;
}
.step h3 { font-family: var(--serif); font-size: 1.3rem; margin-bottom: 0.75rem; }
.step p { font-size: 0.9rem; color: var(--muted); line-height: 1.7; font-weight: 300; }
.step-timeline {
  margin-top: 1.25rem; padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem; color: var(--green-mid); font-weight: 500;
}

/* ── SYSTEMS ── */
.systems-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3.5rem; }
.sys-card {
  border: 1px solid var(--border); border-radius: 14px; padding: 2rem;
  position: relative; transition: border-color .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.sys-card:hover { border-color: rgba(45,122,79,0.4); box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
.sys-card.featured { border-color: var(--green-mid); border-width: 2px; }
.popular-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--green-mid); color: #fff;
  font-size: 0.72rem; font-weight: 500; padding: 3px 14px; border-radius: 10px;
  white-space: nowrap;
}
.sys-tier { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; }
.sys-name { font-family: var(--serif); font-size: 1.5rem; margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.sys-features { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 2rem; flex: 1; }
.sys-features li { font-size: 0.875rem; display: flex; gap: 8px; align-items: flex-start; }
.sys-features li::before { content: '✓'; color: var(--green-mid); font-weight: 500; margin-top: 1px; flex-shrink: 0; }
.sys-btn {
  width: 100%; padding: 0.75rem; border-radius: 8px;
  font-family: var(--sans); font-size: 0.9rem; font-weight: 500; cursor: pointer;
  transition: background .2s, color .2s;
  text-align: center;
  display: inline-block;
}
.sys-btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.sys-btn-outline:hover { border-color: var(--green-mid); color: var(--green-mid); }
.sys-btn-filled { background: var(--green); color: #fff; border: none; }
.sys-btn-filled:hover { background: var(--green-mid); color: #fff; }

/* ── IOT SECTION ── */
.iot-section { background: var(--navy); color: #fff; }
.iot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; margin-top: 3.5rem; }
.iot-section .section-label { color: #6BBFA0; }
.iot-section .section-title { color: #fff; }
.iot-section .section-sub { color: rgba(255,255,255,0.55); max-width: 100%; }
.iot-features { list-style: none; margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.iot-features li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 1rem 1.25rem; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
}
.iot-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.iot-text h4 { font-size: 0.9rem; font-weight: 500; margin-bottom: 0.2rem; }
.iot-text p { font-size: 0.82rem; color: rgba(255,255,255,0.45); line-height: 1.5; font-weight: 300; }

/* Device mockup */
.device-mockup {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px; padding: 2rem; font-family: var(--sans);
}
.device-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.device-title { font-size: 0.78rem; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 0.08em; }
.device-status { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: #6BBFA0; }
.device-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #6BBFA0; }
.gauge-row { display: flex; flex-direction: column; gap: 0.9rem; }
.gauge-label { display: flex; justify-content: space-between; margin-bottom: 0.4rem; }
.gauge-name { font-size: 0.82rem; color: rgba(255,255,255,0.55); }
.gauge-val { font-size: 0.82rem; color: #fff; font-weight: 500; }
.gauge-bar { height: 5px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.gauge-fill { height: 100%; border-radius: 3px; transition: width 1s ease; }
.fill-green { background: linear-gradient(90deg, #2D7A4F, #6BBFA0); }
.fill-blue { background: linear-gradient(90deg, #3B82C4, #87CEEB); }
.fill-amber { background: linear-gradient(90deg, #BA7517, #F0B84A); }
.fill-red { background: linear-gradient(90deg, #A83232, #E07070); }
.device-footer { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,0.07); }
.device-alert {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(45,122,79,0.15); border: 1px solid rgba(107,191,160,0.2);
  border-radius: 8px; padding: 0.85rem 1rem;
}
.alert-icon { font-size: 0.9rem; flex-shrink: 0; margin-top: 1px; }
.alert-text { font-size: 0.8rem; color: rgba(255,255,255,0.65); line-height: 1.5; }
.alert-text strong { color: #6BBFA0; font-weight: 500; }

/* ── QUOTE SECTION ── */
.quote-section { background: var(--sand); }
.quote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; margin-top: 3.5rem; }
.quote-form { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 2.5rem; }
.form-title { font-family: var(--serif); font-size: 1.4rem; margin-bottom: 0.5rem; }
.form-sub { font-size: 0.875rem; color: var(--muted); margin-bottom: 2rem; line-height: 1.6; }
.form-error {
  background: #fde8e8; border: 1px solid #f4baba;
  color: #8a1a1a; padding: 0.85rem 1rem;
  border-radius: 8px; margin-bottom: 1.25rem;
  font-size: 0.875rem;
}
.lead-success { background: var(--water); border-color: var(--green-mid); }
.lead-success .form-title { color: var(--green); }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 500; margin-bottom: 0.4rem; color: var(--text); }
.form-group input, .form-group select {
  width: 100%; padding: 0.75rem 1rem; border-radius: 8px;
  border: 1px solid var(--border); font-family: var(--sans); font-size: 0.9rem;
  background: #fff; color: var(--text);
  transition: border-color .2s, box-shadow .2s; outline: none;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(45,122,79,0.1);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.submit-btn {
  width: 100%; padding: 0.9rem; border-radius: 8px;
  background: var(--green); color: #fff; border: none;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 500;
  cursor: pointer; transition: background .2s, transform .15s; margin-top: 0.5rem;
}
.submit-btn:hover { background: var(--green-mid); transform: translateY(-1px); }
.submit-btn:disabled { opacity: 0.7; cursor: wait; }

.info-block { margin-bottom: 2rem; }
.info-block h4 { font-family: var(--serif); font-size: 1.2rem; margin-bottom: 0.6rem; }
.info-block p { font-size: 0.9rem; color: var(--muted); line-height: 1.7; font-weight: 300; }
.stat-row { display: flex; gap: 1.5rem; margin-top: 2rem; flex-wrap: wrap; }
.stat-box { flex: 1; min-width: 120px; padding: 1.25rem; border-radius: 10px; background: #fff; border: 1px solid var(--border); }
.stat-num { font-family: var(--serif); font-size: 2rem; color: var(--green); }
.stat-label { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; line-height: 1.4; }

/* ── FOOTER ── */
footer {
  background: var(--navy); color: rgba(255,255,255,0.5);
  padding: 3rem 2.5rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-logo { font-family: var(--serif); font-size: 1rem; color: rgba(255,255,255,0.8); }
.footer-logo span { color: #6BBFA0; }
.footer-copy { font-size: 0.8rem; }

/* ── ANIMATIONS ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.hero-content > * { animation: fadeUp 0.7s ease both; }
.hero-content > *:nth-child(2) { animation-delay: 0.1s; }

/* ── HTMX indicators ── */
.htmx-indicator { opacity: 0; transition: opacity .2s; }
.htmx-request .htmx-indicator { opacity: 1; }
.htmx-request.htmx-indicator { opacity: 1; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hero-content, .iot-grid, .quote-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .steps-grid, .systems-grid { grid-template-columns: 1fr; }
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  section { padding: 4rem 1.5rem; }
  .trust-bar { gap: 1.5rem; }
}
