/* ============================================================
   HESTER ASPHALT — HOME PAGE
   ============================================================ */

/* ---------- hero ---------- */

/* .hero-video is a static <img> since AD-04 (September 10, 2026) — the
   name is legacy from the original <video> hero it replaced, kept because
   it's still the correct visual role (full-bleed background layer) and
   js/home.js's hesterHeroVideo() still checks for it by this selector.
   Shade and grain sit over this base image. */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
  filter: saturate(0.92) contrast(1.04);
  transform-origin: center;
  animation: heroDrift 20s ease-in-out infinite alternate;
}
/* Static hero image now that the video is gone — this is the only thing
   standing between it and looking like a paused frame. A transform-only
   scale never affects layout (the image is absolutely positioned and
   .hero clips overflow), so this cannot introduce layout shift. Kept to
   ~102-104% and 20s so it reads as a slow environmental drift rather
   than a visible zoom. */
@keyframes heroDrift {
  from { transform: scale(1); }
  to { transform: scale(1.03); }
}
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(75deg, rgba(13, 14, 16, 0.92) 18%, rgba(13, 14, 16, 0.55) 52%, rgba(13, 14, 16, 0.25) 100%),
    linear-gradient(0deg, var(--ink) 0%, transparent 26%);
}
.hero-grain { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-inner { padding-block: 150px 120px; }
/* Tightened so the H1, geo line and lede read as one cohesive block rather
   than four disconnected pieces — the default 1.02 h1 line-height (set
   sitewide in styleGlobal.css) left too much air between "& Line Striping"
   and the geo line beneath it once the H1 broke onto its own third line. */
.hero .h-hero { line-height: 0.94; }
/* Reduced ~15-20% from the sitewide .lede clamp(16px,1.6vw,19px) so the
   supporting line supports the H1 rather than competing with it. */
.hero-lede { margin-top: 14px; max-width: 54ch; font-size: clamp(13px, 1.3vw, 16px); }
/* Geographic line of the hero H1 — sized relative to .h-hero's own
   computed font-size (em), so it stays ~50% of the primary line at
   every breakpoint automatically, including the 520px/460px overrides
   below and in styleGlobal.css, with no extra media query needed.
   display:block + a small margin (computed against its own 0.5em size,
   not the H1's) gives the H1-to-geo gap its own explicit, tighter value
   instead of inheriting the same line-height used between the two H1
   lines above it. */
.hero-geo { display: block; color: var(--orange); font-size: 0.5em; margin-top: 0.2em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 38px; }
/* width: fit-content (not a fixed max-width) so the row's own box is
   exactly as wide as the three items actually need —
   the old hardcoded 640px was narrower than all three needed on one line
   (~868px), so the third item wrapped even at desktop widths with plenty
   of real room to spare. max-width: 100% is the only ceiling now: it
   still wraps, correctly, once the hero's own available width genuinely
   can't fit everything (verified: happens at ~768px and below). */
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-top: 44px;
  padding-top: 24px;
  width: fit-content;
  max-width: 100%;
}
.hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}
.hero-trust svg { width: 18px; height: 18px; color: var(--orange); }

/* scroll cue */
.hero-scroll {
  position: absolute;
  bottom: 90px;
  right: clamp(20px, 5vw, 60px);
  width: 30px;
  height: 52px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  display: flex;
  justify-content: center;
  padding-top: 9px;
}
.hero-scroll span {
  width: 4px;
  height: 10px;
  border-radius: 2px;
  background: var(--orange);
  animation: scrollCue 1.8s var(--ease) infinite;
}
@keyframes scrollCue {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(16px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}
/* Infinite, so the most important of the two page-specific animations to
   gate — styleGlobal.css's own reduced-motion block doesn't reach this
   file. Disabling the animation leaves span at its unanimated default
   (opacity: 1, no transform), the same static dot the cue starts from. */
@media (prefers-reduced-motion: reduce) {
  .hero-scroll span { animation: none; }
  .hero-video { animation: none; }
}

/* bottom road stripe */
.hero-stripe {
  position: absolute;
  inset: auto 0 0 0;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--stripe) 0 56px, transparent 56px 100px);
  opacity: 0.8;
}

