/* ─── Fonts (self-hosted, no third-party requests) ─── */
@font-face {
  font-family: "Cormorant";
  src: url("../fonts/cormorant-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant";
  src: url("../fonts/cormorant-500-italic.woff2") format("woff2");
  font-weight: 500; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Cormorant";
  src: url("../fonts/cormorant-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-var.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}

/* ─── Tokens ─── */
:root {
  --ink: #111a21;
  --ink-2: #16222c;
  --ivory: #f3efe7;
  --ivory-2: #e9e3d7;
  --brass: #c9a46a;
  --brass-deep: #7d5b2b;
  --text: #1b232b;
  --muted: #5b6168;
  --on-dark: #ece5d6;
  --on-dark-muted: rgba(236, 229, 214, 0.68);
  --line: rgba(17, 26, 33, 0.14);
  --line-dark: rgba(236, 229, 214, 0.16);

  --serif: "Cormorant", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Manrope", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(88px, 12vw, 168px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --intro-delay: 1.45s;
}
.no-intro { --intro-delay: 0.1s; }

/* ─── Base ─── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1.1em; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; line-height: 1.05; letter-spacing: -0.005em; }
h2 { font-size: clamp(2.3rem, 4.8vw, 3.75rem); }
h2 em, h1 em { font-style: italic; color: var(--brass-deep); }
.is-dark h2 em { color: var(--brass); }
::selection { background: var(--brass); color: var(--ink); }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -120px; z-index: 100; padding: 10px 16px; background: var(--brass); color: var(--ink); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

.eyebrow, .section-index {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass-deep);
  margin-bottom: 1.6rem;
}
.is-dark .section-index, .hero .eyebrow { color: var(--brass); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 50px; padding: 0 1.6rem;
  font: 600 0.8125rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn-primary { background: var(--brass); color: var(--ink); }
.btn-primary:hover { background: #d8b67f; }
.btn-ghost { border-color: var(--line-dark); color: var(--on-dark); }
.btn-ghost:hover { border-color: var(--brass); color: var(--brass); }
.btn:disabled { opacity: 0.6; cursor: wait; }

/* ─── Intro curtain ─── */
.intro {
  position: fixed; inset: 0; z-index: 300; display: grid; place-content: center; justify-items: center; gap: 20px;
  background: var(--ink); color: var(--on-dark); pointer-events: none;
  animation: intro-lift 1s var(--ease-io) 1.05s forwards;
}
.intro-mark { margin: 0; font-family: var(--serif); font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: 0.06em; opacity: 0; animation: intro-mark 1s var(--ease) 0.1s forwards; }
.intro-line { width: 0; height: 1px; background: var(--brass); animation: intro-line 0.8s var(--ease) 0.35s forwards; }
@keyframes intro-mark { from { opacity: 0; letter-spacing: 0.22em; } to { opacity: 1; letter-spacing: 0.06em; } }
@keyframes intro-line { to { width: 150px; } }
@keyframes intro-lift { to { transform: translateY(-100%); visibility: hidden; } }
html:not(.js) .intro, .no-intro .intro { display: none; }

/* ─── Film grain ─── */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── Header ─── */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  color: var(--on-dark);
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.js .site-header { opacity: 0; animation: rise 1s var(--ease) forwards; animation-delay: calc(var(--intro-delay) + 0.5s); }
.site-header.is-scrolled, .nav-open .site-header {
  background: rgba(17, 26, 33, 0.94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line-dark);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.wordmark { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; letter-spacing: 0.01em; text-decoration: none; margin: 0; transition: opacity 0.5s var(--ease); }
.js .site-header:not(.is-scrolled) .wordmark { opacity: 0; }
.nav-open .site-header .wordmark { opacity: 1; }
.scroll-progress { position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--brass); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.site-nav { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 36px); }
.site-nav a {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  text-decoration: none; color: var(--on-dark-muted); transition: color 0.25s var(--ease);
}
.site-nav a:hover { color: var(--on-dark); }
.site-nav .nav-cta { color: var(--brass); border: 1px solid rgba(201, 164, 106, 0.5); padding: 10px 16px; }
.site-nav .nav-cta:hover { color: var(--ink); background: var(--brass); }
.nav-toggle { display: none; }
/* Language menu: globe button + flag list */
.lang-menu { position: relative; margin-left: clamp(18px, 2.2vw, 32px); }
.lang-trigger {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 10px;
  list-style: none; cursor: pointer; user-select: none;
  border: 1px solid var(--line-dark); border-radius: 999px; color: var(--on-dark);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.lang-trigger::-webkit-details-marker { display: none; }
.lang-trigger:hover, .lang-menu[open] .lang-trigger { border-color: rgba(201, 164, 106, 0.6); background: rgba(201, 164, 106, 0.06); }
.lang-globe { width: 18px; height: 18px; fill: none; stroke: var(--brass); stroke-width: 1.3; }
.lang-code { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; }
.lang-chevron { width: 10px; height: 10px; fill: none; stroke: var(--on-dark-muted); stroke-width: 1.5; transition: transform 0.3s var(--ease); }
.lang-menu[open] .lang-chevron { transform: rotate(180deg); }
.lang-panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; min-width: 196px; padding: 6px;
  background: #121c24; border: 1px solid rgba(201, 164, 106, 0.35); border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); animation: lang-in 0.25s var(--ease);
}
.lang-panel::before { /* small pointer towards the globe */
  content: ""; position: absolute; top: -6px; right: 22px; width: 10px; height: 10px;
  background: #121c24; border-left: 1px solid rgba(201, 164, 106, 0.35); border-top: 1px solid rgba(201, 164, 106, 0.35); transform: rotate(45deg);
}
@keyframes lang-in { from { opacity: 0; transform: translateY(-6px); } }
.lang-option {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 4px;
  text-decoration: none; color: var(--on-dark-muted); font-size: 0.875rem; transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.lang-option:hover { background: rgba(201, 164, 106, 0.08); color: var(--on-dark); }
.lang-option[aria-current] { color: var(--on-dark); }
.lang-flag { flex: none; width: 24px; height: 16px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18); }
.lang-name { flex: 1; letter-spacing: 0.02em; }
.lang-check { width: 14px; height: 14px; fill: none; stroke: var(--brass); stroke-width: 1.6; }
.lang-option:not([aria-current]) .lang-check { visibility: hidden; }

@media (max-width: 1000px) {
  .lang-menu { margin-left: auto; margin-right: 8px; order: 2; }
  .lang-trigger { height: 38px; }
  .nav-toggle { order: 3; }
  .nav-toggle {
    display: grid; place-content: center; gap: 7px;
    width: 44px; height: 44px; margin-right: -10px;
    background: none; border: 0; cursor: pointer;
  }
  .nav-toggle-bar { width: 24px; height: 1.5px; background: var(--on-dark); transition: transform 0.3s var(--ease); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child { transform: translateY(4.25px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { transform: translateY(-4.25px) rotate(-45deg); }
  .site-nav {
    position: fixed; inset: 72px 0 auto; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 28px; background: rgba(17, 26, 33, 0.97);
    border-bottom: 1px solid var(--line-dark);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }
  .nav-open .site-nav { transform: none; opacity: 1; visibility: visible; }
  .site-nav a { padding: 16px 0; border-bottom: 1px solid var(--line-dark); font-size: 0.8125rem; }
  .site-nav .nav-cta { margin-top: 20px; text-align: center; border-bottom: 1px solid rgba(201, 164, 106, 0.5); }
}

/* ─── Hero ─── */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 128px 0 36px;
  background: radial-gradient(90% 85% at 12% 25%, #1b2a36 0%, var(--ink) 60%) var(--ink);
  color: var(--on-dark);
}
.hero-texture {
  position: absolute; inset: -6%; z-index: -2;
  background: url("../img/topo.svg") center / cover no-repeat;
  opacity: 0.13;
  -webkit-mask-image: radial-gradient(90% 80% at 30% 60%, #000 20%, transparent 85%);
  mask-image: radial-gradient(90% 80% at 30% 60%, #000 20%, transparent 85%);
  animation: drift 60s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(-3%, -2%, 0) scale(1.04); } }

.hero-portrait {
  position: absolute; z-index: -1; margin: 0; bottom: 0; top: 72px;
  right: max(0px, calc((100vw - 1440px) / 2)); width: min(46vw, 760px);
  transform: translate3d(0, var(--py, 0px), 0);
}
.hero-portrait::before { /* warm back-light behind the head */
  content: ""; position: absolute; left: 6%; right: 6%; top: -4%; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(201, 164, 106, 0.2), rgba(201, 164, 106, 0.06) 55%, rgba(201, 164, 106, 0) 100%);
}
.hero-portrait img {
  position: relative; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%;
  filter: saturate(0.92) contrast(1.04);
  /* the source photo crops both shoulders: fade those edges into the page */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 86%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 86%, transparent 100%);
}
.hero-portrait::after { /* torso dissolves into the page */
  content: ""; position: absolute; inset: auto 0 0 0; height: 38%;
  background: linear-gradient(0deg, var(--ink) 8%, rgba(17, 26, 33, 0.75) 40%, rgba(17, 26, 33, 0) 100%);
}
.js .hero-portrait img { opacity: 0; transform: scale(1.06); transform-origin: 50% 100%; animation: portrait-in 2.2s var(--ease) forwards; animation-delay: calc(var(--intro-delay) - 0.35s); }
@keyframes portrait-in { to { opacity: 1; transform: none; } }

.hero-copy { max-width: min(58vw, 780px); }
.eyebrow { display: flex; align-items: center; gap: 12px; }
.eyebrow .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.hero-name {
  font-size: clamp(3.6rem, 10.5vw, 9.25rem);
  line-height: 0.9; letter-spacing: -0.015em; margin-bottom: 2rem;
}
.hero-name .line { display: block; overflow: hidden; padding: 0 0.12em 0.14em 0; margin-bottom: -0.14em; }
.hero-name .line > span { display: inline-block; }
.hero-name .line + .line > span { font-style: italic; color: var(--brass); }
.hero-lead { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.55; max-width: 32ch; color: var(--on-dark); margin-bottom: 0.6rem; }
.hero-sub { font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 1.8vw, 1.55rem); color: var(--on-dark-muted); margin-bottom: 2.4rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.js .hero-seq { opacity: 0; transform: translateY(26px); animation: rise 1.2s var(--ease) forwards; animation-delay: calc(var(--intro-delay) + var(--i, 0) * 0.1s); }
.js .hero-name .hero-seq { transform: translateY(108%); animation-duration: 1.4s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.hero-foot { display: flex; align-items: flex-end; gap: 32px; margin-top: clamp(56px, 8vw, 96px); }
.sector-strip {
  flex: 1; list-style: none; margin: 0; padding: 22px 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  border-top: 1px solid var(--line-dark);
}
.sector-strip li {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--on-dark-muted);
  display: flex; align-items: center; gap: 12px;
}
.sector-strip li::before { content: ""; width: 18px; height: 1px; background: var(--brass); flex: none; }
.scroll-cue { position: relative; flex: none; width: 24px; height: 64px; overflow: hidden; }
.scroll-cue::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line-dark); }
.scroll-cue span { position: absolute; left: calc(50% - 0.5px); top: -40%; width: 1px; height: 40%; background: var(--brass); animation: cue 2.4s var(--ease-io) infinite; }
@keyframes cue { to { top: 100%; } }

@media (max-width: 860px) {
  .hero { justify-content: flex-start; padding: 0 0 28px; }
  .hero-portrait { position: relative; top: auto; right: auto; width: 100%; height: 64svh; min-height: 420px; max-height: 660px; z-index: 0; margin-top: 56px; transform: none; }
  .hero-portrait::after { height: 45%; }
  .hero-inner { position: relative; z-index: 1; margin-top: calc(-1 * min(34vw, 190px)); }
  .hero-copy { max-width: none; }
  .hero-foot { margin-top: 48px; }
  .sector-strip { grid-template-columns: 1fr 1fr; row-gap: 14px; }
  .scroll-cue { display: none; }
}

/* ─── At a glance ─── */
.glance { background: var(--ivory); border-bottom: 1px solid var(--line); }
.glance-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: clamp(40px, 5vw, 64px) clamp(16px, 3vw, 40px); border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat p { margin: 0; }
.stat-value {
  font-family: var(--serif); font-weight: 600; line-height: 1;
  font-size: clamp(3.2rem, 6.5vw, 5.25rem); letter-spacing: -0.02em; color: var(--ink);
}
.stat-plus, .stat-unit { color: var(--brass-deep); }
.stat-unit { font-size: 0.42em; font-weight: 500; letter-spacing: 0.02em; margin-left: 0.2em; }
.stat .stat-label { margin-top: 14px; font-size: 0.9375rem; line-height: 1.5; color: var(--muted); max-width: 26ch; }

@media (max-width: 1000px) and (min-width: 761px) {
  .glance-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .glance-grid { grid-template-columns: 1fr; }
  .stat, .stat:first-child { border-left: 0; padding: 32px 0; border-top: 1px solid var(--line); }
  .stat:first-child { border-top: 0; }
}

/* ─── Sections ─── */
.section { position: relative; padding-block: var(--section-y); }
.is-dark { background: var(--ink); color: var(--on-dark); }
.two-col { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 120px); }
.col-head { position: sticky; top: 112px; align-self: start; }
.col-body { max-width: 640px; }
.lede { font-family: var(--serif); font-size: clamp(1.5rem, 2.3vw, 1.95rem); line-height: 1.35; color: var(--ink); margin-bottom: 1.4em; }
.col-body > p:not(.lede) { color: #39424b; }

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; gap: 28px; }
  .col-head { position: static; }
}

/* Profile */
.facts { margin: 2.6rem 0 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 9rem 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brass-deep); padding-top: 0.3em; }
.facts dd { margin: 0; font-size: 0.975rem; }
@media (max-width: 520px) { .facts div { grid-template-columns: 1fr; gap: 4px; } }

