/* ===== Mario HVAC — bespoke styles on top of Tailwind ===== */

:root { --ease: cubic-bezier(.22,.61,.36,1); }

html, body { -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; }
.font-900 { font-weight: 900; }
.font-800 { font-weight: 800; }
.font-700 { font-weight: 700; }

::selection { background: #E01F2E; color: #fff; }

/* Focus visibility (a11y) */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #1E4FD8; outline-offset: 2px; border-radius: 6px;
}

/* ---------- NAV ---------- */
#navbar { background: transparent; }
.nav-word, .nav-sub, .nav-links a { color: #fff; }
.nav-sub { color: rgba(255,255,255,.6); }
.nav-call { color: #fff; border: 1px solid rgba(255,255,255,.25); }
.nav-call:hover { background: rgba(255,255,255,.12); }

/* scrolled state — solid glass, dark text */
#nav.scrolled #navbar {
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px -12px rgba(11,27,63,.25);
}
#nav.scrolled .nav-word { color: #0B1B3F; }
#nav.scrolled .nav-sub { color: #5B6B8C; }
#nav.scrolled .nav-links a { color: #0B1B3F; }
#nav.scrolled .nav-call { color: #0B1B3F; border-color: rgba(11,27,63,.15); }
#nav.scrolled .nav-call:hover { background: rgba(11,27,63,.06); }

/* ---------- HERO ---------- */
.hero-grid {
  background-image:
    linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

/* ---------- MARQUEE ---------- */
.marquee { will-change: transform; }
.marquee-track { animation: marquee 26s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ---------- REVEAL ANIMATION ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- SERVICE CARDS ---------- */
.service-card {
  position: relative; background: #fff; border: 1px solid #E7ECF5;
  border-radius: 22px; padding: 28px; cursor: default;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -24px rgba(11,27,63,.4); border-color: #C9D6EC; }
.svc-icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  background: #EAF0FF; color: #1B3A9C; margin-bottom: 18px; transition: background .35s, color .35s; }
.svc-icon svg { width: 28px; height: 28px; }
.service-card:hover .svc-icon { background: #1B3A9C; color: #fff; }
.svc-title { font-family: Archivo, sans-serif; font-weight: 800; font-size: 1.3rem; color: #0B1B3F; }
.svc-body { margin-top: 8px; color: #5B6B8C; line-height: 1.6; }
.svc-link { display: inline-block; margin-top: 16px; font-family: "Barlow Semi Condensed", sans-serif;
  text-transform: uppercase; letter-spacing: .05em; font-weight: 700; font-size: .85rem; color: #1B3A9C;
  opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .3s; }
.service-card:hover .svc-link { opacity: 1; transform: none; }
/* accent (emergency) */
.service-card--accent { background: linear-gradient(160deg,#0B1B3F,#12285F); border-color: transparent; }
.service-card--accent .svc-title { color: #fff; }
.service-card--accent .svc-body { color: rgba(255,255,255,.72); }
.svc-icon--accent { background: rgba(224,31,46,.15); color: #ff6b78; }
.service-card--accent:hover .svc-icon--accent { background: #E01F2E; color: #fff; }
.svc-link--accent { color: #ff8a94; }

/* ---------- GALLERY ---------- */
.gal-chip { font-family: "Barlow Semi Condensed", sans-serif; text-transform: uppercase;
  letter-spacing: .05em; font-weight: 700; font-size: .85rem; padding: 8px 16px; border-radius: 999px;
  border: 1px solid #D8E0EF; color: #5B6B8C; background: #fff; cursor: pointer; transition: all .25s; }
.gal-chip:hover { border-color: #1B3A9C; color: #1B3A9C; }
.gal-chip.is-active { background: #0B1B3F; border-color: #0B1B3F; color: #fff; }
.gal-item { position: relative; overflow: hidden; border-radius: 20px; cursor: pointer; margin: 0;
  background: #0B1B3F; transition: opacity .4s, transform .4s; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gal-item:hover img { transform: scale(1.06); }
.gal-item figcaption { position: absolute; inset: auto 0 0 0; padding: 20px;
  background: linear-gradient(transparent, rgba(11,27,63,.9)); color: #fff;
  display: flex; flex-direction: column; gap: 6px; font-size: .95rem;
  transform: translateY(8px); opacity: 0; transition: opacity .4s, transform .4s; }
.gal-item:hover figcaption { transform: none; opacity: 1; }
.gal-item .tag { align-self: flex-start; font-family: "Barlow Semi Condensed", sans-serif;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 700; font-size: .7rem;
  background: #E01F2E; padding: 3px 10px; border-radius: 999px; }
.gal-item.is-hidden { display: none; }

/* ---------- ESTIMATE ---------- */
.est-opt { font-family: "Barlow Semi Condensed", sans-serif; text-transform: uppercase; letter-spacing: .03em;
  font-weight: 700; font-size: .92rem; padding: 12px 8px; border-radius: 12px; border: 1.5px solid #E1E7F2;
  background: #fff; color: #5B6B8C; cursor: pointer; transition: all .2s; }
.est-opt:hover { border-color: #1B3A9C; color: #1B3A9C; }
.est-opt.is-active { background: #0B1B3F; border-color: #0B1B3F; color: #fff; box-shadow: 0 8px 18px -8px rgba(11,27,63,.5); }
.est-range { -webkit-appearance: none; appearance: none; height: 8px; border-radius: 999px;
  background: #E1E7F2; outline: none; cursor: pointer; }
.est-range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: #E01F2E; border: 4px solid #fff; box-shadow: 0 4px 12px rgba(224,31,46,.5); cursor: grab; }
.est-range::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #E01F2E;
  border: 4px solid #fff; box-shadow: 0 4px 12px rgba(224,31,46,.5); cursor: grab; }

/* ---------- PROCESS ---------- */
.step-card { position: relative; padding: 28px; border-radius: 20px; background: #F4F7FC;
  border: 1px solid #E7ECF5; transition: transform .35s var(--ease), background .35s; overflow: hidden; }
.step-card:hover { transform: translateY(-6px); background: #fff; box-shadow: 0 24px 44px -26px rgba(11,27,63,.4); }
.step-num { font-family: Archivo, sans-serif; font-weight: 900; font-size: 3.4rem; line-height: 1;
  color: transparent; -webkit-text-stroke: 2px #C9D6EC; display: block; transition: -webkit-text-stroke-color .35s; }
.step-card:hover .step-num { -webkit-text-stroke-color: #E01F2E; }
.step-title { font-family: Archivo, sans-serif; font-weight: 800; font-size: 1.35rem; margin-top: 10px; color: #0B1B3F; }
.step-body { color: #5B6B8C; margin-top: 8px; line-height: 1.6; font-size: .96rem; }

/* ---------- MAP ---------- */
#map { z-index: 0; }
.leaflet-container { font-family: Inter, sans-serif; background: #eef2f8; }
.mh-pin { display: grid; place-items: center; }
.leaflet-popup-content-wrapper { border-radius: 12px; }
.leaflet-popup-content { font-family: Inter, sans-serif; font-weight: 600; color: #0B1B3F; margin: 10px 14px; }
.city-dot { display: inline-flex; align-items: center; gap: 8px; }
.city-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #E01F2E; flex: none; }

/* ---------- REVIEWS ---------- */
.review-card { flex: 0 0 100%; }
@media (min-width: 768px) { .review-card { flex: 0 0 calc(50% - 10px); } }
@media (min-width: 1024px) { .review-card { flex: 0 0 calc(33.333% - 14px); } }
.review-inner { height: 100%; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px; padding: 30px; backdrop-filter: blur(6px); }
.rev-nav { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25); color: #fff; background: rgba(255,255,255,.05); cursor: pointer; transition: all .25s; }
.rev-nav:hover { background: #E01F2E; border-color: #E01F2E; }
.rev-dot { width: 9px; height: 9px; border-radius: 999px; background: rgba(255,255,255,.25); cursor: pointer; transition: all .3s; }
.rev-dot.is-active { width: 26px; background: #E01F2E; }

/* ---------- FORM ---------- */
.field label { display: block; font-family: "Barlow Semi Condensed", sans-serif; text-transform: uppercase;
  letter-spacing: .04em; font-weight: 700; font-size: .8rem; color: #5B6B8C; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; border: 1.5px solid #DDE4F0; background: #fff;
  border-radius: 12px; padding: 12px 14px; font-size: 1rem; color: #0B1B3F; transition: border-color .2s, box-shadow .2s; }
.field input::placeholder, .field textarea::placeholder { color: #9AA7C0; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #1E4FD8;
  box-shadow: 0 0 0 4px rgba(30,79,216,.12); outline: none; }
.field input.invalid, .field select.invalid, .field textarea.invalid { border-color: #E01F2E; box-shadow: 0 0 0 4px rgba(224,31,46,.12); }
.contact-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: #EAF0FF; color: #1B3A9C; flex: none; }

/* ---------- FOOTER SOCIAL ---------- */
.soc { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255,255,255,.08); color: #fff; transition: background .25s; }
.soc:hover { background: #E01F2E; }

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .marquee-track { animation: none !important; }
}
