@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/outfit-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #f3f1ea;
  --ground-2: #e8e4d9;
  --ink: #121a17;
  --ink-2: rgba(18, 26, 23, 0.68);
  --line: rgba(18, 26, 23, 0.16);
  --green: #17473b;
  --green-deep: #0e2c25;
  --on-dark: #f3f1ea;
  --on-dark-2: rgba(243, 241, 234, 0.66);
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Outfit", "Helvetica Neue", Helvetica, sans-serif;
  --margin: clamp(24px, 4vw, 56px);
  --section: clamp(80px, 11vw, 152px);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 350;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol, dl, dd { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: inherit; }
::selection { background: var(--green); color: var(--on-dark); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

h1, h2 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.03em;
  font-optical-sizing: auto;
}

.eyebrow {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  padding: 0 var(--margin);
  max-width: 1664px;
  margin: 0 auto;
}
.mark { text-decoration: none; display: inline-flex; align-items: baseline; gap: 9px; }
.mark-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 27px;
  letter-spacing: -0.03em;
  color: var(--green);
}
.mark-rest { font-size: 14px; font-weight: 400; letter-spacing: 0.01em; }
nav { display: flex; align-items: center; gap: 28px; }
.navlink { text-decoration: none; font-size: 16px; font-weight: 400; }
.navlink:hover { text-decoration: underline; text-underline-offset: 5px; }

