/* components.css — single job: the reusable pieces. */

/* ---------- Hazard stripe + header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--dur-mid) var(--ease-out),
    border-color var(--dur-mid) ease;
}

.header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 12px 26px -24px rgba(14, 31, 68, 0.6);
}

.stripe {
  height: 9px;
  background: repeating-linear-gradient(
    -45deg,
    var(--navy) 0 20px,
    var(--accent) 20px 40px
  );
}

.header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
  padding-block: 0.7rem;
}

.header__logo img {
  height: 62px;
  width: auto;
  transition: height var(--dur-mid) var(--ease-out);
}

.header.is-scrolled .header__logo img {
  height: 50px;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 0.3rem + 1.2vw, 1.9rem);
}

.nav__link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  transition: color var(--dur-fast) ease;
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--accent);
}

.header__phone {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  padding-left: clamp(0.6rem, 0.3rem + 1vw, 1.2rem);
  border-left: 1px solid var(--line);
}

.header__phone-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.header__phone-number {
  font-weight: 700;
  color: var(--heading);
  white-space: nowrap;
}

.header__phone-number:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 40px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--heading);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) ease;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: relative;
}

.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 4px; }

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

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

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) ease,
    border-color var(--dur-fast) ease, color var(--dur-fast) ease;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.btn--accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 24px -14px rgba(216, 31, 38, 0.8);
}

.btn--accent:hover,
.btn--accent:focus-visible {
  background: var(--accent-2);
  transform: translateY(-2px);
}

.btn--outline {
  background: #fff;
  border-color: var(--line-2);
  color: var(--heading);
}

.btn--outline:hover,
.btn--outline:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn--sm {
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step-eyebrow);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--gap-sm);
}

.accent-text {
  color: var(--accent);
}

/* ---------- Stat panel ---------- */
.stat-panel {
  width: min(100%, 26rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stat {
  padding: 1.15rem 1.3rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat:nth-child(2n) { border-right: 0; }
.stat:nth-last-child(-n + 2) { border-bottom: 0; }

.stat__value {
  font-family: var(--font-display);
  font-size: 1.65rem;
  line-height: 1;
  color: var(--accent);
  text-transform: uppercase;
}

.stat__label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: #fff;
  padding-block: 0.85rem;
}

.marquee__track {
  display: flex;
  width: max-content;
}

.marquee__item {
  display: flex;
  align-items: center;
  gap: 2.4rem;
  padding-right: 2.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.marquee__item::after {
  content: "•";
  color: var(--accent);
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-mid) var(--ease-out),
    box-shadow var(--dur-mid) var(--ease-out), border-color var(--dur-mid) ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-5px);
  border-color: var(--line-2);
  box-shadow: var(--shadow);
}

.card--featured {
  border-top: 3px solid var(--accent);
  background: linear-gradient(to bottom, var(--accent-soft), var(--card) 55%);
}

.card__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: var(--gap-md);
}

.card__icon svg {
  width: 21px;
  height: 21px;
}

.card h3 {
  margin-bottom: 0.5rem;
  color: var(--heading);
}

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

.card__list {
  margin-top: var(--gap-md);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.45rem;
  font-size: 0.87rem;
  color: var(--text);
}

.card__list li {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}

.card__list li::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- Check list ---------- */
.checklist {
  display: grid;
  gap: 0.7rem;
  margin-top: var(--gap-md);
}

.checklist li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  color: var(--text);
}

.checklist li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
  line-height: 1.6;
}

/* ---------- Facility card ---------- */
.facility {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.3rem, 1rem + 1vw, 1.9rem);
  display: grid;
  gap: var(--gap-md);
  align-content: start;
}

.facility > .btn {
  justify-self: start;
}

.facility h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.facility__row {
  display: grid;
  gap: 0.15rem;
  justify-items: start;
  padding-top: var(--gap-md);
  border-top: 1px solid var(--line);
}

.facility__label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.facility__value {
  font-weight: 700;
  color: var(--heading);
}

a.facility__value:hover {
  color: var(--accent);
}

.facility__note {
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- Status chip ---------- */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem 0.3rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}

.status__beacon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #17a06a;
  flex: none;
}

.status__time {
  color: var(--muted);
}

/* ---------- Map ---------- */
.map-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-height: 22rem;
  height: 100%;
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 22rem;
  border: 0;
  filter: saturate(0.82) contrast(1.02);
}

/* ---------- Steps ---------- */
.step {
  padding-top: var(--gap-sm);
  border-top: 2px solid var(--line-2);
}

.step__no {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

.step h3 {
  margin-bottom: 0.3rem;
}

.step p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--navy);
  border-radius: var(--r);
  padding: clamp(1.8rem, 1.2rem + 2.5vw, 3rem);
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-md);
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}

.cta-band h2,
.cta-band p {
  color: #fff;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.78);
  margin-top: 0.5rem;
  max-width: 42ch;
}

.cta-band .btn--accent {
  background: #fff;
  color: var(--navy);
  box-shadow: none;
}

.cta-band .btn--accent:hover,
.cta-band .btn--accent:focus-visible {
  background: var(--accent);
  color: #fff;
}

.cta-band .btn--outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.cta-band .btn--outline:hover {
  background: #fff;
  color: var(--navy);
  border-color: #fff;
}

/* ---------- Footer ---------- */
.footer__logo img {
  height: 54px;
  width: auto;
  margin-bottom: var(--gap-sm);
}

.footer__blurb {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 34ch;
}

.footer__title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 0.7rem;
}

.footer__list {
  display: grid;
  gap: 0.45rem;
  font-size: 0.92rem;
  color: var(--text);
}

.footer__list a:hover {
  color: var(--accent);
}

.footer__meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}

/* ---------- Tap-to-call bar ---------- */
.call-bar {
  display: none;
  position: fixed;
  inset: auto 0 0 0;
  z-index: 90;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1rem calc(0.9rem + env(safe-area-inset-bottom));
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 -12px 30px -20px rgba(14, 31, 68, 0.8);
}

.call-bar svg {
  width: 17px;
  height: 17px;
}

/* ---------- Small screens ---------- */
@media (max-width: 880px) {
  .call-bar {
    display: flex;
  }

  .footer {
    padding-bottom: 5.5rem;
  }

  .header__phone {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    order: 3;
  }

  .nav {
    position: absolute;
    inset: 100% var(--gutter) auto var(--gutter);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid var(--line-2);
    border-radius: var(--r);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out),
      visibility var(--dur-fast);
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav__link {
    padding: 0.8rem 0.7rem;
    border-bottom: 1px solid var(--line);
  }

  .nav__link:last-of-type {
    border-bottom: 0;
  }

  .nav .btn {
    margin-top: 0.5rem;
    justify-content: center;
  }

  .cta-band {
    flex-direction: column;
    align-items: flex-start;
  }
}
