/* ============================================================
   NGWENYA - Strategy · Legacy · Impact
   Design system for richardngwenya.co.za
   Brand: broken-circle crocodile emblem · Cinzel wordmark ·
   teal #4F9AA3 · slate ink #1E2B36 · porcelain ground
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --paper: #FAF9F7;
  --surface: #FFFFFF;
  --surface-2: #F3F2EE;
  --ink: #1E2B36;
  --slate: #45535F;
  --muted: #5F6D78;
  --line: rgba(30, 43, 54, 0.13);
  --line-soft: rgba(30, 43, 54, 0.07);

  --teal: #4F9AA3;
  --teal-bright: #62AEB7;
  --teal-deep: #33727C;
  --teal-ink: #27545D;
  --teal-soft: rgba(79, 154, 163, 0.10);
  --teal-glow: rgba(79, 154, 163, 0.35);
  --mist: #8E9AA2;


  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-brand: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;

  --fs-hero: clamp(2.7rem, 6.4vw, 4.9rem);
  --fs-h2: clamp(1.95rem, 3.6vw, 2.9rem);
  --fs-h3: clamp(1.25rem, 2vw, 1.5rem);
  --fs-lead: clamp(1.05rem, 1.45vw, 1.2rem);

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem;    --space-5: 1.5rem;  --space-6: 2rem;
  --space-8: 3rem;    --space-10: 4rem;   --space-12: 5.5rem;
  --space-16: 8rem;

  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 28px;

  --shadow-1: 0 1px 2px rgba(16, 27, 36, 0.05), 0 8px 24px -12px rgba(16, 27, 36, 0.12);
  --shadow-2: 0 2px 6px rgba(16, 27, 36, 0.06), 0 24px 48px -16px rgba(16, 27, 36, 0.22);
  --shadow-teal: 0 10px 30px -10px var(--teal-glow);

  --ease-out: cubic-bezier(0.2, 0.65, 0.2, 1);
  --header-h: 76px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--slate);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; margin: 0 0 var(--space-4); font-weight: 500; }
h1, h2 { font-family: var(--font-display); letter-spacing: 0.005em; }
h3, h4 { font-family: var(--font-body); font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 var(--space-4); }
a { color: var(--teal-deep); text-decoration: none; transition: color 0.25s ease; }
a:hover { color: var(--teal); }
img, svg { max-width: 100%; display: block; }
ul, ol { padding: 0; margin: 0; }
::selection { background: var(--teal); color: #fff; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

.container { width: min(1180px, 92vw); margin-inline: auto; }
.container--narrow { width: min(760px, 92vw); margin-inline: auto; }

.section { padding-block: var(--space-16); position: relative; }
.section--tight { padding-block: var(--space-12); }
.section--wash { background: var(--surface-2); }

/* ---------- Brand atoms ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.9em;
  font-family: var(--font-brand);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: var(--space-4);
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, var(--teal)); }

.section-title { font-size: var(--fs-h2); max-width: 24ch; }
.section-lead { font-size: var(--fs-lead); color: var(--muted); max-width: 62ch; }

.diamond-divider {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  color: var(--teal); margin-block: var(--space-5);
}
.diamond-divider::before, .diamond-divider::after {
  content: ""; height: 1px; width: min(120px, 20vw);
  background: linear-gradient(90deg, transparent, currentColor);
}
.diamond-divider::after { background: linear-gradient(90deg, currentColor, transparent); }
.diamond-divider svg { width: 10px; height: 10px; flex: none; }

.tag {
  display: inline-block; padding: 0.32em 0.9em;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em;
  color: var(--teal-ink); background: var(--teal-soft);
  border: 1px solid rgba(79, 154, 163, 0.25);
  border-radius: 100px; text-transform: uppercase;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  padding: 0.85em 1.7em;
  font-family: var(--font-body); font-size: 0.92rem; font-weight: 600;
  letter-spacing: 0.02em; line-height: 1;
  border-radius: 100px; border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  will-change: transform;
  background: transparent;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn--primary {
  background: linear-gradient(120deg, var(--teal-deep), var(--teal));
  color: #fff; box-shadow: var(--shadow-teal);
}
.btn--primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 34px -10px var(--teal-glow); }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--teal); color: var(--teal-deep); transform: translateY(-2px); }
.btn--block { width: 100%; }

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 3000;
  background: var(--surface); color: var(--ink);
  padding: 0.6em 1.1em; border-radius: 8px; font-weight: 600; font-size: 0.9rem;
  box-shadow: var(--shadow-2);
  transform: translateY(-300%); transition: transform 0.3s var(--ease-out);
}
.skip-link:focus { transform: none; }

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed; inset: 0 0 auto 0; z-index: 1200;
  height: 3px; pointer-events: none;
  background: linear-gradient(90deg, var(--teal-deep), var(--teal-bright));
  transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- Intro overlay ---------- */
