/* The Mobius Emerging Markets Fund Foundation — site styles
   Palette and type are taken from the brand files in /assets/img/logo. */

:root {
  --navy: #16233b;
  --navy-2: #22324f;
  --red: #b31b1b;
  --paper: #f7f6f2;
  --paper-2: #efede6;
  --white: #ffffff;
  --ink: #16233b;
  --muted: #5b6477;
  --rule: #d6d3c8;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration-color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--navy);
}
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1.1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--red); }

.lede { font-family: var(--serif); font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.55; color: var(--navy-2); }
.muted { color: var(--muted); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--white); padding: 8px 12px; z-index: 100; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 246, 242, 0.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { height: 50px; width: auto; }
.nav { display: flex; gap: 30px; }
.nav a {
  font-size: 0.92rem; font-weight: 500; text-decoration: none; color: var(--navy);
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--navy); border-bottom-color: var(--rule); }
.nav a[aria-current="page"] { border-bottom-color: var(--red); }

.nav-toggle {
  display: none; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; color: var(--navy);
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: currentColor; margin: 5px 0; transition: transform .2s, opacity .2s; }

@media (max-width: 760px) {
  .brand img { height: 40px; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .nav a[aria-current="page"] { color: var(--red); border-bottom-color: var(--rule); }
  .site-header.open .nav { display: flex; }
  .site-header.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Sections ---------- */
section { padding: clamp(64px, 9vw, 120px) 0; }
.section-tight { padding: clamp(48px, 6vw, 80px) 0; }
.bg-white { background: var(--white); }
.bg-paper-2 { background: var(--paper-2); }
.bg-navy { background: var(--navy); color: #dfe3ea; }
.bg-navy h2, .bg-navy h3 { color: var(--white); }
.bg-navy .muted { color: #a9b2c3; }
.rule-top { border-top: 1px solid var(--rule); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Home hero ---------- */
.hero { padding: clamp(72px, 11vw, 150px) 0 clamp(64px, 8vw, 110px); position: relative; overflow: hidden; }
.hero .wrap { position: relative; }
.hero h1 { max-width: 16ch; }
.hero h1 em { font-style: italic; color: var(--red); }
.hero .lede { max-width: 38em; margin-top: 1.4rem; }
.hero-mark {
  position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
  width: min(42vw, 480px); opacity: 0.06; pointer-events: none;
}
@media (max-width: 760px) { .hero-mark { display: none; } }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2.2rem; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.92rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 14px 24px; text-decoration: none;
  border: 1.5px solid var(--navy); color: var(--navy); background: transparent;
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--navy); color: var(--white); }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--red); border-color: var(--red); color: var(--white); }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* Status strip */
.status {
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  background: var(--white);
}
.status .wrap { display: flex; align-items: center; gap: 18px; padding-top: 18px; padding-bottom: 18px; font-size: 0.95rem; }
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); flex: none; box-shadow: 0 0 0 5px rgba(179, 27, 27, 0.12); }
.status strong { font-weight: 600; }

/* Purposes list */
.purposes { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.purposes li {
  counter-increment: p; position: relative;
  padding: 22px 0 22px 64px; border-top: 1px solid var(--rule);
}
.purposes li:last-child { border-bottom: 1px solid var(--rule); }
.purposes li::before {
  content: "0" counter(p);
  position: absolute; left: 0; top: 20px;
  font-family: var(--serif); font-size: 1.3rem; color: var(--red);
}

/* Timeline */
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 48px; position: relative; }
.timeline::before { content: ""; position: absolute; top: 7px; left: 0; right: 0; height: 1px; background: rgba(255,255,255,0.25); }
.tl-item { position: relative; padding: 36px 32px 0 0; }
.tl-item::before {
  content: ""; position: absolute; top: 0; left: 0; width: 15px; height: 15px;
  border-radius: 50%; background: var(--navy); border: 2px solid rgba(255,255,255,0.5);
}
.tl-item.current::before { background: var(--red); border-color: var(--red); box-shadow: 0 0 0 6px rgba(179,27,27,0.25); }
.tl-when { font-size: 0.76rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; color: #a9b2c3; margin-bottom: 8px; }
.tl-item.current .tl-when { color: #ff8a80; }
.tl-item h3 { margin-bottom: 0.4em; }
.tl-item p { font-size: 0.97rem; color: #c3cad6; }
@media (max-width: 860px) {
  .timeline { grid-template-columns: 1fr; }
  .timeline::before { top: 0; bottom: 0; left: 7px; right: auto; width: 1px; height: auto; }
  .tl-item { padding: 0 0 36px 44px; }
}

/* Structure cards */
.card { background: var(--white); border: 1px solid var(--rule); padding: 32px; }
.card .num { font-family: var(--serif); color: var(--red); font-size: 1.1rem; margin-bottom: 18px; display: block; }
.card p { font-size: 0.97rem; color: var(--muted); margin: 0; }

/* Mobius feature on home */
.feature { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.feature figure { margin: 0; }
.feature img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.feature figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 10px; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } .feature figure { max-width: 420px; } }

/* Contact band */
.contact-band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.contact-band h2 { margin: 0; }
.contact-band a.big { font-family: var(--serif); font-size: clamp(1.3rem, 2.6vw, 1.8rem); color: var(--white); text-decoration-color: var(--red); }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding: clamp(64px, 9vw, 120px) 0 clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--rule); }
.page-head .lede { max-width: 40em; }

