/* ===========================================================================
   IHF DESIGN SYSTEM  ·  css/ihf-design.css
   ---------------------------------------------------------------------------
   The single source for the website's look.

   Everything visual is defined here once: the palette, the type scale, the
   spacing rhythm, and the components the pages are built from. Change a value
   at the top and it changes everywhere, because nothing below hard codes a
   colour or a size.

   Load order on every page:
       1. this file
       2. css/ihf-forms.css   (only on pages carrying a form)

   Nothing else is needed.
   =========================================================================== */

/* ── 1. Tokens ──────────────────────────────────────────────────────────── */
:root {
  /* Brand */
  --green:        #1a6b4a;
  --green-dark:   #0d4530;
  --green-light:  #2EC774;
  --charcoal:     #0d1b14;
  --amber:        #F5A623;

  /* Text */
  --ink:          #0d1b14;
  --body:         #1f3329;
  --muted:        #5c7668;
  --on-dark:      rgba(255,255,255,.86);
  --on-dark-dim:  rgba(255,255,255,.62);

  /* Surfaces */
  --bg:           #ffffff;
  --bg-soft:      #f5faf7;
  --bg-tint:      #edf5f0;
  --line:         #dde9e3;
  --line-soft:    #eef4f1;

  /* Type */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Outfit', 'Helvetica Neue', system-ui, sans-serif;

  --step--1: clamp(.80rem, .78rem + .10vw, .86rem);
  --step-0:  clamp(.95rem, .92rem + .15vw, 1.02rem);
  --step-1:  clamp(1.12rem, 1.05rem + .35vw, 1.32rem);
  --step-2:  clamp(1.38rem, 1.24rem + .70vw, 1.85rem);
  --step-3:  clamp(1.70rem, 1.44rem + 1.30vw, 2.60rem);
  --step-4:  clamp(2.05rem, 1.60rem + 2.25vw, 3.60rem);

  /* Rhythm */
  --sp-1: 6px;  --sp-2: 12px; --sp-3: 18px; --sp-4: 26px;
  --sp-5: 38px; --sp-6: 56px; --sp-7: 80px; --sp-8: 112px;

  /* Shape */
  --r-sm: 8px;  --r: 13px;  --r-lg: 20px;  --r-pill: 100px;

  --shadow-1: 0 1px 2px rgba(13,27,20,.05);
  --shadow-2: 0 2px 6px rgba(13,27,20,.06), 0 12px 34px rgba(13,27,20,.07);
  --shadow-3: 0 8px 20px rgba(13,27,20,.10), 0 24px 60px rgba(13,27,20,.13);

  --ease:      cubic-bezier(.22,1,.36,1);
  --ease-soft: cubic-bezier(.4,0,.2,1);

  /* Legacy tokens. The older pages and the footer were written against these
     names. Declaring them here means the site still renders correctly even if
     ihf-global.css is ever missing or renamed. */
  --white:       #ffffff;
  --charcoal-2:  #12261b;
  --gold:        #F5A623;
  --gold-light:  #FFC65C;
  
  --ease-out:    cubic-bezier(.22,1,.36,1);

  --wrap:      1140px;
  --wrap-tight: 820px;
}

/* ── 2. Reset ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.7;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 var(--sp-3);
  font-weight: 700;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p  { margin: 0 0 var(--sp-3); }
a  { color: var(--green); text-decoration: none; transition: color .18s var(--ease); }
a:hover { color: var(--green-light); }
:focus-visible { outline: 3px solid var(--green-light); outline-offset: 3px; border-radius: 4px; }

/* ── 3. Layout ──────────────────────────────────────────────────────────── */
.wrap  { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--sp-4); }
.wrap-tight { width: 100%; max-width: var(--wrap-tight); margin-inline: auto; padding-inline: var(--sp-4); }
.section { padding-block: var(--sp-7); }
.section-soft { background: var(--bg-soft); }
.section-dark { background: linear-gradient(140deg, var(--charcoal), var(--green-dark)); color: var(--on-dark); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }

.grid { display: grid; gap: var(--sp-4); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(275px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.stack > * + * { margin-top: var(--sp-3); }

/* ── 4. Page heading ────────────────────────────────────────────────────── */
.page-hero {
  position: relative;
  padding: 128px 0 72px;
  background: linear-gradient(140deg, var(--charcoal) 0%, var(--green-dark) 58%, var(--green) 100%);
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

/* Darkens a background photograph enough for white text to stay readable,
   whatever the picture happens to be. */
.page-hero__overlay {
  position: absolute; inset: 0; z-index: -3;
  background: linear-gradient(140deg, rgba(13,27,20,.93) 0%, rgba(13,69,48,.86) 55%, rgba(26,107,74,.74) 100%);
}

/* A faint grid, so a flat colour still has some texture to it. */
.page-hero__grid {
  position: absolute; inset: 0; z-index: -2; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 78%);
}

.page-hero__glow-g,
.page-hero__glow-o { position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.page-hero__glow-g {
  width: 620px; height: 620px; top: -220px; right: -160px;
  background: radial-gradient(circle, rgba(46,199,116,.26) 0%, transparent 62%);
}
.page-hero__glow-o {
  width: 480px; height: 480px; bottom: -200px; left: -140px;
  background: radial-gradient(circle, rgba(245,166,35,.17) 0%, transparent 62%);
}

.page-hero > .wrap { position: relative; z-index: 1; }

.page-hero h1 {
  color: #fff;
  font-size: clamp(2.05rem, 1.5rem + 2.6vw, 3.55rem);
  max-width: 20ch;
  margin-bottom: var(--sp-3);
}
.page-hero h1 em {
  font-style: normal;
  color: var(--green-light);
  display: block;
}
.page-hero p {
  color: rgba(255,255,255,.78);
  max-width: 64ch;
  font-size: clamp(1rem, .95rem + .35vw, 1.14rem);
  line-height: 1.8;
  margin: 0;
}

/* The row of reassurance chips under the heading. */
.page-hero__badges {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--sp-4);
}
.page-hero__badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.88);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  padding: 9px 17px; border-radius: var(--r-pill);
  backdrop-filter: blur(8px);
}
.page-hero__badge i { color: var(--green-light); font-size: 12px; }

@media (max-width: 640px) {
  .page-hero { padding: 104px 0 52px; }
  .page-hero__badge { font-size: 11.5px; padding: 8px 14px; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--green-light);
  background: rgba(46,199,116,.11);
  border: 1px solid rgba(46,199,116,.26);
  padding: 8px 17px; border-radius: var(--r-pill);
  margin-bottom: var(--sp-3);
}
.eyebrow-dark {
  color: var(--green); background: var(--bg-tint); border-color: var(--line);
}

.section-head { max-width: 66ch; margin-bottom: var(--sp-5); }
.section-head.center { margin-inline: auto; text-align: center; }

/* ── 5. Breadcrumb ──────────────────────────────────────────────────────── */
.crumb { font-size: var(--step--1); color: var(--on-dark-dim); margin-bottom: var(--sp-3); }
.crumb a { color: var(--on-dark-dim); }
.crumb a:hover { color: #fff; }
.crumb span { opacity: .5; margin-inline: 7px; }

/* ── 6. Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: var(--step--1);
  padding: 14px 30px; border-radius: var(--r); border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; transition: all .2s var(--ease); line-height: 1.3;
}
.btn-primary { background: linear-gradient(135deg, var(--green-dark), var(--green)); color: #fff; box-shadow: 0 4px 16px rgba(26,107,74,.26); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(26,107,74,.34); color: #fff; filter: brightness(1.07); }
.btn-outline { border-color: var(--green); color: var(--green); background: transparent; }
.btn-outline:hover { background: var(--green); color: #fff; }
.btn-light { background: #fff; color: var(--green); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.btn-ghost-light { border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-sm { padding: 9px 18px; font-size: 12.5px; }

/* ── 7. Cards ───────────────────────────────────────────────────────────── */
.card {
  background: #fff; border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease);
}
.card-hover:hover { transform: translateY(-6px); box-shadow: var(--shadow-3); }
.card-pad { padding: var(--sp-4); }

/* Person card, used for both the board and the staff */
.person {
  background: #fff; border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  display: flex; flex-direction: column; height: 100%;
}
.person:hover { transform: translateY(-6px); box-shadow: var(--shadow-3); }
.person-photo { position: relative; aspect-ratio: 3 / 3.4; overflow: hidden; background: var(--bg-tint); }
.person-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.person:hover .person-photo img { transform: scale(1.05); }
.person-body { padding: var(--sp-3) var(--sp-3) var(--sp-4); flex: 1; display: flex; flex-direction: column; }
.person-name { font-family: var(--font-display); font-size: var(--step-1); font-weight: 700; color: var(--ink); margin: 0 0 5px; line-height: 1.25; }
.person-role { font-size: var(--step--1); color: var(--muted); line-height: 1.55; margin: 0 0 var(--sp-2); flex: 1; }
.person-links { display: flex; gap: 10px; align-items: center; }
.person-links a {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-tint); color: var(--green); font-size: 13px; transition: all .18s var(--ease);
}
.person-links a:hover { background: var(--green); color: #fff; }

.dept-heading {
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--green);
  padding-bottom: var(--sp-2); margin: var(--sp-6) 0 var(--sp-4);
  border-bottom: 2px solid var(--line-soft);
}
.dept-heading:first-of-type { margin-top: 0; }