/* Activities */
.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-intro { font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 1.9vw, 1.55rem); color: var(--on-dark-muted); margin-top: 1.4rem; }

.atlas { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 5vw, 88px); align-items: start; }
.atlas-map { position: sticky; top: max(96px, calc(50vh - 250px)); }
.map { position: relative; margin: 0; }
.map-dots { width: 100%; }
.map-overlay { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.country-dots path { stroke: var(--brass); stroke-width: 4.2; opacity: 0.9; }
.arc { fill: none; stroke: var(--brass); stroke-width: 1.6; opacity: 0.85; vector-effect: non-scaling-stroke; }
.flow { fill: #f6e2bb; filter: drop-shadow(0 0 5px rgba(201, 164, 106, 0.95)); }
.marker .core { fill: var(--brass); stroke: var(--ink); stroke-width: 2; }
.marker.is-origin .core { fill: var(--on-dark); }
.marker .pulse { fill: none; stroke: var(--brass); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; opacity: 0; }
.marker.is-origin .pulse { stroke: var(--on-dark); }
.map-label {
  position: absolute; left: var(--x); top: var(--y);
  transform: translate(14px, -50%);
  font-size: clamp(0.6rem, 1.1vw, 0.75rem); font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--on-dark); white-space: nowrap; pointer-events: none;
  text-shadow: 0 0 3px var(--ink), 0 0 8px var(--ink), 0 0 14px var(--ink);
}
.map-label.is-left { transform: translate(calc(-100% - 14px), -50%); }
@media (max-width: 600px) { .map-label.is-left { transform: translate(-50%, 9px); } }
.map-legend { margin: 18px 0 0; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--on-dark-muted); }
.map-legend span { color: var(--brass); margin-right: 10px; }

