/* ===========================================================================
   Clearview v2 homepage layout.
   Adopts the formatting of the reference mockup (utility bar, full-bleed photo
   hero, icon trust strip, icon service cards, split "why" section with a stats
   panel, image CTA band) using the REAL site's copy.

   Deliberately NOT carried over from the mockup: the invented stats
   (10,000+ hours / 500+ investigations / 100%), the fabricated testimonials,
   the placeholder phone and licence, and the "Available 24/7" claim. Their real
   hours are Mon-Fri 8am-6pm PT, case-dependent.
   =========================================================================== */

/* --- utility bar ---------------------------------------------------------- */
.ubar{background:#030c17;border-bottom:1px solid #12293f;font-size:.78rem;color:#9fb0c2}
.ubar .container{display:flex;justify-content:space-between;align-items:center;
  gap:18px;padding:9px 0;flex-wrap:wrap}
.ubar .grp{display:flex;gap:22px;align-items:center;flex-wrap:wrap}
.ubar .ub{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
.ubar svg{width:13px;height:13px;flex:0 0 13px;stroke:var(--gold);fill:none;
  stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* --- header --------------------------------------------------------------- */
.hdr2 .nav{min-height:92px;gap:24px}
.hdr2 .brand img{width:74px;height:74px;border-radius:50%;
  box-shadow:0 0 0 1px rgba(201,151,63,.35),0 6px 22px rgba(0,0,0,.5)}
.callbox{display:flex;flex-direction:column;align-items:flex-end;
  border:1px solid #2a4c70;border-radius:6px;padding:8px 16px;background:#08182a}
.callbox a{font-family:Georgia,serif;font-size:1.18rem;color:#fff;letter-spacing:.01em}
.callbox span{font-size:.7rem;color:#9fb0c2;letter-spacing:.08em;text-transform:uppercase}

/* --- full-bleed hero ------------------------------------------------------ */
.hero2{position:relative;min-height:620px;display:flex;align-items:center;
  overflow:hidden;border-bottom:1px solid #17324f}
/* 2026-08-09: client asked to replace the skyline photo with the brand seal.
   Same gradient as .page-hero (sitewide consistency) instead of a photo -
   the seal is a circular badge, not a wide image, so it's placed as its own
   img rather than stretched as a cover background (see make_home_logo.py).
   The old .scrim/.scrim2 layers existed only to keep text readable over a
   busy photo; a flat gradient doesn't need them. */
.hero2 .bg{position:absolute;inset:0;background:
  radial-gradient(circle at 80% 15%,rgba(45,101,169,.24),transparent 32%),
  linear-gradient(135deg,#0a1e33,#03090f)}
.hero2 .container{position:relative;z-index:2;padding:76px 0;
  display:flex;align-items:center;justify-content:space-between;gap:40px}
.hero2 .inner{max-width:660px}
.hero-badge{width:340px;height:340px;flex:0 0 auto;
  filter:drop-shadow(0 10px 40px rgba(0,0,0,.5))}
/* font-size set once, near the bottom of this file, with the real-Georgia
   fit history - do not set it here too, that's what caused a stale wrong
   value to sit alongside a correct override and cost real debugging time. */
.hero2 h1{font-family:Georgia,serif;font-weight:700;line-height:1.08;
  margin:.28em 0 .5em;
  text-shadow:0 2px 26px rgba(0,0,0,.7)}
.hero2 h1 em{font-style:normal;color:var(--gold-soft);display:block}
.hero2 p{font-size:1.06rem;color:#d7e2ee;max-width:560px;
  text-shadow:0 1px 14px rgba(0,0,0,.6)}
.hero2 .actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:30px}

/* --- trust strip with icons ----------------------------------------------- */
.tstrip{background:#061524;border-bottom:1px solid #12293f}
.tstrip .container{display:grid;grid-template-columns:repeat(5,1fr)}
.tstrip .ti{display:flex;align-items:center;justify-content:center;gap:9px;
  padding:17px 8px;border-right:1px solid #12293f;color:#cfdae7;
  font-size:.78rem;letter-spacing:.05em;text-transform:uppercase;text-align:center}
.tstrip .ti:last-child{border-right:0}
.tstrip svg{width:17px;height:17px;flex:0 0 17px;stroke:var(--gold);fill:none;
  stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

/* --- service cards with icons --------------------------------------------- */
/* 7 services in a 3-col grid would strand the last card alone on row 3, so the
   7th spans the full width as a deliberate wide card instead of an orphan.
   Same reasoning holds at 2 columns (7th alone on row 4), so the treatment runs
   from 641px up.

   FIXED 2026-08-14 - it must NOT run at one column. Below 641px the grid is a
   single 1fr column, and a grid item's automatic minimum size is its
   min-content, so this card's horizontal layout (62px icon + text + a nowrap
   "Learn more" link, all side by side) gave it a min-content of 358px. Because
   it spans 1/-1, that floor propagated to the whole column and the page could
   not render narrower than ~374px: every viewport below that got a horizontal
   scrollbar, which covers the common 360px Android width. Scoping the rules to
   the widths where a wide card is meaningful fixes it without restating any of
   the base .svc values as overrides, so there are no duplicated numbers to
   drift. Verified at 320/360/375/390/412 after the change. */
.svc-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
@media(min-width:641px){
  .svc-grid .svc:last-child{grid-column:1/-1;display:grid;
    grid-template-columns:auto 1fr;align-items:center;gap:24px}
  .svc-grid .svc:last-child .ico{margin-bottom:0}
  .svc-grid .svc:last-child .body{display:grid;
    grid-template-columns:1fr auto;align-items:center;gap:8px 26px}
  .svc-grid .svc:last-child h3{margin:0}
  .svc-grid .svc:last-child p{margin:0;grid-column:1}
  .svc-grid .svc:last-child a{grid-column:2;grid-row:1/3;white-space:nowrap;
    align-self:center}
}
.svc{background:linear-gradient(160deg,#0d2138,#081726);border:1px solid #17324f;
  border-radius:8px;padding:26px 24px;position:relative;cursor:pointer;
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease}

/* --- whole card is the click target -------------------------------------- */
/* The <a> stays the only tab stop and keeps its accessible name; this overlay
   just extends its hit area over the card. */
.svc a.stretch::after{content:"";position:absolute;inset:0;border-radius:8px}
.svc a.stretch{display:inline-flex;align-items:center;gap:8px}
/* visually hidden suffix so each link reads as "Learn more about X" rather
   than seven identical "Learn more" links to a screen reader */
.svc .sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.svc .arw{transition:transform .18s ease;display:inline-block}

/* hover AND focus-within, so keyboard users get the same affordance */
.svc:hover,.svc:focus-within{border-color:#3a6fa5;transform:translateY(-3px);
  background:linear-gradient(160deg,#123255,#0a1e31);
  box-shadow:0 12px 30px rgba(0,0,0,.45)}
.svc:hover .ico,.svc:focus-within .ico{background:#12456f;border-color:#3d7fbb}
.svc:hover .ico svg,.svc:focus-within .ico svg{stroke:var(--gold-soft)}
.svc:hover .arw,.svc:focus-within .arw{transform:translateX(5px)}
.svc:hover h3,.svc:focus-within h3{color:#fff}
.svc:hover a.stretch,.svc:focus-within a.stretch{color:var(--gold-soft)}

/* visible keyboard focus ring on the card, not just the small link */
.svc a.stretch:focus-visible{outline:none}
.svc:focus-within{outline:2px solid var(--gold);outline-offset:3px}

@media(prefers-reduced-motion:reduce){
  .svc,.svc .arw{transition:none}
  .svc:hover,.svc:focus-within{transform:none}
  .svc:hover .arw,.svc:focus-within .arw{transform:none}
}
.svc .ico{width:62px;height:62px;border-radius:8px;background:#0b2f4e;
  border:1px solid #24547f;display:grid;place-items:center;margin-bottom:15px}
.svc .ico svg{width:23px;height:23px;stroke:var(--gold);fill:none;
  stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
/* gold-metallic raster icons (make_service_icons.py), added 2026-08-08 to
   match the client's reference mockup's dimensional icon art - replaced the
   flat-line svg() icons on the 7 service cards specifically. object-fit
   handles the source crops' varying aspect ratios (the truck is wider than
   the eye, etc.) inside a fixed square slot. Bumped twice 2026-08-08 per
   Pete (30px->36px->42px, container 46->54->62px, same ~68% fill ratio
   throughout) - "a little bigger" x2. */
.svc .ico img{width:42px;height:42px;object-fit:contain}
.svc h3{font-family:Georgia,serif;font-size:1.06rem;margin:0 0 8px;color:#f4f7fb}
.svc p{color:#9fb0c2;font-size:.93rem;margin:0 0 16px;line-height:1.55}
.svc a{font-size:.74rem;letter-spacing:.09em;text-transform:uppercase;
  font-weight:700;color:#7fb0f5}
.svc a:hover{color:var(--gold-soft)}

/* --- why / stats split ---------------------------------------------------- */
.why{display:grid;grid-template-columns:1.08fr .92fr;gap:46px;align-items:center}
.why .badge-logo{width:104px;height:104px;border-radius:50%;margin-bottom:20px;
  box-shadow:0 0 0 1px rgba(201,151,63,.3)}
/* Investigator photo, 2026-08-14. Sits in the RIGHT column, where the four
   .statcard tiles used to be - the client asked for the photo in their place.
   width/height are on the element too so the box is reserved before the image
   decodes and the section can't shift; it is below the fold, so unlike the LCP
   hero it is safe to lazy-load and async-decode. aspect-ratio keeps that
   reserved box correct even if the art is regenerated at a different size. */
/* Right column is a column flex so the About button sits centred ABOVE the
   photo (client request 2026-08-14, moved out of the left text column).
   align-items:center keeps the button at its natural inline-flex width instead
   of stretching it the full column, which is the default in a column flex. */
.why .why-media{display:flex;flex-direction:column;align-items:center;gap:22px;
  align-self:center}
.why .why-photo{width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;
  border-radius:8px;display:block;
  border:1px solid #17324f;box-shadow:0 14px 34px rgba(0,0,0,.45)}
.statgrid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
.statcard{background:linear-gradient(160deg,#0d2138,#081726);border:1px solid #17324f;
  border-radius:8px;padding:24px 20px;text-align:center}
.statcard .n{font-family:Georgia,serif;font-size:2.2rem;color:var(--gold-soft);
  line-height:1;margin-bottom:6px;display:block}
.statcard .l{font-size:.72rem;letter-spacing:.09em;text-transform:uppercase;color:#9fb0c2}
.statcard svg{width:22px;height:22px;stroke:var(--gold);fill:none;stroke-width:1.6;
  stroke-linecap:round;stroke-linejoin:round;margin-bottom:12px}

/* --- CTA band --------------------------------------------------------------
   2026-08-09: skyline photo removed per client request (same change as the
   hero) - now the same flat gradient as .hero2/.page-hero, sitewide
   consistency. .scrim dropped: it only existed to darken the photo. */
.ctaband{position:relative;overflow:hidden;border-top:1px solid #17324f;
  border-bottom:1px solid #17324f}
.ctaband .bg{position:absolute;inset:0;background:
  radial-gradient(circle at 80% 15%,rgba(45,101,169,.24),transparent 32%),
  linear-gradient(135deg,#0a1e33,#03090f)}
.ctaband .container{position:relative;z-index:2;display:flex;align-items:center;
  justify-content:space-between;gap:26px;padding:52px 0;flex-wrap:wrap}
.ctaband h2{margin:0 0 8px;font-family:Georgia,serif;font-size:clamp(1.6rem,2.6vw,2.1rem)}
.ctaband p{margin:0;color:#c3d2e2}

@media(max-width:980px){
  .svc-grid{grid-template-columns:repeat(2,1fr)}
  .why{grid-template-columns:1fr;gap:34px}
  .tstrip .container{grid-template-columns:repeat(2,1fr)}
  .tstrip .ti{border-bottom:1px solid #12293f}
  .hero2{min-height:auto}
  .hero2 .container{padding:56px 0}
  .hero-badge{display:none}
}
@media(max-width:640px){
  .svc-grid{grid-template-columns:1fr}
  .statgrid{grid-template-columns:1fr}
  .tstrip .container{grid-template-columns:1fr}
  .ubar .container{justify-content:center;text-align:center}
  .callbox{display:none}
}
/* CORRECTED 2026-08-08: the mobile media query that used to live here (24px
   at 320 / 32px at 480, "5vw + 7px") was fit on a box with NO Georgia font
   installed - Chromium silently substituted DejaVu Serif, narrower than real
   Georgia, so every "fits" from that pass was never true for an actual
   visitor. Caught when Pete's real browser (true Georgia) showed a 3-line
   wrap even at desktop width, which the same broken methodology had also
   called safe. Real Georgia installed here via `ttf-mscorefonts-installer`
   (Microsoft's own redistribution package - not a bundled font file) so
   testing now matches reality; `fc-match Georgia` must report "Georgia" as
   the resolved family before trusting any render of this element again.
   Refit as ONE continuous two-point clamp (20px verified-safe at 320px,
   48px verified-safe at the desktop-pinned width) instead of a separate
   floor + media-query patch - simpler and there's no seam to get out of
   sync. Verified clean at 320/375/390/480/600/768/900/1024/1280/1440/1920px,
   the full range, not a spot check. Do not change without re-verifying that
   same sweep with real Georgia installed. */
.hero2 h1{font-size:clamp(18px, calc(12px + 2.5vw), 48px)}

/* --- sitewide v2 carry-through, added 2026-08-08 ------------------------- */

/* About: Firm Information sidebar. Reuses .why's existing 2-col grid rather
   than inventing a new layout system; .firmcard styles the second column as
   a bordered reference card instead of .why's plain stat panel. */
.firmcard{background:linear-gradient(160deg,#0d2138,#081726);
  border:1px solid #17324f;border-radius:8px;padding:28px 26px;align-self:start}
.firmcard h2{margin-top:0;font-size:1.3rem}
.firmcard p{line-height:2}

/* Services page: icon cards keep the site's existing "FILE / XX" tag - it
   predates this pass and is worth keeping, just restyled to sit under the
   icon instead of as the card's only visual marker. Uses --gold-soft, not
   the older --blue, to match the rest of the v2 accent system. */
.svc .body .file{display:block;color:var(--gold-soft);font-size:.68rem;
  letter-spacing:.14em;text-transform:uppercase;margin-bottom:6px}

/* Process page: icon beside each step's numeral, same treatment as the
   trust-strip icons (small, gold, inline). */
.step{position:relative}
.step-ico{position:absolute;top:2px;right:0;width:22px;height:22px}
.step-ico svg{width:100%;height:100%;stroke:var(--gold);fill:none;
  stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

/* Service-detail pages: icon badge above the eyebrow, ties the page back to
   its homepage/services-page card. */
.svc-icon{width:52px;height:52px;border-radius:10px;background:#0b2f4e;
  border:1px solid #24547f;display:grid;place-items:center;margin-bottom:16px}
.svc-icon svg{width:26px;height:26px;stroke:var(--gold);fill:none;
  stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.svc-icon img{width:34px;height:34px;object-fit:contain}

/* Service-detail page-hero photos, added 2026-08-08. Same .bg/.scrim/.scrim2
   layering .hero2 used to have back when it was a photo too (2026-08-09:
   .hero2 switched to a flat gradient + logo badge, dropping its scrims -
   these ones stay, service pages are still photos and need the contrast
   help). Each service gets its own background-image rule
   keyed off a per-page class (svc-<slug>, matching SERVICE_ICON_BY_SLUG) -
   CSP here forbids 'unsafe-inline' style-src, so this can't be an inline
   style= attribute on the .bg div, it has to be a stylesheet rule per page. */
.page-hero{position:relative;overflow:hidden}
.page-hero .bg{position:absolute;inset:0;background-position:center;
  background-size:cover;background-repeat:no-repeat}
.page-hero .scrim{position:absolute;inset:0;background:
  linear-gradient(100deg,rgba(4,12,22,.94) 0%,rgba(4,12,22,.82) 40%,
                  rgba(5,16,29,.55) 68%,rgba(5,16,29,.32) 100%)}
.page-hero .scrim2{position:absolute;inset:0;background:
  linear-gradient(180deg,rgba(3,10,18,.4) 0%,transparent 24%,transparent 72%,rgba(3,10,18,.78) 100%)}
.page-hero .container{position:relative;z-index:2}
.page-hero.has-photo h1,.page-hero.has-photo .lead{text-shadow:0 2px 20px rgba(0,0,0,.7)}
.page-hero.has-photo .breadcrumbs{text-shadow:0 1px 10px rgba(0,0,0,.65)}
.page-hero.has-photo .svc-icon{background:rgba(11,47,78,.85);backdrop-filter:blur(2px)}

.page-hero.svc-cargo-theft .bg{background-image:url(hero-cargo-theft.webp)}
.page-hero.svc-employee-investigations .bg{background-image:url(hero-employee-investigations.webp)}
.page-hero.svc-insurance-fraud .bg{background-image:url(hero-insurance-fraud.webp)}
.page-hero.svc-ip-enforcement .bg{background-image:url(hero-ip-enforcement.webp)}
.page-hero.svc-infidelity .bg{background-image:url(hero-infidelity.webp)}
.page-hero.svc-workers-comp-fraud .bg{background-image:url(hero-workers-comp-fraud.webp)}
.page-hero.svc-missing-persons .bg{background-image:url(hero-missing-persons.webp)}

/* --- brand lockup: firm name on ONE line, added 2026-08-14 ----------------
   Client request: "CLEARVIEW INVESTIGATIVE SOLUTIONS" on a single line rather
   than breaking after INVESTIGATIVE. The <br> was hard-coded in the markup, so
   it is removed in v2_shared.transform_brand() and the name wrapped in .bname;
   CSS alone could not have undone it.

   The available width is genuinely PIECEWISE, not a smooth function of the
   viewport, because two siblings appear at fixed breakpoints: .navlinks at
   981px (~494px wide) and .callbox at 641px. Max one-line size, measured with
   real Georgia installed (fc-match Georgia MUST report Georgia before trusting
   any render here - see the .hero2 h1 note above for why that matters):

     >=1280px    fits to 24px+      full size, nothing needed
     981-1279px  fits to 13.4px     too tight at .86rem, so the nav links give
                                    back a little padding and size in this band
                                    only, which lifts the ceiling to 16.4px.
                                    Shrinking the logo here was MEASURED and
                                    changes nothing at all - the constraint is
                                    the nav, not the badge - so the badge is
                                    deliberately left at 74px.
     641-980px   fits to 16px+      full size, nothing needed
     <=640px     fits 9.3-14.2px    the only band that has to scale.

   Letter-spacing is .08em rather than the .1em used when the name was stacked:
   a 33-character single line needs the tightening, and it alone bought ~3px of
   headroom. Below 640px the whole lockup scales together (tagline in em, not
   rem) so the name never ends up smaller than the strapline beneath it. */
.hdr2 .bname{display:block;white-space:nowrap;letter-spacing:.08em}

@media(min-width:981px) and (max-width:1279px){
  .hdr2 .nav{gap:16px}
  .navlinks{font-size:.78rem}
  .navlinks>a,.navitem>button{padding:10px 8px}
}
@media(max-width:640px){
  .hdr2 .brand img{width:52px;height:52px}
  .hdr2 .nav{gap:12px}
  .hdr2 .brand-text{font-size:clamp(9px,calc(-3.7px + 3.97vw),13.76px)}
  .hdr2 .brand-text small{font-size:.7em}
}
