/* Home page — welcome hero & service tabs */

.page-home {
  background: var(--page-surface);
}

.page-home .section--alt {
  background: linear-gradient(180deg, #efedeb 0%, #f8f7f6 100%);
}

/* —— Hero —— */

.hero--welcome {
  position: relative;
  overflow: hidden;
  padding: clamp(2.75rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem);
  background: linear-gradient(
    180deg,
    #00205b 0%,
    #0a2f6b 20%,
    #3d6a9e 45%,
    #8fa3bc 72%,
    #d8dee6 90%,
    #f0f2f5 100%
  );
}

.hero--welcome > .container {
  position: relative;
  z-index: 1;
}

.hero-welcome {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.hero-welcome__intro {
  container-type: inline-size;
  text-align: center;
  width: 100%;
  max-width: min(100%, 54rem);
  margin: 0 auto;
  padding-inline: clamp(0.5rem, 2vw, 1rem);
}

.hero-welcome__eyebrow {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.5rem;
}

.hero-welcome__title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 8.4vw, 6.954rem);
  font-size: min(6.954rem, max(1.35rem, calc(100cqi / 9.79)));
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--color-white);
  margin-bottom: calc(0.85rem - 0.196em);
  text-shadow: 0 4px 32px rgba(0, 0, 0, 0.35);
}

.hero-welcome__title::after {
  content: "";
  display: block;
  width: 8rem;
  height: 4px;
  margin: 0.85rem auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--color-red), transparent);
}

.hero-welcome__tagline {
  font-size: clamp(0.875rem, 2.6vw, 1.75rem);
  font-size: min(1.75rem, max(0.875rem, calc(100cqi / 30.5)));
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.55;
  margin: 0 auto;
  max-width: 92cqi;
  text-align: center;
  white-space: nowrap;
}

.hero-welcome__pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.35rem;
}

.hero-welcome__join {
  justify-content: center;
  margin-top: 1.35rem;
}

.hero-welcome__join .btn--primary {
  box-shadow: 0 6px 0 #6d0820, 0 10px 28px rgba(191, 10, 48, 0.4);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.hero-pill:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
}

/* —— Service tabs —— */

.service-tabs {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.service-tabs__label {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-navy);
  margin-bottom: 0.85rem;
}

.service-tabs__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 32, 91, 0.1);
  border-radius: 18px;
  margin-bottom: 1rem;
  box-shadow: 0 8px 28px rgba(0, 32, 91, 0.08);
}

.service-tabs__tab {
  flex: 1 1 auto;
  min-width: min(100%, 7.5rem);
  padding: 0.8rem 1rem;
  font-family: var(--font-display);
  font-size: clamp(0.8125rem, 2vw, 0.9375rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-navy-mid);
  background: transparent;
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    transform 0.2s cubic-bezier(0.34, 1.3, 0.64, 1),
    box-shadow 0.22s ease;
}

.service-tabs__tab:hover {
  color: var(--color-dark);
  background: rgba(0, 32, 91, 0.06);
  transform: translateY(-2px);
}

.service-tabs__tab.is-active,
.service-tabs__tab[aria-selected="true"] {
  color: var(--color-white);
  background: var(--color-red);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow:
    0 6px 0 #6d0820,
    0 10px 28px rgba(191, 10, 48, 0.4);
  transform: translateY(-3px);
}

.service-tabs__tab:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

.service-tabs__panels {
  position: relative;
  min-height: 240px;
}

.service-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.75rem;
  align-items: center;
  padding: 2rem 2.25rem;
  background: var(--color-white);
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-top: 4px solid var(--color-red);
  box-shadow:
    0 1px 2px rgba(20, 16, 14, 0.04),
    0 20px 48px rgba(20, 16, 14, 0.12);
  color: var(--color-gray-800);
  animation: panel-in 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.service-panel[hidden] {
  display: none !important;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.service-panel__content h2 {
  font-size: clamp(1.35rem, 3vw, 1.875rem);
  color: var(--color-dark);
  margin-bottom: 0.5rem;
}

.service-panel__content p {
  color: var(--color-gray-600);
  margin-bottom: 0.85rem;
  font-size: 1rem;
  line-height: 1.55;
}

.service-panel__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-panel__list li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.9375rem;
  color: var(--color-dark);
  margin-bottom: 0.4rem;
  line-height: 1.45;
}

.service-panel__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  background: var(--color-red);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(191, 10, 48, 0.15);
}

.service-panel .btn--primary {
  white-space: nowrap;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 6px 0 #6d0820, 0 8px 24px rgba(191, 10, 48, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-panel .btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #6d0820, 0 12px 28px rgba(191, 10, 48, 0.45);
}