html:not(.js) .intro { display: none; }
.intro {
  position: fixed; inset: 0; z-index: 2000;
  display: grid; place-items: center;
  background: radial-gradient(120% 120% at 50% 30%, #FFFFFF, var(--paper) 70%, #EFF2F1);
  transition: opacity 0.7s ease, visibility 0.7s;
}
.intro--done { opacity: 0; visibility: hidden; pointer-events: none; }
.intro__lockup { display: grid; place-items: center; gap: 18px; text-align: center; }
.intro__mark {
  width: clamp(110px, 16vw, 160px); height: auto;
  opacity: 0; transform: scale(0.9);
  animation: introMark 1.1s var(--ease-out) 0.15s forwards;
}
@keyframes introMark { to { opacity: 1; transform: scale(1); } }
.intro__word {
  font-family: var(--font-brand); font-weight: 600; color: var(--ink);
  font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: 0.34em; text-indent: 0.34em;
  opacity: 0; animation: fadeUp 0.8s ease 0.7s forwards;
}
.intro__tag {
  font-family: var(--font-body); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.4em; text-indent: 0.4em; text-transform: uppercase; color: var(--teal-deep);
  opacity: 0; animation: fadeUp 0.8s ease 0.95s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  transition: transform 0.45s var(--ease-out), background-color 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}
.header--scrolled {
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-color: var(--line-soft);
  box-shadow: 0 8px 30px -18px rgba(16, 27, 36, 0.25);
}
.header--hidden { transform: translateY(-100%); }
.header__inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-6);
}
.brand { display: inline-flex; align-items: center; gap: 13px; }
.brand__mark { width: 46px; height: 46px; }
.brand__name {
  display: flex; flex-direction: column;
  font-family: var(--font-brand); font-size: 1.06rem; font-weight: 600;
  letter-spacing: 0.22em; color: var(--ink); line-height: 1.2;
}
.brand__name small {
  font-family: var(--font-body); font-size: 0.56rem; font-weight: 600;
  letter-spacing: 0.34em; text-transform: uppercase; color: var(--teal-deep);
  margin-top: 3px; white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: var(--space-6); }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); list-style: none; }
.nav__links a:not(.btn) {
  position: relative; font-size: 0.9rem; font-weight: 500; color: var(--slate);
  padding-block: 6px; letter-spacing: 0.02em;
}
.nav__links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--teal-deep), var(--teal-bright));
  border-radius: 2px; transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.35s var(--ease-out);
}
.nav__links a:not(.btn):hover::after, .nav__links a.is-active::after { transform: scaleX(1); }
.nav__links a.is-active { color: var(--ink); }
.nav__actions { display: flex; align-items: center; gap: var(--space-4); }
.nav__cta { display: inline-flex; }
.nav__mobile-cta { display: none; }

