:root {
  color-scheme: light;
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #ebe8df;
  --ink: #181a1c;
  --muted: #5c6268;
  --line: #d7d2c6;
  --brand: #b5281d;
  --brand-dark: #7a1711;
  --steel: #2f4b5b;
  --teal: #0f6d68;
  --gold: #c8922d;
  --shadow: 0 18px 50px rgba(38, 42, 45, 0.14);
  --radius: 8px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 245, 241, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.utility-bar,
.main-nav,
main > section,
.site-footer {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.utility-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  min-height: 34px;
  color: var(--muted);
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(215, 210, 198, 0.7);
}

.utility-bar span {
  margin-right: auto;
  color: var(--steel);
  font-weight: 700;
}

.main-nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 270px;
}

.amfss-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 46px;
  border-radius: 6px;
  background: transparent;
  border: 2px solid var(--brand);
  color: var(--brand);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.amfss-logo {
  width: 54px;
  height: 46px;
  object-fit: contain;
}

.brand-divider {
  width: 1px;
  height: 34px;
  background: var(--line);
}

.buyfirestop-logo {
  width: 148px;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--steel);
  font-weight: 700;
  font-size: 0.95rem;
}

.nav-action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 800;
}

.nav-action {
  background: var(--brand);
  color: #fff;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 36px;
  align-items: stretch;
  padding: 52px 0 36px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 8px 0 24px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.16);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

h1 {
  max-width: 770px;
  margin-bottom: 22px;
  font-size: clamp(2.35rem, 5vw, 5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(1.75rem, 3vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
  line-height: 1.2;
}

.hero-brand-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.amfss-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.amfss-badge-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: var(--steel);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.amfss-badge-text strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--steel);
}

.hero-brand-divider {
  width: 48px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

.hero-lede {
  max-width: 670px;
  color: var(--muted);
  font-size: 1.2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 38px;
}

.button.primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 22px rgba(181, 40, 29, 0.18);
}

.button.secondary {
  border-color: var(--steel);
  background: transparent;
  color: var(--steel);
}

.button.quiet {
  border-color: var(--line);
  background: var(--surface);
  color: var(--steel);
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 620px;
  margin: 0;
}

