/* CallKeep — professional B2B marketing site */
:root {
  --navy: #0b1f33;
  --navy-mid: #14304a;
  --navy-soft: #1e3a56;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-light: #ccfbf1;
  --white: #ffffff;
  --off-white: #f7f9fb;
  --slate: #475569;
  --slate-light: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(11, 31, 51, 0.08);
  --radius: 10px;
  --max: 1100px;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--navy);
  background: var(--white);
  line-height: 1.65;
  font-size: 1.05rem;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal); }
ul { list-style: none; }

.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

/* Header */
.site-header {
  background: var(--navy);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}

.logo {
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo span { color: var(--teal); }
.logo:hover { color: var(--white); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.15rem;
  align-items: center;
}

.site-nav a {
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--teal-light); }

.nav-cta {
  background: var(--teal) !important;
  color: var(--white) !important;
  padding: 0.45rem 0.9rem !important;
  border-radius: 6px;
  text-decoration: none !important;
}
.nav-cta:hover { background: var(--teal-dark) !important; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    width: 100%;
    padding-bottom: 0.75rem;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.35rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary {
  background: var(--teal);
  color: var(--white);
}
.btn-primary:hover { background: var(--teal-dark); color: var(--white); }
.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-secondary:hover { border-color: var(--white); color: var(--white); }
.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-group { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* Hero */
.hero {
  background: linear-gradient(145deg, var(--navy) 0%, var(--navy-mid) 55%, var(--navy-soft) 100%);
  color: var(--white);
  padding: 3.5rem 0 3.75rem;
}
.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.55rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin-bottom: 1rem;
}
.hero .lead {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.88);
  max-width: 42rem;
  margin-bottom: 0.5rem;
}
.hero-note {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.65);
  margin-top: 1.25rem;
}

/* Sections */
.section { padding: 3.25rem 0; }
.section-alt { background: var(--off-white); }
.section h2 {
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}
.section .section-intro {
  color: var(--slate);
  max-width: 40rem;
  margin-bottom: 2rem;
}
.section h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
  color: var(--navy);
}

/* Cards / grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (max-width: 768px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card .icon {
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  color: var(--teal);
}
.card p { color: var(--slate); font-size: 0.98rem; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--teal);
  color: var(--white);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.85rem;
}

/* Problem / highlight strip */
.highlight-box {
  background: var(--teal-light);
  border-left: 4px solid var(--teal);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}
.highlight-box p { color: var(--navy); margin: 0; }

/* Lists */
.check-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.65rem;
  color: var(--slate);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--teal);
  border-radius: 2px;
}

/* CTA band */
.cta-band {
  background: var(--navy);
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
}
.cta-band h2 { color: var(--white); margin-bottom: 0.5rem; }
.cta-band p { color: rgba(255,255,255,0.8); max-width: 36rem; margin: 0 auto 1.25rem; }
.cta-band .btn-group { justify-content: center; }

/* Page hero (inner) */
.page-hero {
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0 2rem;
}
.page-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.page-hero .breadcrumb {
  font-size: 0.88rem;
  color: var(--slate-light);
  margin-bottom: 0.75rem;
}
.page-hero .breadcrumb a { color: var(--slate-light); text-decoration: none; }
.page-hero .breadcrumb a:hover { color: var(--teal); }
.page-hero .lead { color: var(--slate); max-width: 40rem; }

/* Prose content */
.prose { max-width: 42rem; }
.prose p { margin-bottom: 1rem; color: var(--slate); }
.prose ul { margin: 0 0 1.25rem 1.25rem; list-style: disc; }
.prose li { margin-bottom: 0.4rem; color: var(--slate); }
.prose h2 { margin-top: 2rem; margin-bottom: 0.65rem; }
.prose h3 { margin-top: 1.5rem; }

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.faq-item h2, .faq-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.faq-item p { color: var(--slate); margin: 0; }

/* Contact */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.contact-card a {
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--navy);
}
.contact-card a:hover { color: var(--teal); }
.contact-card .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-light);
  margin-bottom: 0.35rem;
}

/* Area chips */
.area-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.area-chip {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--navy-mid);
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  padding: 2.75rem 0 1.5rem;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
.site-footer h3 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.site-footer a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
}
.site-footer a:hover { color: var(--teal-light); }
.site-footer ul li { margin-bottom: 0.4rem; }
.footer-brand { font-weight: 700; color: var(--white); font-size: 1.15rem; margin-bottom: 0.5rem; }
.footer-brand span { color: var(--teal); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: 0.85rem;
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mb-0 { margin-bottom: 0; }

/* === MOBILE OPTIMIZATION LAYER === */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Larger tap targets */
.nav-toggle {
  min-height: 44px;
  min-width: 44px;
  padding: 0.55rem 0.9rem;
  font-size: 1rem;
}

.site-nav a {
  display: block;
  padding: 0.65rem 0.25rem;
  min-height: 44px;
  line-height: 1.3;
}

.nav-cta {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: 100%;
  text-align: center;
  margin-top: 0.35rem;
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  -webkit-tap-highlight-color: transparent;
}

.contact-card a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  word-break: break-word;
}

/* Sticky mobile action bar */
.mobile-cta-bar {
  display: none;
}

@media (max-width: 820px) {
  .container { width: min(100% - 1.25rem, var(--max)); }

  .header-inner {
    padding: 0.65rem 0;
    flex-wrap: nowrap;
  }

  .logo { font-size: 1.25rem; }

  .site-nav {
    border-top: 1px solid rgba(255,255,255,0.12);
    margin-top: 0.35rem;
    padding-top: 0.5rem;
  }

  .site-nav ul {
    width: 100%;
    gap: 0;
  }

  .site-nav li {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .site-nav a {
    padding: 0.85rem 0.35rem;
  }

  .hero {
    padding: 2.25rem 0 2.5rem;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .hero .lead {
    font-size: 1.05rem;
  }

  .section { padding: 2.25rem 0; }

  .page-hero { padding: 1.75rem 0 1.5rem; }

  .btn-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-group .btn {
    width: 100%;
  }

  .card { padding: 1.25rem; }

  .highlight-box {
    padding: 1rem 1.1rem;
  }

  .cta-band { padding: 2.25rem 0; }
  .cta-band .btn-group { align-items: stretch; }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Sticky call/email bar — leave room at bottom */
  body { padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px)); }

  .mobile-cta-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
    background: rgba(11, 31, 51, 0.97);
    border-top: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 -6px 24px rgba(0,0,0,0.25);
  }

  .mobile-cta-bar a {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
  }

  .mobile-cta-bar .m-call {
    background: var(--teal);
    color: var(--white);
  }

  .mobile-cta-bar .m-email {
    background: transparent;
    color: var(--white);
    border: 1.5px solid rgba(255,255,255,0.45);
  }
}

@media (max-width: 380px) {
  .hero .lead { font-size: 1rem; }
  .mobile-cta-bar a { font-size: 0.88rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* Focus visibility for keyboard / accessibility */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}