/* burger */
.nav-toggle {
  display: none; width: 42px; height: 42px;
  border: 1px solid var(--line); border-radius: 50%; background: transparent;
  cursor: pointer; place-items: center;
}
.nav-toggle span {
  display: block; width: 16px; height: 2px; margin: 2px auto;
  background: var(--ink); border-radius: 2px;
  transition: transform 0.35s var(--ease-out), opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Side rail ---------- */
.rail {
  position: fixed; left: clamp(6px, 1.1vw, 18px); bottom: 0; z-index: 900;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.rail::after { content: ""; width: 1px; height: 92px; background: linear-gradient(180deg, var(--mist), transparent); }
.rail__label {
  writing-mode: vertical-rl; font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted);
}
.rail a {
  color: var(--muted); display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  transition: color 0.3s ease, transform 0.3s var(--ease-out), background-color 0.3s ease;
}
.rail a:hover { color: var(--teal-deep); background: var(--teal-soft); transform: translateY(-3px); }
.rail svg { width: 17px; height: 17px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + var(--space-10)) 0 var(--space-12);
  background:
    radial-gradient(90rem 60rem at 118% -20%, rgba(79, 154, 163, 0.18), transparent 55%),
    radial-gradient(70rem 50rem at -30% 120%, rgba(79, 154, 163, 0.10), transparent 55%),
    linear-gradient(165deg, #FFFFFF 0%, var(--paper) 55%, #EDF1EF 100%);
  color: var(--muted);
  overflow: hidden;
}
.hero__emblem {
  position: absolute; right: -6%; top: 50%;
  width: clamp(420px, 52vw, 880px); height: auto;
  transform: translateY(-50%); opacity: 0.38;
  pointer-events: none; will-change: transform;
}
.hero__grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(rgba(30,43,54,0.045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(30,43,54,0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(80% 70% at 40% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(80% 70% at 40% 40%, #000 30%, transparent 100%);
}
.hero__cols { position: relative; z-index: 2; display: grid; grid-template-columns: 1.06fr 0.94fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero__inner { position: relative; z-index: 2; max-width: 640px; }
.hero__visual { position: relative; z-index: 2; }
.hero__visual::before {
  content: ""; position: absolute; inset: 22px -22px -22px 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, rgba(79, 154, 163, 0.2), rgba(79, 154, 163, 0.04));
}
.hero__photo {
  width: 100%; aspect-ratio: 4 / 4.8;
  object-fit: cover; object-position: 50% 26%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-2);
  background: #fff; display: block;
}
.hero__chip {
  position: absolute; left: -26px; bottom: 30px;
  display: flex; align-items: center; gap: 0.9em;
  padding: 0.85em 1.2em;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid var(--line-soft); border-radius: 16px;
  box-shadow: var(--shadow-2);
}
.hero__chip strong { font-family: var(--font-brand); font-weight: 600; font-size: 1.35rem; color: var(--teal-deep); line-height: 1; }
.hero__chip span { font-size: 0.74rem; line-height: 1.45; color: var(--muted); max-width: 18ch; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 0.9em;
  font-family: var(--font-brand); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--teal-deep);
  margin-bottom: var(--space-5);
}
.hero__eyebrow::before { content: ""; width: 40px; height: 1px; background: linear-gradient(90deg, transparent, var(--teal-deep)); }
.hero__title {
  font-size: var(--fs-hero); color: var(--ink); font-weight: 500;
  max-width: 15ch; margin-bottom: var(--space-5); text-wrap: balance;
}
.hero__title em {
  font-style: italic;
  background: linear-gradient(100deg, var(--teal), var(--teal-deep) 70%, var(--teal-ink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub { font-size: var(--fs-lead); line-height: 1.8; max-width: 60ch; color: var(--slate); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-8); }
.hero__meta {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; gap: clamp(1.4rem, 4vw, 3.4rem);
  margin-top: var(--space-10); padding-top: var(--space-6);
  border-top: 1px solid var(--line);
}
.hero__meta-num {
  display: block; font-family: var(--font-brand); font-weight: 600;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem); color: var(--ink); letter-spacing: 0.04em;
}
.hero__meta-num .unit { color: var(--teal-deep); }
.hero__meta-label { font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }

/* animated water lines at hero base */
.hero__water { position: absolute; left: 0; right: 0; bottom: -2px; z-index: 1; pointer-events: none; }
.hero__water svg { width: 100%; height: clamp(90px, 12vw, 160px); display: block; }
.hero__water .fill { fill: var(--surface); transition: fill 0.4s ease; }
.hero__water .w { animation: drift 22s linear infinite; will-change: transform; transform-box: fill-box; }
.hero__water .w2 { animation-duration: 30s; animation-direction: reverse; }
.hero__water .w3 { animation-duration: 40s; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-25%); } }

.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; z-index: 3;
  transform: translateX(-50%);
  display: grid; place-items: center; gap: 8px;
  color: var(--muted); font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase;
}
.scroll-cue__line { width: 1px; height: 44px; background: var(--line); overflow: hidden; position: relative; }
.scroll-cue__line::after {
  content: ""; position: absolute; left: 0; top: -50%; width: 100%; height: 50%;
  background: var(--teal-deep); animation: cue 2.2s var(--ease-out) infinite;
}
@keyframes cue { 0% { top: -50%; } 60%, 100% { top: 110%; } }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; padding-block: var(--space-5);
  border-block: 1px solid var(--line-soft);
  background: var(--surface);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 36s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__seq {
  display: flex; align-items: center; flex: none;
  font-family: var(--font-brand); font-size: 0.86rem; font-weight: 600;
  letter-spacing: 0.34em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.marquee__seq span { padding-inline: 1.6em; }
.marquee__seq svg { width: 9px; height: 9px; color: var(--teal); flex: none; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Story ---------- */
.story-grid {
  display: grid; grid-template-columns: minmax(300px, 0.85fr) 1.15fr;
  gap: clamp(2.5rem, 6vw, 5.5rem); align-items: center;
}
.portrait {
  position: relative; border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #FFFFFF, #EFF2F1 70%);
  border: 1px solid var(--line-soft);
  aspect-ratio: 4 / 4.7; overflow: hidden;
  box-shadow: var(--shadow-2);
}
.portrait::before {
  content: ""; position: absolute; inset: 14px;
  border: 1px solid rgba(30, 43, 54, 0.1); border-radius: calc(var(--radius-lg) - 10px);
  pointer-events: none; z-index: 3;
}
.portrait__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.portrait__emblem {
  position: absolute; inset: 0; margin: auto; width: 62%; height: auto; z-index: 1;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.35));
}
.portrait__glow {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(70% 60% at 50% 38%, rgba(79, 154, 163, 0.14), transparent 70%);
}
.portrait__caption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: var(--space-8) var(--space-6) var(--space-5);
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.94) 55%);
  color: var(--ink);
}
.portrait__caption strong { display: block; font-family: var(--font-brand); letter-spacing: 0.14em; font-size: 0.95rem; font-weight: 600; }
.portrait__caption span { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.04em; }
.story-creds { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-5); }

