/* ==========================================================================
   BBW Broadband Wireless — Site Stylesheet
   Palette derived from the BBW logo:
     --red     : primary brand mark, used sparingly for accents/CTAs
     --charcoal: large surfaces (nav, footer, hero) per BBW brand convention
   ========================================================================== */

:root {
  --red: #a2231d;
  --red-dark: #7c1a15;
  --red-light: #c94d3f;
  /* Brighter than --red-light specifically for small/bold text on dark
     backgrounds (eyebrows). --red-light tops out at ~4.6:1 contrast even
     against pure black, which fails WCAG AA's 4.5:1 for text that size —
     confirmed by sampling actual rendered pixels, not just computed. This
     one holds 5.3–6:1+ against charcoal and darker. Non-text uses (icons,
     borders — 3:1 requirement) can stay on --red-light. */
  --red-accent-text: #e56b52;
  --charcoal: #1c1c1c;
  --charcoal-soft: #2a2a2a;
  --ink: #232323;
  --paper: #ffffff;
  --paper-soft: #f7f6f5;
  --line: #e6e3e1;
  --muted: #6b6764;
  --success: #2f7d5e;

  --font-head: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --radius: 10px;
  --shadow: 0 10px 30px -12px rgba(28, 28, 28, 0.25);
  --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--charcoal);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--ink); }

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }

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

section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.bg-soft { background: var(--paper-soft); }
.bg-charcoal { background: var(--charcoal); color: rgba(255,255,255,0.92); }
.bg-charcoal h2, .bg-charcoal h3 { color: #fff; }
.bg-charcoal p { color: rgba(255,255,255,0.75); }
.bg-charcoal ul.check-list li { color: rgba(255,255,255,0.9); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75em;
}
.bg-charcoal .eyebrow { color: var(--red-accent-text); }

.section-head {
  max-width: 700px;
  margin: 0 auto 3rem;
  text-align: center;
}
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.7em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(162, 35, 29, 0.55);
}
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-outline {
  background: transparent;
  border-color: var(--charcoal);
  color: var(--charcoal);
}
.btn-outline:hover { background: var(--charcoal); color: #fff; }
.btn-block { width: 100%; justify-content: center; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--charcoal);
  border-bottom: 3px solid var(--red);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 46px; width: auto; }
.brand-fallback {
  font-family: var(--font-head);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  font-size: 0.94rem;
  padding: 10px 14px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.main-nav a[aria-current="page"] { border-bottom: 2px solid var(--red); border-radius: 6px 6px 0 0; }
.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 4px 8px;
}

.header-callbar {
  background: var(--charcoal-soft);
  color: rgba(255,255,255,0.85);
  font-size: 0.82rem;
}
.header-callbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 34px;
}
.header-callbar a { color: rgba(255,255,255,0.85); }
.header-callbar a:hover { color: #fff; }
.callbar-links { display: flex; gap: 20px; }
.callbar-links span, .callbar-links a { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--charcoal) url("../images/hero-header.jpg") center center / cover no-repeat;
  color: #fff;
  overflow: hidden;
  padding: 130px 0 110px;
  min-height: 520px;
  display: flex;
  align-items: center;
}
.hero::before {
  /* Scrim so text clears WCAG AA over the photo. Strength verified against
     actual sampled pixels behind each text element, not just eyeballed —
     see hero contrast note further down in this file. */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(8,8,8,0.94) 0%, rgba(8,8,8,0.92) 60%, rgba(8,8,8,0.55) 82%, rgba(8,8,8,0.4) 100%);
  z-index: 1;
}
.hero .container {
  position: relative;
  z-index: 2;
}
.hero-copy { max-width: 640px; }
.hero-eyebrow {
  color: var(--red-accent-text);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 1em;
}
.hero h1 { color: #fff; }
.hero p.lead {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.12rem;
  max-width: 46ch;
}
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 2.2rem;
}
.hero-stats div strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: #fff;
}
.hero-stats div span {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}

