/* hwadslanding.ta.css — Tamil typography for the clinician ad landing kit.
 *
 * Loaded by shell.php ONLY when the page language is Tamil, so English pages neither
 * download it nor parse a rule that can never match. Adapted from
 * social/adslanding/common/adslanding.ta.css — same discipline: type metrics only, no
 * layout/position/color change, so the Tamil page keeps the same layout, orientation and
 * placement as the English one.
 *
 * Why it is needed at all: Tamil stacks vowel signs above and below the base glyph, so a
 * line-height tuned for Latin lets the descenders of one line collide with the marks of
 * the next — visible in the h1, where the display face runs tightest.
 */

/* The Latin display face (Archivo) has no Tamil coverage, so Tamil text in a heading
   silently falls through to whatever the OS offers. Naming the Tamil face first makes that
   deliberate: Noto Sans Tamil is requested in the same css2 call the page already makes
   (shell.php's conditional font href), with the system faces behind it for the moment
   before it arrives. */
body.lang-ta,
body.lang-ta h1, body.lang-ta h2, body.lang-ta h3,
body.lang-ta .hw-loop-center-title,
body.lang-ta .al-btn, body.lang-ta input, body.lang-ta select, body.lang-ta textarea {
  font-family: 'Noto Sans Tamil', 'Nirmala UI', 'Tamil Sangam MN', 'Latha',
               system-ui, -apple-system, sans-serif;
}

body.lang-ta {
  line-height: 1.68;          /* Latin default here is ~1.62 — too tight for stacked marks */
  letter-spacing: 0;          /* tracking tuned for Latin smears Tamil conjuncts */
}

/* The new theme sets negative tracking on ALL display type (-.01 → -.03em). That is a
   defining trait of the Latin look and actively harmful to Tamil conjuncts, so every
   tracking token is neutralised for the Tamil page in one place rather than rule by rule. */
body.lang-ta .al-page {
  --track-1: 0em;
  --track-2: 0em;
  --track-3: 0em;
}

/* Headings are where collision actually shows. The English h1 sits near 1.03; Tamil needs
   the room, and because only line-height changes, the heading still starts at the same
   y-position and the same width — it just grows downward, exactly as longer English copy
   would. */
body.lang-ta .al-hero h1,
body.lang-ta .al-leadband h1,
body.lang-ta .al-lead-col h1 { line-height: 1.34; }

/* Scoped to .al-page, not to body: hwadslanding.css declares the whole type scale on
   .al-page, which is a descendant of body, so a body-level override would be shadowed by
   the very rule it is trying to beat. Same headroom the patient kit needed for the
   lead-band H1 to keep the signup widget inside the first fold — re-tuned to the new
   scale (English is clamp(2rem, 1.4rem + 2.9vw, 3.625rem)). */
body.lang-ta .al-page { --step-lead: clamp(1.5rem, 1.05rem + 2.2vw, 2.7rem); }
body.lang-ta h2,
body.lang-ta .al-h2,
body.lang-ta .al-control h2,
body.lang-ta .al-formband-copy h2,
body.lang-ta .al-finalcta h2 { line-height: 1.38; }
body.lang-ta h3,
body.lang-ta .al-faq summary,
body.lang-ta .al-ps-pain p,
body.lang-ta .hw-loop-center-title { line-height: 1.44; }

/* The emphasis highlight is sized against Latin x-height. Tamil sits lower and carries
   marks below the baseline, so the Latin band cuts across the glyphs instead of running
   under them — thinner and dropped further down. */
body.lang-ta .al-underline::after { height: .14em; bottom: -.03em; }

/* Small print sets the tightest leading in the kit and is the first thing to collide. */
body.lang-ta .al-footer p,
body.lang-ta .al-footer-legal a,
body.lang-ta .al-hero-note,
body.lang-ta .al-proof-txt,
body.lang-ta .al-next-item { line-height: 1.65; }

/* A Tamil label in a pill wraps far more often than its English twin; the ellipsis rule on
   the proof chip would silently eat it, so let it wrap instead of truncate. */
body.lang-ta .al-proof-txt { white-space: normal; overflow: visible; text-overflow: clip; }

/* The mono face carries no Tamil either — eyebrows and step numbers stay legible by
   falling back to the Tamil face for anything but digits. */
body.lang-ta .al-eyebrow,
body.lang-ta .al-kicker,
body.lang-ta .al-hero-label,
body.lang-ta .al-ps-tag { letter-spacing: .04em; line-height: 1.5; }

/* Lining figures keep any digit (queue counts, "₹25", "18+") on the baseline instead of
   descending mid-Tamil-sentence. */
body.lang-ta { font-variant-numeric: lining-nums; font-feature-settings: 'lnum' 1; }
