/* ==========================================================================
   Eos & Iris Strategies — rebuild
   Brand tokens sourced from visualBrandGuide.svg + artboard renders.
   ========================================================================== */

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

:root {
  /* Brand palette (from "Visual Brand" guide: purple / pastel turquoise / dark azure / cream) */
  --cream: #f5f0ea;
  --purple: #3b2660;
  --purple-mid: #6d589b;
  --purple-light: #b6a6d4;
  --mint: #94d4c7;
  --mint-soft: #b9e3da;
  --azure: #172633;
  --white: #ffffff;

  /* Semantic tokens */
  --bg: var(--cream);
  --text: var(--azure);
  --muted: #5d5470;
  --border: #ded6e4;
  --accent: var(--purple);
  --accent-highlight: var(--mint);

  --nav-h: 3.5rem;
  --maxw: 1366px;
  --content: 1080px;
  --panel-ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* The brand guide specifies "Garet" (a commercial font). Outfit is the closest
     free geometric sans on Google Fonts; Poppins is kept as a near-match fallback. */
  --font-brand: "Outfit", "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: var(--font-brand);
  --font-body: var(--font-brand);
  /* Serif used only for the logo tagline, matching the lockup's wordmark style */
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;

  font-family: var(--font-body);
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
}

p {
  margin: 0 0 1rem;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- Header / nav ---------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  min-height: var(--nav-h);
  padding: 0.4rem 1.5rem;
  background: rgba(244, 239, 233, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  height: 2rem;
  width: auto;
}

.brand:hover .brand-logo,
.brand:focus-visible .brand-logo {
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.1rem;
}

.site-nav a {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--purple);
  border-bottom-color: var(--mint);
}

.nav-sep {
  color: rgba(93, 84, 112, 0.4);
  user-select: none;
}

/* ---------- Buttons --------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  background: var(--purple);
  border: none;
  border-radius: 6px;
  padding: 0.85rem 2rem;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  background: #2c1f49;
  box-shadow: 0 8px 22px rgba(59, 42, 96, 0.3);
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

/* ---------- Section scaffolding -------------------------------------------- */
.page-section {
  position: relative;
  scroll-margin-top: calc(var(--nav-h) + 0.75rem);
  overflow: hidden;
}

.section-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) 1.5rem;
}

/* Major page titles use the heavy Garet weight shown in the brand guide */
.what-inner h2,
.section-head h2,
.about-head h2 {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---------- Hero ------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: clamp(32rem, 74vh, 46rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem clamp(1.5rem, 6vw, 6rem);
  background: #c9c3ad;
  background-image: url("../assets/hero.jpg");
  background-size: cover;
  background-position: center 42%;
}

.hero-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  max-width: 32rem;
}

.hero-logo {
  width: clamp(15rem, 28vw, 22rem);
  height: auto;
}

.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.2rem, 1rem + 1vw, 1.85rem);
  line-height: 1.2;
  color: var(--purple);
  margin: -0.25rem 0 0;
  padding-top: 0.95rem;
  position: relative;
}

.hero-tagline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2.75rem;
  height: 2px;
  background: var(--purple);
  opacity: 0.55;
}

/* ---------- What we do (purple panel + rainbow + glow) --------------------- */
.panel-purple {
  position: relative;
  color: var(--cream);
  isolation: isolate;
  background-color: var(--purple);
  /* Rainbow arcs rising from the section bottom.
     - Center at 50% 100%: the arc openings sit exactly on the section's
       bottom edge so they end naturally (not cut off).
     - Arc radius ~38 vw: the arcs curve up to fill the section height
       without bleeding past the top.
     - min(vw, rem): scales on narrow viewports, caps at 1366-px values
       on wider screens so the pattern never overflows.
     - Thin top fade (2rem): smooths any minor clipping at the section top. */
  background-image:
    linear-gradient(to bottom, var(--purple), transparent 2rem),
    radial-gradient(
      circle at 50% 100%,
      transparent                           0 min(19vw, 16.5rem),
      rgba(255, 255, 255, 0.09) min(19vw, 16.5rem) min(22vw, 19rem),
      transparent               min(22vw,   19rem)  min(27vw, 23rem),
      rgba(255, 255, 255, 0.09) min(27vw,   23rem)  min(30vw, 26rem),
      transparent               min(30vw,   26rem)  min(35vw, 30rem),
      rgba(255, 255, 255, 0.09) min(35vw,   30rem)  min(38vw, 32.5rem),
      transparent               min(38vw,   32.5rem)
    );
}

.glow {
  position: absolute;
  width: 46rem;
  height: 46rem;
  border-radius: 50%;
  filter: blur(8px);
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%,
      rgba(255, 255, 255, 0.55) 0%,
      var(--mint) 24%,
      rgba(148, 212, 199, 0.35) 44%,
      transparent 66%);
}

.glow--what {
  left: 50%;
  bottom: -30rem;
  transform: translateX(-50%);
}

.what-inner {
  max-width: 46rem;
}

.what-inner h2 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1.5rem;
}

.what-inner p {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  color: rgba(244, 239, 233, 0.92);
}

.what-inner strong {
  color: var(--white);
  font-weight: 700;
}