.page-hero {
  background: linear-gradient(135deg, var(--charcoal) 0%, #111111 100%);
  color: #fff;
  padding: 64px 0 56px;
  border-bottom: 4px solid var(--red);
}
.page-hero .eyebrow { color: var(--red-accent-text); }
.page-hero h1 { color: #fff; margin-bottom: 0.4em; }
.page-hero p { color: rgba(255,255,255,0.78); max-width: 62ch; font-size: 1.05rem; }
.breadcrumb {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 1.2em;
}
.breadcrumb a { color: rgba(255,255,255,0.75); }
.breadcrumb a:hover { color: #fff; }

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

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color .2s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: transparent; }
.card .icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(162, 35, 29, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--red);
}
.card .icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 0.4em; }
.card p { color: var(--muted); margin-bottom: 0; font-size: 0.96rem; }
.card a.card-link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 600;
  font-size: 0.9rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Feature split (image/graphic + text) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split.reverse .split-art { order: 2; }
.split-art {
  background: var(--paper-soft);
  border-radius: 16px;
  padding: 32px;
  border: 1px solid var(--line);
}
.split-body ul.check-list { margin-top: 1.2em; }

ul.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
ul.check-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  color: var(--ink);
}
ul.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--success);
}
ul.check-list li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  width: 6px;
  height: 10px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

/* ---------- Stats strip ---------- */
.stats-strip {
  background: var(--red);
  color: #fff;
  padding: 36px 0;
}
.stats-strip .grid-4 { text-align: center; }
.stats-strip strong { display: block; font-family: var(--font-head); font-size: 2rem; }
.stats-strip span { font-size: 0.85rem; opacity: 0.9; }

/* ---------- Pricing ---------- */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.pricing-table th, .pricing-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.pricing-table thead th {
  background: var(--charcoal);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
}
.pricing-table tbody tr:last-child td { border-bottom: none; }
.pricing-table tbody tr:nth-child(even) { background: var(--paper-soft); }
.table-wrap { overflow-x: auto; }

/* ---------- Testimonial ---------- */
.testimonial {
  background: var(--paper-soft);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 28px 30px;
}
.testimonial p { font-style: italic; color: var(--ink); font-size: 1.05rem; }
.testimonial cite { font-style: normal; font-weight: 600; color: var(--charcoal); display: block; margin-top: 10px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--charcoal);
  color: #fff;
  padding: 60px 0;
  text-align: center;
  position: relative;
  border-top: 4px solid var(--red);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.75); max-width: 60ch; margin: 0 auto 1.8em; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}
.contact-info-card {
  background: var(--charcoal);
  color: #fff;
  border-radius: var(--radius);
  padding: 34px;
}
.contact-info-card h3 { color: #fff; }
.contact-info-card .info-row {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  align-items: flex-start;
}
.contact-info-card .info-row .icon {
  background: rgba(255,255,255,0.08);
  color: var(--red-light);
  flex-shrink: 0;
}
.contact-info-card .info-row div { color: rgba(255,255,255,0.8); font-size: 0.94rem; }
.contact-info-card .info-row strong { display: block; color: #fff; font-family: var(--font-head); font-weight: 600; margin-bottom: 2px; }
.contact-info-card a { color: rgba(255,255,255,0.85); }
.contact-info-card a:hover { color: #fff; }

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-top: 24px;
}
.map-embed iframe { width: 100%; height: 260px; border: 0; display: block; }

form.contact-form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: var(--charcoal);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-body);
  /* 16px minimum — anything smaller makes iOS Safari auto-zoom on focus */
  font-size: 1rem;
  background: #fff;
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(162, 35, 29, 0.12);
}
.field textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: 0.82rem; color: var(--muted); }

/* Honeypot — off-screen for humans, still present in the DOM for bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  display: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px 14px;
  border-radius: 8px;
  margin: 0;
}
.form-status.is-visible { display: block; }
.form-status.is-success { background: rgba(47, 125, 94, 0.1); color: var(--success); }
.form-status.is-error { background: rgba(162, 35, 29, 0.08); color: var(--red); }
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--red); }

/* ---------- Coverage list ---------- */
.province-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.province-chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.province-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); }