/* pull-stat chips inside story */
.story-pulls { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); margin-top: var(--space-6); }
.pull {
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  background: var(--surface);
}
.pull strong { display: block; font-family: var(--font-brand); font-weight: 600; font-size: 1.15rem; color: var(--teal-deep); letter-spacing: 0.03em; }
.pull span { font-size: 0.8rem; color: var(--muted); }

/* ---------- Quote carousel ---------- */
.quotes { position: relative; overflow: hidden; }
.quotes__mark { position: absolute; left: -3%; top: 50%; transform: translateY(-50%); width: 380px; opacity: 0.14; pointer-events: none; }
.quotes__stage { position: relative; min-height: 15rem; }
.quote {
  position: absolute; inset: 0;
  display: grid; place-content: center; text-align: center; gap: var(--space-4);
  opacity: 0; transform: translateY(18px); pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s var(--ease-out);
  padding-inline: var(--space-4);
}
.quote.is-active { opacity: 1; transform: none; pointer-events: auto; position: relative; }
.quote blockquote {
  margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(1.45rem, 2.9vw, 2.15rem); line-height: 1.45; color: var(--ink);
  max-width: 34ch; text-wrap: balance;
}
.quote figcaption {
  font-family: var(--font-body); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--teal-deep);
}
.quotes__dots { display: flex; justify-content: center; gap: 10px; margin-top: var(--space-6); }
.quotes__dot {
  width: 26px; height: 4px; border-radius: 4px; border: 0; cursor: pointer; padding: 0;
  background: var(--line); transition: background-color 0.35s ease, width 0.35s var(--ease-out);
}
.quotes__dot.is-active { background: var(--teal); width: 44px; }

/* ---------- Timeline ---------- */
.timeline { position: relative; list-style: none; margin-top: var(--space-10); }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px;
  background: var(--line-soft); border-radius: 2px;
}
.timeline::after {
  content: ""; position: absolute; left: 7px; top: 6px; width: 2px;
  height: calc((100% - 12px) * var(--growth, 0));
  background: linear-gradient(180deg, var(--teal-bright), var(--teal-deep));
  border-radius: 2px; transition: height 0.2s linear;
}
.timeline__item { position: relative; padding: 0 0 var(--space-8) 46px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute; left: 0; top: 7px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--paper);
  border: 2px solid var(--mist); z-index: 1;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.timeline__item.is-passed .timeline__dot { border-color: var(--teal); box-shadow: 0 0 0 5px var(--teal-soft); }