/* Map focus follows the chapter being read */
.map [data-c] { transition: opacity 0.7s var(--ease); }
.map[data-active] [data-c] { opacity: 0.14; }
.map[data-active="EC"] [data-c="EC"],
.map[data-active="BR"] [data-c="BR"],
.map[data-active="AO"] [data-c="AO"] { opacity: 1; }

.js .map .arc { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .map.is-visible .arc { stroke-dashoffset: 0; transition: stroke-dashoffset 1.8s var(--ease) 0.3s, opacity 0.7s var(--ease); }
.js .map.is-visible .arc:nth-of-type(2) { transition-delay: 0.55s, 0s; }
.js .map.is-visible .arc:nth-of-type(3) { transition-delay: 0.8s, 0s; }
.js .map:not(.is-visible) .flow { opacity: 0; }
.map.is-visible .marker .pulse { animation: pulse 3.2s var(--ease) 1.4s infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(3.2); opacity: 0; } }

.venture { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; padding: 6vh 0; border-top: 1px solid var(--line-dark); }
.venture:first-child { border-top: 0; padding-top: 0; min-height: 56vh; justify-content: flex-start; }
.js .atlas.has-active .venture.is-visible:not(.is-active) { opacity: 0.32; }
.venture p { color: var(--on-dark-muted); font-size: 0.975rem; }
.venture .venture-index { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; color: var(--brass); margin-bottom: 0.9rem; }
.venture h3 { font-size: clamp(2.6rem, 4vw, 3.6rem); color: var(--on-dark); margin-bottom: 0.35rem; }
.venture .venture-sector { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brass); margin-bottom: 1.6rem; }
.venture .venture-asset {
  font-family: var(--serif); font-size: 1.55rem; line-height: 1.25; color: var(--on-dark);
  padding: 16px 0; margin-bottom: 1.4rem; border-block: 1px solid var(--line-dark);
}
.venture-asset span { display: block; font-family: var(--sans); font-size: 0.8125rem; letter-spacing: 0.04em; color: var(--on-dark-muted); margin-top: 4px; }
.venture .venture-note { font-family: var(--serif); font-style: italic; font-size: 1.2rem; line-height: 1.45; color: var(--on-dark); }
.tags { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: 0.72rem; letter-spacing: 0.08em; padding: 6px 12px; border: 1px solid var(--line-dark); color: var(--on-dark-muted); }

