/* Commercial-page type layer (THE-21744 intervention 5, PR A: type tokens; THE-27108).
   Loaded only by Layout.astro when a page passes `typeScale`; every rule is
   scoped to body.tx-commercial, so the other pages are untouched.
   Sits on top of the site-wide dark theme (main.css), which is left as is. */

body.tx-commercial {
  /* Type scale: one set of steps, reused by every commercial page.
     Fonts stay Space Grotesk (display) and DM Sans (body). */
  --tx-step--1: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --tx-step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --tx-step-1: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --tx-step-2: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  --tx-step-3: clamp(1.75rem, 1.4rem + 1.6vw, 2.625rem);
  --tx-step-4: clamp(2.125rem, 1.6rem + 2.6vw, 3.5rem);
  --tx-lh-tight: 1.08;
  --tx-lh-snug: 1.22;
  --tx-lh-body: 1.6;
  --tx-ls-display: -0.022em;
  --font-h1: var(--tx-step-4);
  --font-h2: var(--tx-step-3);
  --font-h3: var(--tx-step-2);
  --font-lead: var(--tx-step-1);
  --font-body-size: var(--tx-step-0);
  --tx-marker: linear-gradient(135deg, #f00060 0%, #ff9900 100%);
}

/* ── Type ───────────────────────────────────────────────────────────────── */
body.tx-commercial :is(h1, h2, h3, .hero-title, .section-title) {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--tx-ls-display);
}
body.tx-commercial :is(h1, .hero-title) { font-size: var(--tx-step-4); line-height: var(--tx-lh-tight); }
body.tx-commercial main :is(h2, .section-title) { font-size: var(--tx-step-3); line-height: var(--tx-lh-tight); }
body.tx-commercial main h3 { font-size: var(--tx-step-2); line-height: var(--tx-lh-snug); letter-spacing: -0.012em; }
body.tx-commercial main :is(.section-description, .hero-description) { font-size: var(--tx-step-1); line-height: var(--tx-lh-body); font-weight: 400; }
body.tx-commercial main :is(p, li, dd, td, th, summary) { line-height: var(--tx-lh-body); }
body.tx-commercial main :is(p, li, dd, td) { font-size: var(--tx-step-0); }
body.tx-commercial main :is(small, figcaption, .faq-summary + *, .hero-caption) { font-size: var(--tx-step--1); }

/* Small square marker instead of the gradient-filled eyebrow text. */
body.tx-commercial main .tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--text-secondary);
  font-size: var(--tx-step--1);
  font-weight: 600;
  letter-spacing: 0.12em;
}
body.tx-commercial main .tagline::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--tx-marker);
}
/* Inside a dark section the commercial tagline reads light: --text-secondary
   (#475569) on --midnight-950 is unreadable and fails the predeploy contrast
   gate (measured on /waam-additive-manufacturing-monitoring/, #412). */
body.tx-commercial main .dark-section .tagline {
  color: var(--neutral-100);
}
