/* ===========================================================
   HOA Frontgate AI — design tokens
   =========================================================== */
:root {
  --ink: #14213D;
  --ink-deep: #0E1830;
  --slate: #6B7280;
  --slate-light: #97A1AE;
  --blue: #2F6FED;
  --blue-deep: #1E4FBF;
  --gold: #D9A94E;
  --paper: #F7F7F4;
  --paper-alt: #EFEFEA;
  --card: #FFFFFF;
  --line: #E4E4DE;

  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

p { margin: 0 0 1em; color: var(--ink); }
a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-deep);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 8px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(47,111,237,0.55);
}
.btn-primary:hover { background: var(--blue-deep); }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }

.btn-on-dark {
  background: transparent;
  border-color: rgba(255,255,255,0.28);
  color: #fff;
}
.btn-on-dark:hover { border-color: #fff; }

/* ---------- Nav ---------- */
header.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247,247,244,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  max-width: var(--max);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
}
.brand img { height: 74px; width: auto; }
.brand .fg { color: var(--slate); font-weight: 500; }
.brand .ai { color: var(--blue); }

nav.links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14.5px;
  font-weight: 500;
}
nav.links a {
  color: var(--slate);
  position: relative;
  padding: 4px 0;
}
nav.links a:hover, nav.links a.active { color: var(--ink); }
nav.links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
}
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-phone {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--slate);
  display: flex;
  align-items: center;
  gap: 6px;
}
.menu-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 76px 0 60px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(34px, 4.4vw, 54px);
  max-width: 12ch;
}
.hero h1 .accent { color: var(--blue); }
.hero .lede {
  font-size: 18px;
  color: var(--slate);
  max-width: 46ch;
  margin-bottom: 30px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }

.hero-stats {
  display: flex;
  gap: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.hero-stats .stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--ink);
}
.hero-stats .stat span {
  font-size: 12.5px;
  color: var(--slate);
  letter-spacing: 0.02em;
}

/* ---------- Call card (signature element) ---------- */
.call-card {
  background: var(--ink-deep);
  border-radius: 20px;
  padding: 22px;
  color: #fff;
  box-shadow: 0 30px 60px -25px rgba(14,24,48,0.55);
  position: relative;
  overflow: hidden;
}
.call-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% -10%, rgba(47,111,237,0.35), transparent 55%);
  pointer-events: none;
}
.call-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.call-id { display: flex; align-items: center; gap: 10px; }
.call-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(145deg, var(--blue), var(--blue-deep));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
}
.call-id .who { font-size: 13.5px; font-weight: 600; }
.call-id .num { font-family: var(--font-mono); font-size: 11.5px; color: rgba(255,255,255,0.55); }
.call-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7CD98A;
  display: flex; align-items: center; gap: 6px;
}
.call-status .dot {
  width: 6px; height: 6px; border-radius: 50%; background: #7CD98A;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.waveform {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 34px;
  margin: 14px 0 18px;
}
.waveform span {
  width: 3px;
  background: var(--blue);
  border-radius: 2px;
  animation: wave 1.2s ease-in-out infinite;
}
@keyframes wave { 0%,100% { height: 20%; } 50% { height: 100%; } }

.transcript { display: flex; flex-direction: column; gap: 10px; min-height: 168px; }
.bubble {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(6px);
  animation: rise 0.5s ease forwards;
}
.bubble.resident {
  align-self: flex-start;
  background: rgba(255,255,255,0.08);
  border-bottom-left-radius: 3px;
}
.bubble.ai {
  align-self: flex-end;
  background: var(--blue);
  border-bottom-right-radius: 3px;
}
.bubble .tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 3px;
}
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

.call-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.55);
}

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.section-alt { background: var(--paper-alt); }
.section-dark { background: var(--ink-deep); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: rgba(255,255,255,0.68); }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(26px, 3vw, 36px); }
.section-head p { color: var(--slate); font-size: 16.5px; }
.section-dark .section-head p { color: rgba(255,255,255,0.68); }

/* Flow steps (Ring / Answer / Resolve / Log) */
.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.flow-step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 22px;
  position: relative;
}
.flow-step .fnum {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--slate-light);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  display: block;
}
.flow-step h4 { font-size: 17px; margin-bottom: 8px; }
.flow-step p { font-size: 14px; color: var(--slate); margin: 0; }
.flow-step .fname { color: var(--blue); font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }

/* Cards grid */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 26px;
}
.card .ic {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(47,111,237,0.1);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  color: var(--blue);
}
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--slate); font-size: 14.5px; margin: 0; }

/* Example transcripts (services / examples) */
.example {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}
.example .ex-topic {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue-deep);
  margin-bottom: 14px;
}
.example .line { display: flex; gap: 10px; margin-bottom: 10px; font-size: 14px; }
.example .line:last-child { margin-bottom: 0; }
.example .who { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; color: var(--slate-light); min-width: 62px; padding-top: 2px; }
.example .txt { color: var(--ink); }
.example .who.ai-who { color: var(--blue); }

/* Quote / credibility */
.credibility {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.cred-quote {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.4;
  color: var(--ink);
}
.cred-name { margin-top: 18px; font-size: 14px; color: var(--slate); }
.cred-name b { color: var(--ink); }

/* Timeline (About) */
.timeline { border-left: 2px solid var(--line); margin-left: 6px; }
.tl-item { position: relative; padding: 0 0 34px 28px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute; left: -7px; top: 3px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--blue);
}
.tl-item .tl-tag { font-family: var(--font-mono); font-size: 11px; color: var(--blue-deep); text-transform: uppercase; letter-spacing: 0.06em; }
.tl-item h4 { font-size: 16.5px; margin: 6px 0 6px; }
.tl-item p { color: var(--slate); font-size: 14.5px; margin: 0; }

/* Pricing-ish / CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--ink-deep), #16224A 60%, var(--ink-deep));
  border-radius: 22px;
  padding: 56px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  position: relative;
  overflow: hidden;
}
.cta-band::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 90% 10%, rgba(217,169,78,0.18), transparent 50%);
}
.cta-band h2 { color: #fff; margin-bottom: 8px; font-size: 28px; }
.cta-band p { color: rgba(255,255,255,0.68); margin: 0; }
.cta-band .cta-actions { display: flex; gap: 14px; flex-shrink: 0; position: relative; z-index: 1; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  font-family: var(--font-body);
  font-size: 14.5px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47,111,237,0.15);
}
.form-note { font-size: 13px; color: var(--slate-light); margin-top: -6px; }

/* Contact info list */
.info-list { display: flex; flex-direction: column; gap: 22px; }
.info-item { display: flex; gap: 14px; align-items: flex-start; }
.info-item .ic {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 10px;
  background: rgba(47,111,237,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
}
.info-item h4 { font-size: 15px; margin: 0 0 4px; }
.info-item p { font-size: 14px; color: var(--slate); margin: 0; }

/* Footer */
footer {
  background: var(--ink-deep);
  color: rgba(255,255,255,0.6);
  padding: 50px 0 28px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 24px;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: #fff;
}
.footer-brand .fg { color: rgba(255,255,255,0.55); font-weight: 500; }
.footer-brand .ai { color: var(--blue); }
.footer-tag { font-size: 13.5px; margin-top: 10px; max-width: 34ch; color: rgba(255,255,255,0.55); }
.footer-cols { display: flex; gap: 60px; }
.footer-col h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 14px; margin-bottom: 10px; color: rgba(255,255,255,0.72); }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; font-size: 12.5px; color: rgba(255,255,255,0.4); }

/* Page hero (non-home pages) */
.page-hero { padding: 56px 0 20px; }
.page-hero .eyebrow { margin-bottom: 14px; }
.page-hero h1 { font-size: clamp(30px, 4vw, 44px); max-width: 18ch; }
.page-hero .lede { color: var(--slate); font-size: 17px; max-width: 56ch; }

/* Utility */
.mt-0 { margin-top: 0; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  nav.links, .nav-phone { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .credibility { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr 1fr; }
  .footer-top { flex-direction: column; }
  .footer-cols { gap: 40px; }
}
@media (max-width: 620px) {
  .grid-3, .grid-2, .flow { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; row-gap: 16px; }
  .cta-band { flex-direction: column; text-align: center; padding: 40px 26px; }
  .cta-band .cta-actions { flex-direction: column; width: 100%; }
  .footer-cols { flex-wrap: wrap; gap: 30px; }
}
