/* ==========================================================================
   Skilte & Bilreklame — shared CTA + call-bar system
   One primary style, one secondary style, defined once and reused sitewide.
   Loaded after each page's inline <style>, so it is the single source of
   truth for anything .btn-* / .cta-phone related.
   ========================================================================== */

:root {
  --cta-blue:       #2164ab;   /* brand accent — 6.05:1 on white, WCAG AA  */
  --cta-blue-hover: #1a5290;
  --cta-focus:      #ffd24a;
  --call-bar-h:     64px;
}

/* ── Inline phone links inside body copy ───────────────────────────────── */
/* Bare .cta-phone appears inline in paragraphs — keep it a text link. */
a.cta-phone:not([class*="btn-"]):not(.nav-cta):not(.partner-cta):not(.contact-phone):not(.error-cta) {
  color: inherit;
  background: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font: inherit;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 2px;
  touch-action: manipulation;
}

/* ── Shared button base ─────────────────────────────────────────────────── */
.btn-primary,
.btn-secondary,
.btn-dark,
.btn-ghost,
.nav-cta.cta-phone,
.partner-cta.cta-phone,
.contact-phone.cta-phone,
.error-cta.cta-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;                 /* WCAG 2.5.5 / Google tap-target size */
  padding: 12px 26px;
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;              /* never break "21 24 48 54" mid-number */
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
  -webkit-tap-highlight-color: rgba(33,100,171,.25);
  touch-action: manipulation;       /* kill the 300ms tap delay */
}

/* ── Primary: the phone call ────────────────────────────────────────────── */
.btn-primary,
.btn-primary.cta-phone,
.btn-primary.dark,
.btn-primary.dark.cta-phone,
.btn-dark.cta-phone,
.partner-cta.cta-phone,
.contact-phone.cta-phone,
.error-cta.cta-phone {
  background: var(--cta-blue);
  color: #fff;
  border-color: var(--cta-blue);
  box-shadow: none;
}
.btn-primary:hover,
.btn-dark.cta-phone:hover,
.partner-cta.cta-phone:hover,
.contact-phone.cta-phone:hover,
.error-cta.cta-phone:hover {
  background: var(--cta-blue-hover);
  border-color: var(--cta-blue-hover);
  color: #fff;
  filter: none;
  transform: none;                  /* no lift — it caused jitter on touch */
}

/* ── Secondary: the quote form ──────────────────────────────────────────── */
.btn-secondary,
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.55);
}
.btn-secondary:hover,
.btn-ghost:hover {
  background: rgba(255,255,255,.12);
  border-color: #fff;
  color: #fff;
}
/* Secondary sitting on a light section */
.light .btn-secondary,
.btn-secondary.on-light,
.cta-strip .btn-secondary {
  color: var(--cta-blue);
  border-color: var(--cta-blue);
}
.light .btn-secondary:hover,
.btn-secondary.on-light:hover,
.cta-strip .btn-secondary:hover {
  background: rgba(33,100,171,.1);
  color: var(--cta-blue-hover);
}

