/* Layout: a calm editorial column on sage-tinted paper; one bold device, the "markets led" route strip of country codes. */
:root {
  --paper: #f4f7f6;
  --card: #ffffff;
  --band: #dcebe8;
  --ink: #252a35;
  --muted: #586170;
  --line: #d3e0dd;
  --accent: #2d5a55;
  --accent-ink: #ffffff;
  --gold: #8f7134;
  --font-display: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --wrap: 72rem;
  --measure: 40rem;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #161a21; --card: #1e232c; --band: #1b292a; --ink: #e8efed; --muted: #a4aeb9;
    --line: #2d343f; --accent: #8fc7be; --accent-ink: #10171a; --gold: #d3b679; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #161a21; --card: #1e232c; --band: #1b292a; --ink: #e8efed; --muted: #a4aeb9;
  --line: #2d343f; --accent: #8fc7be; --accent-ink: #10171a; --gold: #d3b679; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap {
  width: 100%; max-width: var(--wrap); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 48rem) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; text-wrap: balance; margin: 0; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.35rem, 6.5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { font-size: 1.45rem; }
p { margin: 0; }
.prose { max-width: var(--measure); display: grid; gap: 1rem; }
.prose h2 { margin-top: 1.5rem; }
.prose h3 { margin-top: 0.75rem; }
.prose ul, .prose ol { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.45rem; }
.lead { font-size: 1.2rem; color: var(--ink); }
.muted { color: var(--muted); }
.eyebrow { font: 500 0.78rem/1.3 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.tnum { font-variant-numeric: tabular-nums; }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.7rem; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.1; }
.brand b { font: 600 1.35rem/1.1 var(--font-display); }
.brand span { font: 500 0.68rem/1.4 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 0.5rem; }
.nav-links { display: none; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; font: 500 0.95rem var(--font-body); padding: 0.55rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 0.5rem); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem; display: grid; min-width: 14rem; box-shadow: 0 12px 30px rgb(0 0 0 / 0.12); }
.menu-panel a { padding: 0.6rem 0.75rem; text-decoration: none; color: var(--ink); border-radius: 6px; }
.menu-panel a:hover, .menu-panel a[aria-current="page"] { background: var(--band); }
@media (min-width: 64rem) {
  .menu { display: none; }
  .nav-links { display: flex; gap: 1.25rem; align-items: center; }
  .nav-links a { color: var(--ink); text-decoration: none; font-size: 0.95rem; padding-block: 0.25rem; border-bottom: 1px solid transparent; }
  .nav-links a:hover, .nav-links a[aria-current="page"] { border-bottom-color: var(--gold); }
}

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 48px; padding: 0.7rem 1.25rem; border-radius: 999px; font: 600 1rem/1.2 var(--font-body); text-decoration: none; border: 1px solid var(--accent); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn:hover { filter: brightness(1.06); }
.btn-small { min-height: 40px; padding: 0.45rem 1rem; font-size: 0.92rem; }

/* Sections */
main { display: block; }
.section { padding-block: clamp(3rem, 8vw, 5.5rem); }
.section + .section { border-top: 1px solid var(--line); }
.band { background: var(--band); }
.section-head { display: grid; gap: 0.6rem; margin-bottom: 2rem; max-width: var(--measure); }