.trust-strip div {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.trust-strip dt {
  color: var(--steel);
  font-size: 1.6rem;
  font-weight: 900;
}

.trust-strip dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-media {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  border-radius: var(--radius);
  background: #1b242b;
  box-shadow: var(--shadow);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-note {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: grid;
  gap: 4px;
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.media-note span {
  color: var(--muted);
}

main > section:not(.hero) {
  padding: 68px 0;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-heading.split {
  max-width: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.text-link {
  color: var(--brand);
  font-weight: 900;
  border-bottom: 2px solid currentColor;
}

.domain-grid,
.category-grid,
.product-grid,
.flow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.domain-grid article,
.category-card,
.product-card,
.flow-grid article {
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.domain-label,
.product-brand,
.flow-step {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--steel);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.domain-label.accent,
.product-brand {
  background: rgba(181, 40, 29, 0.11);
  color: var(--brand-dark);
}

.category-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.category-card {
  color: var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.category-card:hover,
.category-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.category-card span {
  display: block;
  margin-bottom: 42px;
  color: var(--gold);
  font-weight: 900;
}

.product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-card {
  display: flex;
  flex-direction: column;
}

.product-card p {
  color: var(--muted);
}

.product-card.is-hidden {
  display: none;
}

.sku {
  color: var(--steel);
  font-size: 0.82rem;
  font-weight: 900;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-weight: 900;
}

.product-footer a {
  color: var(--brand);
}

.industry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
  gap: 28px;
  align-items: stretch;
}

.industry-copy,
.logo-panel {
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.check-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
}

.check-list li {
  padding-left: 28px;
  position: relative;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 12px;
  height: 12px;
  background: var(--teal);
  border-radius: 50%;
}

.logo-panel {
  display: grid;
  place-items: center;
  gap: 28px;
}

.logo-panel img {
  max-height: 80px;
  object-fit: contain;
}

.support-flow {
  background: var(--steel);
  color: #fff;
  width: 100%;
  max-width: none;
  padding-right: max(16px, calc((100% - var(--container)) / 2));
  padding-left: max(16px, calc((100% - var(--container)) / 2));
}

.support-flow .section-heading,
.support-flow .flow-grid {
  width: min(var(--container), 100%);
  margin-right: auto;
  margin-left: auto;
}

.support-flow .eyebrow {
  color: #f1c067;
}

.support-flow h2 {
  color: #fff;
}

.flow-grid article {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.flow-grid p {
  color: rgba(255, 255, 255, 0.78);
}

.flow-step {
  background: #fff;
  color: var(--steel);
}

main > section.quote-band {
  padding: 56px;
}

.quote-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 48px;
  align-items: start;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.quote-panel {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0 8px;
}

.quote-form {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 320px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #faf9f6;
}

.quote-form label {
  display: grid;
  gap: 6px;
  color: var(--steel);
  font-size: 0.9rem;
  font-weight: 900;
}

.quote-form input,
.quote-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.about {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.about-media {
  overflow: hidden;
  max-height: 520px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-copy {
  max-width: 650px;
}

.about-copy p {
  color: var(--muted);
}

.site-footer {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 34px 0 44px;
  border-top: 1px solid var(--line);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand span {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.footer-legal a {
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

@media (max-width: 980px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    inset: 112px 16px auto 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  body.nav-open .nav-links {
    display: flex;
  }

  .hero,
  .industry-layout,
  .quote-band,
  .about {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-media {
    min-height: auto;
  }

  .hero-media {
    aspect-ratio: 4 / 3;
  }

  .hero-media img {
    object-position: center top;
  }

  .domain-grid,
  .product-grid,
  .flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .utility-bar {
    display: none;
  }

  .main-nav {
    min-height: 72px;
  }

  .brand-lockup {
    min-width: 0;
  }

  .brand-divider,
  .buyfirestop-logo {
    display: none;
  }

  .nav-links {
    inset: 88px 16px auto 16px;
  }

  .hero-media {
    aspect-ratio: 4 / 5;
    max-height: 560px;
  }

  .hero {
    padding-top: 28px;
  }

  .hero-copy {
    padding: 16px 0;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .trust-strip,
  .domain-grid,
  .category-grid,
  .product-grid,
  .flow-grid {
    grid-template-columns: 1fr;
  }

  .section-heading.split {
    align-items: start;
    flex-direction: column;
  }

  main > section.quote-band {
    padding: 24px;
  }

  .quote-panel {
    justify-content: center;
    padding: 0 4px;
  }

  .quote-form {
    max-width: 100%;
    padding: 22px;
  }
}

/* ─── Legal pages ─────────────────────────────────────────── */
.legal-nav {
  width: min(var(--container), calc(100% - 32px));
  margin: 24px auto 0;
  font-size: 0.9rem;
}
.legal-nav a { color: var(--steel); }

.legal-page {
  width: min(780px, calc(100% - 32px));
  margin: 32px auto 80px;
}
.legal-page h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 8px; }
.legal-date { color: var(--muted); margin-bottom: 40px; font-size: 0.9rem; }
.legal-page h2 { font-size: 1.2rem; margin-top: 36px; margin-bottom: 8px; color: var(--steel); }
.legal-page p, .legal-page li { color: var(--muted); line-height: 1.7; }
.legal-page ul, .legal-page ol { padding-left: 1.4em; }
.legal-page a { color: var(--brand); }

.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, calc(100% - 32px));
  z-index: 100;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.28);
}

.cookie-banner[hidden] { display: none; }

.cookie-banner-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  flex-wrap: wrap;
}

.cookie-banner-inner p {
  flex: 1;
  margin: 0;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.8);
  min-width: 220px;
}

.cookie-banner-inner a {
  color: #fff;
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-banner-actions .button {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.85rem;
}

.cookie-banner-actions .button.primary {
  background: var(--brand);
  box-shadow: none;
}

.cookie-banner-actions .button.secondary {
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}