/* ── Inline text links that were wrongly styled as pills ────────────────── */
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 4px 0;
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: rgba(255,255,255,.95);
  text-decoration: none;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,.55);
  border-radius: 0;
  box-shadow: none;
  white-space: nowrap;
  touch-action: manipulation;
}
.btn-link:hover { color: #fff; border-bottom-color: #fff; }

/* .btn-link.cta-phone was rendering as an underlined pill — make it a pill. */
.btn-link.cta-phone {
  padding: 12px 26px;
  border: 2px solid var(--cta-blue);
  border-radius: 999px;
  background: var(--cta-blue);
  color: #fff;
}

/* ── Focus states (keyboard + WCAG 2.4.7) ───────────────────────────────── */
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-dark:focus-visible,
.btn-ghost:focus-visible,
.btn-link:focus-visible,
.cta-phone:focus-visible,
.nav-cta:focus-visible,
.call-bar__link:focus-visible {
  outline: 3px solid var(--cta-focus);
  outline-offset: 3px;
  border-radius: 999px;
}
.cta-phone:focus { outline: none; }  /* replaced by :focus-visible above */
a.cta-phone:not([class*="btn-"]):focus-visible {
  outline: 3px solid var(--cta-focus);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ── Header phone CTA — always visible, always tappable ─────────────────── */
.nav-cta.cta-phone {
  min-height: 48px;
  padding: 12px 18px;
  font-size: 15px;
  background: var(--cta-blue);
  border-color: var(--cta-blue);
  color: #fff;
}

@media (max-width: 1024px) {
  .nav-cta.cta-phone { margin-left: auto; margin-right: 12px; }
}

/* Below 430px the header number collapses to an icon-only tap target so the
   logo and hamburger still fit. Still a full tel: link. */
@media (max-width: 429px) {
  .nav-cta.cta-phone {
    padding: 0;
    width: 48px;
    min-width: 48px;
    height: 48px;
    font-size: 0;
    gap: 0;
  }
  .nav-cta.cta-phone::before {
    content: '';
    width: 20px; height: 20px;
    background: #fff;
    -webkit-mask: var(--phone-icon) center / contain no-repeat;
    mask: var(--phone-icon) center / contain no-repeat;
  }
}

:root {
  --phone-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M6.6 10.8c1.4 2.8 3.8 5.2 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.2.4 2.4.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1l-2.3 2.2z'/%3E%3C/svg%3E");
}

/* ── Hero actions: full-width stacked buttons on mobile ─────────────────── */
/* 767px, matching the sticky call bar — 768 is a tablet, where full-width
   buttons look stretched. */
@media (max-width: 767px) {
  .hero-actions,
  .page-hero-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
  }
  .hero-actions > a,
  .page-hero-actions > a,
  .hero-actions .btn-primary,
  .hero-actions .btn-link,
  .hero-actions .cta-phone {
    width: 100%;
    max-width: 480px;
    min-height: 56px;
    font-size: 17px;
  }
  .hero-actions .btn-link {
    border: 2px solid rgba(255,255,255,.55);
    border-radius: 999px;
    padding: 12px 26px;
  }
}

/* ── Above-the-fold CTA block for the Ads landing pages ─────────────────── */
.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}
.page-hero-trust {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.01em;
  color: rgba(255,255,255,.92);
}
.page-hero-trust::before {
  content: '';
  flex: 0 0 auto;
  width: 18px; height: 18px;
  background: #4ade80;
  -webkit-mask: var(--check-icon) center / contain no-repeat;
  mask: var(--check-icon) center / contain no-repeat;
}
:root {
  --check-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E");
}

/* ── Sticky mobile call bar (<768px only) ───────────────────────────────── */
.call-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9000;                    /* under the cookie banner (9999) */
  display: none;
  background: var(--cta-blue);
  border-top: 1px solid rgba(255,255,255,.18);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -4px 20px rgba(0,0,0,.35);
}
.call-bar__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--call-bar-h);
  padding: 12px 16px;
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255,255,255,.2);
}
.call-bar__link:active { background: var(--cta-blue-hover); }
.call-bar__icon { width: 22px; height: 22px; flex: 0 0 auto; fill: currentColor; }

@media (max-width: 767px) {
  .call-bar { display: block; }
  /* Keep the footer and page end clear of the bar */
  body {
    padding-bottom: calc(var(--call-bar-h) + env(safe-area-inset-bottom, 0px));
  }
  /* Lift the cookie banner and its re-open bubble above the bar */
  #sab-cookie-banner {
    bottom: calc(var(--call-bar-h) + env(safe-area-inset-bottom, 0px) + 16px) !important;
  }
  #sab-bubble {
    bottom: calc(var(--call-bar-h) + env(safe-area-inset-bottom, 0px) + 12px) !important;
  }
}

/* Never show the bar in mobile landscape — it eats too much of a 390px-tall
   viewport, and the hero CTA is already in view there. */