/* Hero */
.hero { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(2rem, 5vw, 3.5rem); }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero-text { display: grid; gap: 1.25rem; min-width: 0; }
.hero-name { font: 500 0.85rem/1.3 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.hero-sub { font-size: 1.18rem; max-width: 36rem; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.95rem; font-weight: 600; padding: 0.4rem 0.85rem; border-radius: 999px; background: var(--card); border: 1px solid var(--line); width: fit-content; }
.status::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #2f9e6e; box-shadow: 0 0 0 4px rgb(47 158 110 / 0.18); }
.portrait { width: min(15rem, 62vw); aspect-ratio: 1; max-width: 100%; justify-self: start; }
@media (min-width: 52rem) {
  .hero-grid { grid-template-columns: 1.5fr 1fr; gap: 3rem; }
  .portrait { width: min(22rem, 100%); justify-self: end; }
}

/* Proof bar */
.proof { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.proof div { padding: 1.25rem 0.75rem 1.25rem 0; display: grid; gap: 0.2rem; }
.proof div:nth-child(odd) { border-right: 1px solid var(--line); }
.proof div:nth-child(even) { padding-left: 1rem; }
.proof b { font: 600 clamp(2.2rem, 7vw, 3.1rem)/1 var(--font-display); font-variant-numeric: tabular-nums lining-nums; }
.proof span { font-size: 0.92rem; color: var(--muted); }
@media (min-width: 48rem) {
  .proof { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .proof div, .proof div:nth-child(even) { padding: 1.5rem 1.25rem; border-right: 1px solid var(--line); }
  .proof div:first-child { padding-left: 0; }
  .proof div:last-child { border-right: 0; }
}

/* Route strip: markets led */
.routes { margin-top: 1.75rem; display: grid; gap: 0.6rem; }
.routes ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.routes li { font: 500 0.82rem/1 var(--font-mono); letter-spacing: 0.06em; padding: 0.45rem 0.5rem; border: 1px solid var(--line); border-radius: 4px; background: var(--card); color: var(--ink); }
.routes li abbr { text-decoration: none; cursor: help; }

/* Grids and cards */
.grid { display: grid; gap: 1.25rem; }
@media (min-width: 48rem) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: 0.7rem; align-content: start; min-width: 0; }
.card h3 { font-size: 1.6rem; }
.card .eyebrow { margin-bottom: 0.1rem; }
.card-link { color: inherit; text-decoration: none; }
.card-link:hover .card { border-color: var(--accent); }
.more { font-weight: 600; color: var(--accent); }
.pillars { display: grid; gap: 1.5rem; }
@media (min-width: 48rem) { .pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; } }
.pillar { display: grid; gap: 0.5rem; padding-top: 1rem; border-top: 2px solid var(--gold); }
.pillar h3 { font-size: 1.4rem; }

/* Quotes */
.quotes { display: grid; gap: 1.25rem; }
@media (min-width: 60rem) { .quotes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
blockquote { margin: 0; display: grid; gap: 0.9rem; align-content: start; }
blockquote p { font: italic 500 1.3rem/1.4 var(--font-display); }
blockquote footer { font-size: 0.92rem; color: var(--muted); }
blockquote footer b { color: var(--ink); font-weight: 600; }
.quote-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { display: grid; gap: 0.5rem; padding-block: 1.5rem; border-top: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.when { font: 500 0.85rem/1.4 var(--font-mono); color: var(--gold); letter-spacing: 0.04em; }
.timeline h3 { font-size: 1.45rem; }
.timeline p { max-width: var(--measure); }
@media (min-width: 48rem) { .timeline li { grid-template-columns: 11rem minmax(0, 1fr); column-gap: 2rem; } .timeline li > :not(.when) { grid-column: 2; } .when { grid-row: 1 / span 3; padding-top: 0.35rem; } }

/* Case study and article */
.page-head { padding-block: clamp(2.5rem, 7vw, 4.5rem) 1.5rem; display: grid; gap: 1rem; }
.page-head p.lead { max-width: var(--measure); color: var(--muted); }
.meta { font: 500 0.85rem/1.5 var(--font-mono); color: var(--muted); letter-spacing: 0.02em; }
.result { background: var(--band); border-radius: var(--radius); padding: 1.25rem 1.5rem; max-width: var(--measure); }
.result strong { display: block; font: 500 0.78rem/1.3 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.4rem; }
.answer { border-left: 3px solid var(--gold); padding-left: 1.1rem; }
.checks { list-style: none; padding: 0 !important; }
.checks li { padding-left: 1.6rem; position: relative; }
.checks li::before { content: "↑"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.author { display: flex; gap: 1rem; align-items: center; max-width: var(--measure); padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-top: 1rem; }
.author img { width: 72px; height: 72px; flex: none; }
.author p { font-size: 0.95rem; }
.crumbs { font-size: 0.88rem; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* FAQ */
.faq { display: grid; gap: 0; max-width: 48rem; }
.faq div { padding-block: 1.4rem; border-top: 1px solid var(--line); display: grid; gap: 0.5rem; }
.faq h2, .faq h3 { font-size: 1.45rem; }

/* Tables (speaking) */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 32rem; font-size: 0.98rem; }
th, td { text-align: left; padding: 0.8rem 0.75rem 0.8rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 500 0.78rem/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* Forms */
form { display: grid; gap: 1rem; max-width: 36rem; }
label { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.95rem; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 0.75rem 0.85rem; width: 100%; }
textarea { min-height: 9rem; resize: vertical; }
.consent { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; }
.consent input { width: auto; margin-top: 0.3rem; }
.form-note { font-size: 0.9rem; color: var(--muted); }
.hidden-field { position: absolute; left: -9999px; }
.contact-list { display: grid; gap: 0.75rem; }
.contact-list dt { font: 500 0.78rem/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.contact-list dd { margin: 0 0 0.5rem; font-size: 1.05rem; }
.copy { font: 500 0.82rem var(--font-body); margin-left: 0.5rem; padding: 0.2rem 0.6rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }

/* CTA band and footer */
.cta { display: grid; gap: 1.25rem; justify-items: start; }
.cta h2 { max-width: 30ch; }
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem; font-size: 0.92rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 1.5rem; }
.footer-cols { display: grid; gap: 1.5rem; }
@media (min-width: 48rem) { .footer-cols { grid-template-columns: 2fr 1fr 1fr; } }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.footer-cols a { color: var(--ink); }
.footer-logo { width: 72px; border-radius: 6px; }
a.hidden-field:focus { left: 16px; top: 12px; z-index: 20; background: var(--card); padding: 0.5rem 1rem; border-radius: 6px; }

/* Fixes after first review */
.hero .proof { margin-top: 2.5rem; }
.proof div, .pillar { align-content: start; }
.btn { white-space: nowrap; }
.consent span { flex: 1; min-width: 0; }
.article-head h1 { font-size: clamp(2.1rem, 5vw, 3.25rem); max-width: 24ch; }
@media (max-width: 30rem) {
  .brand b { font-size: 1.15rem; white-space: nowrap; }
  .brand span { display: none; }
  .site-header .btn-small { padding-inline: 0.8rem; }
}
