/* ========================================
   TYPOGRAPHY COMPONENT
   IBM Plex Sans & IBM Plex Mono

   NOTE: CSS variables used in this file are defined in:
   - themes/theme.css (loaded before this file via master.css)

   Linter warnings about undefined variables are expected
   and can be safely ignored - all variables are properly
   defined and will work at runtime.
   ======================================== */

.font-sans {
  font-family: var(--font-family-sans);
}
.font-mono {
  font-family: var(--font-family-mono);
}
/* ========================================
   TITLE STYLES (Reusable for any heading)
   ======================================== */

/* Title 5XL - IBM Plex Sans, 32px on mobile */
.title-5xl {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-h1);
  font-weight: initial;
  line-height: var(--line-height-heading);
}

/* Title 4XL - IBM Plex Sans Bold, 72px */
.title-4xl {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-h1);
  font-weight: initial;
  line-height: var(--line-height-heading);
}

/* Hero Title - Display Large, Fluid 40px → 52px → 64px */
.hero-title {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-hero-title);
  font-weight: var(--font-weight-normal);
  line-height: 1;
}

.hero-title strong,
.hero-title b {
  font-weight: var(--font-weight-bold);
}

/* Title 3XL - IBM Plex Sans Regular/Bold, 50px */
.title-3xl {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-h2);
  font-weight: initial;
  line-height: var(--line-height-heading);
  margin-bottom: var(--spacing-md);
}

.title-3xl.bold,
.title-3xl strong,
.title-3xl b {
  font-weight: var(--font-weight-bold);
}

/* Title 2XL - IBM Plex Sans Regular/SemiBold, 32px */
.title-2xl {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-h3);
  font-weight: initial;
  line-height: var(--line-height-heading);
  margin-bottom: var(--spacing-md);
}

.title-2xl.semibold {
  font-weight: var(--font-weight-semibold);
}

/* Title XL - IBM Plex Sans Regular/Medium, 24px */
.title-xl {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-h4);
  font-weight: initial;
  line-height: var(--line-height-heading);
  margin-bottom: var(--spacing-sm);
}

.title-xl.medium {
  font-weight: var(--font-weight-medium);
}

.title-lg {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-lg-fluid);
  font-weight: initial;
  line-height: var(--line-height-heading);
  margin-bottom: var(--spacing-sm);
}

.title-lg.medium {
  font-weight: var(--font-weight-medium);
}

@media (max-width: 768px) {
  .title-lg {
    font-size: var(--font-size-20);
  }

 /* Panel / inner-page heroes only — overlay landing uses mobile sizes */

  .hero-section:not(.hero-section-overlay) .hero-title strong,
  .hero-section:not(.hero-section-overlay) .hero-title b {
    font-weight: var(--font-weight-semibold);
  }

  .title-5xl {
    font-size: var(--font-size-32); /* 32px */
  }

  .title-4xl {
    font-size: 28px; /* 1.75rem */
  }

  .text-subtitle {
    font-size: 16px !important;
    margin: 20px 0 10px !important;
    text-align: center;
  }

  .hero-section:not(.hero-section-overlay) .hero-desc {
    font-size: 18px !important;
  }
}

/* Title Example Project - IBM Plex Sans Regular/SemiBold, 30px desktop → 24px mobile */
.title-example-project {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-example-project-title-fluid);
  font-weight: initial;
  line-height: var(--line-height-heading);
  margin-bottom: var(--spacing-sm);
}

.title-example-project.semibold {
  font-weight: var(--font-weight-semibold);
}

/* ========================================
   PARAGRAPH STYLES
   ======================================== */

/* Paragraph - IBM Plex Sans Regular, 16px */
p,
.p-regular {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-p-regular);
  font-weight: initial;
  line-height: var(--line-height-body);
  margin-bottom: var(--spacing-md);
}

/* Paragraph Medium - IBM Plex Sans Medium, 16px */
p.medium,
.p-medium {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-p-medium);
  font-weight: initial;
  line-height: var(--line-height-body);
  margin-bottom: var(--spacing-md);
}

