/* ============================================================
   RD-WHY — redesign item 8 (owner-approved 2026-11-10)
   Home → "Why Choose Approved By Saini" (section#why.rdy).
   Design: the final prototype's Home intro sheet (#homeIntro): an
   off-white paper sheet with a rounded top, a blue-dot eyebrow, a
   giant statement whose words morph as you scroll (not yet reached:
   light grey, thin and condensed; reached: bold near-black; the
   highlighted words: blue), small text underneath.
   Content mapping (the site's own text and data-i18n keys, unchanged):
     eyebrow    = the kicker            (why-kicker)
     statement  = the h2, then the paragraph (why-h2 + home-a4),
                  read as one statement; blue = the h2's own em.ac
                  ("Approved By Saini"), in every language
     underneath = the 4 ticks (glossary "i" kept) + "Contact us".
   The real <h2> and <p> are the visible statement: the shared morph
   engine rd-morph.r703.js (inline mode, since r701; + the paper theme
   in rd-morph.css) wraps their words in place and drives each word's
   --s (0 → 1). (Until r701 it drew an aria-hidden word copy and kept
   the real text for screen readers only.)
   Without JS (or if the script fails) the real h2 and p show as the
   statement in its final, fully revealed colours.
   The section above (What We Offer) is not touched: the sheet starts
   exactly at its bottom edge, never overlaps it. Its rounded corners
   show a 30px backdrop strip (.rdy-under, built by rd-morph.r703.js) that
   continues the last offer card's fixed photo, so the paper still
   reads as sliding up over that photo, as in the prototype. The
   paper and strip start on the first whole device pixel below the
   card (--rdy-snap, set by the script), so even the pixel row the
   card's edge shares with this section paints exactly as before.
   Linked ?v=rd1.
   ============================================================ */

/* Archivo (variable: wdth 62–125, wght 100–900) is pending the owner's OK to
   add the file; until assets/fonts/archivo-variable.woff2 exists the site's
   own Bricolage renders (the morph then steps 500 → 800 in weight, with colour). */
@font-face { font-family: "Archivo"; src: url(../fonts/archivo-variable.woff2) format("woff2-variations");
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }

#why.rdy {
  --rdy-paper: #f3f2ee;
  --rdy-ink: #050505;
  --rdy-ink2: #232322;           /* tick text  (15.6:1 on the paper) */
  --rdy-hair: rgba(5,5,5,.16);
  --rdy-blue: #1e5eff;           /* text-on-paper blue (4.6:1 on #f3f2ee) */
  --rdy-blue2: #1747c9;          /* hover / pressed */
  --rdy-dot: #3d8bff;            /* the prototype's bright blue — decorative only */
  --rdy-wide: "Archivo", "Bricolage", "Bricolage Grotesque", system-ui, sans-serif;
  --rdy-r: 30px;                 /* the sheet's top corners */
  /* the statement: ~45 words (the prototype's has 26), so a step smaller than its 31–74px */
  --rdy-fs: clamp(25px, calc(12.5px + 3.15vw), 54px);
  --rdy-lh: 1.1;
  position: relative;
  isolation: isolate;            /* the backdrop strip (-2) and the paper (-1) stay inside the section */
  color: var(--rdy-ink2);
  color-scheme: light;
  padding-block: clamp(76px, 12svh, 132px) clamp(76px, 13svh, 140px);
}
/* the paper sheet (rounded top). A layer of its own so the backdrop strip can sit under its corners. */
#why.rdy::before {
  content: ""; position: absolute; inset: var(--rdy-snap, 0px) 0 0; z-index: -1; pointer-events: none;
  background: var(--rdy-paper);
  border-radius: var(--rdy-r) var(--rdy-r) 0 0;
}
/* backdrop under the two rounded corners: the last offer card's fixed photo layers, continued 30px
   (rd-morph.r703.js clones .ofr-blur / .ofr-pic / .ofr-scrim into it with the card's own --photo etc.) */
#why.rdy > .rdy-under {
  position: absolute; left: 0; right: 0; top: var(--rdy-snap, 0px); height: var(--rdy-r); z-index: -2;
  clip-path: inset(0); pointer-events: none; overflow: hidden;
}
#why.rdy > .rdy-under::after {          /* the sheet's soft shadow on that photo */
  content: ""; position: absolute; inset: 0; z-index: 4;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.38));
}

#why.rdy .wrap > * + * { margin-top: 0; }