/* ---------- Stat row ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 48px;
}

/* ---------- Service panels ---------- */
.svc-stack { display: grid; gap: 22px; }
.svc-panel {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--coal-800);
  border: 1px solid var(--line);
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 26px) 100%, 0 100%);
  transition: border-color 0.3s, transform 0.35s var(--ease);
}
.svc-panel:nth-child(even) { grid-template-columns: 1fr 1.15fr; }
.svc-panel:nth-child(even) figure { order: 2; }
.svc-panel:hover { border-color: rgba(244, 121, 33, 0.45); transform: translateY(-4px); }
.svc-panel figure { position: relative; min-height: 280px; overflow: hidden; }
.svc-panel figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.svc-panel:hover figure img { transform: scale(1.045); }
/* Sealcoating's photo is portrait; the sibling cards get their figure's
   height "for free" because height:100% resolves against their own
   image's natural ~3:2 width/height at width:100%. Give just this
   card's img an explicit 3:2 ratio (height:auto instead of the
   percentage height) so it sizes the same way the siblings' images
   do, and object-fit:cover crops the portrait source to fit — instead
   of expanding the row to the photo's real (taller) height. Scoped to
   the img itself, not the figure, so it doesn't interact with the
   figure's own grid-stretch sizing at narrow breakpoints. */
.svc-panel[href="sealcoating.html"] figure img { height: auto; aspect-ratio: 3 / 2; }
.svc-copy {
  padding: clamp(28px, 4vw, 54px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
  position: relative;
}
.svc-index {
  font-family: var(--font-display);
  font-size: clamp(56px, 7vw, 92px);
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(244, 121, 33, 0.5);
  position: absolute;
  top: 18px;
  right: 24px;
  pointer-events: none;
}
.svc-copy p { color: var(--mute); max-width: 46ch; }
.svc-copy .link-arrow { margin-top: 6px; }

/* ---------- Process track ---------- */
.process-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  counter-reset: step;
}
.process-track li {
  position: relative;
  background: var(--coal-800);
  border: 1px solid var(--line);
  padding: 30px 22px 26px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}
.process-track li::after {
  content: "";
  position: absolute;
  top: 44px;
  right: -19px;
  width: 20px;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--stripe) 0 5px, transparent 5px 9px);
  z-index: 2;
}
.process-track li:last-child::after { display: none; }
.process-track .step-num {
  position: absolute;
  top: 14px;
  right: 16px;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1.3px rgba(255, 255, 255, 0.22);
  line-height: 1;
}
.process-track svg { width: 26px; height: 26px; color: var(--orange); margin-bottom: 14px; }
.process-track h3 { font-size: 21px; margin-bottom: 8px; }
.process-track p { font-size: 14px; color: var(--mute); line-height: 1.55; }

/* Quote-card CSS moved to css/styleGlobal.css (September 12, 2026) — now
   shared by index.html's #testimonials section and review.html's reviews
   grid, not homepage-only. See styleGlobal.css's "Cards & panels" section. */

/* ---------- Area links ---------- */
.area-links { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 22px; }
.area-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  border-bottom: 1px solid var(--line);
  transition: color 0.2s, transform 0.25s var(--ease);
}
.area-links a::before { content: "→"; color: var(--orange); font-family: var(--font-body); }
.area-links a:hover { color: var(--paper); transform: translateX(6px); }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero-scroll { display: none; }
}
@media (max-width: 900px) {
  .stat-row { grid-template-columns: 1fr 1fr; gap: 36px 20px; }
  .process-track { grid-template-columns: repeat(2, 1fr); }
  .process-track li::after { display: none; }
  .svc-panel, .svc-panel:nth-child(even) { grid-template-columns: 1fr; }
  .svc-panel:nth-child(even) figure { order: 0; }
  .svc-panel figure { min-height: 220px; max-height: 300px; }
}
@media (max-width: 760px) {
  /* Shrink only the supporting hero paragraph; headline stays prominent.
     ~15-20% down from the pre-existing 13.5px, matching the desktop reduction. */
  .hero .hero-lede { font-size: 11.5px; line-height: 1.58; max-width: 44ch; }
  /* Pull hero content up so the background video shows more on smaller devices */
  .hero-inner { padding-block: 130px 100px; }
}
@media (max-width: 600px) {
  .process-track { grid-template-columns: 1fr; }
  .area-links { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  /* Override global h-hero shrink so the homepage headline keeps its impact */
  .hero .h-hero { font-size: clamp(42px, 12vw, 64px); }
  /* Increase spacing before CTAs so they sit lower in the viewport */
  .hero-ctas { margin-top: 54px; }
  /* Tighten lede further on narrowest screens (~15% down from the
     pre-existing 13px) */
  .hero .hero-lede { font-size: 11px; max-width: 38ch; }
}