/* ---------- Mobius memorial ---------- */
.memorial-hero { background: var(--navy); color: #dfe3ea; padding: 0; overflow: hidden; }
.memorial-hero .wrap { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.memorial-hero figure { margin: 0; align-self: end; }
.memorial-hero img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.memorial-hero .text { padding: clamp(56px, 8vw, 110px) 0; }
.memorial-hero .eyebrow { color: #ff8a80; }
.memorial-hero .eyebrow::before { background: #ff8a80; }
.memorial-hero h1 { color: var(--white); margin-bottom: 0.2em; }
.memorial-hero .years { font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.7rem); color: #c3cad6; letter-spacing: 0.04em; }
.memorial-hero .dedication { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: #dfe3ea; border-left: 2px solid var(--red); padding-left: 20px; margin-top: 2rem; max-width: 32em; }
@media (max-width: 860px) {
  .memorial-hero .wrap { grid-template-columns: 1fr; }
  .memorial-hero figure { order: 2; max-width: 420px; }
  .memorial-hero .text { padding-bottom: 0; }
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stat { padding: 32px 24px 28px 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--rule); }
.stat .n { font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.9rem); color: var(--navy); line-height: 1; }
.stat .l { font-size: 0.88rem; color: var(--muted); margin-top: 10px; }
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 24px 16px 24px 0; }
  .stat + .stat { padding-left: 16px; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
  .stat:nth-child(4) { border-top: 1px solid var(--rule); }
}

.prose { max-width: 42em; }
.prose p { font-size: 1.06rem; }

.chron { list-style: none; margin: 0; padding: 0; }
.chron li { display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: 22px 0; border-top: 1px solid var(--rule); }
.chron li:last-child { border-bottom: 1px solid var(--rule); }
.chron .yr { font-family: var(--serif); font-size: 1.25rem; color: var(--red); }
.chron h3 { font-size: 1.12rem; margin-bottom: 0.25em; }
.chron p { margin: 0; color: var(--muted); font-size: 0.97rem; }
@media (max-width: 600px) { .chron li { grid-template-columns: 1fr; gap: 4px; } }

.books { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.books li { background: var(--white); border: 1px solid var(--rule); border-top: 3px solid var(--navy); padding: 22px 20px; font-family: var(--serif); font-size: 1.05rem; line-height: 1.35; }
.books li span { display: block; font-family: var(--sans); font-size: 0.82rem; color: var(--muted); margin-top: 8px; }

.pullquote {
  font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.35;
  color: var(--navy); max-width: 26em; margin: 0 auto; text-align: center;
}
.pullquote::before { content: ""; display: block; width: 60px; height: 3px; background: var(--red); margin: 0 auto 32px; }

/* ---------- People ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 40px 32px; }
.person .photo {
  position: relative; aspect-ratio: 4 / 5; background: var(--paper-2);
  border: 1px solid var(--rule); overflow: hidden; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: center;
}
.person .photo .initials { font-family: var(--serif); font-size: 3.2rem; color: #b9b5a8; letter-spacing: 0.04em; }
.person .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.03); transition: filter .3s; }
.person:hover .photo img { filter: none; }
.person .photo::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; background: var(--red); }
.person h3 { margin-bottom: 0.15em; font-size: 1.3rem; }
.person .role { font-size: 0.92rem; color: var(--muted); margin: 0; }
.person .tag { display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); margin-bottom: 8px; }
.person .bio { font-size: 0.93rem; color: var(--muted); margin-top: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #a9b2c3; padding: 64px 0 40px; font-size: 0.9rem; }
.site-footer .top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.site-footer .logo img { height: 52px; width: auto; }
.site-footer nav { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; }
.site-footer a { color: #dfe3ea; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; text-decoration-color: var(--red); }
.site-footer .bottom { padding-top: 28px; display: grid; gap: 10px; }
.site-footer .disclaimer { max-width: 60em; font-size: 0.82rem; line-height: 1.6; }
@media (max-width: 600px) { .site-footer .logo img { height: 40px; } }

/* ---------- Coming soon (portfolio) ---------- */
.soon { position: relative; overflow: hidden; min-height: calc(100vh - 76px - 260px); display: flex; align-items: center; padding: clamp(80px, 12vw, 160px) 0; }
.soon .wrap { position: relative; width: 100%; }
.soon .lede { max-width: 36em; }
.soon-status { display: inline-flex; align-items: center; gap: 12px; margin-top: 1.4rem; font-size: 0.92rem; font-weight: 500; background: var(--white); border: 1px solid var(--rule); padding: 10px 16px; }
.soon-status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 5px rgba(179, 27, 27, 0.12); }

/* ---------- Quote ---------- */
.quote { margin: 0 auto; max-width: 34em; text-align: center; }
.quote::before { content: ""; display: block; width: 60px; height: 3px; background: var(--red); margin: 0 auto 32px; }
.quote blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.35; color: var(--navy); }
.quote figcaption { margin-top: 24px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
