/* ==========================================================================
   Northmark — HVAC AI Voice Agent Landing Page
   Design tokens: white + blue only. Mobile-first (375px base).
   ========================================================================== */

:root {
  --white: #FFFFFF;
  --tint: #F2F7FF;
  --tint-2: #E7F0FF;
  --blue: #4F8EF7;
  --blue-hover: #3B77E0;
  --blue-deep: #1E4FA3;
  --blue-deep-2: #17408A;
  --ink: #1C2434;
  --ink-soft: #4E5A70;
  --ink-faint: #7B8699;
  --border: #DCE7FA;
  --border-strong: #C3D6F7;
  --white-a: rgba(255,255,255,.14);
  --shadow: 0 12px 30px -12px rgba(30,79,163,.18);
  --shadow-sm: 0 4px 16px -8px rgba(30,79,163,.12);
  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1120px;

  --font: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Offsets anchor/scrollIntoView targets so the sticky nav doesn't cover them */
[id] { scroll-margin-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--white);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

:focus-visible {
  outline: 3px solid var(--blue-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Layout helpers ---- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}
.section {
  padding: 56px 0;
}
.section--tint { background: var(--tint); }
.section--deep { background: linear-gradient(165deg, var(--blue-deep) 0%, var(--blue-deep-2) 100%); color: var(--white); }

@media (min-width: 640px) {
  .section { padding: 76px 0; }
}
@media (min-width: 960px) {
  .section { padding: 96px 0; }
}

/* ---- Type scale ---- */
h1, h2, h3 { font-family: var(--font); color: var(--blue-deep); font-weight: 800; line-height: 1.08; }
.section--deep h1, .section--deep h2, .section--deep h3 { color: var(--white); }

h1 {
  font-size: clamp(2rem, 7vw, 3.4rem);
  font-stretch: 105%;
  letter-spacing: -0.01em;
}
h2 {
  font-size: clamp(1.5rem, 5.5vw, 2.35rem);
  letter-spacing: -0.005em;
}
h3 {
  font-size: clamp(1.1rem, 3.6vw, 1.4rem);
  font-weight: 700;
}
p { color: var(--ink-soft); }
.section--deep p { color: rgba(255,255,255,.86); }

.subhead {
  font-size: clamp(1rem, 3.6vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 46ch;
}

/* ---- Eyebrow / nameplate tag ----
   Signature motif: styled like a stamped equipment nameplate —
   thin rules top/bottom, tracked caps, notched corner. Reused for
   eyebrows, stat labels, and the transcript "Outcome" chip. */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--blue-deep);
  padding: 6px 12px 6px 14px;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
  background: var(--tint-2);
}
.section--deep .tag {
  color: var(--white);
  border-color: var(--white-a);
  background: rgba(255,255,255,.08);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(.98); }
.btn--primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 10px 24px -8px rgba(79,142,247,.55);
}
.btn--primary:hover { background: var(--blue-hover); }
.btn--on-deep {
  background: var(--white);
  color: var(--blue-deep);
}
.btn--on-deep:hover { background: var(--tint); }
.btn--block { width: 100%; }
.btn--sm {
  min-height: 42px;
  padding: 10px 20px;
  font-size: .92rem;
  box-shadow: none;
}
.btn--ghost {
  background: transparent;
  color: var(--blue-deep);
  border: 2px solid var(--border-strong);
  min-height: 48px;
}

.trust-line {
  margin-top: 16px;
  font-size: .84rem;
  color: var(--ink-faint);
}

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--blue-deep);
  text-decoration: none;
}
.nav__logo img { height: 38px; width: auto; border-radius: 8px; }
.nav__cta { display: none; }

@media (min-width: 640px) {
  .nav__cta { display: inline-flex; }
}

/* ==========================================================================
   Hero
   The lead form sits directly beside (desktop) or below (mobile) the
   headline — always visible, no button needed to reveal it.
   ========================================================================== */
