/* =============================================================
   FLAMEFIX — MAIN STYLES
   Mobile-first. Load order: tokens.css, then this file, then Google
   Fonts — all linked directly in <head> (base.njk), not @import'd
   here, so the browser can discover and fetch them in parallel
   instead of a blocking chain.
   ============================================================= */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
img, video, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }

/* ---- Base ---- */
html {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--text-primary);
  background: var(--surface-page);
  line-height: var(--lh-body);
  scroll-behavior: smooth;
}

body { min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; }

/* Focus ring — orange, always visible */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* Links */
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--link-hover); }

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  color: var(--text-primary);
}
h1 { font-size: var(--fs-3xl); letter-spacing: var(--ls-display); line-height: var(--lh-display); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl);  }
h4 { font-size: var(--fs-lg);  }
h5 { font-size: var(--fs-md);  }
h6 { font-size: var(--fs-base); }

p { max-width: var(--measure-prose); }
p + p { margin-top: var(--space-4); }

/* Prose article body */
.prose {
  font-size: var(--fs-base);
  line-height: var(--lh-prose);
  color: var(--text-primary);
  max-width: var(--measure-prose);
}
.prose h2 { margin-top: var(--space-8);  margin-bottom: var(--space-4); }
.prose h3 { margin-top: var(--space-6);  margin-bottom: var(--space-3); }
.prose p  { margin-bottom: var(--space-4); }
.prose ul, .prose ol { padding-left: var(--space-5); margin-bottom: var(--space-4); }
.prose li + li { margin-top: var(--space-2); }
.prose strong { font-weight: 600; }

/* ---- Layout containers ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.container--prose  { max-width: var(--container-prose);  }
.container--narrow { max-width: var(--container-narrow); }

/* Section vertical rhythm */
.section {
  padding-block: var(--section-y);
}
.section--alt  { background: var(--surface-alt); }
.section--band {
  background: var(--surface-band);
  color: var(--text-on-brand);
}
.section--band h2,
.section--band h3,
.section--band p { color: var(--text-on-brand); }

/* Full-bleed band (no negative margins) */
.band {
  background: var(--surface-band);
  color: var(--text-on-brand);
  padding-block: var(--space-6);
}

/* ---- Grid patterns ---- */
.grid--services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: var(--space-5);
}

.grid--content-aside {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}
@media (min-width: 900px) {
  .grid--content-aside {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

/* ---- Navigation ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-card);
  box-shadow: var(--shadow-xs);
}

/* Utility bar — green strip at top */
.util-bar {
  background: var(--green);
  color: var(--text-on-brand);
  font-size: var(--fs-xs);
  padding-block: var(--space-2);
}
.util-bar__inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-4);
}
.util-bar a {
  color: var(--text-on-brand);
  text-decoration: none;
  opacity: 0.9;
}
.util-bar a:hover { opacity: 1; }

/* Main nav bar */
.nav {
  padding-block: var(--space-3);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--text-primary);
}
.nav__logo-mark {
  display: block;
}
.nav__logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-lg);
  color: var(--green);
}

/* Desktop nav links */
.nav__links {
  display: none;
  list-style: none;
  gap: var(--space-5);
  align-items: center;
}
@media (min-width: 768px) {
  .nav__links { display: flex; }
}
.nav__links a {
  position: relative;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  padding-block: var(--space-2);
  transition: color var(--dur-fast) var(--ease-out);
}
.nav__links a:hover,
.nav__links a[aria-current="page"] { color: var(--green); }

/* Animated line above nav links on hover/active — excludes the phone pill button */
.nav__links a:not(.btn)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--dur-base) var(--ease-out);
}
.nav__links a:not(.btn):hover::before,
.nav__links a:not(.btn)[aria-current="page"]::before { transform: scaleX(1); }

/* Phone pill keeps white text on hover regardless of the .nav__links a:hover rule above */
.nav__links a.btn--primary:hover { color: var(--text-on-brand); }