.timeline__year {
  font-family: var(--font-brand); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--teal-deep);
}
.timeline__role { font-size: 1.12rem; margin: var(--space-1) 0 2px; }
.timeline__org { font-size: 0.85rem; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; margin-bottom: var(--space-2); }
.timeline__desc { font-size: 0.95rem; color: var(--muted); max-width: 62ch; margin: 0; }
.timeline-cols { display: grid; grid-template-columns: minmax(280px, 0.8fr) 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.timeline-cols__intro { position: sticky; top: calc(var(--header-h) + var(--space-6)); }

/* ---------- Portfolio ---------- */
.firm {
  display: grid; grid-template-columns: minmax(290px, 0.72fr) 1.28fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(1.8rem, 4vw, 3.2rem);
  border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  position: relative; overflow: hidden;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s ease, border-color 0.5s ease;
  margin-top: var(--space-8);
}
.firm:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); border-color: rgba(79, 154, 163, 0.35); }
.firm::after {
  content: ""; position: absolute; top: 0; left: -70%; width: 45%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(79, 154, 163, 0.07), transparent);
  transform: skewX(-18deg); transition: left 0.9s var(--ease-out); pointer-events: none;
}
.firm:hover::after { left: 135%; }
.firm__mark {
  width: 62px; height: 62px; border-radius: 16px; display: grid; place-items: center;
  background: var(--teal-soft); color: var(--teal-deep); margin-bottom: var(--space-4);
}
.firm__mark svg { width: 30px; height: 30px; }
.firm__mark img { width: 44px; height: 44px; object-fit: contain; }
.deals { list-style: none; display: grid; gap: 0.7em; margin-top: var(--space-4); }
.deals li { display: grid; grid-template-columns: 108px 1fr; gap: var(--space-4); font-size: 0.93rem; color: var(--slate); align-items: baseline; }
.deals strong { font-family: var(--font-brand); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.04em; color: var(--teal-deep); white-space: nowrap; }
@media (max-width: 640px) { .deals li { grid-template-columns: 1fr; gap: 0.15em; } }
.firm__badge { display: inline-block; margin-bottom: var(--space-4); }
.firm__name { font-family: var(--font-display); font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 600; margin-bottom: var(--space-1); }
.firm__role { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal-deep); margin-bottom: var(--space-5); }
.firm__facts { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--line-soft); }
.firm__facts > div { display: flex; justify-content: space-between; gap: var(--space-4); padding: 0.65em 0; border-bottom: 1px solid var(--line-soft); }
.firm__facts dt { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.firm__facts dd { margin: 0; font-weight: 600; font-size: 0.9rem; color: var(--ink); text-align: right; }
.firm__facts a { color: var(--teal-deep); }
.firm__body h3 { font-size: 1.02rem; letter-spacing: 0.01em; margin: var(--space-6) 0 var(--space-2); color: var(--teal-ink); }
.firm__body h3:first-of-type { margin-top: var(--space-5); }
.firm__body p { color: var(--slate); font-size: 0.98rem; }
.firm__body > p:first-child { font-size: 1.05rem; }
.sectors { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin-top: var(--space-2); }
.firm__more { margin-top: var(--space-4); border-top: 1px dashed var(--line); }
.firm__more summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 0.5em;
  padding-top: var(--space-4); font-weight: 600; font-size: 0.9rem; color: var(--teal-deep);
}
.firm__more summary::-webkit-details-marker { display: none; }
.firm__more summary::after { content: "+"; font-size: 1.1em; transition: transform 0.3s var(--ease-out); }
.firm__more[open] summary::after { transform: rotate(45deg); }
.firm__more summary:hover { color: var(--teal); }

/* ---------- Stat band ---------- */
.stat-band {
  background:
    radial-gradient(70rem 40rem at 85% 120%, rgba(79, 154, 163, 0.12), transparent 60%),
    var(--surface-2);
  color: var(--muted);
  position: relative; overflow: hidden;
}
.stat-band__emblem { position: absolute; left: -140px; bottom: -140px; width: 480px; opacity: 0.12; pointer-events: none; }
.stat-band__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px; background: var(--line-soft);
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-1);
}
.stat { background: var(--surface); padding: var(--space-8) var(--space-6); }
.stat__num {
  font-family: var(--font-brand); font-weight: 600;
  font-size: clamp(2.1rem, 3.6vw, 3rem); color: var(--ink); letter-spacing: 0.03em; line-height: 1.1;
}
.stat__num .unit { color: var(--teal-deep); }
.stat__label { margin-top: var(--space-2); font-size: 0.85rem; line-height: 1.6; }