@media (max-width: 960px) {
  .atlas { grid-template-columns: 1fr; gap: 0; }
  .atlas-map {
    top: 72px; z-index: 2; background: var(--ink);
    margin-inline: calc(-1 * var(--gutter)); padding: 10px var(--gutter) 6px;
    box-shadow: 0 22px 22px -6px var(--ink);
  }
  .map-legend { margin-top: 8px; }
  .venture, .venture:first-child { min-height: 0; padding: 56px 0; justify-content: flex-start; }
  .venture:first-child { padding-top: 40px; }
}

/* Aerial film */
.film { position: relative; background: #0b1116; overflow: hidden; aspect-ratio: 16 / 9; max-height: 100vh; width: 100%; }
.film-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film::after { /* soft hand-off into the sections above and below */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 17, 22, 0.55) 0%, rgba(11, 17, 22, 0) 16%, rgba(11, 17, 22, 0) 86%, var(--ink) 100%);
}
.film-top { position: absolute; z-index: 1; top: clamp(20px, 4vw, 48px); left: 0; right: 0; padding-inline: max(var(--gutter), calc((100% - 1240px) / 2 + var(--gutter))); display: flex; justify-content: space-between; gap: 16px; color: var(--on-dark); }
.film-top p { margin: 0; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; }
.film-kicker { color: var(--brass); display: flex; align-items: center; gap: 12px; }
.film-kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.film-places { color: var(--on-dark-muted); }
.film-toggle {
  position: absolute; z-index: 2; right: max(var(--gutter), calc((100% - 1240px) / 2 + var(--gutter))); bottom: clamp(28px, 5vw, 64px);
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(236, 229, 214, 0.35);
  background: rgba(11, 17, 22, 0.35); cursor: pointer; display: grid; place-items: center;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: border-color 0.3s var(--ease);
}
.film-toggle:hover { border-color: var(--brass); }
.film-toggle-icon { width: 10px; height: 12px; border-inline: 3px solid var(--on-dark); box-sizing: border-box; }
.film.is-paused .film-toggle-icon { width: 0; height: 0; border: 0; border-left: 11px solid var(--on-dark); border-block: 7px solid transparent; margin-left: 3px; }
@media (max-width: 860px) {
  .film { max-height: none; }
  .film-places { display: none; }
}

