/* ==========================================================================
   B.E.S.T Roofing — plain CSS
   Premium black / charcoal base with gold accents and warm white type.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --radius: 0.5rem;
  --radius-md: calc(var(--radius) - 2px);
  --radius-xl: calc(var(--radius) + 4px);

  --font-display: "Bebas Neue", "Arial Narrow", sans-serif;
  --font-sans: "Barlow", ui-sans-serif, system-ui, sans-serif;

  --background: oklch(0.145 0.006 260);
  --foreground: oklch(0.97 0.004 95);
  --card: oklch(0.185 0.008 260);
  --popover: oklch(0.185 0.008 260);
  --primary: oklch(0.76 0.125 86);
  --primary-foreground: oklch(0.16 0.02 80);
  --secondary: oklch(0.23 0.008 260);
  --muted-foreground: oklch(0.7 0.01 260);
  --accent: oklch(0.24 0.01 260);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 14%);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid var(--border);
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  font-family: var(--font-sans);
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-size: inherit;
  font-weight: 400;
  letter-spacing: 0.02em;
}

a { color: inherit; text-decoration: inherit; }
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
ul { list-style: none; }
button, input, select, textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
button { cursor: pointer; background: none; }
[hidden] { display: none !important; }

.icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1rem;
}
.container--narrow { max-width: 48rem; }

.section { padding-block: 4rem; }
.section--alt { background-color: var(--secondary); border-top: 1px solid var(--border); }

.grid { display: grid; gap: 1.5rem; }
.mt-10 { margin-top: 2.5rem; }

/* ---------- Typography helpers ---------- */
.muted { color: var(--muted-foreground); }
.text-primary { color: var(--primary); }

.section-heading::before {
  content: "";
  display: block;
  width: 3rem;
  height: 2px;
  margin-bottom: 0.75rem;
  background: linear-gradient(90deg, oklch(0.76 0.125 86), transparent);
}
.eyebrow {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--primary);
}
.section-heading h2 {
  margin-top: 0.25rem;
  font-size: 2.25rem;
  line-height: 2.5rem;
  color: var(--foreground);
}
.lead {
  margin-top: 1.5rem;
  max-width: 42rem;
  color: var(--muted-foreground);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}
.btn--gold {
  background-color: var(--primary);
  color: var(--primary-foreground);
}
.btn--gold:hover { background-color: color-mix(in oklab, var(--primary) 90%, transparent); }
.btn--outline {
  border: 1px solid var(--border);
  background-color: color-mix(in oklab, var(--background) 40%, transparent);
  color: var(--foreground);
}
.btn--outline:hover { border-color: var(--primary); color: var(--primary); }

.link-more {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--primary);
}
.link-more:hover { color: color-mix(in oklab, var(--primary) 80%, transparent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background-color: color-mix(in oklab, var(--background) 90%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header { background-color: color-mix(in oklab, var(--background) 75%, transparent); }
}
.header-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding-block: 0.75rem;
}
.brand { display: flex; min-width: 0; align-items: center; gap: 0.75rem; }
.brand-logo { display: flex; flex-shrink: 0; align-items: center; }
.brand-logo img { width: 3.5rem; height: 3.5rem; border-radius: var(--radius-md); }
.brand-text { min-width: 0; }
.brand-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--foreground);
}
.brand-sub {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  line-height: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--primary);
}

/* Desktop nav (hidden below 1024px) */
.main-nav { display: none; align-items: center; gap: 1.5rem; }
.nav-link {
  display: inline-block;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: color-mix(in oklab, var(--foreground) 80%, transparent);
}
.nav-link.is-active { color: var(--primary); }

.nav-dropdown { position: relative; }
.dropdown-panel {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: 50;
  width: 18rem;
  transform: translateX(-50%);
  padding-top: 0.75rem;
  transition: all 0.2s;
}
.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  visibility: visible;
  opacity: 1;
}
.dropdown-inner {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--popover);
  padding: 0.5rem;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}
.dropdown-inner a {
  display: block;
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: color-mix(in oklab, var(--foreground) 85%, transparent);
  transition: color 0.15s, background-color 0.15s;
}
.dropdown-inner a:hover { background-color: var(--accent); color: var(--primary); }
.dropdown-inner a.dropdown-all {
  margin-top: 0.25rem;
  border-top: 1px solid var(--border);
  font-weight: 600;
  color: var(--primary);
}