/* ---------- Insights cards ---------- */
.insights-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: var(--space-4); }
.insights-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-6); margin-top: var(--space-10); }
.post-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s ease, border-color 0.5s ease;
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); border-color: rgba(79, 154, 163, 0.35); }
.post-card__media { position: relative; aspect-ratio: 16 / 9; display: block; overflow: hidden; }
.post-card__media svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 0.8s var(--ease-out); }
.post-card:hover .post-card__media svg { transform: scale(1.05); }
.post-card__media--a { background: linear-gradient(135deg, #5FA5AD, #3E828B); }
.post-card__media--b { background: linear-gradient(135deg, #94A9B3, #71919E); }
.post-card__media--c { background: linear-gradient(135deg, #7FB6BC, #4F9AA3); }
.post-card__cat { position: absolute; left: 14px; bottom: 14px; background: rgba(255, 255, 255, 0.82); color: var(--teal-ink); border-color: rgba(255,255,255,0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.post-card__body { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5) var(--space-5) var(--space-5); flex: 1; }
.post-card__meta { display: flex; gap: var(--space-3); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.post-card__body h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.32rem; line-height: 1.25; margin: 0; }
.post-card__body h3 a { color: inherit; }
.post-card__body h3 a:hover { color: var(--teal-deep); }
.post-card__excerpt { font-size: 0.92rem; color: var(--muted); margin: 0; flex: 1; }
.post-card__read {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-weight: 600; font-size: 0.88rem; color: var(--teal-deep); margin-top: var(--space-2);
}
.post-card__read svg { width: 1em; height: 1em; transition: transform 0.3s var(--ease-out); }
.post-card__read:hover svg { transform: translateX(4px); }
.post-card--featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.25fr 1fr; }
.post-card--featured .post-card__media { aspect-ratio: auto; min-height: 320px; }
.post-card--featured .post-card__body { padding: clamp(1.6rem, 3.5vw, 3rem); justify-content: center; }
.post-card--featured h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.link-arrow { display: inline-flex; align-items: center; gap: 0.5em; font-weight: 600; font-size: 0.92rem; color: var(--teal-deep); }
.link-arrow svg { width: 1.05em; height: 1.05em; transition: transform 0.3s var(--ease-out); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Connect ---------- */
.connect {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(60rem 34rem at 110% -30%, rgba(79, 154, 163, 0.16), transparent 60%),
    linear-gradient(155deg, #FFFFFF, var(--paper) 75%);
  border: 1px solid var(--line-soft);
  color: var(--muted);
  padding: clamp(2.5rem, 6vw, 5rem);
  box-shadow: var(--shadow-2);
}
.connect__emblem { position: absolute; right: -90px; bottom: -110px; width: 420px; opacity: 0.22; pointer-events: none; }
.connect h2 { color: var(--ink); font-size: var(--fs-h2); max-width: 18ch; }
.connect__lead { max-width: 54ch; font-size: var(--fs-lead); }
.connect__cols { position: relative; z-index: 1; display: grid; grid-template-columns: 1.45fr 0.85fr; gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.connect__photo {
  width: 100%; aspect-ratio: 4 / 4.6;
  object-fit: cover; object-position: 50% 28%;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-2); display: block;
}
.connect__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--space-4); margin-top: var(--space-8); }
.connect-card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-6); border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: var(--surface);
  color: var(--muted);
  box-shadow: var(--shadow-1);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s ease, border-color 0.45s ease;
}
.connect-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); border-color: rgba(79, 154, 163, 0.45); color: var(--muted); }
.connect-card__icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-deep); margin-bottom: var(--space-2); }
.connect-card__icon svg { width: 20px; height: 20px; }
.connect-card strong { color: var(--ink); font-size: 1.02rem; letter-spacing: 0.01em; }
.connect-card span { font-size: 0.86rem; }
.connect-card .connect-card__handle { color: var(--teal-deep); font-weight: 600; font-size: 0.9rem; margin-top: auto; display: inline-flex; align-items: center; gap: 0.45em; }
.connect-card .connect-card__handle svg { width: 0.95em; height: 0.95em; transition: transform 0.3s var(--ease-out); }
.connect-card:hover .connect-card__handle svg { transform: translateX(4px); }

