/* WPI Investing Association — shared styles */
:root {
  --ivory: #F6F3EE;
  --paper: #FBF9F5;
  --ink: #15171C;
  --ink-2: #2A2D34;
  --muted: #62656E;
  --line: #E2DDD4;
  --line-strong: #CFC8BB;
  --accent: #9C1F2B;
  --accent-deep: #7E1923;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-h: 68px;
  --gutter: 2rem;
  --section-y: 5.5rem;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; color: var(--ink); margin: 0; }
p { margin: 0; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent);
}
.muted { color: var(--muted); }

/* ---------- Nav ---------- */
header.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: color-mix(in oklab, var(--ivory) 94%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--nav-h); max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter);
}
.brand { font-family: var(--serif); font-size: 20px; font-weight: 500; text-decoration: none; color: var(--ink); white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 14px; color: var(--ink-2); text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; }
.nav-links a:hover { color: var(--accent); }
.nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.nav-links .btn { padding: 9px 16px; border-bottom: 1px solid var(--ink); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-strong); color: var(--ink);
  font: 500 14px var(--sans); padding: 8px 14px; cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-size: 14px; font-weight: 500; text-decoration: none;
  padding: 13px 22px; border: 1px solid var(--ink); color: var(--ink); background: transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--ink); color: var(--ivory); }
