/* ============================================================
   SIBIN — shared visual system
   Tokens per master build prompt §3
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;450;500;600&family=Geist+Mono:wght@400;500&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  /* Surfaces */
  --void:         #07090D;
  --ink:          #0C111A;
  --ink-raised:   #131A26;
  --white:        #FAFBFD;
  --mist:         #EEF1F7;
  --white-raised: #FFFFFF;

  /* Type */
  --text-hi:      #F2F5FA;
  --text-lo:      rgba(242, 245, 250, 0.62);
  --text-dark:    #0C111A;
  --text-dark-lo: rgba(12, 17, 26, 0.60);

  /* Accent */
  --cobalt:       #2D5BFF;
  --cobalt-soft:  rgba(45, 91, 255, 0.14);
  --cobalt-deep:  #1E3FB8;

  /* Lines */
  --line-dark:    rgba(242, 245, 250, 0.08);
  --line-light:   rgba(12, 17, 26, 0.10);

  /* Wine — logo only */
  --logo-wine:    #7A1F3D;

  --font-sans:  'Geist', 'Inter', system-ui, sans-serif;
  --font-serif: 'Geist', 'Inter', system-ui, sans-serif;
  --font-mono:  'Geist', 'Inter', system-ui, sans-serif;

  --max-w: 1320px;
  --gutter: 48px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--void);
  color: var(--text-hi);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: rgba(45, 91, 255, 0.25); }

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

/* ---------- type utilities ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-lo);
  display: flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--cobalt);
  flex: none;
}
.on-light .eyebrow, .light .eyebrow { color: var(--text-dark-lo); }

.display-xl {
  font-weight: 500;
  font-size: clamp(56px, 8vw, 128px);
  letter-spacing: -0.03em;
  line-height: 0.98;
  text-wrap: balance;
}
.display-l {
  font-weight: 500;
  font-size: clamp(40px, 5vw, 80px);
  letter-spacing: -0.025em;
  line-height: 1.02;
  text-wrap: balance;
}
.display-m {
  font-weight: 500;
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
}
em.accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.body-copy {
  font-size: clamp(17px, 1.2vw, 19px);
  font-weight: 400;
  line-height: 1.6;
  max-width: 56ch;
  color: var(--text-lo);
  text-wrap: pretty;
}
.on-light .body-copy, .light .body-copy { color: var(--text-dark-lo); }

/* ---------- buttons ---------- */
.btn-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 14px 28px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
}
.btn-solid {
  background: linear-gradient(180deg, #3D6BFF 0%, var(--cobalt) 52%, var(--cobalt-deep) 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 0 0 1px rgba(45, 91, 255, 0.5),
    0 4px 16px rgba(45, 91, 255, 0.42),
    0 0 30px rgba(45, 91, 255, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}
.btn-solid:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(45, 91, 255, 0.7),
    0 6px 22px rgba(45, 91, 255, 0.6),
    0 0 42px rgba(45, 91, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}
.btn-ghost { border-color: var(--line-dark); color: var(--text-hi); background: transparent; position: relative; }
.btn-ghost:hover { border-color: transparent; }
/* gradient stroke on hover (light→dark blue), keeps the 14px radius */
.btn-ghost::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, #6E92FF, #1E3FB8);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.btn-ghost:hover::after { opacity: 1; }
.on-light .btn-ghost, .light .btn-ghost { border-color: var(--line-light); color: var(--text-dark); }
.on-light .btn-ghost:hover, .light .btn-ghost:hover { border-color: transparent; }

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: -60px;
  left: 24px;
  z-index: 300;
  background: var(--cobalt);
  color: #fff;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  background: var(--cobalt);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 220;
  pointer-events: none;
}

/* banner-hero pages: white nav text over the dark image until scrolled */
body.banner-hero .site-nav:not(.scrolled) .nav-links a { color: rgba(242, 245, 250, 0.82); }
body.banner-hero .site-nav:not(.scrolled) .nav-links a:hover,
body.banner-hero .site-nav:not(.scrolled) .nav-links a.active { color: #fff; }
body.banner-hero .site-nav:not(.scrolled) .nav-logo .word { color: #fff; }
body.banner-hero .site-nav:not(.scrolled) .nav-logo .sub { color: rgba(242, 245, 250, 0.6); }
body.banner-hero .site-nav:not(.scrolled) .nav-burger span { background: #fff; }

/* ---------- nav ---------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - var(--max-w)) / 2));
  height: 76px;
  transition: background 0.4s ease, border-color 0.4s ease, height 0.4s ease;
  border-bottom: 1px solid transparent;
}
.site-nav.scrolled {
  background: rgba(7, 9, 13, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line-dark);
  height: 64px;
}
.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo svg { display: block; }
.nav-logo .word {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.14em;
  color: var(--text-hi);
}
.nav-logo .sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.22em;
  color: var(--text-lo);
  margin-top: 1px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  font-weight: 450;
  white-space: nowrap;
  color: var(--text-lo);
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 0;
}
.nav-links a:hover { color: var(--text-hi); }
.nav-links a.active { color: var(--text-hi); }
.nav-links a.active::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--cobalt);
  flex: none;
}
.nav-links .nav-cta {
  background: linear-gradient(180deg, #3D6BFF 0%, var(--cobalt) 52%, var(--cobalt-deep) 100%);
  color: #fff;
  padding: 10px 22px;
  border-radius: 12px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 0 0 1px rgba(45, 91, 255, 0.45),
    0 3px 14px rgba(45, 91, 255, 0.4),
    0 0 24px rgba(45, 91, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.nav-links .nav-cta:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(45, 91, 255, 0.65),
    0 5px 20px rgba(45, 91, 255, 0.55),
    0 0 36px rgba(45, 91, 255, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
/* keep the CTA white + centered in active/focus/current-page states */
.nav-links .nav-cta.active,
.nav-links .nav-cta:focus,
.nav-links .nav-cta:active,
.nav-links a.nav-cta.active { color: #fff; justify-content: center; text-align: center; }
.nav-links .nav-cta.active::before { display: none; }

.nav-burger {
  display: none;
  background: none;
  border: none;
  width: 44px; height: 44px;
  cursor: pointer;
  position: relative;
  z-index: 240;
}
.nav-burger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--text-hi);
  margin: 5px auto;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 230;
  background: rgba(7, 9, 13, 0.97);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  padding: 120px 32px 48px;
  flex-direction: column;
  gap: 8px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-hi);
  padding: 10px 0;
  border-bottom: 1px solid var(--line-dark);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.mobile-menu.open a { opacity: 1; transform: none; }
.mobile-menu a.active { color: var(--cobalt); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger { display: block; }
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--void);
  border-top: 1px solid var(--line-dark);
  padding: 96px max(24px, calc((100vw - var(--max-w)) / 2)) 48px;
  position: relative;
  z-index: 5;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 80px;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-lo);
  font-weight: 400;
  margin-bottom: 22px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { font-size: 15px; color: var(--text-lo); transition: color 0.2s ease; }
.footer-col a:hover { color: var(--text-hi); }
.footer-col p { font-size: 14px; color: var(--text-lo); line-height: 1.7; }
.footer-brand-line {
  font-size: 16px;
  color: var(--text-hi);
  max-width: 30ch;
  line-height: 1.5;
  margin-top: 20px;
}
.footer-base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-lo);
}