/* ---------- Footer ---------- */
.footer {
  background: linear-gradient(180deg, var(--surface-2), #ECEBE6);
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  padding: var(--space-12) 0 var(--space-6);
  position: relative; overflow: hidden;
}
.footer__lockup { display: grid; place-items: center; text-align: center; gap: 10px; margin-bottom: var(--space-10); }
.footer__lockup svg.footer__emblem { width: 92px; height: 92px; }
.footer__word { font-family: var(--font-brand); font-weight: 600; font-size: 1.7rem; letter-spacing: 0.3em; text-indent: 0.3em; color: var(--ink); }
.footer__tagline { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.42em; text-indent: 0.42em; text-transform: uppercase; color: var(--teal-deep); }
.footer__grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: var(--space-8); padding-top: var(--space-8);
  border-top: 1px solid var(--line);
}
.footer h4 { color: var(--ink); font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600; margin-bottom: var(--space-4); }
.footer ul { list-style: none; display: grid; gap: 0.55em; }
.footer a { color: var(--muted); font-size: 0.92rem; }
.footer a:hover { color: var(--teal-deep); }
.footer__about { font-size: 0.92rem; max-width: 40ch; }
.footer__socials { display: flex; gap: var(--space-3); margin-top: var(--space-5); }
.social-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--muted);
  transition: transform 0.35s var(--ease-out), border-color 0.35s ease, color 0.35s ease, background-color 0.35s ease;
}
.social-btn:hover { transform: translateY(-3px); border-color: var(--teal-deep); color: var(--teal-deep); background: var(--teal-soft); }
.social-btn svg { width: 17px; height: 17px; }
.footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3);
  margin-top: var(--space-10); padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  font-size: 0.8rem; letter-spacing: 0.03em;
}