.hero {
  padding: 28px 0 48px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
}
.hero h1 { margin-bottom: 16px; }
.hero .subhead { margin-bottom: 26px; }
.fee-badge {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: flex-start;
  gap: 8px;
  background: var(--tint-2);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 10px 14px;
  margin-bottom: 22px;
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--blue-deep);
}
.fee-badge svg { flex-shrink: 0; margin-top: 2px; }

.hero__actions { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.hero__actions .btn { width: 100%; }

.hero__form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.hero__form-title { font-size: 1.25rem; margin-bottom: 6px; }
.hero__form-note {
  font-size: .85rem;
  color: var(--ink-faint);
  margin-bottom: 18px;
}

@media (min-width: 640px) {
  .hero__actions .btn { width: auto; }
}

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: start; }
}

/* ==========================================================================
   Demo call section
   ========================================================================== */
.demo__player {
  background: var(--tint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin: 28px 0 22px;
}
.demo__player-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--blue-deep);
  margin-bottom: 10px;
}
audio {
  width: 100%;
  height: 42px;
}
.demo__voice-note {
  font-size: .82rem;
  color: var(--ink-faint);
  margin: 12px 0 0;
}

/* Call transcript — styled as a captioned transcript (not chat bubbles)
   so it reads unambiguously as a phone call, not a text conversation. */
.transcript {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}
.transcript-line {
  display: flex;
  gap: 16px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}
.transcript-line__speaker {
  flex: 0 0 100px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 2px;
}
.transcript-line--ai .transcript-line__speaker { color: var(--blue-deep); }
.transcript-line__text {
  flex: 1;
  font-size: .95rem;
  color: var(--ink);
}

@media (max-width: 480px) {
  .transcript-line { flex-direction: column; gap: 4px; }
  .transcript-line__speaker { flex: none; }
}

.outcome-chip {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-deep);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .88rem;
}
.outcome-chip svg { flex-shrink: 0; }

/* ==========================================================================
   Problem / stats / accordions
   ========================================================================== */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 26px 0 30px;
}
@media (min-width: 720px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.stat-card p { color: var(--ink); font-weight: 600; margin: 0; font-size: .98rem; }

.accordion { border-top: 1px solid var(--border); }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-item__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: none;
  border: none;
  padding: 18px 4px;
  text-align: left;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}
.accordion-item__icon {
  flex-shrink: 0;
  transition: transform .2s ease;
}
.accordion-item[data-open="true"] .accordion-item__icon { transform: rotate(45deg); }
.accordion-item__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .22s ease;
}
.accordion-item__body-inner { overflow: hidden; }
.accordion-item[data-open="true"] .accordion-item__body { grid-template-rows: 1fr; }
.accordion-item__body p { padding: 0 4px 18px; font-size: .95rem; }

/* ==========================================================================
   How it works
   ========================================================================== */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 30px;
}
@media (min-width: 780px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
.step {
  padding: 22px 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.step__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--tint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.step__num {
  font-size: .78rem;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: .08em;
  margin-bottom: 10px;
  display: block;
}
.step p { color: var(--ink); font-size: .98rem; }

/* ==========================================================================
   "What you see" mockups
   ========================================================================== */
.mock-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin: 30px 0 34px;
}
@media (min-width: 860px) {
  .mock-row { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* Job notification card */
.job-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.job-card__head {
  background: var(--blue);
  color: var(--white);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: .95rem;
}
.job-card__body { padding: 16px 18px; }
.job-card__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: .92rem;
}
.job-card__row:last-of-type { border-bottom: none; }
.job-card__row span:first-child { color: var(--ink-faint); }
.job-card__row span:last-child { color: var(--ink); font-weight: 600; text-align: right; }
.job-card__summary {
  margin-top: 12px;
  font-size: .88rem;
  color: var(--ink-soft);
  background: var(--tint);
  border-radius: var(--radius-sm);
  padding: 12px;
}

/* Mini calendar */
.week-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.week-card__title { font-size: .82rem; font-weight: 700; color: var(--blue-deep); margin-bottom: 12px; }
.week-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.week-day__label {
  font-size: .68rem;
  font-weight: 700;
  color: var(--ink-faint);
  text-align: center;
  margin-bottom: 6px;
}
.week-day__col {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 90px;
  padding: 4px;
  background: var(--tint);
  border-radius: 6px;
}
.job-chip {
  font-size: .62rem;
  font-weight: 700;
  color: var(--blue-deep);
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 4px 5px;
  line-height: 1.25;
}


/* ==========================================================================
   Offer / risk reversal (deep blue)
   ========================================================================== */
.offer-list { display: flex; flex-direction: column; gap: 14px; margin: 26px 0 30px; }
.offer-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--white);
}
.offer-list svg { flex-shrink: 0; margin-top: 2px; }