.phone-btn {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--radius-md);
  background-color: var(--primary);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--primary-foreground);
  transition: background-color 0.15s;
}
.phone-btn:hover { background-color: color-mix(in oklab, var(--primary) 90%, transparent); }

/* Mobile controls */
.mobile-controls { display: flex; flex-shrink: 0; align-items: center; gap: 0.5rem; }
.phone-btn--mobile {
  padding: 0.5rem 0.75rem;
  letter-spacing: normal;
  text-transform: none;
}
.phone-btn--mobile span { display: none; }
.menu-toggle {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  color: var(--foreground);
}
.menu-toggle .icon { width: 1.25rem; height: 1.25rem; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }

.mobile-menu {
  border-top: 1px solid var(--border);
  background-color: var(--background);
}
.mobile-menu .container { padding-block: 1rem; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu a {
  border-bottom: 1px solid var(--border);
  padding-block: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: color-mix(in oklab, var(--foreground) 85%, transparent);
}
.mobile-menu a.main {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--foreground);
}
.mobile-menu .mobile-label {
  margin-top: 1rem;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--primary);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 48vh;
}
.hero--tall { min-height: 72vh; }
.hero-slide {
  position: absolute;
  inset: 0;
  z-index: -20;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1500ms ease-in-out;
}
.hero-slide.is-active { opacity: 1; }
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -10;
  background-image: linear-gradient(
    to top,
    var(--background),
    color-mix(in oklab, var(--background) 60%, transparent),
    color-mix(in oklab, var(--background) 30%, transparent)
  );
}
.hero .container { position: relative; padding-block: 5rem; }
.hero h1 {
  margin-top: 0.5rem;
  max-width: 56rem;
  font-size: 3rem;
  line-height: 1.05;
  color: var(--foreground);
}
.eyebrow--hero { letter-spacing: 0.25em; }
.hero-subtitle {
  margin-top: 1.25rem;
  max-width: 42rem;
  font-size: 1rem;
  line-height: 1.5rem;
  color: color-mix(in oklab, var(--foreground) 80%, transparent);
}
.hero-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background-color: var(--card);
}
.card-pad { padding: 1.5rem; }
.card-pad-sm { padding: 1.25rem; }
.card > h3 { font-size: 1.5rem; line-height: 2rem; color: var(--foreground); }
.card > p { margin-top: 0.5rem; font-size: 0.875rem; line-height: 1.25rem; color: var(--muted-foreground); }

.cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }

.trust { border-bottom: 1px solid var(--border); padding-block: 3.5rem; }
.trust .icon { width: 1.75rem; height: 1.75rem; color: var(--primary); }
.trust h3 { margin-top: 0.75rem; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

/* Service card */
.service-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background-color: var(--card);
  transition: border-color 0.15s;
}
.service-card:hover { border-color: color-mix(in oklab, var(--primary) 60%, transparent); }
.service-card img { height: 12rem; width: 100%; object-fit: cover; }
.service-card-body { display: flex; flex: 1; flex-direction: column; padding: 1.25rem; }
.service-card h3 { font-size: 1.5rem; line-height: 2rem; color: var(--foreground); }
.service-card:hover h3 { color: var(--primary); }
.service-card p {
  margin-top: 0.5rem;
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--muted-foreground);
}
.service-card-more {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--primary);
}
.service-card-more .icon { transition: transform 0.15s; }
.service-card:hover .service-card-more .icon { transform: translateX(0.25rem); }

/* Gallery */
.gallery { gap: 1rem; }
.gallery figure {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}
.gallery img { height: 12rem; width: 100%; object-fit: cover; }
.gallery figcaption {
  background-color: var(--card);
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--muted-foreground);
}
.gallery--large { gap: 1.5rem; }
.gallery--large figure { background-color: var(--card); }
.gallery--large img { height: 18rem; }
.gallery--large figcaption { padding: 0.75rem 1rem; font-size: 0.875rem; line-height: 1.25rem; }

