/* ==========================================================================
   ABLENTRA V18 — homepage "How It Works" fixes (2026-11-09, owner order).
   Linked ONLY on / (index.html), AFTER v16-averlo.css + the other V18
   sheets, so these rules win ties. Scope: main#main section.proc on the
   homepage only. Palette (V17 definitive, unchanged): accent #FE5C22,
   black #111112, canvas #F6F6F4, white #FFFFFF. No new sections, no
   content changes, no Cal.com changes. The pinned one-step-at-a-time
   mechanism (site-core-b2.js + proc-mobile.js) is untouched.
   --------------------------------------------------------------------------
   Averlo layout (kept, as specified): left "How it works" label + huge
   right heading; step pill + square indicators left; image centre;
   step title + text right; giant step numeral.
   What was wrong on laptop (reproduced 1440/1366, see QA screenshots):
   (a) the heading sat on ONE line at up to 72px and ran to the very
       edge of the black panel ("From first call to final launch." —
       period at the edge at 1518px+); Averlo's heading is TWO lines.
   (b) the giant numeral's element box ran past the viewport bottom on
       900px-tall laptops (1440x900: numeral bottom 904px) because the
       step grid's 1fr image row could not shrink below its content
       minimum, pushing the grid past the sticky viewport.
   Fixes: smaller heading cap + 14ch so it wraps to exactly two lines
   (Manrope's ch is ~0.66em, so 20ch still held the whole line);
   smaller numeral cap + line-height 1 + minmax(0,1fr) image row + more
   stick bottom padding so the whole step fits inside 100svh, including
   short (768px-tall) laptops. Mobile (<=900px) already fits and is
   untouched except for the clipping guards.
   ========================================================================== */

/* --- (a) HEADING: two lines on laptop/desktop, inside the panel --------- */
@media (min-width: 901px) {
  main#main section.proc .proc-sr {
    font-size: clamp(2.4rem, 3.8vw, 3.5rem) !important;
    line-height: 1.06 !important;
    max-width: 14ch !important;
  }
}

/* --- (b) NUMERAL + GRID: the whole step fits inside 100svh ------------- */
/* Numeral cap 9rem -> 7rem (144px -> 112px at 1440px) with line-height 1,
   so the glyph run no longer overflows the element box past the viewport
   edge; the stick gets the same bottom clearance the /process/ fix uses. */
@media (min-width: 901px) {
  main#main section.proc .proc-step .proc-num,
  main#main section.proc .proc-step.is-active .proc-num {
    font-size: clamp(4.5rem, 8vw, 7rem) !important;
    line-height: 1 !important;
  }
  main#main section.proc .proc-stick {
    padding-bottom: clamp(2.5rem, 5vh, 3.5rem) !important;
  }
  /* The actual overflow fix: a bare 1fr row keeps its content minimum
     and pushed the grid (and the numeral) past the sticky viewport.
     minmax(0,1fr) lets the image row shrink; the card can never force
     the grid taller than the stick. */
  main#main section.proc .proc-step,
  main#main section.proc .proc-step.is-active {
    grid-template-rows: minmax(0, 1fr) auto !important;
  }
  main#main section.proc .proc-card {
    min-height: 0 !important;
  }
}
/* Short laptops (<=800px tall): shrink the numeral and the stick's top
   padding further so step 5 still fits with its full copy. */
@media (min-width: 901px) and (max-height: 800px) {
  main#main section.proc .proc-step .proc-num,
  main#main section.proc .proc-step.is-active .proc-num {
    font-size: clamp(4rem, 7vw, 5.5rem) !important;
  }
  main#main section.proc .proc-stick {
    padding-top: clamp(4.5rem, 8vh, 5.5rem) !important;
  }
}

/* --- CLIPPING GUARDS (all viewports): steps list never past any edge ---- */
/* Same guards as the /process/ fix: grid children shrink properly, the
   section clips horizontal overflow. The pinned mechanism is untouched;
   the guards also cover the reduced-motion / no-JS static stacked list. */
main#main section.proc {
  overflow-x: clip !important;
}
main#main section.proc .proc-grid,
main#main section.proc .proc-stage,
main#main section.proc .proc-step,
main#main section.proc .proc-text {
  min-width: 0 !important;
  box-sizing: border-box !important;
}
main#main section.proc .proc-step {
  max-width: 100% !important;
}
main#main section.proc .proc-card img {
  max-width: 100% !important;
}
@media (prefers-reduced-motion: reduce) {
  main#main section.proc .proc-stage {
    padding-left: clamp(1rem, 3vw, 2rem) !important;
    padding-right: clamp(1rem, 3vw, 2rem) !important;
    box-sizing: border-box !important;
  }
}
html:not(.js) main#main section.proc .proc-stage {
  padding-left: clamp(1rem, 3vw, 2rem) !important;
  padding-right: clamp(1rem, 3vw, 2rem) !important;
  box-sizing: border-box !important;
}
