/* Components: header, nav, buttons, cards, CTA band, FAQ, breadcrumbs, page hero, footer, form */

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(14 15 17 / 96%);
  color: var(--bone);
  backdrop-filter: blur(8px);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: var(--stripe-dash);
  opacity: 0.9;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-right: auto;
  color: var(--bone);
  text-decoration: none;
}

.brand__mark {
  width: 2.6rem;
  height: 2.6rem;
  outline: 1px solid rgb(255 194 26 / 35%);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: 0.03em;
}

.brand__tag {
  margin-top: 0.1rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--line);
}

.header-call {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.9rem;
  background: var(--line);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.header-call:hover {
  background: var(--line-hot);
}

.header-call__num {
  display: none;
}

.nav-toggle {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  padding: 0;
  border: 1px solid var(--rule-dark);
  background: transparent;
  color: var(--bone);
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1.4rem;
  height: 2px;
  background: currentcolor;
  transition:
    transform 0.25s var(--ease),
    opacity 0.2s;
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -7px;
}

.nav-toggle__bars::after {
  top: 7px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav panel */
.site-nav {
  position: fixed;
  inset: 4.5rem 0 0;
  z-index: 40;
  display: none;
  overflow-y: auto;
  padding: 1.25rem var(--gutter) 3rem;
  background: var(--ink);
  border-top: 1px solid var(--rule-dark);
}

.site-nav.is-open {
  display: block;
}

.nav-list,
.nav-sub {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-item {
  border-bottom: 1px solid var(--rule-dark);
}

.nav-link {
  display: block;
  padding: 0.9rem 0;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.03em;
  color: var(--bone);
  text-decoration: none;
}

.nav-link[aria-current="page"],
.nav-sub a[aria-current="page"] {
  color: var(--line);
}

.nav-sub {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.25rem 1rem;
  padding-bottom: 1rem;
}

.nav-sub a {
  display: block;
  padding: 0.4rem 0;
  color: var(--muted-dark);
  text-decoration: none;
}

.nav-sub a:hover {
  color: var(--line);
}

.nav-item--cta .nav-link {
  color: var(--line);
}

@media (width >= 30em) {
  .header-call__num {
    display: inline;
  }

  .header-call__label {
    display: none;
  }
}

@media (width >= 64em) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    display: block;
    overflow: visible;
    padding: 0;
    background: none;
    border: 0;
  }

  .nav-list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }

  .nav-item {
    position: relative;
    border: 0;
  }

  .nav-link {
    padding: 0.6rem 0.8rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  .nav-link:hover {
    color: var(--line);
  }

  .has-sub > .nav-link::after {
    content: "";
    display: inline-block;
    width: 0.45em;
    height: 0.45em;
    margin-left: 0.45em;
    border-right: 2px solid currentcolor;
    border-bottom: 2px solid currentcolor;
    transform: translateY(-0.2em) rotate(45deg);
  }

  .nav-sub {
    position: absolute;
    top: 100%;
    left: 0;
    display: block;
    min-width: 15rem;
    padding: 0.6rem;
    background: var(--ink);
    border-top: 3px solid var(--line);
    box-shadow: var(--shadow-dark);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition:
      opacity 0.18s,
      transform 0.18s var(--ease),
      visibility 0.18s;
  }

  .nav-sub--grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-width: 22rem;
  }

  .nav-sub a {
    padding: 0.5rem 0.7rem;
    font-size: 0.95rem;
  }

  .nav-sub a:hover {
    background: var(--asphalt-2);
  }

  .has-sub:hover > .nav-sub,
  .has-sub:focus-within > .nav-sub {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-item--cta .nav-link {
    margin-left: 0.4rem;
    border: 2px solid var(--line);
  }

  .header-inner {
    gap: 1.25rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.5rem 0.85rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.18s,
    color 0.18s,
    transform 0.18s var(--ease),
    box-shadow 0.18s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn .icon--arrow {
  transition: transform 0.2s var(--ease);
}

.btn:hover .icon--arrow {
  transform: translateX(4px);
}

.btn--primary {
  background: var(--line);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}

.btn--primary:hover {
  background: var(--line-hot);
  box-shadow: 6px 6px 0 var(--ink);
}

.section--dark .btn--primary,
.section--ink .btn--primary,
.page-hero .btn--primary,
.home-hero .btn--primary,
.hazard-cta .btn--primary {
  box-shadow: 4px 4px 0 rgb(250 248 243 / 18%);
}

.btn--ghost {
  border-color: var(--bone);
  color: var(--bone);
  background: rgb(14 15 17 / 35%);
}

.btn--ghost:hover {
  background: var(--bone);
  color: var(--ink);
}

.btn--ghost-dark {
  border-color: var(--ink);
  color: var(--ink);
}

.btn--ghost-dark:hover {
  background: var(--ink);
  color: var(--bone);
}

.btn--block {
  width: 100%;
}

.cta-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: var(--space-m);
}

/* Card grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: clamp(1rem, 0.6rem + 1.4vw, 1.75rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.card-grid--cities {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
}

.card-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.card-more .icon {
  transition: transform 0.2s var(--ease);
}

a:hover .card-more .icon {
  transform: translateX(5px);
}

/* Service card: dark card, works on light and dark sections */
.service-card__link,
.city-card__link,
.post-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s;
}

.service-card__link {
  background: var(--asphalt);
  color: var(--bone);
  border-bottom: 4px solid var(--line);
  box-shadow: var(--shadow);
}

.service-card__link:hover,
.city-card__link:hover,
.post-card__link:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-dark);
}