/* Marquee */
.marquee { overflow: hidden; background: var(--ivory); border-top: 1px solid var(--line); padding: clamp(22px, 3.2vw, 40px) 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 55s linear infinite; }
.marquee span {
  display: flex; align-items: center; gap: 0.5em; padding-right: 0.5em;
  font-family: var(--serif); font-weight: 500; font-size: clamp(3rem, 8vw, 7.5rem); line-height: 1.1; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px rgba(17, 26, 33, 0.5);
}
.marquee span:nth-child(odd) { font-style: italic; color: var(--ink); -webkit-text-stroke: 0; }
.marquee span::after { content: ""; width: 0.12em; height: 0.12em; background: var(--brass); transform: rotate(45deg); }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }

/* Philosophy */
.philosophy { background: var(--ivory); }
.statement { font-size: clamp(2.3rem, 5vw, 4.25rem); line-height: 1.1; max-width: 22ch; color: var(--ink); }
.js .statement .w { color: rgba(17, 26, 33, 0.14); transition: color 0.4s var(--ease); }
.js .statement .w.is-lit { color: var(--ink); }
.js .statement em .w.is-lit { color: var(--brass-deep); }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 3vw, 40px); margin-top: clamp(56px, 7vw, 96px); }
.pillar { border-top: 1px solid var(--ink); padding-top: 24px; }
.pillar-n { font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--brass-deep); margin-bottom: 0.9rem; }
.pillar h3 { font-size: 1.7rem; line-height: 1.15; color: var(--ink); margin-bottom: 0.8rem; }
.pillar p:last-child { color: var(--muted); font-size: 0.95rem; margin: 0; }
@media (max-width: 960px) { .pillars { grid-template-columns: 1fr 1fr; row-gap: 48px; } }
@media (max-width: 520px) { .pillars { grid-template-columns: 1fr; } }