/* ---------- eyebrow (the kicker) ---------- */
#why.rdy .wrap > .rdy-lab {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0;
  font: 600 15px/1.3 var(--rdy-wide);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--rdy-ink);
}
#why.rdy .rdy-lab::before {          /* centred on the first line, also when a long translation wraps */
  content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--rdy-dot);
  margin-top: calc((1.3em - 9px) / 2);
}
#why.rdy.rdm-af .rdy-lab { font-stretch: 125%; }

/* ---------- the statement ---------- */
#why.rdy .wrap > .rdy-st {
  position: relative;
  margin-top: clamp(18px, 2.2vw, 26px);
  max-width: 1100px;
  font-family: var(--rdy-wide);
  font-size: var(--rdy-fs);
  line-height: var(--rdy-lh);
  letter-spacing: -.01em;
  color: var(--rdy-ink);
}
/* the real heading + paragraph: the statement in its final colours (no JS, reduced data, script failed) */
#why.rdy .rdy-st > h2,
#why.rdy .rdy-st > p {
  margin: 0; max-width: none;
  font-family: var(--rdy-wide); font-size: 1em; font-weight: 800; line-height: inherit;
  letter-spacing: inherit;
  color: var(--rdy-ink);
  text-wrap: pretty;
}
#why.rdy .rdy-st em.ac {                 /* keep the markup, drop the gradient: solid text-on-paper blue */
  font-style: normal; color: var(--rdy-blue);
  background: none; -webkit-background-clip: border-box; background-clip: border-box;
  -webkit-text-fill-color: currentColor;
}

/* the morph of each word: rd-morph.css (paper theme), by rd-morph.r703.js — in inline mode (since r701): the words of the
   real heading and paragraph are wrapped in place, so they stay the visible text. The copy-mode rule below (an
   aria-hidden word copy, the real text kept for screen readers only) applies only if this section is set back to copy mode.
   While the words morph, plain wrapping (as rd-morph.css does for inline statements): Chrome's text-wrap: pretty does not
   count a word's end padding at a line end, and the padding is what keeps the line breaks still during the morph */
#why.rdy.rdm-inline.rdm-on .rdy-st > h2,
#why.rdy.rdm-inline.rdm-on .rdy-st > p { text-wrap: wrap; font-weight: 500; }   /* 500: the spaces between the words, as the copy's lines had */
/* the heading balanced, as the copy's heading line was — not by text-wrap: balance while the words morph (Chrome's balancing
   does not count the end padding of a line's last word: with the first step's narrow glyphs the whole heading fitted one
   line at 390-393 px, 5 px past the screen). rd-morph.r703.js balances it once in its final state and keeps those lines
   with plain wrapping in the measure of the widest one (--rdm-bal), which counts the padding in every state. A width, not a
   max-width: a one-line heading that only fitted because balancing ignores its last word's 1-2 px end padding may need
   that much more than the column (it reaches into the column's side padding; nothing paints there) */
#why.rdy.rdm-inline.rdm-on .rdy-st > h2 { width: var(--rdm-bal, auto); max-width: none; }
#why.rdy.rdm-copy.rdm-on .rdy-st > h2,
#why.rdy.rdm-copy.rdm-on .rdy-st > p {   /* still read by screen readers and search engines */
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* scripts that join letters or hang marks on a headline: no tracking, more line room */
:lang(ar) #why.rdy .rdy-st, :lang(pa) #why.rdy .rdy-st, :lang(zh) #why.rdy .rdy-st { letter-spacing: 0; }
:lang(ar) #why.rdy .rdy-lab, :lang(pa) #why.rdy .rdy-lab, :lang(zh) #why.rdy .rdy-lab { letter-spacing: .02em; }
:lang(ar) #why.rdy, :lang(pa) #why.rdy { --rdy-lh: 1.32; }
:lang(zh) #why.rdy { --rdy-lh: 1.24; }