.service-card__media,
.city-card__media,
.post-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--asphalt-3);
}

.service-card__media img,
.city-card__media img,
.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.6s var(--ease),
    filter 0.4s;
}

.service-card__link:hover img,
.city-card__link:hover img,
.post-card__link:hover img {
  transform: scale(1.05);
}

.service-card__body,
.city-card__body,
.post-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.4rem 1.4rem 1.5rem;
}

.service-card__num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--line);
}

.service-card__title {
  margin: 0.2rem 0 0.6rem;
  color: var(--bone);
}

.service-card__body p {
  color: var(--muted-dark);
}

.service-card .card-more {
  color: var(--line);
}

/* City card */
.city-card__link {
  background: var(--bone);
  color: var(--text);
  border: 1px solid var(--rule-light);
  box-shadow: var(--shadow);
}

.city-card__media {
  aspect-ratio: 16 / 9;
}

.city-card__media img {
  filter: saturate(0.85);
}

.city-card__title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  font-size: var(--step-2);
  color: var(--ink);
}

.city-card__title .icon {
  color: var(--ink);
  background: var(--line);
  padding: 0.15rem;
}

.city-card__body p {
  font-size: 0.95rem;
  color: var(--muted);
}

.city-card .card-more {
  color: var(--ink);
}

/* Post card */
.post-card__link {
  background: var(--bone);
  color: var(--text);
  border: 1px solid var(--rule-light);
  box-shadow: var(--shadow);
}

.post-card__meta {
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-card__title {
  margin-bottom: 0.6rem;
  font-size: clamp(1.5rem, 1.3rem + 0.6vw, 1.85rem);
  color: var(--ink);
}

.post-card__body p:not(.post-card__meta) {
  font-size: 0.95rem;
  color: var(--muted);
}

.post-card .card-more {
  color: var(--ink);
}

/* Hazard CTA band */
.hazard-cta {
  padding-block: 18px;
  background: var(--hazard);
}

.hazard-cta__panel {
  display: grid;
  gap: var(--space-m);
  align-items: center;
  padding: clamp(2rem, 1rem + 4vw, 4rem) clamp(1.25rem, 0.5rem + 3vw, 3.5rem);
  background: var(--ink);
  color: var(--bone);
  box-shadow: 0 0 0 4px var(--ink);
}

.hazard-cta__title {
  margin-bottom: 0.35em;
  font-size: var(--step-3);
}

.hazard-cta__panel p {
  margin: 0;
  max-width: 40rem;
  color: var(--muted-dark);
}

.hazard-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.hazard-cta__phone {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.6rem + 3.4vw, 4.25rem);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--line);
  text-decoration: none;
}

.hazard-cta__phone .icon {
  width: 0.7em;
  height: 0.7em;
}

.hazard-cta__phone:hover span {
  text-decoration: underline;
  text-decoration-thickness: 3px;
}

@media (width >= 60em) {
  .hazard-cta__panel {
    grid-template-columns: 1.3fr 1fr;
  }

  .hazard-cta__actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* FAQ */
.faq {
  display: grid;
  gap: 0.75rem;
  max-width: 54rem;
}

.faq__item {
  background: var(--bone);
  border: 1px solid var(--rule-light);
  border-left: 5px solid var(--ink);
  transition: border-color 0.2s;
}

.faq__item[open] {
  border-left-color: var(--line);
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  font-weight: 700;
  font-size: var(--step-1);
  line-height: 1.3;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq__q::-webkit-details-marker {
  display: none;
}

.faq__q::after {
  content: "";
  flex: none;
  width: 2rem;
  height: 2rem;
  background:
    linear-gradient(var(--line), var(--line)) center / 14px 3px no-repeat,
    linear-gradient(var(--line), var(--line)) center / 3px 14px no-repeat,
    var(--ink);
  transition: transform 0.25s var(--ease);
}

.faq__item[open] .faq__q::after {
  transform: rotate(45deg);
}

.faq__a {
  padding: 0 1.25rem 1.1rem;
}

.faq__a p {
  margin: 0;
  color: var(--muted);
}

.section--dark .faq__item,
.section--ink .faq__item {
  background: var(--asphalt-2);
  border-color: var(--asphalt-3);
  border-left-color: var(--muted-dark);
}

.section--dark .faq__item[open],
.section--ink .faq__item[open] {
  border-left-color: var(--line);
}

.section--dark .faq__q,
.section--ink .faq__q {
  color: var(--bone);
}

.section--dark .faq__q::after,
.section--ink .faq__q::after {
  background:
    linear-gradient(var(--ink), var(--ink)) center / 14px 3px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 3px 14px no-repeat,
    var(--line);
}

/* Breadcrumbs */
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted-dark);
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.3rem;
  color: var(--line);
}