/* ---------- Article (insight pages) ---------- */
.page-hero {
  position: relative; overflow: hidden;
  padding: calc(var(--header-h) + var(--space-12)) 0 var(--space-10);
  background:
    radial-gradient(70rem 40rem at 110% -30%, rgba(79, 154, 163, 0.14), transparent 60%),
    linear-gradient(160deg, #FFFFFF, var(--paper) 70%);
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
}
.page-hero h1 { color: var(--ink); font-size: clamp(2.2rem, 4.6vw, 3.6rem); max-width: 22ch; text-wrap: balance; }
.page-hero__lead { font-size: var(--fs-lead); max-width: 62ch; }
.page-hero__emblem { position: absolute; right: -70px; top: 50%; transform: translateY(-50%); width: 420px; opacity: 0.3; pointer-events: none; }

.article__header { padding-top: var(--space-8); }
.article__title { font-size: clamp(2rem, 4.4vw, 3.3rem); max-width: 24ch; text-wrap: balance; }
.article__byline { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-6); }
.author-chip { display: flex; align-items: center; gap: 13px; }
.author-chip__avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.author-chip__avatar svg { width: 32px; height: 32px; }
.author-chip__avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-chip__name { font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.author-chip__role { font-size: 0.8rem; color: var(--muted); }
.article__meta { display: flex; gap: var(--space-4); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.article__hero { margin-top: var(--space-8); }
.article__hero svg { width: 100%; height: clamp(220px, 42vw, 460px); display: block; }
.article__hero--a { background: linear-gradient(135deg, #5FA5AD, #3E828B); }
.article__hero--b { background: linear-gradient(135deg, #94A9B3, #71919E); }
.article__hero--c { background: linear-gradient(135deg, #7FB6BC, #4F9AA3); }

.article__share { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); }
.article__share-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-right: var(--space-2); }
.share-btn {
  display: inline-flex; align-items: center; gap: 0.55em;
  padding: 0.55em 1.1em; border-radius: 100px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 0.82rem; font-weight: 600; color: var(--slate); cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s var(--ease-out);
}
.share-btn:hover { border-color: var(--teal); color: var(--teal-deep); transform: translateY(-2px); }
.share-btn svg { width: 15px; height: 15px; }

.prose { width: min(720px, 92vw); margin: var(--space-8) auto 0; font-size: 1.08rem; line-height: 1.88; color: var(--slate); }
.prose > p:first-of-type::first-letter {
  font-family: var(--font-display); font-weight: 600;
  font-size: 3.4em; line-height: 0.82; color: var(--teal-deep);
  float: left; padding: 0.08em 0.14em 0 0;
}
.prose h2 {
  font-size: clamp(1.5rem, 2.6vw, 1.95rem); font-weight: 600;
  margin: var(--space-10) 0 var(--space-4);
}
.prose strong { color: var(--ink); }
.prose em { font-style: italic; }
.prose blockquote {
  margin: var(--space-8) 0; padding: var(--space-2) 0 var(--space-2) var(--space-6);
  border-left: 3px solid var(--teal);
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(1.3rem, 2.2vw, 1.6rem); line-height: 1.5; color: var(--ink);
}
.prose blockquote cite { display: block; margin-top: var(--space-3); font-family: var(--font-body); font-style: normal; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--teal-deep); }
.prose .callout {
  margin: var(--space-8) 0; padding: var(--space-5) var(--space-6);
  background: var(--teal-soft); border: 1px solid rgba(79, 154, 163, 0.25);
  border-radius: var(--radius-sm); font-size: 0.98rem;
}
.prose .callout p { margin: 0; }
.back-link { display: inline-flex; align-items: center; gap: 0.5em; font-size: 0.86rem; font-weight: 600; color: var(--muted); }
.back-link svg { width: 1em; height: 1em; }
.back-link:hover { color: var(--teal-deep); }

/* ---------- Reveal animation ---------- */
html.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s var(--ease-out); }
html.js .reveal.is-visible { opacity: 1; transform: none; }
html.js .reveal[data-delay="1"] { transition-delay: 0.1s; }
html.js .reveal[data-delay="2"] { transition-delay: 0.2s; }
html.js .reveal[data-delay="3"] { transition-delay: 0.3s; }

/* ---------- Responsive ---------- */
@media (max-width: 1260px) {
  .rail { display: none; }
}
@media (max-width: 960px) {
  .story-grid, .timeline-cols, .firm { grid-template-columns: 1fr; }
  .hero__cols, .connect__cols { grid-template-columns: 1fr; }
  .hero__visual { max-width: 430px; width: 100%; margin-inline: auto; }
  .hero__chip { left: 10px; }
  .connect__photo { max-width: 400px; margin-inline: auto; }
  .timeline-cols__intro { position: static; }
  .portrait { max-width: 420px; }
  .post-card--featured { grid-template-columns: 1fr; }
  .post-card--featured .post-card__media { aspect-ratio: 16 / 9; min-height: 0; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav__links {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; gap: var(--space-5);
    background: color-mix(in srgb, var(--paper) 96%, transparent);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s;
  }
  .nav__links a:not(.btn) { font-size: 1.5rem; font-family: var(--font-display); color: var(--ink); opacity: 0; transform: translateY(16px); transition: opacity 0.45s ease, transform 0.45s var(--ease-out); }
  body.nav-open .nav__links { opacity: 1; visibility: visible; z-index: 1001; }
  body.nav-open .nav__links a:not(.btn) { opacity: 1; transform: none; }
  body.nav-open .nav__links li:nth-child(1) a { transition-delay: 0.08s; }
  body.nav-open .nav__links li:nth-child(2) a { transition-delay: 0.14s; }
  body.nav-open .nav__links li:nth-child(3) a { transition-delay: 0.2s; }
  body.nav-open .nav__links li:nth-child(4) a { transition-delay: 0.26s; }
  body.nav-open .nav__links li:nth-child(5) a { transition-delay: 0.32s; }
  body.nav-open .nav__links li:nth-child(6) a { transition-delay: 0.38s; }
  body.nav-open { overflow: hidden; }
  .nav-toggle { display: grid; position: relative; z-index: 1002; }
  .nav__cta { display: none; }
  .nav__mobile-cta { display: block; margin-top: var(--space-4); }
  .nav__mobile-cta .btn { font-size: 1rem; }
  body.nav-open .header { background: transparent; box-shadow: none; }
  .hero__emblem { right: -34%; opacity: 0.1; }
  .brand__name { font-size: 0.95rem; }
  .brand__name small { font-size: 0.5rem; }
}
@media (max-width: 640px) {
  .section { padding-block: var(--space-12); }
  .story-pulls { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .hero__meta { gap: var(--space-5); }
  .connect { padding: var(--space-8) var(--space-5); }
  .article__byline { flex-direction: column; align-items: flex-start; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html.js .reveal { opacity: 1; transform: none; }
  .intro { display: none; }
}
