/* ============================================================
   TFOS — design system
   Investec design DNA × TFOS brand. See DESIGN_PROPOSAL.md
   ============================================================ */

:root {
  /* Brand */
  --midnight: #2E247E;
  --midnight-deep: #17123F;
  --midnight-ink: #0F0C2A;
  --ink: #1A1A18;
  --teal: #508CA4;
  --teal-deep: #3E7089;
  --cadet: #91AEC1;
  --columbia: #BFD7EA;
  --paper: #FBFAF7;
  --white: #FFFFFF;

  /* Derived */
  --tint: #EEF4F9;               /* columbia at low strength on white */
  --hairline: rgba(26, 26, 24, 0.14);
  --hairline-invert: rgba(255, 255, 255, 0.18);
  --text-soft: rgba(26, 26, 24, 0.68);
  --text-invert-soft: rgba(255, 255, 255, 0.72);

  /* Type */
  --serif: "Newsreader", Georgia, serif;
  --sans: "Mulish", "Segoe UI", sans-serif;

  /* Rhythm (8px grid) */
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 40px; --s6: 48px; --s8: 64px; --s10: 80px;
  --s12: 96px; --s16: 128px;

  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);

  --shadow-1: 0 8px 16px rgba(15, 12, 42, 0.10), 0 0 2px rgba(15, 12, 42, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

::selection { background: var(--columbia); color: var(--midnight-deep); }

/* ---------- Type scale ---------- */
h1, h2, h3, .serif {
  font-family: var(--serif);
  font-weight: 480;
  letter-spacing: -0.01em;
  line-height: 1.12;
  color: inherit;
}
h1 { font-size: clamp(40px, 5.4vw, 68px); }
h2 { font-size: clamp(30px, 3.6vw, 46px); }
h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.25; }

.kicker {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 12px;
}
.kicker::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--teal);
}
.on-dark .kicker { color: var(--cadet); }
.on-dark .kicker::before { background: var(--cadet); }

.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--text-soft); }
.on-dark .lede { color: var(--text-invert-soft); }