/* Book */
.book { overflow: hidden; isolation: isolate; background: radial-gradient(80% 90% at 20% 50%, #1b2b37 0%, var(--ink) 60%) var(--ink); }
.book-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(48px, 8vw, 128px); align-items: center; }
.book-cover { margin: 0; perspective: 1600px; justify-self: center; width: min(100%, 380px); }
.book-object {
  position: relative; aspect-ratio: 2 / 3; overflow: hidden;
  border-radius: 2px 6px 6px 2px;
  transform: rotateY(calc(-14deg + var(--ry, 0deg))) rotateX(calc(2deg + var(--rx, 0deg)));
  transform-origin: left center;
  box-shadow: 30px 36px 60px rgba(0, 0, 0, 0.55), 8px 10px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.6s var(--ease);
}
.book-shine {
  position: absolute; inset: 0; z-index: 4; pointer-events: none; mix-blend-mode: soft-light;
  background: radial-gradient(circle at var(--sx, 30%) var(--sy, 20%), rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 50%);
}
.book::before {
  content: ""; position: absolute; width: 60vw; height: 60vw; left: -18vw; top: 50%; transform: translateY(-50%);
  background: radial-gradient(circle, rgba(201, 164, 106, 0.12), rgba(201, 164, 106, 0) 60%); pointer-events: none;
}
.book-object img { width: 100%; height: 100%; object-fit: cover; }
.book-object::before { /* spine */
  content: ""; position: absolute; inset: 0 auto 0 0; width: 7%; z-index: 2;
  background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(255,255,255,.12) 55%, rgba(0,0,0,.25));
}
.book-object::after { /* gloss */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 38%),
              linear-gradient(180deg, rgba(10,14,18,.78) 0%, rgba(10,14,18,0) 24%, rgba(10,14,18,0) 80%, rgba(10,14,18,.7) 100%);
}
.book-cover-title, .book-cover-author {
  position: absolute; left: 0; right: 0; z-index: 3; margin: 0; text-align: center; color: #efe6d2;
}
.book-cover-title {
  top: 5.5%; font-family: var(--serif); font-weight: 600; text-transform: uppercase;
  font-size: clamp(1.5rem, 3.4vw, 2.15rem); line-height: 0.95; letter-spacing: 0.06em;
}
.book-cover-author { bottom: 5%; font-size: clamp(0.6rem, 1.1vw, 0.72rem); font-weight: 600; letter-spacing: 0.32em; text-transform: uppercase; color: var(--brass); }
.book-subtitle { font-family: var(--serif); font-style: italic; font-size: clamp(1.35rem, 2vw, 1.7rem); line-height: 1.35; color: var(--on-dark); margin: 1.2rem 0 1.4rem; }
.book-copy > p:not(.section-index):not(.book-subtitle):not(.book-availability) { color: var(--on-dark-muted); max-width: 56ch; }
.principles { margin: 2.2rem 0; border-top: 1px solid var(--line-dark); }
.principles-title { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brass); margin: 18px 0 6px; }
.principles ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; counter-reset: p; }
.principles li {
  counter-increment: p; display: flex; gap: 14px; align-items: baseline;
  font-family: var(--serif); font-size: 1.3rem; color: var(--on-dark); padding: 12px 0; border-bottom: 1px solid var(--line-dark);
}
.principles li::before { content: counter(p, decimal-leading-zero); font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--brass); }
.book-availability { display: flex; align-items: center; gap: 14px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-dark); margin: 0; }
.book-badge { padding: 7px 12px; border: 1px solid rgba(201, 164, 106, 0.6); color: var(--brass); letter-spacing: 0.18em; font-size: 0.7rem; }
@media (max-width: 860px) {
  .book-grid { grid-template-columns: 1fr; }
  .book-cover { width: min(72%, 300px); justify-self: start; }
}
@media (max-width: 520px) { .principles ul { grid-template-columns: 1fr; } }

