/* =========================================================
   Joplin Home Security — Design System
   Palette: night-watch navy + porch-light amber
   Type: Archivo (display) / Inter (body) / IBM Plex Mono (data)
   ========================================================= */

:root {
  /* Color */
  --ink:        #0F1620;
  --navy:       #152232;
  --navy-2:     #1E3049;
  --paper:      #EFEDE6;
  --paper-2:    #E4E1D6;
  --white:      #FFFFFF;
  --amber:      #D9A441;
  --amber-dark: #B4822E;
  --slate:      #5B6B7C;
  --slate-light:#8593A0;
  --line:       #D7D3C6;
  --line-dark:  #2C3D53;
  --success:    #3E7A5A;

  /* Type */
  --font-display: "Archivo", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  /* Scale */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem);
  --step-2:  clamp(1.5rem, 1.3rem + 0.8vw, 1.9rem);
  --step-3:  clamp(1.9rem, 1.6rem + 1.4vw, 2.6rem);
  --step-4:  clamp(2.4rem, 1.9rem + 2.2vw, 3.6rem);

  --radius-sm: 4px;
  --radius-md: 8px;
  --container: 1180px;
  --shadow-card: 0 1px 2px rgba(15,22,32,0.06), 0 8px 24px -12px rgba(15,22,32,0.18);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

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

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  color: var(--navy);
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { margin: 0 0 1em; color: var(--ink); }
.lede { font-size: var(--step-1); color: var(--slate); max-width: 62ch; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

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

section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--navy); color: var(--paper); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: var(--white); }
.section-dark p { color: #C7D0DA; }
.section-dark .lede { color: #C7D0DA; }

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step-0);
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: var(--amber-dark); }
.btn-outline { background: transparent; border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-outline-navy { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline-navy:hover { background: var(--navy); color: var(--white); }
.btn-phone { background: var(--navy); color: var(--white); }
.btn-phone:hover { background: var(--navy-2); }
.btn-block { width: 100%; }
.btn-sm { padding: 10px 18px; font-size: var(--step--1); }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.75em; }

/* -------------------- Header -------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid var(--line-dark);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  white-space: nowrap;
}
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; }
.brand-sub { display: block; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.14em; color: var(--amber); text-transform: uppercase; font-weight: 500; }

.main-nav { display: none; }
.main-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; align-items: center; }
.main-nav a { text-decoration: none; color: #D9DEE5; font-weight: 500; font-size: var(--step--1); position: relative; }
.main-nav a:hover { color: var(--white); }
.main-nav .has-dropdown { position: relative; }
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: -16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 10px;
  min-width: 260px;
  z-index: 50;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { display: block; }
.dropdown a { display: block; color: var(--navy); padding: 9px 12px; border-radius: var(--radius-sm); font-size: var(--step--1); }
.dropdown a:hover { background: var(--paper); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-phone {
  display: none;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--step--1);
}
.header-phone svg { flex-shrink: 0; }

.menu-toggle {
  background: none;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  color: var(--white);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  background: var(--navy-2);
  border-top: 1px solid var(--line-dark);
}
.mobile-nav.is-open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 8px 0; }
.mobile-nav a { display: block; padding: 12px 24px; color: var(--white); text-decoration: none; font-weight: 500; border-bottom: 1px solid rgba(255,255,255,0.06); }
.mobile-nav .sub-list { padding-left: 12px; }
.mobile-nav .sub-list a { font-size: var(--step--1); color: #C7D0DA; padding: 10px 24px; }

@media (min-width: 960px) {
  .main-nav { display: block; }
  .header-phone { display: inline-flex; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* -------------------- Hero -------------------- */
.hero {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--white);
  padding: 64px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
.hero-copy h1 { color: var(--white); }
.hero-copy .lede { color: #C7D0DA; }
.hero-schematic { width: 100%; max-width: 460px; margin: 0 auto; }
.hero-note {
  margin-top: 28px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: #A9B4C0;
}
.hero-note span { display: flex; align-items: center; gap: 8px; }
.hero-note svg { flex-shrink: 0; }

@media (min-width: 900px) {
  .hero .container { grid-template-columns: 1.1fr 0.9fr; }
}

/* -------------------- Trust bar -------------------- */
.trust-bar { background: var(--paper-2); border-bottom: 1px solid var(--line); padding: 22px 0; }
.trust-bar .container { display: flex; flex-wrap: wrap; gap: 24px 40px; justify-content: center; }
.trust-item { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: var(--step--1); color: var(--slate); }
.trust-item svg { color: var(--amber-dark); flex-shrink: 0; }

/* -------------------- Cards -------------------- */
.grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card-icon { width: 46px; height: 46px; color: var(--amber-dark); margin-bottom: 16px; }
.card h3 { font-size: var(--step-1); margin-bottom: 0.4em; }
.card p { color: var(--slate); flex-grow: 1; }
.card-link { margin-top: 14px; font-weight: 600; color: var(--navy); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.card-link:hover { color: var(--amber-dark); }

/* -------------------- Process steps -------------------- */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step {
  counter-increment: step;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  position: relative;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: var(--step-0);
  color: var(--amber-dark);
  display: block;
  margin-bottom: 10px;
  letter-spacing: 0.06em;
}
.step h4 { margin-bottom: 0.35em; font-size: var(--step-0); }
.step p { color: var(--slate); margin-bottom: 0; font-size: var(--step--1); }

/* -------------------- FAQ -------------------- */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 8px;
  font-weight: 600;
  font-family: var(--font-display);
  font-size: var(--step-0);
  color: var(--navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-body);
  font-size: 1.5rem;
  color: var(--amber-dark);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 8px 20px; color: var(--slate); max-width: 68ch; }

/* -------------------- CTA band -------------------- */
.cta-band {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 44px 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
}
.cta-band h3 { color: var(--white); margin-bottom: 0.25em; }
.cta-band p { color: #C7D0DA; margin-bottom: 0; }
.cta-band-full { background: var(--navy); color: var(--white); text-align: center; padding: 64px 0; }
.cta-band-full h2 { color: var(--white); }
.cta-band-full p { color: #C7D0DA; }
.cta-band-full .cta-row { justify-content: center; }

/* -------------------- Service area chips -------------------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.5em; }
.chip {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  text-decoration: none;
  color: var(--navy);
}
.chip:hover { border-color: var(--amber); color: var(--amber-dark); }

/* -------------------- Breadcrumbs -------------------- */
.breadcrumbs { padding: 18px 0 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; font-family: var(--font-mono); font-size: 0.78rem; color: var(--slate); }
.breadcrumbs a { color: var(--slate); text-decoration: none; }
.breadcrumbs a:hover { color: var(--amber-dark); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--slate-light); }

/* -------------------- Page header (non-home) -------------------- */
.page-header { background: var(--navy); color: var(--white); padding: 32px 0 56px; }
.page-header h1 { color: var(--white); margin-bottom: 0.3em; }
.page-header .lede { color: #C7D0DA; margin-bottom: 0; }

/* -------------------- Forms -------------------- */
.form-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: var(--step--1); color: var(--navy); }
.field input, .field select, .field textarea {
  font-family: var(--font-body);
  font-size: var(--step-0);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 32px; box-shadow: var(--shadow-card); }
.form-note { font-size: var(--step--1); color: var(--slate); margin-top: 14px; }

/* -------------------- Footer -------------------- */
.site-footer { background: var(--ink); color: #B8C0CA; padding: 56px 0 24px; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1fr; margin-bottom: 40px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--white); font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); text-decoration: none; margin-bottom: 12px; }
.footer-brand svg { width: 30px; height: 30px; }
.site-footer h5 { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer a { color: #B8C0CA; text-decoration: none; font-size: var(--step--1); }
.site-footer a:hover { color: var(--white); }
.footer-contact p { margin-bottom: 8px; font-size: var(--step--1); }
.footer-bottom { border-top: 1px solid #232C36; padding-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 0.78rem; color: #6E7A85; }
.footer-note { max-width: 780px; margin: 0 auto 24px; font-size: 0.78rem; color: #6E7A85; text-align: center; }

/* -------------------- Sticky mobile call bar -------------------- */
.sticky-call {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 90;
  background: var(--amber);
  display: flex;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
}
.sticky-call a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 12px;
  text-decoration: none;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--ink);
  font-size: var(--step--1);
}
.sticky-call a.quote { background: var(--navy); color: var(--white); }
body { padding-bottom: 60px; }
@media (min-width: 960px) {
  .sticky-call { display: none; }
  body { padding-bottom: 0; }
}

/* -------------------- Utility -------------------- */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-content { max-width: 780px; }
.mt-0 { margin-top: 0; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.two-col { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }
.list-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.list-check li { display: flex; gap: 12px; align-items: flex-start; }
.list-check svg { flex-shrink: 0; margin-top: 3px; color: var(--success); }
.divider { border: none; border-top: 1px solid var(--line); margin: 48px 0; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