@media (max-height: 500px) and (orientation: landscape) {
  .call-bar { display: none !important; }
  body { padding-bottom: 0 !important; }
  #sab-cookie-banner, #sab-bubble { bottom: 16px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary, .btn-secondary, .btn-link, .cta-phone, .call-bar__link {
    transition: none;
  }
}

/* ── Ads landing pages: get the call CTA into the first screen ──────────── */
@media (max-width: 768px) {
  /* The stock .page-hero reserves 140px of top padding for a nav that is
     only 64px tall, which pushed the CTA below the fold (and under the
     cookie banner) on a 390x780 phone. */
  .page-hero { padding: calc(var(--nav-h, 64px) + 28px) 20px 40px; }

  .page-hero-inner { display: flex; flex-direction: column; }
  .page-breadcrumb   { display: none; }          /* nav aid, not needed for ad traffic */
  .page-tag          { order: 1; margin-bottom: 14px; }
  .page-hero h1      { order: 2; font-size: clamp(34px, 9vw, 46px); }
  .page-hero-trust   { order: 3; margin-top: 16px; }
  .page-hero-actions { order: 4; margin-top: 18px; }
  .page-hero-sub     { order: 5; margin-top: 22px; font-size: 15px; line-height: 1.5; }
}

/* ── No horizontal scroll at any width ──────────────────────────────────── */
@media (max-width: 768px) {
  /* CTA pairs sat in a nowrap flex row and overflowed once the buttons
     carried the full "Ring til Ken: 21 24 48 54" label. */
  .cta-actions,
  .cta-inner,
  .cta-strip-inner,
  .partner-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    min-width: 0;
  }
  .cta-actions > a,
  .cta-strip-inner > a,
  .partner-actions > a { width: 100%; }

  /* Grid tracks default to min-width:auto and refuse to shrink. */
  .usp-grid,
  .cases-grid,
  .photo-grid,
  .two-col,
  .footer-grid { grid-template-columns: minmax(0, 1fr); }

  /* Flex children likewise */
  .case-body,
  .case-info,
  .cta-inner,
  .content-inner { min-width: 0; }
  .case-body > *, .case-info > * { min-width: 0; }

  /* Wide data tables scroll inside their own box, not the page */
  .article-body-inner table,
  .content-inner table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 14px;
  }
}

/* Long unbroken strings (emails, URLs) must not push the page wide */
.article-body-inner p,
.content-inner p,
.section-body { overflow-wrap: break-word; }

/* Respect reduced motion on the decorative photo marquee */
@media (prefers-reduced-motion: reduce) {
  .photo-strip { animation: none !important; }
}