/* Impact */
.impact { background: var(--ivory-2); }
.values { list-style: none; padding: 0; margin: 2.4rem 0 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.values li {
  font-family: var(--serif); font-size: 1.4rem; color: var(--ink);
  padding: 18px 0; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
}
.values li::before { content: ""; width: 6px; height: 6px; transform: rotate(45deg); background: var(--brass-deep); flex: none; }
@media (max-width: 520px) { .values { grid-template-columns: 1fr; } }

/* Contact */
.contact { overflow: hidden; isolation: isolate; }
.contact .hero-texture { opacity: 0.08; }
.contact-intro { color: var(--on-dark-muted); margin-top: 1.6rem; max-width: 38ch; }
.contact-place { font-family: var(--serif); font-style: italic; font-size: 1.35rem; color: var(--on-dark); }
.contact-form { display: grid; gap: 26px; align-content: start; }
.field label { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--on-dark-muted); margin-bottom: 6px; }
.field .optional { text-transform: none; letter-spacing: 0.02em; font-weight: 400; }
.field input, .field textarea {
  width: 100%; padding: 12px 0;
  background: transparent; color: var(--on-dark);
  font: 400 1.0625rem/1.5 var(--sans);
  border: 0; border-bottom: 1px solid var(--line-dark); border-radius: 0;
  transition: border-color 0.25s var(--ease);
}
.field textarea { resize: vertical; min-height: 128px; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--brass); }
.field-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 6px; }
.form-privacy { margin: 0; font-size: 0.8125rem; color: var(--on-dark-muted); }
.form-status { margin: 0; min-height: 1.7em; font-size: 0.9375rem; color: var(--on-dark-muted); }
.form-status[data-state="ok"] { color: var(--brass); }
.form-status[data-state="error"] { color: #e3a08c; }

/* Investment mandate */
.mandate { background: var(--ivory); border-top: 1px solid var(--line); }
.mandate-head { max-width: 900px; margin-bottom: clamp(48px, 6vw, 80px); }
.mandate-head h2 { color: var(--ink); }
.mandate-intro { font-family: var(--serif); font-size: clamp(1.35rem, 2vw, 1.7rem); line-height: 1.4; color: #39424b; margin-top: 1.6rem; max-width: 46ch; }
.mandate-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.mandate-col { padding: 28px clamp(16px, 2vw, 28px) 8px; border-left: 1px solid var(--line); }
.mandate-col:first-child { border-left: 0; padding-left: 0; }
.mandate-k { display: flex; align-items: baseline; gap: 10px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink); margin-bottom: 1.2rem; }
.mandate-k span { font-family: var(--serif); font-style: italic; font-size: 1.1rem; letter-spacing: 0; text-transform: none; color: var(--brass-deep); }
.mandate-col ul { list-style: none; padding: 0; margin: 0; }
.mandate-col li { font-family: var(--serif); font-size: 1.28rem; line-height: 1.3; color: var(--ink); padding: 11px 0; border-bottom: 1px solid var(--line); }
.mandate-col li:last-child { border-bottom: 0; }
@media (max-width: 1000px) {
  .mandate-grid { grid-template-columns: 1fr 1fr; }
  .mandate-col:nth-child(3) { border-left: 0; padding-left: 0; }
  .mandate-col:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 12px; }
}
@media (max-width: 560px) {
  .mandate-grid { grid-template-columns: 1fr; }
  .mandate-col, .mandate-col:nth-child(3) { border-left: 0; padding-left: 0; }
  .mandate-col + .mandate-col { border-top: 1px solid var(--line); margin-top: 12px; }
}

/* Aerial loop at the top of each country chapter */
.venture-media { position: relative; margin: 0 0 28px; aspect-ratio: 32 / 13; overflow: hidden; background: #0b1116; border: 1px solid var(--line-dark); }
.venture-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.venture-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(11, 17, 22, 0.7) 0%, rgba(11, 17, 22, 0) 45%); pointer-events: none; }
.venture-media figcaption { position: absolute; z-index: 1; left: 16px; bottom: 12px; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--on-dark); }

/* Market context inside each country chapter */
.venture-context { margin-top: 1.8rem; padding: 20px 22px; background: rgba(236, 229, 214, 0.04); border: 1px solid var(--line-dark); border-left: 2px solid var(--brass); }
.context-k { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass); margin: 0 0 12px; }
.venture-context dl { margin: 0; display: grid; gap: 12px; }
.venture-context dl div { display: grid; grid-template-columns: 7.4rem 1fr; gap: 14px; align-items: baseline; }
.venture-context dt { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; line-height: 1; color: var(--on-dark); white-space: nowrap; }
.venture-context dd { margin: 0; font-size: 0.9rem; line-height: 1.5; color: var(--on-dark-muted); }