/* ---------- Layout ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
section { position: relative; }

/* ---------- Links & buttons ---------- */
.link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: color 0.25s var(--ease);
}
.link:hover { color: var(--teal); }
.on-dark .link:hover { color: var(--columbia); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  padding: 17px 30px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn svg { transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn-solid { background: var(--midnight); color: var(--white); }
.btn-solid:hover { background: var(--midnight-deep); }

.btn-ghost { border-color: var(--hairline); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }

.on-dark .btn-solid { background: var(--white); color: var(--midnight-deep); }
.on-dark .btn-solid:hover { background: var(--columbia); }
.on-dark .btn-ghost { border-color: var(--hairline-invert); color: var(--white); }
.on-dark .btn-ghost:hover { border-color: var(--white); }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Header (Investec-pattern: solid white trust chrome) ---------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  background: var(--white);
  box-shadow: 0 1px 0 var(--hairline);
  transition: box-shadow 0.35s var(--ease);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  max-width: 1360px;
}
.site-header.scrolled { box-shadow: 0 2px 12px rgba(26, 26, 24, 0.10); }
.brand img { height: 30px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  list-style: none;
}
.nav-links a {
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-cta .btn { padding: 12px 22px; font-size: 14px; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 44px; height: 44px;
  cursor: pointer;
  position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  position: absolute;
  left: 10px;
  width: 24px; height: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background-color 0.3s var(--ease);
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before { left: 0; top: -7px; }
.nav-toggle span::after { left: 0; top: 7px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { background: var(--white); transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span::after { background: var(--white); transform: translateY(-7px) rotate(-45deg); }

/* Mobile overlay menu exists in the DOM at all widths — visible only ≤820px */
.mobile-menu { display: none; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(120% 90% at 78% -10%, rgba(46, 36, 126, 0.55) 0%, transparent 55%),
    radial-gradient(90% 70% at 12% 110%, rgba(80, 140, 164, 0.22) 0%, transparent 60%),
    var(--midnight-ink);
  color: var(--white);
  margin-top: 76px;
  min-height: calc(88svh - 76px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.hero .container { padding-top: var(--s8); padding-bottom: var(--s10); position: relative; z-index: 2; }

/* Photographic layer — full-bleed, midnight-tinted; text sits on the opaque left field */
.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-visual img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 72% 50%;
  filter: saturate(0.55) brightness(0.72) contrast(1.05);
  transform: scale(1.06);
  animation: hero-img 2.4s var(--ease) forwards;
}
@keyframes hero-img { to { transform: scale(1); } }
.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--midnight-ink) 0%, rgba(15, 12, 42, 0.96) 30%, rgba(15, 12, 42, 0.78) 52%, rgba(23, 18, 63, 0.42) 78%, rgba(46, 36, 126, 0.30) 100%),
    linear-gradient(180deg, rgba(15, 12, 42, 0.55) 0%, transparent 45%, rgba(15, 12, 42, 0.72) 100%);
}

.hero-reg {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--columbia);
  border: 1px solid var(--hairline-invert);
  border-radius: 999px;
  padding: 9px 18px;
  margin-bottom: var(--s4);
}
.hero-reg .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(80, 140, 164, 0.25);
}

.hero h1 { max-width: 26ch; }
.hero .lede { max-width: 52ch; margin-top: var(--s3); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }
.hero-legal {
  margin-top: var(--s6);
  font-size: 13.5px;
  color: var(--text-invert-soft);
}
.hero-legal a { color: inherit; }

/* staggered reveal */
.hero [data-stagger] {
  opacity: 0;
  transform: translateY(26px);
  animation: rise 0.9s var(--ease) forwards;
}
.hero [data-stagger="1"] { animation-delay: 0.15s; }
.hero [data-stagger="2"] { animation-delay: 0.3s; }
.hero [data-stagger="3"] { animation-delay: 0.45s; }
.hero [data-stagger="4"] { animation-delay: 0.6s; }
.hero [data-stagger="5"] { animation-delay: 0.78s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Ticker ---------- */
.ticker {
  border-block: 1px solid var(--hairline-invert);
  background: var(--midnight-ink);
  color: var(--cadet);
  overflow: hidden;
  padding-block: 14px;
}
.ticker-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: ticker 46s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-inline: 34px;
  border-right: 1px solid var(--hairline-invert);
}
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Section scaffolding ---------- */
.section { padding-block: clamp(72px, 10vw, 128px); }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 { margin-top: var(--s2); }
.section-head .lede { margin-top: var(--s2); }

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Global access ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hairline);
}
.stat {
  padding: var(--s4) var(--s3) var(--s4) 0;
  border-bottom: 1px solid var(--hairline);
}
.stat + .stat { border-left: 1px solid var(--hairline); padding-left: var(--s3); }
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(34px, 3.4vw, 52px);
  font-weight: 480;
  line-height: 1.05;
  color: var(--midnight);
}
.stat span { font-size: 15px; color: var(--text-soft); margin-top: 6px; display: block; }

.access-note {
  margin-top: var(--s5);
  display: flex;
  gap: var(--s2);
  align-items: baseline;
  font-size: 15.5px;
  color: var(--text-soft);
  max-width: 760px;
}
.access-note strong { color: var(--ink); font-weight: 600; }

/* ---------- Protection ---------- */
.protection { background: var(--midnight-deep); color: var(--white); }
.protection-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--s3);
}
.protection-card {
  grid-column: span 4;
  border: 1px solid var(--hairline-invert);
  border-radius: 4px;
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.protection-card:hover { border-color: var(--cadet); background: rgba(255, 255, 255, 0.03); }
.protection-card .num {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--cadet);
  letter-spacing: 0.08em;
  margin-bottom: var(--s2);
}
.protection-card p { font-size: 15.5px; color: var(--text-invert-soft); }
.protection-card .link { font-size: 15px; margin-top: auto; }
.protection-fineprint {
  margin-top: var(--s5);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-invert-soft);
  max-width: 900px;
}

/* ---------- Audiences ---------- */
.audiences .cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
}
.audience {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.audience:hover { box-shadow: var(--shadow-1); transform: translateY(-3px); }
.audience .tag {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-deep);
  background: var(--tint);
  border-radius: 999px;
  padding: 7px 16px;
}
.audience ul { list-style: none; display: grid; gap: 10px; }
.audience li {
  padding-left: 22px;
  position: relative;
  font-size: 15.5px;
  color: var(--text-soft);
}
.audience li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 10px; height: 1px;
  background: var(--teal);
}
.audience .btn { align-self: flex-start; margin-top: auto; }