/* Project card */
.project-card { display: flex; flex-direction: column; height: 100%; }
.project-card .thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-tint); }
.project-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.project-card:hover .thumb img { transform: scale(1.06); }
.project-card .body { padding: var(--sp-4); flex: 1; display: flex; flex-direction: column; }
.project-card h3 { font-size: var(--step-1); margin-bottom: var(--sp-2); }
.project-card p { font-size: var(--step--1); color: var(--muted); flex: 1; margin-bottom: var(--sp-3); }

/* ── 8. Chips, tags and stats ───────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; padding: 6px 14px;
  border-radius: var(--r-pill); background: var(--bg-tint); color: var(--green);
}
.chip-dark { background: rgba(255,255,255,.09); color: var(--on-dark); border: 1px solid rgba(255,255,255,.16); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-3); }
.stat-box { background: var(--bg-soft); border-radius: var(--r); padding: var(--sp-3) var(--sp-4); border-left: 3px solid var(--green); }
.stat-box .n { font-family: var(--font-display); font-size: var(--step-2); font-weight: 800; color: var(--green); line-height: 1.1; }
.stat-box .l { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* ── 9. Long form prose ─────────────────────────────────────────────────── */
.prose { font-size: var(--step-0); line-height: 1.85; color: var(--body); max-width: 72ch; }
.prose h2 { font-size: var(--step-2); margin: var(--sp-5) 0 var(--sp-3); }
.prose h3 { font-size: var(--step-1); margin: var(--sp-4) 0 var(--sp-2); }
.prose p  { margin-bottom: var(--sp-3); }
.prose ul, .prose ol { margin: 0 0 var(--sp-3); padding-left: 1.4em; }
.prose li { margin-bottom: var(--sp-1); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote {
  margin: var(--sp-4) 0; padding: var(--sp-3) var(--sp-4);
  border-left: 3px solid var(--green); background: var(--bg-soft);
  border-radius: 0 var(--r) var(--r) 0; font-style: italic; color: var(--muted);
}

/* ── 10. Profile layout ─────────────────────────────────────────────────── */
.profile { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }
@media (min-width: 900px) { .profile { grid-template-columns: 330px 1fr; align-items: start; } }
.profile-photo { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-2); position: sticky; top: 100px; }
.profile-photo img { width: 100%; aspect-ratio: 3/3.6; object-fit: cover; }
.profile-meta { padding: var(--sp-3) var(--sp-4) var(--sp-4); background: #fff; }
.profile-meta .n { font-family: var(--font-display); font-size: var(--step-1); font-weight: 700; color: var(--ink); }
.profile-meta .r { font-size: var(--step--1); color: var(--muted); margin-top: 4px; }

.label-line {
  font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted); padding-bottom: var(--sp-2); margin-bottom: var(--sp-3);
  border-bottom: 1px solid var(--line);
}

/* ── 11. Empty state ────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: var(--sp-7) var(--sp-4); color: var(--muted); }
.empty-state h3 { color: var(--ink); margin-bottom: var(--sp-2); }

/* ── 12. Call to action band ────────────────────────────────────────────── */
.cta-band {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff; border-radius: var(--r-lg); padding: var(--sp-6) var(--sp-5); text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.82); max-width: 56ch; margin-inline: auto; }
.cta-band .actions { display: flex; gap: var(--sp-2); justify-content: center; flex-wrap: wrap; margin-top: var(--sp-4); }

/* ── 13. Helpers ────────────────────────────────────────────────────────── */
.center     { text-align: center; }
.muted      { color: var(--muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
