/* pages.css: page-specific sections */

/* ---------- home hero (full-bleed video, bottom-left copy) ---------- */
.hero { position: relative; height: var(--hero-h); min-height: 560px; color: var(--color-on-ink); background: var(--color-ink); overflow: hidden; isolation: isolate; }
.hero-media, .hero-media video, .hero-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media video { object-fit: cover; z-index: 1; }
/* Stand-in motion until real footage exists. */
.hero-fallback { z-index: 0; background:
  radial-gradient(60% 50% at 70% 40%, var(--hero-glow), transparent 70%),
  radial-gradient(40% 35% at 25% 70%, var(--hero-glow-soft), transparent 70%),
  linear-gradient(160deg, var(--hero-fallback-a), var(--hero-fallback-b) 70%); }
.hero-fallback .beam { position: absolute; top: -20%; height: 140%; width: 22%; background: linear-gradient(90deg, transparent, var(--hero-beam), transparent); transform: skewX(-18deg); animation: sweep 9s var(--ease) infinite; }
.hero-fallback .beam:nth-child(2) { animation-delay: 3s; width: 12%; opacity: .7; }
.hero-fallback .beam:nth-child(3) { animation-delay: 6s; width: 30%; opacity: .5; }
.hero-fallback .spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--color-on-ink); box-shadow: 0 0 18px 6px var(--hero-spark-glow); opacity: 0; animation: flick 4.5s infinite; }
.hero-fallback .spark:nth-child(4) { left: 68%; top: 38%; }
.hero-fallback .spark:nth-child(5) { left: 74%; top: 52%; animation-delay: 1.7s; }
.hero-fallback .spark:nth-child(6) { left: 61%; top: 47%; animation-delay: 3.1s; }
@keyframes sweep { 0% { left: -40%; } 60%, 100% { left: 130%; } }
@keyframes flick { 0%, 100% { opacity: 0; transform: scale(.6); } 8% { opacity: 1; transform: scale(1); } 14% { opacity: .2; } 18% { opacity: .9; } 30% { opacity: 0; } }
.hero.is-paused .beam, .hero.is-paused .spark { animation-play-state: paused; }
.hero-scrim { position: absolute; inset: 0; z-index: 2; background: linear-gradient(to top, var(--scrim-strong) 0%, var(--scrim-mid) 42%, transparent 70%), linear-gradient(to right, var(--scrim-mid), transparent 60%); }
.hero > .proto-tag { top: calc(var(--header-h) + 1rem); }
.hero-content { position: absolute; z-index: 3; left: 0; right: 0; bottom: clamp(2.5rem, 7vh, 5rem); }
.hero-content .eyebrow { display: inline-flex; align-items: center; gap: .75rem; margin-bottom: 1.1rem; }
.hero-content .eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
/* 20ch: "Licensed Electrician / in Katy & West Houston" sets on two lines on desktop, leaving the video room. */
.hero h1 { font-size: var(--fs-hero); font-weight: 700; line-height: .93; max-width: 20ch; }
.hero-sub { max-width: 50ch; margin-top: 1.25rem; font-size: clamp(1rem, 1.3vw, 1.125rem); color: var(--color-on-ink-soft); }
.hero-controls { position: absolute; z-index: 4; right: var(--gutter); bottom: clamp(2.5rem, 7vh, 5rem); display: flex; align-items: center; gap: 1rem; }
.progress { width: 120px; height: 2px; background: var(--color-on-ink-line); overflow: hidden; }
.progress span { display: block; height: 100%; width: 100%; background: var(--color-on-ink); transform-origin: left; animation: prog 9s linear infinite; }
.hero.is-paused .progress span { animation-play-state: paused; }
@keyframes prog { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero.has-video .progress span { animation: none; transform: scaleX(0); transition: transform .3s linear; }
.pause-btn { width: var(--touch-min); height: var(--touch-min); display: grid; place-items: center; border: 1px solid var(--ghost-border); background: var(--scrim-soft); color: var(--color-on-ink); cursor: pointer; border-radius: 50%; }
.pause-btn svg { width: 16px; height: 16px; }

/* ---------- feature split (why VG, about owner, area proof) ---------- */
.feature { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.feature > .ph, .feature > .media { aspect-ratio: 5/4; }
/* Logo standing in for a photo: show the whole mark, never crop it. */
.feature > .media--logo { object-fit: contain; padding: clamp(1.5rem, 5vw, 3.5rem); background: var(--color-surface); }
.feature h2 { font-size: var(--fs-h2); margin: .75rem 0 1.25rem; }
.feature > div > p { color: var(--color-text-muted); max-width: 44ch; }

/* ---------- two-panel split (who we work for) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--color-bg); }
.panel { position: relative; min-height: clamp(420px, 62vh, 640px); color: var(--color-on-ink); background: var(--color-ink); overflow: hidden; }
.panel > .ph, .panel > .media { position: absolute; inset: 0; }
.panel-body { position: absolute; z-index: 2; inset: auto 0 0 0; padding: clamp(1.5rem, 4vw, 3.5rem); padding-top: clamp(4rem, 10vw, 8rem); background: linear-gradient(to top, rgba(10, 20, 33, .9), rgba(10, 20, 33, .6) 55%, transparent); }
.panel > .media--left { object-position: 30% center; }
.panel h3 { font-size: var(--fs-h2); margin: .6rem 0 .75rem; }
.panel p { max-width: 40ch; color: var(--color-on-ink-soft); }
.panel .arrow-link { color: var(--color-on-ink); margin-top: .75rem; }

/* ---------- areas ---------- */
.areas { display: grid; grid-template-columns: 5fr 7fr; gap: 2rem clamp(2rem, 5vw, 5rem); align-items: end; }
.areas h2 { font-size: var(--fs-h2); margin-top: .6rem; }
.areas p { color: var(--color-text-muted); margin-top: 1rem; max-width: 40ch; }
.area-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.area-cards a { display: flex; flex-direction: column; gap: .75rem; height: 100%; padding: 2rem 1.5rem; border: 1px solid var(--color-text); text-decoration: none; transition: background .2s; }
.area-cards a:hover, .area-cards a:focus-visible { background: var(--color-surface); }
.area-cards strong { font: 600 clamp(2rem, 3.5vw, 2.75rem)/1 var(--font-display); text-transform: uppercase; }
.area-cards span:not(.arrow-link):not(.eyebrow) { color: var(--color-text-muted); font-size: .9375rem; }

/* ---------- process band ---------- */
.process { padding-block: var(--section-gap); }
.process .section-head p { color: var(--color-on-ink-muted); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2.5vw, 2.5rem); }
.steps li { border-top: 1px solid var(--color-on-ink-line); padding-top: 1.5rem; }
.steps b { display: block; font: 600 clamp(3rem, 6vw, 4.75rem)/.9 var(--font-display); color: var(--color-on-ink); }
.steps strong { display: block; font: 600 1.35rem/1.1 var(--font-display); text-transform: uppercase; margin: 1rem 0 .5rem; }
.steps span { display: block; color: var(--color-on-ink-muted); font-size: .9375rem; }
.steps b + span { margin-top: 1rem; }

/* ---------- service pages ---------- */

/* ---------- about ---------- */
.facts { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.facts li { border-top: 1px solid var(--color-border); padding-top: .75rem; }
.facts span { display: block; font-size: var(--fs-small); color: var(--color-text-muted); }
.facts strong { display: block; font: 600 1.5rem/1.1 var(--font-display); text-transform: uppercase; margin-top: .25rem; }
.credentials { padding-block: var(--section-gap); }
.cred-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 2.5rem); }
.cred-grid li { border-top: 1px solid var(--color-on-ink-line); padding-top: 1.5rem; }
.cred-grid svg { width: 28px; height: 28px; margin-bottom: 1rem; }
.cred-grid strong { display: block; font: 600 1.5rem/1.1 var(--font-display); text-transform: uppercase; }
.cred-grid span { display: block; margin-top: .5rem; color: var(--color-on-ink-muted); font-size: .9375rem; }
.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
.team .ph, .team .media { aspect-ratio: 4/5; margin-bottom: .75rem; }
.team strong { display: block; font: 600 1.35rem/1.1 var(--font-display); text-transform: uppercase; }
.team span { color: var(--color-text-muted); font-size: .9375rem; }