/* ── Hamburger is now a real <button>; strip UA button chrome ───────────── */
button.nav-hamburger {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
}
button.nav-hamburger:focus-visible {
  outline: 3px solid var(--cta-focus);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ── Footer contrast (WCAG AA on the near-black footer) ─────────────────── */
/* Several pages carry a second, later footer block that overrode the first
   with rgba(255,255,255,.22-.42) — roughly 2-3.4:1. */
.footer-brand-about { color: #b0b0b0; }
.footer-col-ttl     { color: #ffffff; }
.footer-col a,
.footer-links a,
.footer-bottom,
.footer-bottom a    { color: #b0b0b0; }
.footer-col a:hover,
.footer-links a:hover,
.footer-bottom a:hover { color: #ffffff; }

/* .price-card titles are <h3> now — keep the <h4> look */
.price-card h3 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.02em;
}

/* footer-copy was overridden to rgba(255,255,255,.18) — 1.5:1 */
.footer-copy          { color: #a8a8a8; }
.footer-copy a        { color: #c9c9c9; text-decoration: underline; }
.footer-copy a:hover  { color: #ffffff; }

/* .ilist-item titles are <h3> now — keep the <h4> look */
.ilist-item h3 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.02em;
}

/* .step-content titles are <h3> now — keep the <h4> look */
.step-content h3 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.02em;
}

/* ── Mobile landscape ───────────────────────────────────────────────────── */
/* The page's own landscape rule sets .hero{min-height:unset}. With the old
   fixed height gone that collapsed the hero and let the headline ride up
   under the fixed nav. Give it room for the nav plus its content instead. */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-h, 64px) + 16px);
    padding-bottom: 24px;
    align-items: center;
  }
  .hero-content {
    padding-top: 0;
    padding-bottom: 0;
    gap: 12px;
  }
  .hero-heading { font-size: clamp(24px, 4.6vh, 40px); }
  /* Keep the call CTA visible even though the page hides the sub and tag */
  .hero-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    width: auto;
  }
  .hero-actions > a { width: auto; min-height: 48px; font-size: 15px; }

  /* Landing pages are 844px wide in landscape, so the <=768px rules above
     do not apply — repeat the reordering here to keep the call CTA in view. */
  .page-hero { padding-top: calc(var(--nav-h, 64px) + 16px); padding-bottom: 24px; }
  .page-hero-inner  { display: flex; flex-direction: column; }
  .page-breadcrumb  { display: none; }
  .page-tag         { order: 1; margin-bottom: 8px; }
  .page-hero h1     { order: 2; font-size: clamp(24px, 5vh, 38px); }
  .page-hero-trust  { order: 3; margin-top: 10px; }
  .page-hero-actions{ order: 4; margin-top: 12px; flex-direction: row; flex-wrap: wrap; }
  .page-hero-actions > a { width: auto; min-height: 48px; font-size: 15px; }
  .page-hero-sub    { order: 5; margin-top: 14px; font-size: 14px; line-height: 1.45; }
}

/* ── Hero: compact service chips and stats on small screens ─────────────── */
@media (max-width: 767px) {
  .hero-content   { gap: 14px; }
  .hero-services  { order: 3; gap: 6px; }
  .hero-actions   { order: 4; }
  .hero-stats     { order: 5; gap: 12px 24px; padding-top: 16px; }
  .hero-sub       { order: 6; }

  .hero-services a   { min-height: 34px; padding: 6px 12px; font-size: 13px; }
  .hero-stat-num     { font-size: 24px; }
  .hero-stat-label   { font-size: 11px; letter-spacing: .04em; }
  /* Four stats across two tidy columns rather than a ragged wrap */
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; }
}

/* Mobile landscape is short — drop the extras, keep headline + call CTA */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-services, .hero-stats { display: none; }
}

/* Inline phone links in body copy must not rely on colour alone (WCAG 1.4.1) */
a.cta-phone:not([class*="btn-"]):not(.nav-cta):not(.partner-cta):not(.contact-phone):not(.error-cta) {
  text-decoration: underline;
}

/* Decorative USP numerals were rgba(255,255,255,.15) — about 1.3:1 */
.usp-num { color: rgba(255,255,255,.38); }

/* Section eyebrows: --mid (#9ca3af) on white is 2.53:1 */
.section-tag.dark-tag { color: #5b6471; }
.section-tag          { color: rgba(255,255,255,.85); }

/* `.faq-section.faq-dark .btn-link` (0,3,0) was tinting the pill's label to
   70% white over the blue fill — 3.85:1. Match its specificity. */
.faq-section.faq-dark a.btn-link.cta-phone,
.content-section a.btn-link.cta-phone,
a.btn-link.cta-phone {
  color: #fff;
  border-color: var(--cta-blue);
}

/* Partner block meta text on black: .35/.38 white is 3.0-3.4:1 */
.partner-tag  { color: rgba(255,255,255,.72); }
.partner-role { color: rgba(255,255,255,.72); }

/* Partner stat labels on black were .30 white — 2.5:1 */
.partner-stat-lbl { color: rgba(255,255,255,.72); }

/* Between 1024 and 1199 the text column is narrow enough that four stats
   break 3 + 1; a 2x2 grid reads better there. */
@media (min-width: 1024px) and (max-width: 1199px) {
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px; }
}
