/* =========================================================================
   HERO TYPOGRAPHY — per-element type pairing (loaded LAST so it wins)
   -------------------------------------------------------------------------
   Self-hosted (CSP is `font-src 'self'`, so no CDN links here):
     · Satoshi        → hero H1 ("Research India's markets with")
     · General Sans   → hero eyebrow / subheading
     · Inter          → hero body sentence (site --font-sans)
     · PP Editorial   → the rotating / changing words (accent)
   NOTE: PP Editorial New (Pangram Pangram) is a commercial font with no free
   web-font; the CSP forbids CDN fonts. Fraunces Italic (opsz 144) is used as
   the closest free stand-in — drop a licensed PPEditorialNew-Italic.woff2 in
   /fonts and repoint the last @font-face src to switch to the real face.
   ========================================================================= */

@font-face {
  font-family: 'Satoshi';
  src: url('fonts/satoshi-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('fonts/satoshi-900.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'General Sans';
  src: url('fonts/generalsans-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'General Sans';
  src: url('fonts/generalsans-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {                     /* stand-in for PP Editorial New Italic */
  font-family: 'PP Editorial';
  src: url('fonts/fraunces-italic.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

/* --- H1: Satoshi ----------------------------------------------------- */
.hero h1 {
  font-family: 'Satoshi', var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* --- Eyebrow / subheading: General Sans ------------------------------ */
.hero__eyebrow {
  font-family: 'General Sans', var(--font-sans);
  font-weight: 600;
}

/* --- Body sentence: Inter ------------------------------------------- */
.hero__sub {
  font-family: 'Inter', var(--font-sans);
  font-weight: 400;
}

/* --- Changing words: PP Editorial Italic (→ Fraunces, accent) ------- */
/* Out-specify preview-overrides.css / reactbits.css, which own the pill. */
.hero h1 em.mx-fx-rot,
.hero h1 em.mx-fx-rot .mx-fx-rot__word {
  font-family: 'PP Editorial', var(--font-serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0;
}

/* =========================================================================
   PHONE HERO
   -------------------------------------------------------------------------
   On a phone the headline reads best one phrase per line —
   "Research" / "India's" / "markets with" / then the rotating pill on two
   tight lines. The static words are wrapped in .hero__w spans (inline on
   desktop, so the desktop wrap is untouched) which go block here.
   Sizes are vw-based clamps so nothing overflows on a 320px phone.
   ========================================================================= */
@media (max-width: 639px) {
  .hero h1 {
    /* ~42px @ 375. Tuned down by eye over several passes; the longest line
       ("markets with") runs ~5.6x the font-size, so this clears the 339px
       content box by a wide margin. */
    font-size: clamp(1.75rem, 11.3vw, 2.85rem);
    line-height: 1.04;
    max-width: none;          /* the 14ch cap would fight the manual breaks */
  }
  /* nowrap so a phrase can never split across two lines and undo the
     one-phrase-per-line rhythm; the clamp above keeps it inside the box. */
  .hero h1 .hero__w { display: block; white-space: nowrap; }

  /* Rotating pill: two lines, set close together. .86em keeps the widest
     word ("analyst-grade", ~5.15x its font-size plus 0.64em of padding)
     inside the 339px content box at 375px, with slack for narrower phones. */
  .hero h1 em.mx-fx-rot {
    font-size: 0.86em;
    height: 2.2em;            /* exactly two 1.1em lines */
    line-height: 1.1em;
    margin-top: 0.16em;
    /* The rolling words must clear a box that is now two lines tall —
       preview-rotating.js reads these (defaults suit the 1-line desktop box). */
    --pr-roll-out: 2.6em;
    --pr-roll-in: 2.55em;
  }
  .hero h1 .pr-stage { white-space: normal; text-align: center; }
  .hero h1 .pr-word { display: block; }

  .hero__sub { font-size: 0.912rem; }   /* 20% down from 1.14rem -> ~14.6px */

  /* styles.css stacks the CTA column with align-items:stretch, which pins the
     button to the full container width. Centre it so it hugs its label. */
  .hero__cta { align-items: center; }
}