/* ---------- gallery ---------- */
.gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.gallery-grid li[hidden] { display: none; }
.gallery-grid figure { margin: 0; }
.gallery-grid .ph, .gallery-grid .media { aspect-ratio: 4/3; }
.gallery-grid figcaption { padding-top: .75rem; }
.gallery-grid figcaption strong { display: block; font: 600 1.25rem/1.1 var(--font-display); text-transform: uppercase; }
.gallery-grid figcaption span { font-size: var(--fs-small); color: var(--color-text-muted); }
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.ba > div { position: relative; }
.ba-label { position: absolute; left: .5rem; bottom: .5rem; z-index: 3; padding: .3rem .5rem; background: var(--scrim-tag); color: var(--color-on-ink); font: 600 .6875rem/1 var(--font-body); text-transform: uppercase; letter-spacing: .1em; }

/* ---------- pricing ---------- */
.facts-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.facts-grid li { padding: 1.75rem 1.25rem; border-right: 1px solid var(--color-border); }
.facts-grid li:last-child { border-right: 0; }
.facts-grid strong { display: block; margin-top: .75rem; font: 600 1.5rem/1.15 var(--font-display); text-transform: uppercase; }
.table-wrap { overflow-x: auto; }
.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td { text-align: left; padding: 1.1rem 1rem; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.price-table thead th { font: 600 .75rem/1.2 var(--font-body); text-transform: uppercase; letter-spacing: .1em; border-bottom: 2px solid var(--color-text); }
.price-table tbody th { font: 600 1.25rem/1.1 var(--font-display); text-transform: uppercase; }
.price-table tbody th a { text-decoration: none; }
.price-table td:nth-child(2) { font-weight: 600; white-space: nowrap; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 2.5rem clamp(2rem, 5vw, 5rem); align-items: start; }
.visually-h3 { font-size: var(--fs-card); margin-bottom: 1.5rem; }
.contact-side { display: grid; gap: 2rem; }
.emergency-box { padding: 2rem; display: grid; gap: 1rem; justify-items: start; }
.emergency-box svg { width: 32px; height: 32px; }
.emergency-box h2 { font-size: var(--fs-card); }
.emergency-box p { color: var(--color-on-ink-soft); }
.booking { min-height: 720px; margin-bottom: 1rem; }
.booking-frame { display: block; width: 100%; min-height: 720px; border: 1px solid var(--color-border); background: var(--color-bg); }
.booking-ph { display: grid; place-items: center; min-height: 260px; padding: 2rem; background: var(--color-surface); border: 1px dashed var(--color-placeholder-b); text-align: center; }

/* ---------- prose (legal, blog, about story) ---------- */
.prose { max-width: var(--prose-max); }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: .4rem; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 2.5rem 0 1rem; }
.prose h3 { font-size: 1.3rem; margin: 1.75rem 0 .75rem; }
.legal > .draft-note { margin: 0 0 2rem; }
.post-meta { font-size: var(--fs-small); color: var(--color-text-muted); }
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.post-list a { display: grid; gap: .5rem; padding: 1.75rem 0; border-top: 1px solid var(--color-border); text-decoration: none; }
.post-list strong { font: 600 var(--fs-card)/1.1 var(--font-display); text-transform: uppercase; }
.post-list span:not(.arrow-link):not(.eyebrow) { color: var(--color-text-muted); max-width: 60ch; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; }
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .facts-grid li:nth-child(2) { border-right: 0; }
  .facts-grid li:nth-child(n+3) { border-top: 1px solid var(--color-border); }
}
@media (max-width: 860px) {
  .feature, .areas, .split, .contact-grid { grid-template-columns: 1fr; }
  .cred-grid { grid-template-columns: 1fr; }
  .hero-controls { bottom: auto; top: calc(var(--header-h) + 1rem); }
  .hero > .proto-tag { top: auto; bottom: 1rem; }
  .progress { display: none; }
}
@media (max-width: 600px) {
  .steps { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts-grid { grid-template-columns: 1fr; }
  .facts-grid li { border-right: 0 !important; }
  .facts-grid li + li { border-top: 1px solid var(--color-border); }
}

/* ---------- home hero still photo ---------- */
.hero-media .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }

/* ---------- home recent work strip ---------- */
.work-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.75rem, 1.4vw, 1.25rem); }
.work-strip .media, .work-strip .ph { aspect-ratio: 3/4; }
@media (max-width: 860px) { .work-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Real photo or video behind the hero: darker scrim so the headline and header stay readable over bright skies. */
.hero--media .hero-scrim { background:
  linear-gradient(to bottom, rgba(10, 20, 33, .7) 0%, transparent 25%),
  linear-gradient(to right, rgba(10, 20, 33, .8) 0%, rgba(10, 20, 33, .5) 40%, rgba(10, 20, 33, .1) 75%, transparent 100%),
  linear-gradient(to top, rgba(10, 20, 33, .6) 0%, transparent 50%); }