/* brand logo image (replaces inline mark in nav + footer) */
.brand-logo { height: 30px; width: auto; display: block; }
.site-footer .brand-logo { height: 34px; }
/* recolor to white on dark surfaces (home nav + all footers); wine stays on light subpage navs */
body.home .site-nav .brand-logo,
.site-footer .brand-logo,
.mobile-menu .brand-logo {
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

/* flickering grid band */
.flicker-band {
  position: relative;
  height: 200px;
  margin-top: 64px;
  overflow: hidden;
}
.flicker-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, transparent 0%, var(--void) 78%);
  z-index: 1;
  pointer-events: none;
}
.flicker-band .flicker-canvas { display: block; pointer-events: none; }
@media (max-width: 768px) { .flicker-band { height: 130px; margin-top: 40px; } }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-offices { border-top: 1px solid var(--line-dark); margin-bottom: 44px; padding-top: 36px; }
.footer-offices > h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-lo); margin-bottom: 24px; }
.foff-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; }
.foff h5 { font-size: 15px; font-weight: 500; color: var(--text-hi); margin-bottom: 8px; }
.foff p { font-size: 13px; color: var(--text-lo); line-height: 1.6; margin-bottom: 6px; }
.foff a { color: var(--text-lo); transition: color .2s; }
.foff a:hover { color: var(--text-hi); }
@media (max-width: 900px) { .foff-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foff-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- subpage scaffolding ---------- */
.page-main { position: relative; z-index: 2; }
.subpage-hero {
  padding: 220px max(24px, calc((100vw - var(--max-w)) / 2)) 120px;
  background:
    radial-gradient(ellipse 60% 50% at 75% 10%, var(--cobalt-soft), transparent 65%),
    var(--void);
}
.subpage-hero .eyebrow { margin-bottom: 32px; }
.subpage-hero .display-l { max-width: 18ch; }
.subpage-hero .body-copy { margin-top: 32px; }

.section {
  padding: 160px max(24px, calc((100vw - var(--max-w)) / 2));
  position: relative;
}
.section.light { background: var(--white); color: var(--text-dark); }
.section.ink { background: var(--ink); }
.section .eyebrow { margin-bottom: 28px; }
.section-head { margin-bottom: 72px; }
.section-head .body-copy { margin-top: 28px; }

.hairline { border: none; border-top: 1px solid var(--line-dark); }
.light .hairline { border-top-color: var(--line-light); }

/* reveal-on-scroll (subpages, IO-driven) */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in { opacity: 1; transform: none; }

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

@media (max-width: 768px) {
  :root { --gutter: 24px; }
  .section { padding-top: 100px; padding-bottom: 100px; }
  .subpage-hero { padding-top: 160px; padding-bottom: 80px; }
}


/* nav over LIGHT sections (§05 Human Impact, §08 Leadership): dark ink.
   The homepage nav is transparent until scrolled, so over a near-white
   surface the near-white links would drop to ~1.06:1 contrast. */
.site-nav.on-light .nav-links a { color: rgba(12, 17, 26, 0.75) !important; }
.site-nav.on-light .nav-links a:hover,
.site-nav.on-light .nav-links a.active { color: var(--text-dark) !important; }
.site-nav.on-light .nav-links a.active::before { background: var(--cobalt); }
.site-nav.on-light .nav-logo .word { color: var(--text-dark) !important; }
.site-nav.on-light .nav-logo .sub { color: var(--text-dark-lo) !important; }
.site-nav.on-light .nav-burger span { background: var(--text-dark) !important; }
.site-nav.on-light .nav-logo svg [fill]:not([fill="none"]) { fill: var(--text-dark); }
/* the CTA pill keeps its cobalt fill + white label on every surface */
.site-nav.on-light .nav-links .nav-cta { color: #fff !important; }
/* when scrolled, the dark translucent bar wins again */
.site-nav.on-light.scrolled { background: rgba(250, 251, 253, 0.82); border-bottom-color: var(--line-light); }