/* ---------- Service pillars ---------- */
.pillars { background: var(--white); border-block: 1px solid var(--hairline); }
.pillar-list { border-top: 1px solid var(--hairline); }
.pillar {
  display: grid;
  grid-template-columns: 72px minmax(0, 340px) 1fr;
  gap: var(--s4);
  padding-block: var(--s5);
  border-bottom: 1px solid var(--hairline);
}
.pillar .num {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--cadet);
}
.pillar p { color: var(--text-soft); font-size: 16px; max-width: 62ch; }

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s3);
  border-top: 1px solid var(--hairline);
  padding-top: var(--s5);
}
.member {
  padding-block: var(--s3);
  border-bottom: 1px solid var(--hairline);
}
.member b { font-family: var(--serif); font-weight: 520; font-size: 20px; display: block; }
.member span { font-size: 14.5px; color: var(--text-soft); margin-top: 4px; display: block; }

/* ---------- Contact ---------- */
.contact { background: var(--midnight-ink); color: var(--white); overflow: hidden; }
.contact .container {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
}
.contact h2 { max-width: 14ch; }
.contact .btn { margin-top: var(--s4); }
.contact-details { display: grid; gap: var(--s3); align-content: start; padding-top: 10px; }
.contact-details .row { border-bottom: 1px solid var(--hairline-invert); padding-bottom: var(--s2); }
.contact-details .label {
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cadet);
  margin-bottom: 6px;
}
.contact-details a { color: var(--white); }
.contact-details p, .contact-details a { font-size: 16px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--midnight-ink);
  color: var(--text-invert-soft);
  border-top: 1px solid var(--hairline-invert);
  padding-block: var(--s8) var(--s5);
  font-size: 13px;
  line-height: 1.65;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s4);
  flex-wrap: wrap;
  margin-bottom: var(--s5);
}
.footer-top img { height: 26px; width: auto; }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--s3); list-style: none; }
.footer-nav a { color: var(--text-invert-soft); text-decoration: none; }
.footer-nav a:hover { color: var(--white); }
.legal p + p { margin-top: var(--s2); }
.footer-bottom {
  margin-top: var(--s5);
  padding-top: var(--s3);
  border-top: 1px solid var(--hairline-invert);
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  flex-wrap: wrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .protection-card { grid-column: span 6; min-height: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--hairline); padding-left: var(--s3); }
  .pillar { grid-template-columns: 48px 1fr; }
  .pillar p { grid-column: 2; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: block; }
  .mobile-menu {
    display: flex;
    position: fixed;
    inset: 0;
    background: var(--midnight-ink);
    z-index: 40;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--gutter);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease);
  }
  .nav-open .mobile-menu { opacity: 1; pointer-events: auto; }
  .mobile-menu ul { list-style: none; display: grid; gap: var(--s3); }
  .mobile-menu a {
    font-family: var(--serif);
    font-size: 32px;
    color: var(--white);
    text-decoration: none;
  }
  .mobile-menu .minor a { font-family: var(--sans); font-size: 17px; color: var(--text-invert-soft); }

  .audiences .cols { grid-template-columns: 1fr; }
  .hero-visual::after {
    background:
      linear-gradient(90deg, rgba(15, 12, 42, 0.88) 0%, rgba(15, 12, 42, 0.78) 100%),
      linear-gradient(180deg, rgba(15, 12, 42, 0.6) 0%, transparent 45%, rgba(15, 12, 42, 0.85) 100%);
  }
  .contact .container { grid-template-columns: 1fr; }
  .protection-card { grid-column: span 12; }
  .hero .container { padding-top: var(--s6); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand img { height: 24px; }
  .nav-cta .btn { padding: 10px 16px; font-size: 13px; }
  .nav-cta { gap: 4px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat b { font-size: 30px; }
  .team-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .footer-bottom { flex-direction: column; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero [data-stagger], .reveal { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .hero-visual img { animation: none; transform: none; }
  .ticker-track { animation: none; }
  .btn, .audience, .protection-card { transition: none; }
}
