/*
 * InspireSphere Theme — Main Stylesheet
 *
 * Split into 4 concern layers — never mix them:
 *
 *  1. Reset & Base   — *, html, body, img, a, ul
 *  2. Typography     — h1–h4, paragraph utilities, logo text
 *  3. Buttons        — .btn, .btn--green, .btn--blue, .btn--outline
 *  4. Layout         — .container, .section, .grid--*, .flex--*
 *
 * Adding a new component → append a clearly labelled block at the BOTTOM.
 */


/* ═══════════════════════════════════════════════════════════════════
   1. RESET & BASE
   ═══════════════════════════════════════════════════════════════════ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-body-md);
  font-weight: var(--font-weight-regular);
  color: var(--color-black);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

input,
textarea,
select {
  font: inherit;
}


/* ═══════════════════════════════════════════════════════════════════
   2. TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════════

   Heading hierarchy (one h1 per page — hero only):

   h1  40px Bold   #061C3D  — Hero page title (ONLY ONE PER PAGE)
   h2  36px Semi   #262626  — Section titles  (What We Do, Our Impact…)
   h3  24px Semi   #061C3D  — Sub-section, stat numbers
   h4  20px Bold   #034083  — Card titles, feature names

   ═══════════════════════════════════════════════════════════════════ */

h1 {
  font-family: var(--font-body);
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  color: var(--color-dark-navy);
}

h2 {
  font-family: var(--font-body);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
  color: var(--color-black);
}

h3 {
  font-family: var(--font-body);
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-semibold);
  line-height: 1.3;
  color: var(--color-dark-navy);
}

h4 {
  font-family: var(--font-body);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-bold);
  line-height: 1.4;
  color: var(--color-blue);
}

p {
  font-family: var(--font-body);
  font-size: var(--font-size-body-md);
  font-weight: var(--font-weight-regular);
  line-height: 1.6;
  color: var(--color-black);
}

/* Typography utilities */
.text-body-lg {
  font-size: var(--font-size-body-lg);
  line-height: 1.5;
}

.text-muted {
  color: var(--color-grey);
}

.text-white {
  color: var(--color-white);
}

.text-blue {
  color: var(--color-blue);
}

.text-green {
  color: var(--color-green);
}

.text-dark-navy {
  color: var(--color-dark-navy);
}

/* Section label / badge (e.g. "Who We Are" pill) */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 12px 24px 12px 12px;
  background: var(--color-white);
  border: 1px solid var(--color-light-grey);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-semibold);
  color: var(--color-blue);
  line-height: 1;
}

.section-label__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-green);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.section-label__icon img {
  width: 24px;
  height: 24px;
}


/* ═══════════════════════════════════════════════════════════════════
   3. BUTTONS
   ═══════════════════════════════════════════════════════════════════

   Variants:
   .btn--green    Primary CTA — green bg  (#B3D634), black text
   .btn--blue     Primary CTA — blue bg   (#034083), white text
   .btn--outline  Secondary   — white bg, light-grey border, black text
   .btn--icon     Icon-only button (arrow / arrow in a box)

   ═══════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--btn-height);
  padding: var(--btn-padding-y) var(--btn-padding-x);
  border-radius: var(--btn-radius);
  font-family: var(--font-body);
  font-size: var(--font-size-body-md);
  font-weight: var(--font-weight-regular);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease;
  text-decoration: none;
}

.btn:hover {
  opacity: 0.88;
}

.btn:active {
  transform: scale(0.98);
}

/* Primary Green */
.btn--green {
  background-color: var(--color-green);
  color: var(--color-black);
  border: none;
}

/* Primary Blue */
.btn--blue {
  background-color: var(--color-blue);
  color: var(--color-white);
  border: none;
}

/* Secondary / Outline */
.btn--outline {
  background-color: var(--color-white);
  color: var(--color-black);
  border: 1px solid var(--color-light-grey);
}

/* Icon button — square, icon only */
.btn--icon {
  width: 54px;
  height: 54px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--color-white);
  border: 1px solid var(--color-light-grey);
  flex-shrink: 0;
}

.btn--icon img {
  width: 26px;
  height: 26px;
}


/* ═══════════════════════════════════════════════════════════════════
   4. LAYOUT
   ═══════════════════════════════════════════════════════════════════ */

/* Wraps all page content below the fixed header */
.site {
  padding-top: 90px;
  /* compensate for fixed nav height */
}

/* Direct parent of all page sections — single source of truth for inter-section gaps */
.site-main {
  display: flex;
  flex-direction: column;
  gap: 120px;
  padding-bottom: 120px;
  /* + footer's own 60px top padding = 120px gap to footer */
}

/* ── Container ───────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--section-max-width);
  margin-inline: auto;
  padding-inline: var(--section-pad-desktop);
}

/* ── Section ─────────────────────────────────────────────────────── */
.section {
  width: 100%;
}

.section--sm {
  padding-block: var(--spacing-xl);
}

/* ── Grid helpers ────────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: var(--spacing-md);
}

.grid--2col {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3col {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4col {
  grid-template-columns: repeat(4, 1fr);
}

/* ── Flex helpers ────────────────────────────────────────────────── */
.flex {
  display: flex;
  gap: var(--spacing-md);
}

.flex--center {
  align-items: center;
  justify-content: center;
}

.flex--between {
  align-items: center;
  justify-content: space-between;
}

.flex--col {
  flex-direction: column;
}

.flex--wrap {
  flex-wrap: wrap;
}

/* Section hidden via admin toggle */
.is-section--hidden {
  display: none !important;
}


/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

/* ── Tablet landscape (1025 px – 1319 px) ────────────────────────── *
 * Desktop font sizes; slightly reduced padding-inline + section gaps.
 * ────────────────────────────────────────────────────────────────── */
@media (min-width: 1025px) and (max-width: 1319px) {
  .site-main {
    gap: 90px;
    padding-bottom: 90px;
  }

  .container {
    padding-inline: var(--section-pad-tab-landscape);
  }
}

/* ── Tablet portrait (769 px – 1024 px) ──────────────────────────── *
 * Mobile font sizes; medium padding-inline + section gaps.
 * ────────────────────────────────────────────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
  .site {
    padding-top: 78px;
  }

  h1 {
    font-size: var(--font-size-h1-mobile);
  }

  h2 {
    font-size: var(--font-size-h2-mobile);
  }

  h3 {
    font-size: var(--font-size-h3-mobile);
  }

  .site-main {
    gap: 64px;
    padding-bottom: 48px;
  }

  .container {
    padding-inline: var(--section-pad-tab-portrait);
  }

  .section-label {
    font-size: var(--font-size-h3-mobile);
  }
}

/* ── Mobile (≤ 768px) ────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Wraps all page content below the fixed header */
  .site {
    padding-top: 78px;
    /* compensate for fixed nav height */
  }

  h1 {
    font-size: var(--font-size-h1-mobile);
  }

  h2 {
    font-size: var(--font-size-h2-mobile);
  }

  h3 {
    font-size: var(--font-size-h3-mobile);
  }

  .site-main {
    gap: 32px;
    padding-bottom: 40px;
    /* + footer's own 60px top padding = 100px gap to footer */
  }

  .container {
    padding-inline: var(--section-pad-mobile);
  }

  .section {}

  .grid--2col,
  .grid--3col,
  .grid--4col {
    grid-template-columns: 1fr;
  }

  .section-label {
    font-size: var(--font-size-h3-mobile);
  }
}