/* Impact focus areas */
.focus { margin-top: 2.4rem; }
.impact .context-k { color: var(--brass-deep); }
.focus-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.focus-list li { font-size: 0.8125rem; letter-spacing: 0.06em; padding: 8px 14px; border: 1px solid rgba(17, 26, 33, 0.25); color: var(--ink); }

/* Contact call to action + window */
.contact-inner { max-width: 880px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact-title { font-size: clamp(3rem, 8vw, 6.5rem); line-height: 0.95; }
.contact .contact-intro { margin: 1.6rem auto 2.4rem; max-width: 46ch; }
.contact-actions { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.btn-lg { min-height: 60px; padding: 0 2.4rem; font-size: 0.875rem; }
.contact-place { margin: 0; }

.contact-dialog {
  width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid rgba(201, 164, 106, 0.35);
  background: #121c24; color: var(--on-dark); box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}
.contact-dialog::backdrop { background: rgba(8, 12, 16, 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.contact-dialog[open] { animation: dialog-in 0.45s var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 28px 32px 22px; border-bottom: 1px solid var(--line-dark); }
.dialog-kicker { margin: 0 0 8px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass); }
.dialog-head h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.dialog-head h2 em { color: var(--brass); }
.dialog-close { position: relative; flex: none; width: 40px; height: 40px; border: 1px solid var(--line-dark); background: none; cursor: pointer; transition: border-color 0.3s var(--ease); }
.dialog-close:hover { border-color: var(--brass); }
.dialog-close span::before, .dialog-close span::after { content: ""; position: absolute; left: 11px; right: 11px; top: 50%; height: 1px; background: var(--on-dark); transform: rotate(45deg); }
.dialog-close span::after { transform: rotate(-45deg); }
.contact-dialog .contact-form { padding: 26px 32px 30px; }
@media (max-width: 560px) {
  .dialog-head { padding: 22px 20px 18px; }
  .contact-dialog .contact-form { padding: 20px; }
}

/* Footer extras */
.footer-nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 18px; }
.footer-nav a { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none; color: var(--on-dark-muted); }
.footer-nav a:hover { color: var(--brass); }
.footer-sources { grid-column: 1 / -1; margin: 22px 0 0; font-size: 0.72rem; line-height: 1.6; color: rgba(236, 229, 214, 0.45); }

/* ─── Footer ─── */
.site-footer { background: #0c1318; color: var(--on-dark-muted); padding: 56px 0 48px; border-top: 1px solid var(--line-dark); }
.footer-inner { display: grid; grid-template-columns: auto 1fr; gap: 12px 40px; align-items: baseline; }
.site-footer .wordmark { color: var(--on-dark); }
.footer-meta { margin: 0; font-size: 0.875rem; justify-self: end; }
.footer-legal { grid-column: 1 / -1; margin: 20px 0 0; padding-top: 20px; border-top: 1px solid var(--line-dark); font-size: 0.78rem; line-height: 1.6; }
@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-meta { justify-self: start; }
}

/* ─── Reveal on scroll ─── */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .glance .stat:nth-child(2), .js .pillar:nth-child(2) { transition-delay: 0.1s; }
.js .glance .stat:nth-child(3), .js .pillar:nth-child(3) { transition-delay: 0.2s; }
.js .glance .stat:nth-child(4), .js .mandate-col:nth-child(4) { transition-delay: 0.3s; }
.js .mandate-col:nth-child(2) { transition-delay: 0.1s; }
.js .mandate-col:nth-child(3) { transition-delay: 0.2s; }
.js .book-cover.reveal { transform: translateY(22px) scale(.98); }
.js .book-cover.reveal.is-visible { transform: none; }
.js .pillar:nth-child(4) { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro { display: none; }
  .js .reveal, .js .hero-seq, .js .hero-portrait img, .js .site-header { opacity: 1; transform: none; transition: none; animation: none; }
  .js .map .arc { stroke-dashoffset: 0; transition: none; }
  .map.is-visible .marker .pulse, .hero-texture, .marquee-track, .scroll-cue span { animation: none; }
  .flow { display: none; }
  .js .statement .w { color: inherit; }
}

@media print {
  .site-header, .hero-texture, .contact-form, .nav-toggle, .intro, .marquee { display: none !important; }
  body::after { display: none; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .is-dark, .hero { background: #fff !important; color: #000 !important; }
}