/* Hamburger button */
.nav__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
}
@media (min-width: 768px) { .nav__toggle { display: none; } }
.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--dur-base) var(--ease-out),
              opacity var(--dur-fast) var(--ease-out);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav__mobile {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--border);
  padding-block: var(--space-4);
}
.nav__mobile.is-open { display: flex; }
.nav__mobile a {
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--border);
}
.nav__mobile a:last-child { border-bottom: none; }

/* Sticky phone pill on mobile */
.phone-pill {
  position: sticky;
  bottom: var(--space-4);
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 50;
  padding-inline: var(--container-pad);
}
.phone-pill a {
  pointer-events: all;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--orange-display);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-base);
  font-feature-settings: 'tnum' 1;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-cta);
  transition: transform var(--dur-base) var(--ease-bounce),
              box-shadow var(--dur-base) var(--ease-out);
}
.phone-pill a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
@media (min-width: 768px) { .phone-pill { display: none; } }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-base);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  transition: transform var(--dur-base) var(--ease-bounce),
              box-shadow var(--dur-base) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
  min-height: 44px; /* touch target */
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Primary — pill, orange, one per viewport */
.btn--primary {
  background: var(--orange-display);
  color: var(--text-primary);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-cta);
}
.btn--primary:hover {
  background: var(--orange-deep);
  box-shadow: var(--shadow-hover);
  color: var(--text-on-brand);
}

/* Secondary — green outlined */
.btn--secondary {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}
.btn--secondary:hover {
  background: var(--green);
  color: var(--text-on-brand);
}

/* Ghost — for use on green bands */
.btn--ghost {
  background: rgba(255,255,255,0.08);
  color: var(--text-on-brand);
  border-color: rgba(255,255,255,0.4);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.22);
  color: var(--text-on-brand);
}

/* ---- Hero ---- */
.hero {
  background: var(--green);
  color: var(--text-on-brand);
  padding-block: clamp(3rem, 10vw, 7rem);
  position: relative;
  overflow: hidden;
}
.hero__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  align-items: flex-start;
}
@media (min-width: 768px) {
  .hero__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.hero__content { flex: 1; max-width: 600px; }
.hero__eyebrow {
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  margin-bottom: var(--space-3);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-3xl);
  letter-spacing: var(--ls-display);
  line-height: var(--lh-display);
  max-width: 16ch;
  color: var(--text-on-brand);
  margin-bottom: var(--space-5);
}
.hero__title em {
  font-style: normal;
  color: var(--orange-bright);
}
.hero__lead {
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: rgba(255,255,255,0.9);
  max-width: var(--measure-lead);
  margin-bottom: var(--space-6);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}
.hero__mascot {
  display: none;
  flex-shrink: 0;
  width: clamp(180px, 20vw, 280px);
}
.hero__mascot img {
  display: block;
  width: 100%;
  height: auto;
}
@media (min-width: 768px) { .hero__mascot { display: block; } }

/* ---- Service cards ---- */
.service-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.service-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  color: var(--text-primary);
}
.service-card--primary {
  border-color: var(--green-tint);
  background: linear-gradient(135deg, var(--surface-card) 0%, var(--green-tint) 100%);
}
.service-card__icon {
  width: 44px;
  height: 44px;
  background: var(--green-tint);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
}
.service-card--primary .service-card__icon {
  background: var(--green);
  color: var(--text-on-brand);
}
.service-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-lg);
  color: var(--text-primary);
}
.service-card__summary {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-body);
  max-width: none;
}
.service-card__link {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--green);
  margin-top: auto;
}

/* ---- Review / testimonial card ---- */
.review-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange-display);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
}
.review-card__quote {
  font-size: var(--fs-base);
  line-height: var(--lh-prose);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  max-width: none;
}
.review-card__name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--orange);
}
.review-card__place {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}
.stars {
  display: flex;
  gap: 2px;
  margin-bottom: var(--space-2);
}
.stars__star {
  width: 16px;
  height: 16px;
}
.stars__star--filled {
  fill: var(--orange-display);
}
.stars__star--empty {
  fill: var(--n-200);
}