.pill {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(18, 26, 23, 0.24);
  border-radius: 9999px;
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.pill:hover { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.pill-solid { background: var(--green); color: var(--on-dark); border-color: var(--green); }
.pill-solid:hover { background: var(--green-deep); border-color: var(--green-deep); }
.pill-light { background: var(--on-dark); color: var(--green-deep); border-color: var(--on-dark); }
.pill-light:hover { background: transparent; color: var(--on-dark); border-color: var(--on-dark); }

main { max-width: 1664px; margin: 0 auto; }

/* Hero */
.hero {
  padding: clamp(56px, 9vw, 136px) var(--margin) var(--section);
}
.hero h1 {
  font-size: clamp(2.6rem, 5.4vw + 0.6rem, 5.6rem);
  line-height: 1.02;
  max-width: 15ch;
  margin-top: 28px;
}
.lead {
  font-size: clamp(1.15rem, 0.6vw + 1rem, 1.4rem);
  line-height: 1.4;
  max-width: 36em;
  margin-top: 36px;
  margin-bottom: 40px;
}

/* Focus */
.focus {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 40px;
  row-gap: 56px;
  padding: var(--section) var(--margin);
  border-top: 1px solid var(--line);
}
.focus-statement { grid-column: 1 / span 6; }
.focus-statement h2 {
  font-size: clamp(2.1rem, 2.5vw + 1.2rem, 3.6rem);
  line-height: 1.04;
  margin-top: 24px;
  max-width: 22ch;
}
.body-lg { font-size: 19px; line-height: 1.55; max-width: 30em; margin-top: 32px; color: var(--ink-2); }
.focus-list { grid-column: 8 / span 5; }
.focus-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  padding: 28px 0 30px;
  border-top: 1px solid var(--line);
}
.focus-list li:last-child { border-bottom: 1px solid var(--line); }
.num {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
  color: var(--green);
  padding-top: 3px;
}
.focus-list h3 { font-size: 24px; line-height: 1.2; font-weight: 500; letter-spacing: -0.02em; }
.focus-list p { margin-top: 8px; color: var(--ink-2); max-width: 30em; }

/* Contact */
.contact {
  display: grid;
  grid-template-columns: 7fr 5fr;
  margin: 0 var(--margin) var(--section);
}
.contact-band {
  background: var(--green);
  color: var(--on-dark);
  padding: clamp(40px, 6vw, 88px);
}
.contact-band h2 { font-size: clamp(2.4rem, 3.4vw + 1.2rem, 4.6rem); line-height: 1; }
.contact-band p { font-size: 19px; max-width: 24em; margin: 24px 0 40px; color: var(--on-dark-2); }
.contact-details {
  background: var(--ground-2);
  padding: clamp(40px, 6vw, 88px) clamp(28px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.contact-details > div { padding: 20px 0; border-top: 1px solid var(--line); }
.contact-details > div:last-child { border-bottom: 1px solid var(--line); }
.contact-details dt { font-size: 12px; line-height: 16px; color: var(--ink-2); letter-spacing: 0.02em; }
.contact-details dd { font-size: 19px; margin-top: 6px; }
.contact-details a { text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* Footer */
.foot {
  background: var(--green-deep);
  color: var(--on-dark-2);
  padding: 64px var(--margin) 48px;
}
.foot-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 27px;
  letter-spacing: -0.03em;
  color: var(--on-dark);
  margin-bottom: 28px;
}
.foot-legal { font-size: 13px; line-height: 20px; max-width: 62em; margin-top: 8px; }

/* Page-load reveal */
@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(18px); animation: rise 0.9s var(--ease) forwards; }
  .r1 { animation-delay: 0.05s; }
  .r2 { animation-delay: 0.15s; }
  .r3 { animation-delay: 0.3s; }
  .r4 { animation-delay: 0.42s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

@media (max-width: 860px) {
  .top { height: 72px; }
  .mark-rest { font-size: 13px; }
  .navlink { display: none; }
  .pill { height: 42px; padding: 0 16px; }
  .focus { display: block; }
  .focus-list { margin-top: 56px; }
  .contact { grid-template-columns: 1fr; }
}

/* Colour hero: header and hero sit on one full-bleed green field */
.hero-wrap {
  color: var(--on-dark);
  background:
    linear-gradient(112deg, rgba(4, 14, 11, 0) 46%, rgba(4, 14, 11, 0.82) 63%, rgba(4, 14, 11, 0.25) 78%, rgba(4, 14, 11, 0) 92%),
    radial-gradient(75% 85% at 8% 38%, #2f9273 0%, rgba(47, 146, 115, 0) 62%),
    radial-gradient(60% 70% at 92% 108%, #3f8f6a 0%, rgba(63, 143, 106, 0) 60%),
    linear-gradient(180deg, #071a15 0%, #12392f 45%, #1f5a49 100%);
}
.hero-wrap .top, .hero-wrap .hero { max-width: 1664px; margin: 0 auto; }
.hero-wrap .hero {
  min-height: calc(100vh - 88px - 90px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(48px, 7vw, 104px);
  padding-bottom: clamp(72px, 9vw, 128px);
}
.hero-wrap .hero h1 { max-width: 20ch; }
.hero-wrap .mark-name, .hero-wrap .mark-rest { color: var(--on-dark); }
.hero-wrap .eyebrow { color: var(--on-dark-2); }
.hero-wrap .lead { color: rgba(243, 241, 234, 0.9); }
.hero-wrap nav .pill { border-color: rgba(243, 241, 234, 0.45); }
.hero-wrap nav .pill:hover { background: var(--on-dark); color: var(--green-deep); border-color: var(--on-dark); }
.hero-wrap :focus-visible { outline-color: var(--on-dark); }
.hero-wrap + main .focus { border-top: 0; }
@media (max-width: 860px) {
  .hero-wrap .hero { min-height: 0; }
}

/* rotator:start */
/* Hero headline: the last word rotates healthcare, medicine, life, growth, on
   a line of its own. The motion follows a measurement of eqtgroup.com taken
   on 2026-11-27: each word rests 1.5s, a change takes 1.2s, the leaving word
   travels one viewport width to the left while the next one arrives from one
   viewport width to the right, both on the same cubic in-out curve, fading
   and softening as they go. Nothing clips the words except the edges of the
   hero.
   The first word is real text. The other three are drawn from data-word on
   empty aria-hidden spans, so the h1 reads "Building Africa's access to
   healthcare." to search engines and screen readers. With reduced motion, or
   where animations do not run, the three extra words stay hidden and the
   headline is static.
   Timing arithmetic: one loop is 4 x (1.2s + 1.5s) = 10.8s. Every word runs
   the same keyframes: 0 to 11.111% arrive (1.2s), to 25% rest (1.5s), to
   36.111% leave (1.2s), then unseen. Word n starts 2.7s after word n-1, so
   it arrives exactly while the previous word leaves. Word 1 starts 1.2s
   early (negative delay), so on first load it is already in place.
   To retune: loop = 4 x (change + rest); arrive ends at change / loop, rest
   ends at 25%, leave ends at 25% + change / loop; delays are -change, then
   rest, rest + period, rest + 2 x period, with period = change + rest. */
.hero-wrap { overflow: hidden; }
.hero-wrap .hero h1 { max-width: none; }
.rotator { display: block; position: relative; white-space: nowrap; }
.rotator-word { display: inline-block; }
.rotator-word[data-word] { position: absolute; left: 0; top: 0; opacity: 0; }
.rotator-word[data-word]::before { content: attr(data-word); }

/* Brush underline under the changing word: an orange hand-drawn stroke with
   a lighter second pass. It belongs to each word, so it travels, fades and
   softens with the word, and it is drawn in from left to right as the word
   lands (a 0.7s wipe that starts just before the word comes to rest). It
   stops short of the full stop. The orange is Boas's own, not EQT's. */
.rotator-word { position: relative; isolation: isolate; }
.rotator-word::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.06em;
  right: 0.2em;
  bottom: -0.16em;
  height: 0.27em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 30' preserveAspectRatio='none'%3E%3Cpath fill='%23f28b30' d='M4 19C50 9 130 6 200 7c40 .5 75-.5 97-4-19 6.500-55 9.500-97 10.500C132 15 58 17 8 25c-5 1-8-4-4-6z'/%3E%3Cpath fill='%23f28b30' fill-opacity='.7' d='M70 24c60-4.500 130-5.500 198-4.500 4 .1 4 1.500 0 1.500-68 0-136 1.500-196 5.500-3.500.3-5-2.100-2-2.500z'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
  pointer-events: none;
}

@media screen and (prefers-reduced-motion: no-preference) {
  .rotator-word { animation: rotator-word 10.8s linear -1.2s infinite backwards; }
  .rotator-word:nth-child(2) { animation-delay: 1.5s; }
  .rotator-word:nth-child(3) { animation-delay: 4.2s; }
  .rotator-word:nth-child(4) { animation-delay: 6.9s; }
  @keyframes rotator-word {
    0% { transform: translateX(100vw); opacity: 0; filter: blur(4px); animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1); }
    11.111% { transform: translateX(0); opacity: 1; filter: blur(0); animation-timing-function: linear; }
    25% { transform: translateX(0); opacity: 1; filter: blur(0); animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1); }
    36.111%, 100% { transform: translateX(-100vw); opacity: 0; filter: blur(4px); }
  }
  .rotator-word::after { animation: rotator-stroke 10.8s linear -1.2s infinite backwards; }
  .rotator-word:nth-child(2)::after { animation-delay: 1.5s; }
  .rotator-word:nth-child(3)::after { animation-delay: 4.2s; }
  .rotator-word:nth-child(4)::after { animation-delay: 6.9s; }
  @keyframes rotator-stroke {
    0%, 9.5% { clip-path: inset(-100% 100% -100% 0); animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
    16%, 100% { clip-path: inset(-100% 0 -100% 0); }
  }
}
/* rotator:end */
