/* Typography and responsive heading scale
 *
 * Headings use clamp() for fluid scaling between a minimum and maximum
 * size, so they adapt naturally to any viewport / container width.
 * text-wrap: balance distributes words evenly across lines to prevent
 * a single long word from dominating the last line.
 *
 * Formula:  clamp(<min>, <preferred>, <max>)
 *   --font-h1  min 2.5rem (40px)  →  max 5rem (80px)
 *   --font-h2  min 1.5rem (24px)  →  max 2.5rem (40px)
 *   --font-h3  min 1.25rem (20px) →  max 1.8rem (28.8px)
 */

:root{
  --font-body: 1.2rem;
  --font-h1:   clamp(2.5rem, 3.5vw + 1rem, 5rem);
  --font-h2:   clamp(1.5rem, 1.5vw + 0.8rem, 2.5rem);
  --font-h3:   clamp(1.25rem, 1vw + 0.8rem, 1.8rem);
}

html{
  -webkit-text-size-adjust: 100%;
}

body{
  font-size: var(--font-body) !important;
  line-height: 1.6;
}

#main-content h1,
#main-content h2,
#main-content h3{
  line-height: 1.2;
  margin: 0 0 .6em 0;
  text-wrap: balance;          /* even line lengths – avoids orphans  */
  overflow-wrap: break-word;   /* safety net for very long words      */
}

#main-content h1{ font-size: var(--font-h1) !important; }
#main-content h2{ font-size: var(--font-h2) !important; }
#main-content h3{ font-size: var(--font-h3) !important; }

#main-content .et_pb_text h1,
#main-content .et_pb_module h1,
#main-content h1.et_pb_module_header{
  font-size: var(--font-h1) !important;
}

#main-content .et_pb_text h2,
#main-content .et_pb_module h2,
#main-content h2.et_pb_module_header{
  font-size: var(--font-h2) !important;
}

#main-content .et_pb_text h3,
#main-content .et_pb_module h3,
#main-content h3.et_pb_module_header{
  font-size: var(--font-h3) !important;
}

#main-content .et_pb_slide_title{
  font-size: var(--font-h1) !important;
  line-height: 1.2;
}

/* ── Hero "word-stack" effect ───────────────────────────────────
 * One word per line: word-spacing wider than the viewport forces
 * every space character to overflow, so each word wraps to a new
 * line naturally.
 *
 * Applied automatically to:
 *   - Divi slider titles  (.et_pb_slide_title)
 * Use utility class on any other heading:
 *   - .linis-word-stack
 * ────────────────────────────────────────────────────────────── */

#main-content .et_pb_slide_title,
.linis-word-stack{
  word-spacing: 100vw;
  overflow-wrap: normal !important;  /* never break mid-word        */
  hyphens: none !important;          /* no automatic hyphenation     */
  text-wrap: auto;                   /* override balance for stacking */
}

/* clamp() already handles the mobile range — no breakpoint override needed.
 * At 320px viewport: 3.5vw = 11.2px → 3.5vw + 1rem = ~27px = ~1.7rem → clamped to min 2.5rem (40px).
 * This gives a smooth, continuous scale without abrupt jumps.
 */