/* ---- Trust badges (certifications) ---- */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  align-items: center;
  justify-content: center;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}
.trust-badge img {
  height: 40px;
  width: auto;
  opacity: 0.8;
}

/* ---- FAQ accordion ---- */
.faq-list { display: flex; flex-direction: column; gap: var(--space-2); }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-item__btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  background: var(--surface-card);
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-base);
  color: var(--text-primary);
  gap: var(--space-4);
  min-height: 44px;
  transition: background var(--dur-fast) var(--ease-out);
}
.faq-item__btn:hover { background: var(--surface-alt); }
.faq-item__btn[aria-expanded="true"] { color: var(--green); }
.faq-item__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform var(--dur-base) var(--ease-out);
  color: var(--text-secondary);
}
.faq-item__btn[aria-expanded="true"] .faq-item__icon { transform: rotate(45deg); }
.faq-item__body {
  display: none;
  padding: 0 var(--space-5) var(--space-4);
  font-size: var(--fs-sm);
  line-height: var(--lh-prose);
  color: var(--text-secondary);
  background: var(--surface-card);
}
.faq-item__body.is-open { display: block; }

/* ---- CTA section band ---- */
.cta-band {
  background: var(--green);
  color: var(--text-on-brand);
  padding-block: var(--space-10);
  text-align: center;
}
.cta-band h2 {
  color: var(--text-on-brand);
  margin-bottom: var(--space-3);
}
.cta-band p {
  color: rgba(255,255,255,0.85);
  margin-inline: auto;
  max-width: var(--measure-lead);
  margin-bottom: var(--space-6);
}
.cta-band .btn--primary { font-size: var(--fs-lg); padding: var(--space-4) var(--space-8); }

/* Phone display */
.phone-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-feature-settings: 'tnum' 1;
  font-weight: 600;
  text-decoration: none;
  color: var(--green);
}
.phone-link:hover { color: var(--orange); }
.phone-link--large { font-size: var(--fs-xl); }
.phone-link--onband { color: var(--text-on-brand); }
.phone-link--onband:hover { color: rgba(255,255,255,0.8); }

/* ---- Breadcrumbs ---- */
.breadcrumb {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  list-style: none;
  padding-block: var(--space-4);
}
.breadcrumb li + li::before {
  content: '/';
  color: var(--n-300);
}
.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--green); }
.breadcrumb [aria-current="page"] { color: var(--text-primary); font-weight: 500; }

/* ---- Footer ---- */
.site-footer {
  background: var(--green-deep);
  color: rgba(255,255,255,0.85);
  padding-block: var(--space-10) var(--space-6);
  margin-top: auto;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}
@media (min-width: 640px) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .footer__grid { grid-template-columns: 2fr 1fr 1fr; }
}
.footer__brand-name {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--text-on-brand);
  margin-bottom: var(--space-2);
}
.footer__tagline {
  font-size: var(--fs-sm);
  margin-bottom: var(--space-4);
  max-width: none;
}
.footer__heading {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--text-on-brand);
  margin-bottom: var(--space-4);
}
.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer__links a {
  position: relative;
  display: inline-block;
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.footer__links a:hover { color: var(--text-on-brand); }

/* Animated underline on footer links, mirrors the nav's hover-line */
.footer__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--dur-base) var(--ease-out);
}
.footer__links a:hover::after { transform: scaleX(1); }
.footer__phone {
  font-size: var(--fs-xl);
  font-weight: 700;
  font-feature-settings: 'tnum' 1;
  color: var(--orange-bright);
  text-decoration: none;
  display: block;
  margin-bottom: var(--space-2);
}
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-xs);
}

/* ---- Utility classes ---- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.eyebrow {
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: var(--space-2);
}
.section__heading {
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-3);
}
.section__lead {
  font-size: var(--fs-md);
  color: var(--text-secondary);
  max-width: var(--measure-lead);
  margin-bottom: var(--space-8);
}
.text-center { text-align: center; }
.text-center p { margin-inline: auto; }