/* ==========================================================================
   Conversion section (Calendly only — the lead form lives in the hero)
   ========================================================================== */
.calendly-shell {
  /* Calendly's inline widget sets its iframe to width/height:100%, which
     only resolves against a *definite* height on this container — a plain
     min-height (or a flex parent with align-items:center) leaves that
     percentage unresolved and the iframe collapses to its intrinsic
     default (~150px), rendering as a thin strip instead of filling the box. */
  height: 700px;
  max-width: 640px;
  margin-top: 26px;
  background: var(--tint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.calendly-shell--loading {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink-faint);
  font-size: .9rem;
  padding: 20px;
}
.calendly-shell iframe {
  width: 100% !important;
  height: 100% !important;
  border: 0;
  display: block;
}

@media (max-width: 480px) {
  .calendly-shell { height: 620px; }
}

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.field label {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--white);
  color: var(--ink);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79,142,247,.22); }
.hidden-field { position: absolute; left: -9999px; }

.reassure {
  font-size: .82rem;
  color: var(--ink-faint);
  margin-top: 8px;
}

.form-success {
  display: none;
  background: var(--tint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
}
.form-success[data-visible="true"] { display: block; }
.form-success h3 { margin-bottom: 8px; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq .accordion-item__head { font-size: 1.02rem; }

/* ==========================================================================
   Legal pages (privacy / terms) — plain readable document layout
   ========================================================================== */
.legal__doc { max-width: 720px; }
.legal__doc h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); margin-bottom: 6px; }
.legal__updated { color: var(--ink-faint); font-size: .88rem; margin-bottom: 30px; }
.legal__doc h2 { font-size: 1.15rem; margin: 34px 0 12px; }
.legal__doc p { margin-bottom: 14px; }
.legal__list { margin: 0 0 14px; padding-left: 20px; }
.legal__list li { color: var(--ink-soft); list-style: disc; padding: 4px 0; }
.legal__doc a { color: var(--blue); text-decoration: underline; }
.legal__back { margin-top: 40px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  padding: 34px 0 100px;
  border-top: 1px solid var(--border);
}
.footer__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--blue-deep);
}
.footer__logo img { height: 32px; border-radius: 7px; }
.footer p { font-size: .85rem; color: var(--ink-faint); margin: 4px 0; }
.footer a { text-decoration: underline; }

@media (min-width: 640px) {
  .footer { padding-bottom: 34px; }
}

/* ==========================================================================
   Sticky mobile CTA bar
   ========================================================================== */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px -12px rgba(30,79,163,.25);
  transform: translateY(120%);
  transition: transform .25s ease;
}
.sticky-cta[data-visible="true"] { transform: translateY(0); }
.sticky-cta .btn { flex: 1; }
.sticky-cta__close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (min-width: 960px) {
  .sticky-cta { display: none; }
}

/* ==========================================================================
   Exit intent modal (desktop only)
   ========================================================================== */
.exit-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  background: rgba(28,36,52,.55);
  padding: 24px;
}
.exit-modal[data-visible="true"] { display: flex; }
.exit-modal__panel {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
}
.exit-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.exit-modal h2 { font-size: 1.4rem; margin-bottom: 14px; padding-right: 30px; }

@media (max-width: 959px) {
  .exit-modal { display: none !important; }
}