.hero-welcome__footer {
  text-align: center;
}

.hero-welcome__footer .hero__meta {
  justify-content: center;
  margin-bottom: 1.35rem;
  font-size: 1rem;
  color: var(--color-gray-800);
}

.hero-welcome__footer .hero__meta a {
  color: var(--color-navy-mid);
}

.hero-welcome__footer .hero__meta a:hover {
  color: var(--color-red);
}

.hero-welcome__footer .btn--outline-light {
  color: var(--color-dark);
  border-color: var(--color-navy-mid);
}

.hero-welcome__footer .btn--outline-light:hover {
  background: var(--color-navy);
  border-color: var(--color-navy);
  color: var(--color-white);
}

.hero-welcome__actions {
  justify-content: center;
  gap: 0.65rem;
}

.hero-welcome__actions .btn--primary {
  box-shadow: 0 6px 0 #6d0820, 0 10px 28px rgba(191, 10, 48, 0.35);
}

/* —— Promo slideshow —— */

.home-promo-slideshow {
  padding: clamp(0.75rem, 2vw, 1.25rem) 0 clamp(1.5rem, 4vw, 2.75rem);
  background: linear-gradient(180deg, #f0f2f5 0%, #f8f9fa 100%);
}

.promo-slideshow {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
}

.promo-slideshow__viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 1024 / 682;
  overflow: hidden;
  border-radius: clamp(12px, 2vw, 20px);
  box-shadow:
    0 4px 24px rgba(0, 32, 91, 0.12),
    0 0 0 1px rgba(0, 32, 91, 0.06);
  background: #ffffff;
  line-height: 0;
  transition: aspect-ratio 0.4s ease;
}

.promo-slideshow__track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  line-height: 0;
}

.promo-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.promo-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.promo-slide__link {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 0;
}

.promo-slide__link:focus-visible {
  outline: 3px solid var(--color-red);
  outline-offset: 3px;
  border-radius: clamp(12px, 2vw, 20px);
}

.promo-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.promo-slideshow__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: rgba(0, 32, 91, 0.85);
  color: var(--color-white);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 0.15rem;
  box-shadow: 0 4px 16px rgba(0, 32, 91, 0.25);
  transition: background 0.2s ease, transform 0.2s ease;
}

.promo-slideshow__arrow:hover {
  background: var(--color-red);
}

.promo-slideshow__arrow:focus-visible {
  outline: 3px solid var(--color-red);
  outline-offset: 2px;
}

.promo-slideshow__arrow--prev {
  left: clamp(0.5rem, 2vw, 1rem);
}

.promo-slideshow__arrow--next {
  right: clamp(0.5rem, 2vw, 1rem);
}

.promo-slideshow__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.promo-slideshow__dot {
  width: 0.65rem;
  height: 0.65rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 32, 91, 0.25);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.promo-slideshow__dot.is-active {
  background: var(--color-red);
  transform: scale(1.25);
}

.promo-slideshow__dot:focus-visible {
  outline: 2px solid var(--color-navy);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .promo-slideshow__arrow {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .promo-slide {
    transition: none;
  }
}

/* —— Story section —— */

.home-story {
  background: var(--color-white);
}

.home-story__inner {
  text-align: left;
  max-width: 720px;
  margin-left: 0;
  margin-right: auto;
}

.home-story__inner h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
}

/* —— Service cards grid —— */

.page-home #what-we-do .section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.service-cards .card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--color-gray-100);
  padding: 1.75rem 1.5rem 1.5rem;
  transition:
    transform 0.25s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.service-card--link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.service-card--link:focus-visible {
  outline: 2px solid var(--color-navy-mid);
  outline-offset: 3px;
}

.service-cards .card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #3d3428;
  transition: height 0.2s ease;
}

.service-cards .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
  border-color: rgba(30, 41, 59, 0.15);
}

.service-cards .card:hover::before {
  height: 5px;
}

.service-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.85rem;
  font-size: 1.35rem;
  line-height: 1;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.07);
}

.service-card--hvac::before {
  background: var(--color-red);
}

.service-card--cabinets::before {
  background: #8b6914;
}

.service-card--equipment::before {
  background: #5c4a3a;
}

.service-card--parts::before {
  background: var(--color-red);
}

.service-card--supplies::before {
  background: #475569;
}

.service-card--filters::before {
  background: #0a6f54;
}

.service-card--hvac .service-card__icon {
  background: rgba(0, 32, 91, 0.08);
}

.service-card--filters .service-card__icon {
  background: rgba(10, 111, 84, 0.12);
}

