/* Green Wave AI — Civic Daylight */

:root {
  --porcelain: #F3F5F2;
  --raised: #FBFCFA;
  --ink: #1E2A24;
  --ink-muted: #5B685F;
  --rule: #DFE5DE;
  --green: #1F8A4C;
  --green-deep: #166534;
  --amber: #B07D2E;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  font-family: var(--sans);
  background:
    radial-gradient(90rem 40rem at 70% -10%, #E7EEE6 0%, transparent 60%),
    var(--porcelain);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(20px, 5vw, 48px);
  background: color-mix(in srgb, var(--porcelain) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 17px; text-decoration: none; letter-spacing: -0.01em;
}
.glyph { flex: none; }
.nav nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); }
.nav nav > a:not(.btn) {
  text-decoration: none; font-size: 15px; color: var(--ink-muted);
  transition: color 180ms ease;
}
.nav nav > a:not(.btn):hover { color: var(--ink); }

/* ---- buttons ---- */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font-weight: 600; font-size: 16px;
  padding: 12px 22px; border-radius: 10px;
  transition: background-color 180ms ease, border-color 180ms ease;
}
.btn-sm { padding: 8px 16px; font-size: 14px; border-radius: 8px; }
.btn-solid { background: var(--green); color: #fff; }
.btn-solid:hover { background: var(--green-deep); }
.btn-quiet { border: 1px solid var(--rule); background: var(--raised); color: var(--ink); }
.btn-quiet:hover { border-color: var(--ink-muted); }

/* ---- layout ---- */
main { max-width: 1060px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }

.kicker {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--green-deep); margin-bottom: 16px;
}

/* ---- hero ---- */
.hero { padding: clamp(56px, 10vw, 110px) 0 clamp(40px, 6vw, 64px); }
.hero h1 {
  font-size: clamp(34px, 5.4vw, 58px); line-height: 1.08;
  letter-spacing: -0.025em; font-weight: 700;
}
.lede {
  margin-top: 22px; max-width: 62ch;
  font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-muted);
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px; background: var(--rule); border: 1px solid var(--rule);
  border-radius: 12px; overflow: hidden;
  margin-top: clamp(40px, 6vw, 64px);
}
.stats > div { background: var(--raised); padding: 18px 20px; }
.stats dt {
  font-family: var(--mono); font-size: 12px; color: var(--ink-muted);
  letter-spacing: 0.03em;
}
.stats dd { font-family: var(--mono); font-size: 22px; font-weight: 500; margin-top: 4px; }

/* ---- content blocks ---- */
.block { padding: clamp(40px, 7vw, 72px) 0; border-top: 1px solid var(--rule); }
.block h2 {
  font-size: clamp(24px, 3.2vw, 34px); letter-spacing: -0.02em;
  line-height: 1.15; max-width: 24ch;
}
.copy { margin-top: 16px; max-width: 66ch; color: var(--ink-muted); }

.pillars { margin-top: 18px; max-width: 72ch; list-style: none; display: grid; gap: 10px; }
.pillars li { padding-left: 22px; position: relative; color: var(--ink-muted); }
.pillars li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
}
.pillars strong { color: var(--ink); font-weight: 600; }

.shot { margin-top: 32px; }
.shot + .shot { margin-top: 28px; }
.shot img {
  display: block; width: 100%; height: auto; aspect-ratio: 1376 / 768;
  object-fit: cover; border-radius: 12px;
  border: 1px solid var(--rule);
  box-shadow: 0 1px 2px rgba(30, 42, 36, 0.05), 0 12px 32px rgba(30, 42, 36, 0.07);
  background: var(--raised);
}
.shot figcaption {
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-muted);
  margin-top: 12px; letter-spacing: 0.02em;
}

/* ---- demo cta + form ---- */
.demo { text-align: center; }
.demo h2, .demo .copy { margin-left: auto; margin-right: auto; }
.fineprint { margin-top: 22px; font-family: var(--mono); font-size: 12px; color: var(--ink-muted); }
.fineprint a { color: var(--green-deep); }

.demo-modal {
  margin: auto; /* the global reset removes the UA rule that centers <dialog> */
  border: 1px solid var(--rule); border-radius: 14px; padding: 0;
  width: min(640px, calc(100vw - 32px));
  max-height: min(86vh, 760px);
  background: var(--raised); color: var(--ink);
  box-shadow: 0 8px 24px rgba(30, 42, 36, 0.12), 0 24px 64px rgba(30, 42, 36, 0.18);
}
.demo-modal::backdrop { background: rgba(30, 42, 36, 0.4); backdrop-filter: blur(3px); }
.demo-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(20px, 4vw, 32px) 0;
}
.demo-modal-head h2 { font-size: 22px; letter-spacing: -0.02em; }
.modal-close {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--rule); border-radius: 8px; background: transparent;
  color: var(--ink-muted); cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease;
}
.modal-close:hover { color: var(--ink); border-color: var(--ink-muted); }

.demo-form {
  text-align: left;
  padding: 18px clamp(20px, 4vw, 32px) clamp(20px, 4vw, 28px);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 600; }
.field .optional {
  font-family: var(--mono); font-size: 11px; font-weight: 400;
  color: var(--ink-muted); margin-left: 4px;
}
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 16px; color: var(--ink);
  background: #fff; border: 1px solid var(--rule); border-radius: 8px;
  padding: 10px 12px; width: 100%;
  transition: border-color 180ms ease;
}
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #9AA69D; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-muted); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green);
}
.field select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235B685F' stroke-width='1.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.demo-form .btn { width: 100%; margin-top: 4px; border: 0; }
.demo-form .btn:disabled { opacity: 0.65; cursor: default; }
.hp-field { position: absolute; left: -5000px; height: 0; overflow: hidden; }

.form-error { margin-top: 12px; font-size: 14px; color: var(--clay, #9A4B36); }
.form-error a { color: inherit; }

.demo-success {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: clamp(32px, 6vw, 56px) clamp(20px, 4vw, 32px);
  text-align: center;
}
.demo-success-title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.demo-success-copy { color: var(--ink-muted); }
.demo-success[hidden] { display: none; }

@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

/* ---- footer ---- */
.foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  max-width: 1060px; margin: 0 auto;
  padding: 28px clamp(20px, 5vw, 48px) 44px;
  border-top: 1px solid var(--rule);
}
.wordmark-sm { font-size: 14px; }
.foot-note { font-family: var(--mono); font-size: 12px; color: var(--ink-muted); }

/* ---- small screens ---- */
@media (max-width: 640px) {
  .nav nav > a:not(.btn) { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .stats { grid-template-columns: 1fr; }
}