/* Area pills / list */
.pills { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.pills li {
  border: 1px solid var(--border);
  border-radius: 9999px;
  background-color: var(--card);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: color-mix(in oklab, var(--foreground) 90%, transparent);
}
.mt-8 { margin-top: 2rem; }
.area-list { gap: 1rem; }
.area-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background-color: var(--card);
  padding: 1rem 1.25rem;
}
.area-list .icon { width: 1.25rem; height: 1.25rem; color: var(--primary); }
.area-list span { color: color-mix(in oklab, var(--foreground) 90%, transparent); }

/* CTA band */
.cta-band {
  border-top: 1px solid var(--border);
  background-color: var(--secondary);
  padding-block: 4rem;
}
.cta-band .container { text-align: center; }
.cta-band h2 { font-size: 2.25rem; line-height: 2.5rem; color: var(--foreground); }
.cta-band p { margin: 1rem auto 0; max-width: 42rem; color: var(--muted-foreground); }
.cta-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }

.cta-band--small { padding-block: 3.5rem; }
.cta-band--small h2 { font-size: 1.875rem; line-height: 2.25rem; }
.cta-band--small p { margin-top: 0.75rem; }
.cta-band--small .cta-actions { margin-top: 1.75rem; }

/* Two-column text sections */
.two-col { display: grid; gap: 3rem; grid-template-columns: 1fr; }
.two-col p.muted { margin-top: 1.5rem; }
.two-col p.muted + p.muted { margin-top: 1.5rem; }
.about-text p.muted + p.muted { margin-top: 1rem; }

.panel { padding: 1.5rem; }
.panel h3 { font-size: 1.5rem; line-height: 2rem; color: var(--foreground); }

.check-list { margin-top: 1.25rem; }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: color-mix(in oklab, var(--foreground) 90%, transparent);
}
.check-list li + li { margin-top: 0.75rem; }
.check-list .icon { margin-top: 0.125rem; color: var(--primary); }

.why-list { margin-top: 1.25rem; }
.why-list li + li { margin-top: 1rem; }
.why-list .why-title { font-weight: 600; color: var(--primary); }
.why-list .why-text { font-size: 0.875rem; line-height: 1.25rem; color: var(--muted-foreground); }

/* ---------- Contact ---------- */
.contact-cards { margin-top: 2.5rem; }
a.contact-card { transition: border-color 0.15s; }
a.contact-card:hover { border-color: color-mix(in oklab, var(--primary) 60%, transparent); }
.contact-card .icon { width: 1.5rem; height: 1.5rem; color: var(--primary); }
.contact-card h3 { margin-top: 0.75rem; font-size: 1.25rem; line-height: 1.75rem; }
.card.contact-card > p { margin-top: 0.25rem; }
.break-all { word-break: break-all; }

.contact-split { display: grid; gap: 3rem; align-items: start; grid-template-columns: 1fr; }
.contact-split h2 { font-size: 1.875rem; line-height: 2.25rem; color: var(--foreground); }
.contact-split .form-card { padding: 1.5rem; }
.form-card > p { margin-top: 0.75rem; font-size: 0.875rem; line-height: 1.25rem; color: var(--muted-foreground); }
.form-wrap { margin-top: 1.5rem; }
.where p { margin-top: 0.75rem; color: var(--muted-foreground); }
.where p a { color: var(--primary); }
.where p a:hover { text-decoration: underline; }
.map-box {
  margin-top: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}
.map-box iframe { display: block; width: 100%; height: 400px; border: 0; }

.form { display: grid; gap: 1rem; }
.form-row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.form label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: var(--foreground);
}
.form label span { color: var(--primary); }
.field {
  width: 100%;
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  background-color: color-mix(in oklab, var(--background) 60%, transparent);
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--foreground);
}
.field::placeholder { color: var(--muted-foreground); }
.field:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 1px var(--primary);
}
select.field { appearance: auto; }
select.field option { background-color: var(--background); color: var(--foreground); }
textarea.field { resize: vertical; }
.form button[type="submit"] { border: 0; }
.form-note { margin-top: 0.75rem; font-size: 0.75rem; line-height: 1rem; color: var(--muted-foreground); }
.form-note.is-sent { font-size: 0.875rem; line-height: 1.25rem; color: var(--primary); }

