/* ==========================================================================
   ABLENTRA V15 — responsive + imagery hardening (Phases 7-8, 2026-11-08).
   Linked LAST on all 61 pages, after v15-base.css (after v15-services.css
   on the 12 service pages). Loaded last on purpose: these are narrow,
   high-specificity guards that must win over the ~25 earlier sheets.
   Code-level review only — no live browser exists in this VM, so every
   rule below was checked against the actual base CSS it overrides, and
   verified with jsdom + static checks (see reports/phase7-8-*.md).
   Brand tokens: Manrope, bg #DDDDDD, text #0E0E0F, CTA #FF5A1F.
   ========================================================================== */

/* --- 1. Horizontal-overflow guard (375/390/430/tablet/desktop/large) -----
   overflow-x: clip (not hidden) so position:sticky children keep working
   and no vertical scrolling behaviour changes. Covers the rotated hero
   .tilt frames (rotate -1.4deg) and any full-bleed strip that is a few
   pixels wider than the viewport. Verified: no element in the tree uses
   a fixed width above the viewport except the rules handled below. */
html, body {
  overflow-x: clip;
}
img, video, svg {
  max-width: 100%;
}
h1, h2, h3, p, li, figcaption, .kicker, .lede {
  overflow-wrap: break-word;
}

/* --- 2. D7: hero-caption legibility, pinned (all pages) -------------------
   Base conflict in the tree: experience-polish/site-core-c3 position the
   .page-hero-caption ABSOLUTELY over the photo with a dark scrim, while
   ablentra-fixes-bundle:535 forces it static with grey #5b5f66 text.
   Whichever wins, the caption must never be pale text over a bright
   photo. Pin it below the image in dark ink on the page background:
   #3F434A on #DDDDDD = ~8.6:1. Attribution links stay dark ink too.
   QA FIX 2026-11-08 (D7 was NOT fixed): the rule above lost to
   ablentra-signature-redesign.css:307-312, which sets
   `.page-hero:not(.home-hero) figcaption` and `.annot-notes` to white
   rgba(255,255,255,.86) on translucent white rgba(255,255,255,.075)
   !important — specificity 0,2,1/0,3,0 beats the plain .page-hero-caption
   (0,1,0) even though this sheet loads last. The captions render STATIC
   below the photo (position forced static), so white-on-light was
   ~1.6:1 and illegible on every industry + service hero. The selectors
   below carry the :not(.home-hero) qualifier so they outrank the
   signature rule (0,3,0 / 0,3,1) and the dark ink actually wins.
   QA FIX 2 (2026-11-08): the caption sits at the bottom of a figure
   with border-radius:32px + overflow:hidden, so its first character
   was clipped by the rounded bottom-left corner (the corner intrudes
   ~9-12px at the caption's height). Left padding is 1rem so the text
   clears the corner; the old .15rem left the "P" of "Products" cut. */