.breadcrumbs a {
  color: var(--bone);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--line);
}

/* Page hero (inner pages) */
.page-hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: clamp(30rem, 62vh, 40rem);
  padding-block: clamp(6rem, 4rem + 8vw, 9rem) var(--space-l);
  background: var(--ink);
  color: var(--bone);
  isolation: isolate;
  overflow: hidden;
}

.page-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.page-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      90deg,
      rgb(14 15 17 / 94%) 0%,
      rgb(14 15 17 / 80%) 45%,
      rgb(14 15 17 / 35%) 100%
    ),
    linear-gradient(0deg, rgb(14 15 17 / 85%) 0%, rgb(14 15 17 / 0%) 45%);
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 6px;
  background: var(--stripe-dash);
}

.page-hero__inner {
  max-width: var(--container);
}

.page-hero__title {
  max-width: 16ch;
  margin-bottom: 0.3em;
  font-size: var(--step-4);
  color: var(--bone);
}

.page-hero__lead {
  max-width: 40rem;
  margin: 0;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--paper-2);
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--muted-dark);
}

.footer-grid {
  display: grid;
  gap: var(--space-l);
  padding-block: var(--space-section) var(--space-l);
}

@media (width >= 48em) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

.footer-brand p {
  max-width: 24rem;
  margin-top: 1.25rem;
  font-size: 0.95rem;
}

.footer-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--line);
  text-decoration: none;
}

.footer-phone:hover {
  color: var(--line-hot);
}

.footer-title {
  margin-bottom: 1rem;
  font-size: 1.6rem;
  color: var(--bone);
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: var(--muted-dark);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--line);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.5rem 2rem;
  border-top: 1px solid var(--rule-dark);
  font-size: 0.85rem;
}

.footer-bottom p {
  margin: 0;
}

/* Form */
.estimate-form {
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.25rem, 0.8rem + 2vw, 2.5rem);
  background: var(--bone);
  border: 1px solid var(--rule-light);
  border-top: 6px solid var(--line);
  box-shadow: var(--shadow);
}

.estimate-form[hidden],
.form-thankyou[hidden] {
  display: none;
}

.form-row {
  display: grid;
  gap: 1.1rem;
}

@media (width >= 40em) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.form-field {
  display: grid;
  gap: 0.35rem;
}

.form-field label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}

.form-field .optional {
  font-weight: 500;
  color: var(--muted);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 2px solid #8c8f95;
  border-radius: var(--radius-s);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.form-field textarea {
  min-height: 9rem;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--ink);
  outline: 3px solid var(--line);
  outline-offset: 0;
}

.form-field [aria-invalid="true"] {
  border-color: var(--danger);
}

.form-field__error {
  display: none;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--danger);
}

.form-field__error.is-visible {
  display: block;
}

.form-status {
  display: none;
  padding: 1rem;
  border-left: 5px solid var(--danger);
  background: #fbe9e7;
  color: #5c1410;
  font-weight: 600;
}

.form-status.is-visible {
  display: block;
}

.form-status a {
  color: inherit;
}

.form-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.form-thankyou {
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  background: var(--ink);
  color: var(--bone);
  border-top: 6px solid var(--line);
}

.form-thankyou h2 {
  color: var(--line);
}

.form-thankyou p {
  color: var(--paper-2);
}

.form-thankyou a {
  color: var(--line);
}

/* Reveal on scroll (JS adds .js to <html>; without JS everything is visible) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
      opacity 0.7s var(--ease),
      transform 0.7s var(--ease);
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (width < 30em) {
  .brand__name {
    font-size: 1.6rem;
  }

  .brand__tag {
    font-size: 0.56rem;
    letter-spacing: 0.12em;
    white-space: nowrap;
  }
}

.page-hero__lead a {
  color: var(--line);
}