/* ---------- Footer ---------- */
.site-footer {
  background: #111111;
  color: rgba(255, 255, 255, 0.6);
  padding: 56px 0 0;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-brand img { height: 40px; margin-bottom: 14px; }
.footer-brand p { color: rgba(255, 255, 255, 0.55); font-size: 0.88rem; }
.site-footer h4 {
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: rgba(255, 255, 255, 0.6); }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
  flex-wrap: wrap;
  gap: 10px;
}
.social-row { display: flex; gap: 10px; }
.social-row a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.social-row a:hover { background: var(--red); }
.social-row svg { width: 16px; height: 16px; }

/* ---------- Utilities ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(162, 35, 29, 0.08);
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* ---------- FAQ accordion (native <details>/<summary>, no JS) ---------- */
.faq-list {
  display: grid;
  gap: 14px;
  max-width: 800px;
  margin: 0 auto;
}
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-family: var(--font-head);
  color: var(--charcoal);
  list-style: none;
  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-size: 1.5rem;
  line-height: 1;
  color: var(--red);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { background: var(--paper-soft); }
.faq-item .faq-answer { padding: 0 22px 20px; color: var(--muted); margin: 0; }

/* ---------- WhatsApp floating button ---------- */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.whatsapp-bubble {
  max-width: 220px;
  background: #fff;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.4;
  padding: 12px 32px 12px 14px;
  border-radius: 12px;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.25);
  position: relative;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.whatsapp-bubble.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.whatsapp-bubble::after {
  content: "";
  position: absolute;
  right: 20px;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
}
.whatsapp-bubble-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: 0;
  font-size: 1rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
}
.whatsapp-bubble-close:hover { color: var(--ink); }

.whatsapp-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px -6px rgba(37, 211, 102, 0.6);
  flex-shrink: 0;
  animation: whatsapp-pulse 2.4s ease-out infinite;
}
.whatsapp-btn:hover { transform: scale(1.06); }
.whatsapp-btn img { width: 32px; height: 32px; display: block; }

@keyframes whatsapp-pulse {
  0%   { box-shadow: 0 10px 24px -6px rgba(37, 211, 102, 0.6), 0 0 0 0 rgba(37, 211, 102, 0.45); }
  70%  { box-shadow: 0 10px 24px -6px rgba(37, 211, 102, 0.6), 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 10px 24px -6px rgba(37, 211, 102, 0.6), 0 0 0 0 rgba(37, 211, 102, 0); }
}

@media (max-width: 480px) {
  .whatsapp-float { right: 14px; bottom: 14px; }
  .whatsapp-bubble { display: none; }
  .whatsapp-btn { width: 52px; height: 52px; }
  .whatsapp-btn img { width: 28px; height: 28px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .split.reverse .split-art { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 100px 0 80px; min-height: 440px; }
  .hero::before {
    /* text now spans nearly the full width (no more 640px column to protect
       within), so keep the whole scrim uniformly dark rather than fading
       right — verified against sampled pixels at 375px, not just assumed */
    background: linear-gradient(100deg, rgba(8,8,8,0.92) 0%, rgba(8,8,8,0.8) 100%);
  }
}

/* Nav collapses to a hamburger earlier than the general mobile breakpoint
   below — six links plus the "Fibre Internet" / "Wireless Internet" /
   "VoIP Solutions" two-word items need more room than 760px gives them
   before they start wrapping onto a second line. */
@media (max-width: 1040px) {
  .header-callbar { display: none; }
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    background: var(--charcoal);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 20px 20px;
    display: none;
    border-bottom: 3px solid var(--red);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 6px; }
  .nav-cta { margin-left: 0; margin-top: 8px; }
}

@media (max-width: 760px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .province-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
}