/* ---------- Services (cards) ------------------------------------------------ */
.services {
  background: var(--cream);
}

.section-head {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head h2 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  color: var(--azure);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card-photo {
  width: clamp(11rem, 18vw, 14rem);
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid var(--mint);
  box-shadow: 0 10px 30px rgba(22, 36, 47, 0.12);
}

.card h3 {
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--azure);
  margin: 1.5rem 0 0;
}

.card p {
  color: var(--azure);
  margin: 1rem 0 1.75rem;
}

.card .btn {
  margin-top: auto;
}

/* ---------- Detail sections (azure + faint photo) -------------------------- */
.detail {
  position: relative;
  background: var(--azure);
  color: var(--cream);
}

.detail::after {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: right center;
  /* Fade the photo in from the centre-right, leaving the text side dark azure */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 38%, black 62%);
  mask-image: linear-gradient(to right, transparent 0%, transparent 38%, black 62%);
  opacity: 0.45;
  z-index: 0;
}

.detail--evaluation::after {
  background-image: url("../assets/detail-evaluation.jpg");
}

.detail--health::after {
  background-image: url("../assets/detail-health.jpg");
}

.detail--capacity::after {
  background-image: url("../assets/detail-capacity.jpg");
}

.detail .section-inner {
  position: relative;
  z-index: 1;
  max-width: var(--content);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.detail-title {
  font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-align: right;
  color: var(--mint);
}

.detail-lead {
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.2rem);
  color: rgba(245, 240, 234, 0.92);
}

.detail h3 {
  font-size: 1.4rem;
  margin: 2rem 0 0.85rem;
  color: var(--mint);
}

.tag-list {
  color: rgba(244, 239, 233, 0.85);
  line-height: 1.9;
  max-width: 46rem;
}

/* Purple separator bars that break the pages from Services onward (per original) */
#evaluation,
#health-care-transformation,
#capacity-building,
#about-contact {
  border-top: 14px solid var(--purple);
}

/* ---------- About + Contact ------------------------------------------------- */
.about {
  position: relative;
  background: var(--cream);
  isolation: isolate;
}

.glow--about {
  left: -18rem;
  top: -14rem;
  opacity: 0.8;
}

/* About is a single wide column (wider than the two-column detail pages);
   headshot tops the right column above the first paragraph */
.about .section-inner {
  max-width: 64rem;
}

.about-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.about-head h2 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--purple);
}

.about-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.about-photo {
  width: 9.5rem;
  height: 9.5rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 5px solid var(--mint);
}

.about-name {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.875rem;
  color: var(--purple);
}

.about-email {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}

.about-email:hover {
  color: var(--purple);
}

.about-bio {
  max-width: none;
}

.about-bio p {
  margin-bottom: 1.15rem;
}

/* ---------- Contact form ---------------------------------------------------- */
.contact {
  margin: 3rem auto 0;
  max-width: 38rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: rgba(109, 88, 155, 0.1);
  border: 1px solid rgba(109, 88, 155, 0.18);
  border-radius: 12px;
}

.contact h3 {
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--purple);
  margin-bottom: 1.25rem;
}

.contact-sink {
  display: none;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cf-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.cf-field[hidden] {
  display: none;
}

.cf-label {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--azure);
}

.cf-input {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--azure);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.cf-input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(109, 88, 155, 0.2);
}

.cf-textarea {
  resize: vertical;
  min-height: 5rem;
  line-height: 1.5;
}

.cf-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 0.25rem;
}

.cf-thanks {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0;
}

.cf-reset {
  font-size: 0.8125rem;
  color: var(--muted);
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.cf-reset[hidden] {
  display: none;
}

.cf-reset:hover,
.cf-reset:focus-visible {
  color: var(--purple);
}

/* ---------- Footer ---------------------------------------------------------- */
.site-footer {
  background: var(--azure);
  color: rgba(244, 239, 233, 0.72);
  text-align: center;
  font-size: 0.8125rem;
  line-height: 1.7;
  padding: 1.75rem 1.5rem;
}

.site-footer a {
  color: var(--mint);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ---------- Utilities ------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 200;
  padding: 0.5rem 1rem;
  font-weight: 600;
  background: var(--purple);
  color: var(--white);
  text-decoration: none;
  border-radius: 4px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ---------- Scroll reveal --------------------------------------------------- */
html.enhance-panels .page-section {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 0.75s var(--panel-ease), transform 0.9s var(--panel-ease);
}

html.enhance-panels .page-section.is-in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ------------------------------------------------------ */
@media (max-width: 860px) {
  .cards {
    grid-template-columns: 1fr;
    max-width: 24rem;
    margin: 0 auto;
  }

  .detail .section-inner {
    grid-template-columns: 1fr;
  }

  .detail-title {
    text-align: left;
    order: -1;
    margin-bottom: 0.5rem;
  }

  /* On mobile the columns collapse, so restore a subtle full-width photo overlay */
  .detail::after {
    -webkit-mask-image: none;
    mask-image: none;
    opacity: 0.1;
  }

  .about-head {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.enhance-panels .page-section {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover,
  .btn:focus-visible {
    transform: none;
  }
}