.page-hero:not(.home-hero) .page-hero-caption,
.page-hero:not(.home-hero) .annot-notes,
.page-hero:not(.home-hero) .services-hero-visual figcaption,
.page-hero:not(.home-hero) .page-hero-visual figcaption {
  position: static !important;
  background: none !important;
  border: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #3F434A !important;
  padding: .6rem 1rem 0 !important;
  font-size: .8rem !important;
  line-height: 1.45 !important;
}
.page-hero:not(.home-hero) .page-hero-caption a,
.page-hero:not(.home-hero) .services-hero-visual figcaption a {
  color: #0E0E0F !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- 3. D10: hero figures never render as a large empty black area ------
   The /process/ hero image was loading="lazy" (fixed in markup to eager
   + fetchpriority="high" + a preload link). While any hero figure image
   is still loading, the figure now shows the brand light grey instead
   of the black that the old .hero-video background (#111) used to show. */
.page-hero-figure,
.page-hero-figure img,
.split-fig.page-hero-figure {
  background: #DDDDDD;
}
.page-hero-figure {
  border-radius: 18px;
}

/* --- 4. Review cards fit a 375px screen ----------------------------------
   .rev-card was flex: 0 0 380px — wider than a 375px viewport, so the
   first card was always cropped by the marquee mask on the smallest
   phones. 320px fits 375px with the page padding intact. */
@media (max-width: 420px) {
  .rev-card {
    flex-basis: 320px !important;
    max-width: 320px !important;
  }
}

/* --- 5. Blog article tables at phone widths ------------------------------
   .article-body table is width:100% with wrapping cells, so it cannot
   overflow the page — but at 375px four columns were cramped. Smaller
   type + padding keeps the tables readable without a layout change. */
@media (max-width: 640px) {
  .article-body table {
    font-size: .85rem;
  }
  .article-body th,
  .article-body td {
    padding: .45rem .5rem;
    overflow-wrap: anywhere;
  }
}

/* --- 6. Touch targets -----------------------------------------------------
   The hero-video play/pause toggle was 34px at <=767px (below the 44px
   minimum). The floating back-to-top button is already 48px. */
@media (max-width: 767px) {
  .hero-video-toggle {
    width: 44px !important;
    height: 44px !important;
  }
}
@media (max-width: 420px) {
  .v15-to-top {
    bottom: 1rem;
    right: 1rem;
  }
  .v15-submit {
    width: 100%;
  }
}

/* --- 7. Forms: full-width submit + no iOS zoom (belt & braces) -----------
   Base already sets 16px inputs site-wide (site-core-a.css:1457,
   !important) so iOS does not zoom on focus; re-asserted here so no
   later sheet can reintroduce sub-16px form text. */
input, select, textarea {
  font-size: 16px !important;
}

/* --- 8. Reduced motion — covers marquee, rotator, tilt, reveals ---------
   Base coverage already exists (main.css:1205 global duration kill,
   reviews-marquee reduced-motion block, v15-nav/footer/base blocks,
   premium-2026-11-07.css rotator block). Re-pinned here at last load
   position so the homepage review marquee and the hero rotator never
   animate for users who asked for reduced motion. NOTE (corrected per
   QA C2): the hero rotator does NOT swap under prefers-reduced-motion —
   site-core-a.js gates the interval on reduceMotion and returns early
   before setInterval is created (verified in jsdom). */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  .rev-track,
  .pq-marquee-track {
    animation: none !important;
  }
  .pq-rotator {
    transition: none !important;
    transform: none !important;
  }
  .tilt,
  .annot-wrap.tilt {
    transform: none !important;
  }
  .rev-card,
  .proc-card,
  .hub-card {
    transition: none !important;
  }
}

/* ------------------------------------------------------------------ */
/* TEXT REVEAL SPEC (owner 2026-11-08) — D-06 fix.                    */
/* [data-word-reveal] headings must be DIM grey (not invisible, not   */
/* blurred) before reveal, then word-by-word grey -> bold black on     */
/* scroll. premium-2026-11-07.js owns that (grey #b3b3b8 -> inherit,   */
/* 30ms/word stagger, IntersectionObserver + 6s/12s failsafes).        */
/* These headings ALSO carry data-reveal, so the generic reveal        */
/* systems hid them (opacity:0 via motion-sites / site-core-b) and     */
/* blurred them (filter:blur(6px) via .abl-rv, abl-reveal.js) —        */
/* masking the dim-grey state entirely (measured: opacity 0 +          */
/* blur(6px) below the fold). Exempt them from both systems here;      */
/* abl-reveal.js also skips any element that is / contains a           */
/* [data-word-reveal], so ancestor cards cannot blur the text either.  */
/* ------------------------------------------------------------------ */
html.js:not(.ms-failsafe) [data-word-reveal][data-reveal],
html.js [data-word-reveal].abl-rv:not(.abl-in),
html.js [data-word-reveal].abl-rv.abl-in {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}
html.js:not(.ms-failsafe) [data-word-reveal].ms-in.ms-in {
  animation: none !important;
}

/* --- M-A2 FIX 2026-11-08 (mobile QA): "Sources and further reading" links ---
   site-core-b.css (bundled mobile-phase4) sets `main li>a:not(.btn){
   display:inline-flex}` (<=767px) for 44px tap targets. On article Sources
   lists the link text is wrapped in .pq-word spans by the word-reveal, so
   the link became a single-line flex row: words jammed with no spaces,
   417-530px wide in a 332px <li>, cut off at the viewport edge.
   Scoped override: inside .article-body only, long text links lay out as
   normal inline text and wrap. The inline-flex tap-target rule is untouched
   everywhere else (sitemap, menus, .case-steps, .form-note, footer). */
@media (max-width:767px){
  .article-body li>a:not(.btn){display:inline}
}

/* --- M-B1 FIX 2026-11-08 (mobile QA), REVERSED 2026-11-08 (white hero) ----
   ORIGINAL (dark hero): the D-02 caption colour #3F434A (~8.6:1) assumes
   the light #E8E5DF strip the 11 service pages put .annot-notes on. On
   the hub, the hero figure has no light strip: #3F434A on the near-black
   hero bg #0E0E0F measured ~1.9:1. Hub-only override: <figure
   class="services-hero-visual"> exists ONLY on /services/ (service pages
   use figure.annotated + figcaption.annot-notes, guarded additionally by
   :not(.annot-notes)). Light-on-dark caption colour, same file + later
   position + higher specificity (0,4,1 vs D-02 0,3,1) so it wins over the
   D-02 !important rule. Service-page captions UNCHANGED.
   HUBCAP FIX 2026-11-08: the light colour is correct ONLY <=767px, where
   ablentra-fixes-bundle:536 sets the figure background to none so the
   caption sits on the dark hero section (#0E0E0F, measured 8.79:1). Above
   767px the figure keeps its own #E8E5DF background (experience-polish
   :96 / site-core-c3:99), so the light caption measured 1.1:1 at 1440
   and 1024. The light rule is therefore scoped to max-width:767px; at
   desktop the D-02/D7 rule above (#3F434A !important, same scope) takes
   over — #3F434A on #E8E5DF ≈ 7.91:1. No new desktop rule needed.
   REVERSED 2026-11-08 (owner white-hero change): the hub hero is now
   WHITE (v15-services.css §4), so at <=767px the caption sits on white,
   not on #0E0E0F — the light rgba(244,244,242,.70) would fail (~1.3:1).
   The rule now pins the SAME dark #3F434A at <=767px that D-02 already
   pins at desktop: hub caption is dark #3F434A at ALL widths
   (#3F434A on white ≈ 9.6:1; on #E8E5DF ≈ 7.9:1). Selector kept
   unchanged so the override still outranks D-02 if the hero ever goes
   dark again — only the colour value changed. */
@media (max-width: 767px) {
  .page-hero:not(.home-hero) .services-hero-visual>figcaption:not(.annot-notes){
    color: #3F434A !important;
  }
}

/* --- V15-IND-01 FIX 2026-11-08 (independent verification blocker) ---------
   The 11 service pages' annotation note was effectively invisible: the
   D-02 rule above sets #3F434A !important on the figcaption ELEMENT, but
   the text sits in a child <p> whose own rule `.annot-notes p {
   color: var(--muted) }` (main.css:1241, site-core-a.css:1248) beats
   inheritance, and --muted resolves light inside the dark hero:
   rgba(255,255,255,0.78) on the #E8E5DF strip = 1.2:1. D-02 measured
   the figcaption element (7.91:1), not the paragraph — hence missed.
   Scoping (verified by grep + render 2026-11-08): `figcaption.annot-notes`
   exists ONLY on the 11 service pages (1 each, inside section.page-hero,
   figure.annotated, div.page-hero-visual); it is the ONLY figcaption
   with a <p> child anywhere on those pages. Industry captions use
   .page-hero-caption (no .annot-notes) and the services-hub caption is
   a bare figcaption with no <p> child — neither can match this rule.
   Specificity 0,3,1 + !important beats .annot-notes p (0,1,1).
   Target: #3F434A on #E8E5DF ≈ 8.3:1. The orange <strong> "Note" is
   untouched. The parent's broader alternates were NOT needed:
   `.page-hero-visual figcaption p` would match the same single <p>
   per page (no extra coverage), and `.services-hero-visual figcaption p`
   matches nothing on service pages (their figure is .annotated, not
   .services-hero-visual; the hub figure's figcaption has no <p>). */
.page-hero:not(.home-hero) .annot-notes p {
  color: #3F434A !important;
}

/* ================= V16 (2026-11-08) =================
   K18 blog top images, L19 tap targets, mobile process = desktop pinned
   behaviour, services-hero / industry / CTA mobile polish (video findings).
   Appended last in v15-responsive.css (loads last) so these win ties.
   Preserved: D-02 / IND-01 caption colours above, white service heroes,
   the 8 QA + 10 mobile fixes. No header/nav/footer/breadcrumb markup touched. */

/* --- K18: blog top images SMALLER + properly rounded (incl. the top) ---
   Root cause (measured): blog index hero img computed border-radius 0 on all
   corners — the only 18px rule lives in images-2026-10-28.css, which blog
   pages never link, and the figure has overflow:visible so nothing clips it
   (desktop 1136x710, mobile 323x202, square top corners in render).
   Article covers measured 1186x540 desktop / 355x266 mobile with img radius 0
   (only the figure clipped). Fix: explicit 20px radius on the IMG itself +
   overflow:hidden on the figure, and a smaller frame. Article pages carry
   exactly 1 content image each (verified) — no excess images to remove there;
   blog index has 1 hero + 15 article-card images (1 per article, no dupes). */
.article-cover{margin:0 auto 2.5rem;max-width:720px}
.article-cover img{border-radius:20px;max-height:360px}
.blog-hub-hero{max-width:880px;margin:1.75rem auto 0;overflow:hidden;border-radius:20px}
.blog-hub-hero img{display:block;width:100%;height:auto;aspect-ratio:16/9;max-height:420px;object-fit:cover;border-radius:20px}
@media (max-width:767px){
  .article-cover{margin-bottom:1.75rem}
  .article-cover img{aspect-ratio:16/10;max-height:240px}
  .blog-hub-hero img{max-height:200px}
}

/* --- L19: tap targets left open by the earlier mobile rounds ---
   D-M4 brand link 26px tall (measured 390px), D-M6 About explore links 28px.
   Visual logo/link size unchanged; only the hit area grows to 44px. */
.v15-brand{display:flex;align-items:center;min-height:44px}
.stage5-pillars a{display:inline-flex;align-items:center;min-height:44px}

/* --- V16 PROC: mobile process behaves EXACTLY like desktop ---
   Owner order: one step at a time, scroll-driven forward AND backward, smooth.
   Desktop is a pinned track (520vh, sticky 100svh, absolute steps, only
   .is-active opaque) driven by the ungated switcher in site-core-b2.js.
   The <=900px static vertical timeline (site-core-c3.css) + node lighting
   (proc-mobile.js) + spine (ablentra-mobile-pro.css S9) replaced that on
   mobile. This block neutralises the timeline and restores the pinned
   one-at-a-time layout at <=900px, mirroring the site-core-c2 <=820px rules.
   Scoped to html.js + no-preference so the no-JS / reduced-motion static
   lists still apply. The proc-mobile.js node classes are neutralised so the
   giant numerals never get the timeline badge background. */
@media (max-width:900px) and (prefers-reduced-motion:no-preference){
  html.js .proc-track{height:480vh!important}
  html.js .proc-stick{position:sticky!important;top:0!important;height:100vh!important;height:100svh!important;overflow:hidden!important;padding:clamp(5.5rem,10vh,7rem) clamp(1.1rem,4vw,3.5rem) clamp(1.5rem,4vh,3rem)!important}
  html.js .proc-grid{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:auto 1fr!important;gap:.5rem!important;margin-top:clamp(1rem,3vh,2rem)!important}
  html.js .proc-rail{display:flex!important;flex-direction:row!important;gap:.15rem!important;justify-content:space-between!important}
  html.js .proc-rail li:has(.is-on){flex:1 1 auto}
  html.js .proc-dot{min-width:44px;gap:.5rem}
  html.js .proc-dot span{display:none}
  html.js .proc-dot.is-on span{display:inline}
  html.js .proc-stage{display:block!important;position:relative!important;margin-top:0!important}
  html.js .proc-stage::before,html.js .proc-stage::after{display:none!important}
  html.js .proc-step{position:absolute!important;inset:0!important;display:grid!important;grid-template-columns:1fr!important;grid-template-rows:minmax(0,1fr) auto auto!important;gap:.6rem!important;padding:0!important;background:none!important;border:0!important;border-radius:0!important;opacity:0!important;pointer-events:none!important;overflow:visible!important}
  html.js .proc-step.is-active{opacity:1!important;pointer-events:auto!important}
  html.js .proc-step .proc-card,html.js .proc-step.is-active .proc-card{grid-column:1!important;grid-row:1!important;max-height:36vh!important;aspect-ratio:auto!important;border-radius:20px!important;clip-path:inset(100% 0 0 0)!important;overflow:hidden!important;margin:0!important}
  html.js .proc-step.is-active .proc-card{clip-path:inset(0 0 0 0)!important}
  html.js .proc-card img{width:100%!important;height:100%!important;object-fit:cover!important}
  html.js .proc-step .proc-text,html.js .proc-step.is-active .proc-text{grid-column:1!important;grid-row:2!important;position:relative!important;max-width:30rem!important;margin:0!important;padding:0!important;opacity:0!important;transform:translate3d(0,24px,0)!important}
  html.js .proc-step.is-active .proc-text{transform:none!important;opacity:1!important}
  html.js .proc-step .proc-num,html.js .proc-step.is-active .proc-num{grid-column:1!important;grid-row:3!important;position:static!important;width:auto!important;height:auto!important;display:block!important;justify-self:start!important;align-self:end!important;font-size:clamp(5rem,28vw,9rem)!important;line-height:.8!important;letter-spacing:-.05em!important;background:none!important;border:0!important;border-radius:0!important;color:#FF5A1F!important;opacity:0!important;transform:translate3d(0,40px,0)!important;pointer-events:none!important}
  html.js .proc-step.is-active .proc-num{transform:none!important;opacity:1!important}
  html.js .proc-num.is-on,html.js .proc-num.is-done{border-color:transparent!important;background:none!important;box-shadow:none!important}
}

/* --- Services hero (video 0:41-0:44) + G5 dead space, mobile only ---
   Hero top padding was clamp(4.75rem,8vw,6.5rem) = 76px min on phones (the
   empty white band above the kicker); headline capped at 12ch wrapped
   "Three services. Designed properly." over 4 awkward lines — 16ch gives
   two clean lines. CTA band bottom dead space cut on mobile too. */
@media (max-width:767px){
  .page-hero{padding-top:3.5rem!important}
  section.page-hero h1.bz-hero-title{max-width:16ch}
  .cta-band{padding-block:2.25rem!important;margin-top:1.75rem!important}
}

/* --- Services detail cards (video 1:28): bullets + Explore links ---
   .sv-link measured .85rem (premium-port wins over fixes-bundle .95rem);
   raise to readable 1rem with a 44px hit area. */
@media (max-width:767px){
  .sv-bullets li{font-size:1rem}
  .sv-link{font-size:1rem;display:inline-flex;align-items:center;min-height:44px}
}

/* --- Industries (video 2:13-2:16): search pills + related links ---
   .query-chips li was .875rem on mobile — back to .95rem. .ind-links are
   inline "Related: a · b · c" links; "how we price" wrapped alone onto its
   own line reading as struck-through — keep each link intact on one line. */
.ind-links a{white-space:nowrap}
@media (max-width:767px){
  .query-chips li{font-size:.95rem;padding:.65rem 1rem}
}