/* ---------- underneath: the four ticks ---------- */
#why.rdy .wrap > .rdy-ticks {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0;
  margin: clamp(34px, 4.4vw, 54px) 0 0; padding: 0; list-style: none;
  max-width: 1100px;
}
#why.rdy .rdy-ticks li {
  position: relative; min-width: 0;
  padding: 14px 0 14px 32px;
  border-top: 1px solid var(--rdy-hair);
  font: 600 clamp(16px, calc(14.6px + .3vw), 18px)/1.45 var(--fb);
  color: var(--rdy-ink2);
}
#why.rdy .rdy-ticks li::before {        /* a blue check in a circle */
  content: ""; position: absolute; left: 0; top: calc(14px + .725em - 10px);
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--rdy-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.6 10.4l2.9 2.9 6-6.3' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
}
[dir="rtl"] #why.rdy .rdy-ticks li { padding: 14px 32px 14px 0; }
[dir="rtl"] #why.rdy .rdy-ticks li::before { left: auto; right: 0; }
@media (min-width: 720px) {
  #why.rdy .wrap > .rdy-ticks { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 56px); }
  #why.rdy .rdy-ticks li { padding-block: 16px; }
  #why.rdy .rdy-ticks li::before { top: calc(16px + .725em - 10px); }
}

/* the glossary "i" on paper: solid blue, white i (5.1:1), a finger-sized hit area; the popup keeps the site's dark card */
#why.rdy .rdy-ticks .gl-btn {
  position: relative;
  color: #fff; background: var(--rdy-blue); border-color: var(--rdy-blue);
  width: 17px; height: 17px; font-size: .64rem; margin-inline-start: 5px; vertical-align: .32em;
}
#why.rdy .rdy-ticks .gl-btn::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; }
#why.rdy .rdy-ticks .gl-btn:hover, #why.rdy .rdy-ticks .gl.open .gl-btn { background: var(--rdy-blue2); border-color: var(--rdy-blue2); }
#why.rdy .rdy-ticks .gl-pop { font-weight: 400; }

/* ---------- underneath: "Contact us" — the prototype's outline pill, ink on paper ---------- */
#why.rdy .wrap > .rdy-cta { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 12px; margin: clamp(28px, 3.4vw, 40px) 0 0; }
#why.rdy .rdy-cta .btn {
  min-height: 52px; padding: 0 24px; gap: 10px;
  font: 700 16px/1 var(--rdy-wide); letter-spacing: .01em;
  color: var(--rdy-ink); background: transparent; border: 1.5px solid var(--rdy-ink); box-shadow: none;
}
#why.rdy.rdm-af .rdy-cta .btn { font-stretch: 110%; }
#why.rdy .rdy-cta .btn::after {          /* arrow, decorative (the link text stays the dictionary's) */
  content: ""; flex: none; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
  transition: translate .3s;
}
[dir="rtl"] #why.rdy .rdy-cta .btn::after { scale: -1 1; }
@media (hover: hover) {
  #why.rdy .rdy-cta .btn:hover { background: rgba(5,5,5,.07); box-shadow: none; }
  #why.rdy .rdy-cta .btn:hover::after { translate: 4px 0; }
  [dir="rtl"] #why.rdy .rdy-cta .btn:hover::after { translate: -4px 0; }
}

/* focus on paper: the text-on-paper blue (4.6:1), clear of the control */
#why.rdy a:focus-visible, #why.rdy button:focus-visible { outline: 2px solid var(--rdy-blue); outline-offset: 3px; }
#why.rdy .rdy-ticks .gl-btn:focus-visible { outline-offset: 2px; }

@media (max-width: 760px) {
  #why.rdy .wrap > .rdy-lab { font-size: 14px; }
}

/* ---- Alignment pass (owner on his iPhone, 2026-11-14: "align anything that is misaligned or the space is not
   efficiently used"). Layout and spacing only.
   - The eyebrow wraps in balanced lines: on a phone "EXPERIENCE THAT WORKS FOR" left "YOU" alone on the second line.
   - The sheet takes the big-title sections' one rhythm: phones 8svh above / 7svh below (was 12svh / 13svh: ~110px of
     empty paper under the button), larger screens 10svh / 9svh.
   - The glossary "i" stays on the line of the word it explains (at 360px it dropped alone onto a line of its own under
     "Pre-Approval"); the popup keeps its own wrapping (v9.css .gl-pop white-space: normal).
   Linked ?v=rd3m. */
#why.rdy .wrap > .rdy-lab { text-wrap: balance; }
#why.rdy .rdy-ticks .gl { white-space: nowrap; }
#why.rdy { padding-block: clamp(80px, 10svh, 128px) clamp(64px, 9svh, 112px); }
@media (max-width: 760px) {
  #why.rdy { padding-block: clamp(56px, 8svh, 76px) clamp(48px, 7svh, 64px); }
}