.btn.primary { background: var(--ink); color: var(--ivory); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }
.nav-links .btn:hover { color: var(--ivory); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.text-link { font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.text-link:hover { color: var(--accent); }

/* ---------- Page header ---------- */
.page-head { padding: calc(var(--nav-h) + 72px) 0 56px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(40px, 5.5vw, 64px); line-height: 1.05; margin-top: 12px; }
.page-head .lede { font-size: 19px; color: var(--ink-2); max-width: 60ch; margin-top: 20px; }

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; border-bottom: 1px solid var(--line); }
.section.alt { background: var(--paper); }
.section.dark { background: var(--ink); color: var(--ivory); border-bottom: none; }
.section.dark h2, .section.dark h3 { color: var(--ivory); }
.section.dark .label { color: #E3A3A9; }
.section.dark .btn { color: var(--ivory); border-color: rgba(246,243,238,.6); }
.section.dark .btn.primary { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.section.dark .btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--ivory); }
.section-head { margin-bottom: 40px; max-width: 70ch; }
.section-head h2 { font-size: clamp(30px, 3.4vw, 42px); line-height: 1.1; margin-top: 10px; }
.section-head p { color: var(--muted); margin-top: 14px; font-size: 17px; }
.section.dark .section-head p { color: rgba(246,243,238,.72); }

/* ---------- Home hero ---------- */
.hero { padding-top: var(--nav-h); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; min-height: min(78vh, 720px); }
.hero-text {
  padding: 72px 56px 72px max(var(--gutter), calc((100vw - 1200px) / 2 + var(--gutter)));
  display: flex; flex-direction: column; justify-content: center;
}
.hero-text h1 { font-size: clamp(42px, 5.2vw, 68px); line-height: 1.04; margin: 14px 0 0; }
.hero-text .lede { font-size: 19px; color: var(--ink-2); max-width: 44ch; margin: 22px 0 32px; }
.hero-photo { position: relative; background: var(--ink); overflow: hidden; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.hero-photo figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 14px;
  font-size: 12px; color: rgba(246,243,238,.9);
  background: linear-gradient(to top, rgba(10,12,16,.6), transparent);
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.stat { padding: 28px 24px 28px 0; border-right: 1px solid var(--line); }
.stat + .stat { padding-left: 24px; }
.stat:last-child { border-right: none; }
.stat-num { white-space: nowrap; font-family: var(--serif); font-size: clamp(34px, 3.6vw, 48px); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.stat-label { font-size: 14px; color: var(--muted); margin-top: 10px; }
.stats-band { padding: 0 0 var(--section-y); }

/* ---------- Two-up feature cards ---------- */
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.feature { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.feature-photo { aspect-ratio: 3 / 2; overflow: hidden; background: var(--ink); margin-bottom: 24px; }
.feature-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.feature:hover .feature-photo img { transform: scale(1.03); }
.feature h3 { font-size: 30px; line-height: 1.15; margin-bottom: 12px; }
.feature p { color: var(--ink-2); max-width: 52ch; margin-bottom: 18px; }
.feature .text-link { align-self: flex-start; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid rgba(246,243,238,.25); }
.step { padding: 28px 28px 8px 0; }
.step + .step { padding-left: 28px; border-left: 1px solid rgba(246,243,238,.18); }
.step-num { font-family: var(--serif); font-size: 15px; color: #E3A3A9; margin-bottom: 10px; }
.step h3 { font-size: 22px; margin-bottom: 8px; }
.step p { color: rgba(246,243,238,.75); font-size: 15px; }
.step a { color: var(--ivory); }

/* ---------- Info grid (programs) ---------- */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-strong); }
.info { padding: 28px 28px 28px 0; border-bottom: 1px solid var(--line); }
.info:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.info h3 { font-size: 21px; margin-bottom: 8px; }
.info p { color: var(--ink-2); font-size: 15px; }

/* ---------- People ---------- */
.people { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.people.six { grid-template-columns: repeat(6, 1fr); gap: 16px; }
.people.six .person-name { font-size: 17px; }
.person { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--paper); border: 1px solid var(--line); }
a.person:hover { border-color: var(--line-strong); }
a.person:hover .person-name { color: var(--accent); }
.person-photo { aspect-ratio: 1 / 1; background: #E9E4DB; overflow: hidden; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.person-photo .initials { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 40px; color: var(--muted); }
.person-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.person-role { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.person-name { font-family: var(--serif); font-size: 19px; line-height: 1.25; }
.person-meta { font-size: 13px; color: var(--muted); line-height: 1.45; }
.person-bio { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; margin-top: 6px; }
.person.wide { grid-column: span 1; }
.group-title { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 48px 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.group-title:first-child { margin-top: 0; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.gallery figure { margin: 0; }
.gallery figure:nth-child(1), .gallery figure:nth-child(2) { grid-column: span 3; }
.gallery figure:nth-child(n+3) { grid-column: span 2; }
.gallery .frame { aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* ---------- Prose / two column text ---------- */
.split { display: grid; grid-template-columns: 1fr 2fr; gap: 64px; align-items: start; }
.prose p { font-family: var(--serif); font-size: 19px; line-height: 1.6; color: var(--ink-2); max-width: 62ch; }
.prose p + p { margin-top: 16px; }

/* ---------- Timeline ---------- */
.timeline { border-top: 1px solid var(--line-strong); }
.tl-row { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.tl-year { font-family: var(--serif); font-size: 20px; color: var(--accent); }
.tl-row h3 { font-size: 20px; margin-bottom: 4px; }
.tl-row p { color: var(--ink-2); font-size: 15px; max-width: 64ch; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; font-family: var(--serif); font-size: 21px; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); color: var(--accent); font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.faq .answer { color: var(--ink-2); max-width: 70ch; margin-top: 12px; }

/* ---------- Fund structure ---------- */
.fund-flow { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-strong); }
.flow { padding: 26px 28px 26px 0; }
.flow + .flow { padding-left: 28px; border-left: 1px solid var(--line); }
.flow h3 { font-size: 21px; margin: 8px 0; }
.flow p { color: var(--ink-2); font-size: 15px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-strong); }
.contact-item { padding: 28px 28px 28px 0; }
.contact-item + .contact-item { padding-left: 28px; border-left: 1px solid var(--line); }
.contact-item h2 { font-size: 24px; margin: 8px 0 10px; }
.contact-item p { color: var(--ink-2); font-size: 15px; margin-bottom: 14px; }
.contact-item ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
address { font-style: normal; }

/* ---------- Footer ---------- */
footer.foot { background: var(--ivory); padding: 56px 0 28px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 40px; margin-bottom: 40px; }
.foot-brand { font-family: var(--serif); font-size: 20px; }
.foot-tag { font-size: 14px; color: var(--muted); margin-top: 8px; max-width: 34ch; }
.foot h4 { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.foot-col a { display: block; font-size: 14px; color: var(--ink-2); text-decoration: none; padding: 3px 0; }
.foot-col a:hover { color: var(--accent); }
.foot-col address { font-size: 14px; color: var(--ink-2); line-height: 1.6; margin-top: 8px; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .people { grid-template-columns: repeat(3, 1fr); }
  .people.four, .people.six { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  :root { --gutter: 1.25rem; --section-y: 4rem; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ivory); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-links a[aria-current="page"] { border-bottom-color: var(--line); color: var(--accent); }
  .nav-links .btn { margin-top: 14px; text-align: center; border: 1px solid var(--ink); }

  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero-text { padding: 48px var(--gutter); }
  .hero-photo { height: 56vw; min-height: 240px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat, .stat + .stat { padding: 22px 16px 22px 0; border-right: none; border-bottom: 1px solid var(--line); }
  .stat:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
  .two-up, .split { grid-template-columns: 1fr; gap: 40px; }
  .steps, .fund-flow, .contact-grid, .info-grid { grid-template-columns: 1fr; }
  .step + .step, .flow + .flow, .contact-item + .contact-item, .info:not(:nth-child(3n+1)) {
    padding-left: 0; border-left: none;
  }
  .step, .flow, .contact-item { padding-right: 0; border-bottom: 1px solid var(--line); }
  .step { border-bottom-color: rgba(246,243,238,.18); }
  .info { padding-right: 0; }
  .people, .people.four, .people.six { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery figure:nth-child(n) { grid-column: span 1; }
  .gallery figure:first-child { grid-column: span 2; }
  .tl-row { grid-template-columns: 1fr; gap: 4px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :first-child { grid-column: span 2; }
}
@media (max-width: 420px) {
  .brand { font-size: 17px; }
  .person-body { padding: 12px; }
  .person-name { font-size: 17px; }
}

/* ---------- Allocation figure (home Fund card) ---------- */
.feature-photo.alloc {
  background: var(--paper); border: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: center; gap: 28px; padding: 32px 36px;
}
.alloc-title { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.alloc-bar { display: flex; gap: 2px; height: 32px; }
.alloc-bar span { display: block; height: 100%; transition: opacity .15s; }
.alloc-bar span:first-child { border-radius: 4px 0 0 4px; }
.alloc-bar span:last-child { border-radius: 0 4px 4px 0; }
.alloc-bar:hover span { opacity: .55; }
.alloc-bar span:hover { opacity: 1; }
.alloc-key { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.alloc-key div { display: grid; grid-template-columns: 10px 1fr; column-gap: 10px; align-items: baseline; }
.alloc-key i { width: 10px; height: 10px; border-radius: 2px; align-self: center; }
.alloc-key b { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3vw, 40px); line-height: 1; color: var(--ink); }
.alloc-key span { grid-column: 2; font-size: 14px; color: var(--muted); margin-top: 6px; }
@media (max-width: 420px) { .feature-photo.alloc { padding: 22px 20px; gap: 20px; } }