.service-cards .card h3 {
  color: var(--color-dark);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.service-cards .card p {
  font-size: 0.9375rem;
  line-height: 1.55;
}

.service-cards .card__link {
  font-weight: 700;
  transition: gap 0.2s ease;
}

.service-cards .card:hover .card__link {
  color: var(--color-red);
}

/* —— Why grid —— */

.page-home .home-why.section--dark {
  background: linear-gradient(
    165deg,
    #020814 0%,
    #00205b 40%,
    #0a2f6b 100%
  );
}

.home-why {
  position: relative;
  overflow: hidden;
}

.home-why::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 50%;
  height: 80%;
  background: radial-gradient(circle, rgba(56, 120, 200, 0.14), transparent 70%);
  pointer-events: none;
}

.page-home .home-why .section-header h2 {
  color: var(--color-white);
}

.page-home .home-why .section-header .lead {
  color: rgba(255, 255, 255, 0.78);
}

.page-home .home-why .why-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.page-home .home-why .why-item {
  text-align: left;
  padding: 1.35rem 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  backdrop-filter: blur(6px);
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.page-home .home-why .why-item:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

.why-item__num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--color-red);
  margin-bottom: 0.35rem;
}

.page-home .home-why .why-item strong {
  font-size: 1rem;
  margin-bottom: 0.35rem;
  color: var(--color-white);
}

.why-item__desc {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.65);
  text-transform: none;
  letter-spacing: 0;
}

/* —— Mission —— */

.home-mission__card {
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  text-align: center;
  background: var(--color-white);
  border-radius: 24px;
  border: 1px solid var(--color-gray-100);
  box-shadow: 0 16px 48px rgba(0, 32, 91, 0.08);
}

.home-mission__list {
  max-width: 420px;
  margin: 0 auto;
  text-align: left;
}

/* —— Hours —— */

.page-home .home-hours .hours-grid {
  max-width: 800px;
  gap: 1.25rem;
}

.page-home .hours-block {
  padding: 2rem 1.5rem;
  border-radius: 18px;
  border: 1px solid var(--color-gray-100);
  box-shadow: 0 8px 28px rgba(0, 32, 91, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.page-home .hours-block:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0, 32, 91, 0.1);
}

.hours-block--featured {
  border-color: rgba(191, 10, 48, 0.25);
  background: linear-gradient(145deg, #fff 0%, #fff5f7 100%);
}

.hours-block__label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: 0.35rem;
}

.hours-block__time {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-dark);
  margin: 0;
}

/* —— CTA —— */

.page-home .home-cta.cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 8vw, 4.5rem) 0;
  background:
    radial-gradient(ellipse 60% 70% at 10% 100%, rgba(56, 120, 200, 0.22), transparent 52%),
    linear-gradient(145deg, #020814 0%, #00205b 48%, #0a2f6b 100%);
}

.page-home .home-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.04) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.04) 50%,
    rgba(255, 255, 255, 0.04) 75%,
    transparent 75%
  );
  background-size: 24px 24px;
  opacity: 0.35;
  pointer-events: none;
}

.home-cta__inner {
  position: relative;
  z-index: 1;
}

.home-cta__eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.page-home .home-cta .phone-large {
  font-size: clamp(2rem, 6vw, 2.75rem);
  transition: transform 0.2s ease, color 0.2s ease;
}

.page-home .home-cta .phone-large:hover {
  transform: scale(1.03);
}

.home-cta__actions {
  justify-content: center;
  gap: 0.65rem;
}

.page-home .home-cta .btn--primary {
  box-shadow: 0 6px 0 #6d0820, 0 10px 28px rgba(191, 10, 48, 0.4);
}

/* —— Motion —— */

@media (prefers-reduced-motion: reduce) {
  .service-tabs__tab:hover,
  .service-tabs__tab.is-active,
  .service-panel,
  .service-cards .card:hover,
  .page-home .why-item:hover,
  .page-home .hours-block:hover {
    transform: none;
  }
}

@media (max-width: 768px) {
  .hero--welcome {
    padding: 2rem 0 3rem;
  }

  .hero-welcome__pills {
    gap: 0.4rem;
  }

  .hero-pill {
    font-size: 0.75rem;
    padding: 0.4rem 0.75rem;
  }

  .service-tabs__tab {
    min-width: calc(50% - 0.5rem);
    flex: 1 1 calc(50% - 0.5rem);
    padding: 0.65rem 0.5rem;
    font-size: 0.75rem;
  }

  .service-panel {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 1.5rem 1.25rem;
  }

  .service-panel .btn--primary {
    width: 100%;
  }

  .service-panel__list li {
    text-align: left;
  }

  .home-mission__card {
    padding: 1.75rem 1.25rem;
  }
}

@media (max-width: 400px) {
  .service-tabs__tab {
    min-width: 100%;
  }
}