/* ---------- Privacy policy ---------- */
.privacy h1 { font-size: 3rem; line-height: 1; color: var(--foreground); }
.privacy .updated { margin-top: 0.5rem; font-size: 0.875rem; line-height: 1.25rem; color: var(--muted-foreground); }
.privacy .body { margin-top: 2.5rem; color: var(--muted-foreground); }
.privacy .body > section + section { margin-top: 2rem; }
.privacy h2 { font-size: 1.5rem; line-height: 2rem; color: var(--foreground); }
.privacy p { margin-top: 0.75rem; }
.privacy a { color: var(--primary); }
.privacy a:hover { text-decoration: underline; }

/* ---------- 404 ---------- */
.not-found {
  display: flex;
  min-height: 60vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-inline: 1rem;
  text-align: center;
}
.not-found h1 { font-family: var(--font-sans); font-size: 4.5rem; line-height: 1; font-weight: 700; }
.not-found h2 { margin-top: 1rem; font-family: var(--font-sans); font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; }
.not-found p { margin-top: 0.5rem; font-size: 0.875rem; line-height: 1.25rem; color: var(--muted-foreground); }
.not-found .btn { margin-top: 1.5rem; padding: 0.5rem 1rem; font-weight: 500; text-transform: none; letter-spacing: normal; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background-color: var(--secondary); }
.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
  padding-block: 3.5rem;
}
.footer-logo { width: 4rem; height: 4rem; border-radius: var(--radius-md); }
.footer-about { margin-top: 1rem; max-width: 20rem; font-size: 0.875rem; line-height: 1.25rem; color: var(--muted-foreground); }
.site-footer h3 { font-size: 1.25rem; line-height: 1.75rem; color: var(--foreground); }
.footer-links { margin-top: 1rem; }
.footer-links li + li { margin-top: 0.5rem; }
.footer-links a {
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--muted-foreground);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--primary); }
.footer-contact { margin-top: 1rem; font-size: 0.875rem; line-height: 1.25rem; color: var(--muted-foreground); }
.footer-contact li + li { margin-top: 0.75rem; }
.footer-contact a,
.footer-contact li.row { display: flex; align-items: flex-start; gap: 0.5rem; }
.footer-contact a { transition: color 0.15s; }
.footer-contact a:hover { color: var(--primary); }
.footer-contact .icon { margin-top: 0.125rem; color: var(--primary); }
.footer-emergency {
  margin-top: 1rem;
  font-size: 0.75rem;
  line-height: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--primary);
}
.footer-bottom { border-top: 1px solid var(--border); }
.footer-bottom .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-block: 1.25rem;
}
.footer-bottom p,
.footer-bottom a { font-size: 0.75rem; line-height: 1rem; color: var(--muted-foreground); }
.footer-bottom a { transition: color 0.15s; }
.footer-bottom a:hover { color: var(--primary); }

/* ==========================================================================
   Responsive
   ========================================================================== */

/* sm — 640px */
@media (min-width: 40rem) {
  .container { padding-inline: 1.5rem; }
  .section { padding-block: 5rem; }
  .cta-band { padding-block: 5rem; }
  .cta-band--small { padding-block: 3.5rem; }

  .brand-logo img { width: 4rem; height: 4rem; }
  .phone-btn--mobile span { display: inline; }

  .section-heading h2,
  .cta-band h2 { font-size: 3rem; line-height: 1; }
  .cta-band--small h2,
  .contact-split h2 { font-size: 2.25rem; line-height: 2.5rem; }

  .hero h1 { font-size: 3.75rem; line-height: 1.05; }
  .hero-subtitle { font-size: 1.125rem; line-height: 1.75rem; }

  .cols-2, .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .panel, .contact-split .form-card { padding: 2rem; }
}

/* lg — 1024px */
@media (min-width: 64rem) {
  .container { padding-inline: 2rem; }

  .header-row { display: flex; justify-content: space-between; }
  .main-nav { display: flex; }
  .mobile-controls, .mobile-menu { display: none !important; }

  .hero h1 { font-size: 4.5rem; line-height: 1.05; }

  .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .two-col, .contact-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