/* Body Large - IBM Plex Sans Regular, 18px desktop → 16px mobile */
.body-lg {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-18);
  font-weight: initial;
  line-height: var(--line-height-body);
  margin-bottom: var(--spacing-md);
}

@media (max-width: 768px) {
  .body-lg {
    font-size: var(--font-size-16);
  }
}

/* ========================================
   SPECIAL TEXT STYLES
   ======================================== */

/* Programmes - IBM Plex Sans SemiBold, 38px */
.programmes,
.text-programmes {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-programmes);
  font-weight: initial;
  line-height: var(--line-height-heading);
  margin-bottom: 0;
}

/* Preheader - IBM Plex Mono Regular, 16px */
.preheader,
.text-preheader {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-preheader);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-body);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0;
}

.text-subtitle {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  font-family: var(--font-family-mono);
  text-transform: uppercase;
  line-height: var(--line-height-body);
  letter-spacing: 0.05em;
  margin-bottom: 0;
}

.text-description {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-body);
  margin-bottom: 0;
}

/* ========================================
   FONT SIZE UTILITY CLASSES
   NOTE: Larger sizes (.fs-16 and above) are now handled by typography-fluid.css
   with fluid clamp() values for responsive scaling. Only small fixed sizes remain here.
   ======================================== */

.fs-11 {
  font-size: var(--font-size-11);
}
.fs-12 {
  font-size: var(--font-size-12);
}
.fs-13 {
  font-size: var(--font-size-13);
}
.fs-14 {
  font-size: var(--font-size-14);
}

/* Larger font sizes (.fs-16 through .fs-72) are defined in typography-fluid.css
   with fluid clamp() values for smooth responsive scaling across breakpoints.
   Commented out to prevent overriding the fluid definitions:

.fs-16 {
  font-size: var(--font-size-16);
}
.fs-18 {
  font-size: var(--font-size-18);
}
.fs-20 {
  font-size: var(--font-size-20);
}
.fs-24 {
  font-size: var(--font-size-24);
}
.fs-28 {
  font-size: var(--font-size-28);
}
.fs-32 {
  font-size: var(--font-size-32);
}
.fs-36 {
  font-size: var(--font-size-36);
}
.fs-38 {
  font-size: var(--font-size-38);
}
.fs-40 {
  font-size: var(--font-size-40);
}
.fs-48 {
  font-size: var(--font-size-48);
}
.fs-50 {
  font-size: var(--font-size-50);
}
.fs-56 {
  font-size: var(--font-size-56);
}
.fs-64 {
  font-size: var(--font-size-64);
}
.fs-72 {
  font-size: var(--font-size-72);
}
*/

/* ========================================
   TEXT UTILITIES
   ======================================== */

/* Text alignment */
.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

/* Text weights */
.font-regular {
  font-weight: var(--font-weight-regular);
}

.font-medium {
  font-weight: var(--font-weight-medium);
}

.font-semibold {
  font-weight: var(--font-weight-semibold);
}

.font-bold {
  font-weight: var(--font-weight-bold);
}

/* Text transforms */
.text-uppercase {
  text-transform: uppercase;
}

.text-lowercase {
  text-transform: lowercase;
}

.text-capitalize {
  text-transform: capitalize;
}

/* ========================================
   RESPONSIVE TYPOGRAPHY
   Now handled by fluid typography in typography-fluid.css
   ======================================== */

/* Note: All responsive font sizing is now handled by CSS clamp()
   in typography-fluid.css for smooth, fluid scaling across all viewports.
   The classes below use CSS variables that automatically scale. */

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .title-5xl,
  .title-4xl,
  .title-3xl,
  .title-2xl,
  .title-xl,
  p,
  .p-regular,
  p.medium,
  .p-medium,
  .programmes,
  .text-programmes,
  .preheader,
  .text-preheader,
  .text-subtitle,
  .text-description {
    transition: none;
  }
}
