/* ═══════════════════════════════════════════════════════════
   I2I — SHARED STYLES
   All pages import this file
═══════════════════════════════════════════════════════════ */

/* ── Google Fonts are loaded per-page in <head> ──────────── */

/* ── Reset ─────────────────────────────────────────────────  */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { cursor: pointer; font-family: inherit; }

/* ── Variables ─────────────────────────────────────────────  */
:root {
  --navy:      #1F3580;
  --deep:      #3B5EC6;
  --sky:       #4A90D9;
  --teal:      #4CAF7D;
  --green:     #2E9E6B;
  --amber:     #F4B942;
  --salmon:    #F28B82;
  --coral:     #E8704A;
  --lavender:  #C3A8E0;
  --purple:    #8B5CF6;
  --white:     #FFFFFF;
  --light:     #F7F7F5;
  --dark:      #1A1A1A;
  --black:     #0D0F14;
  --gray:      #6B7280;
  --border:    #E8EAF0;
  --fd: 'DM Serif Display', Georgia, serif;
  --fb: 'Sora', system-ui, sans-serif;
}

body {
  font-family: var(--fb);
  background: var(--white);
  color: var(--black);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════════════════ */
#navbar {
  position: fixed; inset: 0 0 auto;
  z-index: 200; height: 64px;
  display: flex; align-items: center; justify-content: flex-start;
  padding: 0 2.5rem; gap: 0;
  transition: background .3s, box-shadow .3s;
}
#navbar.scrolled {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--border);
}

/* Logo */
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; z-index: 210; position: relative;
}
.nav-logo-bars {
  display: flex; flex-direction: column; gap: 3px;
}
.nav-logo-bars span {
  display: block; height: 3px; border-radius: 2px;
}
.nav-logo-bars span:nth-child(1) { width: 18px; background: var(--navy); }
.nav-logo-bars span:nth-child(2) { width: 14px; background: var(--deep); }
.nav-logo-bars span:nth-child(3) { width: 10px; background: var(--sky);  }
.nav-logo-text {
  font-family: var(--fb); font-weight: 700; font-size: .94rem;
  color: var(--black); display: flex; align-items: baseline; gap: 1px;
}
.nav-logo-text sup {
  font-size: .52rem; color: var(--deep); font-weight: 700;
  margin-left: 1px; vertical-align: super;
}

/* Desktop nav links */
.nav-links {
  list-style: none; display: flex; align-items: center; gap: 2.4rem;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.nav-links a {
  text-decoration: none; font-size: .84rem; font-weight: 500;
  color: #111; transition: color .15s; position: relative;
  white-space: nowrap;
}
.nav-links a:hover { color: #111; text-decoration: underline; text-underline-offset: 4px; }
.nav-links a.active {
  color: #111; font-weight: 700;
}
.nav-links a.active::before {
  content: ''; position: absolute; top: -22px; left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--deep);
}

/* Right side external links — pushed to the right edge */
.nav-ext {
  font-size: .83rem; font-weight: 500; color: var(--gray);
  text-decoration: none; transition: color .2s; white-space: nowrap;
  margin-right: .75rem;
}
.nav-ext:hover { color: var(--black); }
/* Push nav-ext (and everything after it) to the right */
#navbar > .nav-ext { margin-left: auto; }
.nav-sep {
  color: rgba(107,114,128,.3); font-size: .75rem;
  margin: 0 .35rem; user-select: none; pointer-events: none;
}

/* Hamburger */
.nav-burger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; padding: 6px; background: none; border: none;
  z-index: 210; position: relative;
}
.nav-burger span {
  display: block; width: 22px; height: 2px; background: var(--black);
  border-radius: 2px; transition: transform .28s ease, opacity .2s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile panel */
#mobile-panel {
  position: fixed; inset: 0; z-index: 190;
  background: var(--white);
  display: flex; flex-direction: column; justify-content: center;
  padding: 5rem 2.5rem 3rem;
  transform: translateY(-110%);
  transition: transform .38s cubic-bezier(.22,1,.36,1);
}
#mobile-panel.open { transform: translateY(0); }
#mobile-panel ul { list-style: none; display: flex; flex-direction: column; gap: 2rem; }
#mobile-panel a {
  text-decoration: none; font-size: 1.75rem; font-family: var(--fd);
  color: var(--black); transition: color .2s;
}
#mobile-panel a:hover { color: var(--deep); }
.mob-sub {
  margin-top: 2.5rem; display: flex; flex-direction: column; gap: .8rem;
  border-top: 1px solid var(--border); padding-top: 2rem;
}
.mob-sub a { font-size: .9rem; font-family: var(--fb); font-weight: 500; color: var(--gray); }

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

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
#footer {
  background: var(--dark);
  color: var(--white);
  font-family: var(--fb);
}

/* Top band */
.ft-top {
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: flex-start; gap: 4rem;
  padding: 5rem 2.5rem 4rem;
}
.ft-top-left {
  flex: 1;
}
.ft-top-left h2 {
  font-family: var(--fb); font-weight: 700;
  font-size: clamp(26px, 3vw, 42px);
  color: var(--white); line-height: 1.2; max-width: 420px;
}
.ft-top-right {
  flex: 1; display: flex; flex-direction: column; gap: 2.2rem;
}
.ft-contact-block { display: flex; flex-direction: column; gap: .5rem; }
.ft-contact-label {
  display: flex; align-items: center; gap: .55rem;
  font-size: 11px; font-weight: 600; letter-spacing: .2em;
  text-transform: uppercase; color: rgba(255,255,255,.45);
}
.ft-contact-label .dash { width: 18px; height: 2px; border-radius: 2px; flex-shrink: 0; }
.ft-contact-email {
  font-size: clamp(16px, 2vw, 22px); font-weight: 600;
  color: var(--white); text-decoration: underline;
  text-underline-offset: 4px; transition: opacity .2s;
}
.ft-contact-email:hover { opacity: .7; }

/* Rule */
.ft-rule { border: none; border-top: 1px solid rgba(255,255,255,.1); margin: 0 2.5rem; }

/* Bottom band */
.ft-bottom {
  max-width: 1240px; margin: 0 auto;
  display: flex; gap: 3rem; padding: 4rem 2.5rem 3rem;
  flex-wrap: wrap;
}
.ft-bottom-logo { flex: 0 0 auto; min-width: 160px; }
.ft-logo-mark { display: flex; align-items: center; gap: 8px; margin-bottom: .75rem; }
.ft-logo-bars { display: flex; flex-direction: column; gap: 3px; }
.ft-logo-bars span { display: block; height: 3px; border-radius: 2px; }
.ft-logo-bars span:nth-child(1) { width: 18px; background: rgba(255,255,255,.7); }
.ft-logo-bars span:nth-child(2) { width: 14px; background: rgba(255,255,255,.5); }
.ft-logo-bars span:nth-child(3) { width: 10px; background: rgba(255,255,255,.3); }
.ft-logo-name {
  font-family: var(--fb); font-weight: 700; font-size: .92rem; color: var(--white);
  display: flex; align-items: baseline; gap: 1px;
}
.ft-logo-name sup { font-size: .48rem; color: var(--sky); font-weight: 700; }
.ft-logo-tag { font-size: 11.5px; color: rgba(255,255,255,.35); font-weight: 300; }

.ft-col { display: flex; flex-direction: column; gap: 1rem; min-width: 160px; flex: 1; }
.ft-col-label {
  display: flex; align-items: center; gap: .55rem;
  font-size: 10.5px; font-weight: 600; letter-spacing: .2em;
  text-transform: uppercase; color: rgba(255,255,255,.4);
  margin-bottom: .25rem;
}
.ft-col-label .dash { width: 16px; height: 2px; border-radius: 2px; flex-shrink: 0; }
.ft-col a, .ft-col span {
  font-size: .88rem; color: rgba(255,255,255,.65);
  text-decoration: none; transition: color .2s; line-height: 1.8;
}
.ft-col a:hover { color: var(--white); }

/* Disclaimer band */
.ft-disclaimer {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 16px 2.5rem;
}
.ft-disclaimer-inner {
  max-width: 900px;
  margin: 0 auto;
}
.ft-disclaimer p {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 11px; font-weight: 300;
  color: rgba(255,255,255,0.35);
  line-height: 1.7; text-align: left;
}
.ft-disclaimer-link {
  color: rgba(255,255,255,0.35);
  text-decoration: none;
}
.ft-disclaimer-link:hover {
  text-decoration: underline;
  color: rgba(255,255,255,0.55);
}

/* Very bottom bar */
.ft-bar {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 1.4rem 2.5rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  flex-wrap: wrap;
}
.ft-bar span, .ft-bar a {
  font-size: 11.5px; color: rgba(255,255,255,.3);
  text-decoration: none; transition: color .2s;
}
.ft-bar a:hover { color: rgba(255,255,255,.6); }
.ft-bar-links { display: flex; gap: 1.2rem; align-items: center; }

@media (max-width: 768px) {
  .ft-top { flex-direction: column; gap: 2.5rem; padding: 3.5rem 1.5rem 3rem; }
  .ft-bottom { padding: 3rem 1.5rem 2.5rem; }
  .ft-rule { margin: 0 1.5rem; }
  .ft-bar { padding: 1.2rem 1.5rem; }
  .ft-disclaimer { padding: 14px 1.5rem; }
}

/* ── Disclaimer page ──────────────────────────────────────── */
.disc-body {
  background: #fff;
  padding: 60px 48px;
  max-width: 800px;
  margin: 0 auto 0;
}
.disc-body p {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 15px; font-weight: 300;
  color: #374151; line-height: 1.85;
  margin-bottom: 24px;
}
.disc-body p:last-of-type { margin-bottom: 0; }
.disc-institutions {
  max-width: 800px; margin: 0 auto;
  padding: 32px 48px 60px;
  border-top: 1px solid var(--border);
}
.disc-inst-label {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 13px; font-weight: 400; color: #6B7280;
  margin-bottom: 16px;
}
.disc-inst-row {
  display: flex; gap: 40px; flex-wrap: wrap;
}
.disc-inst-row span {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 13px; font-weight: 300; color: #6B7280;
}
@media (max-width: 768px) {
  .disc-body { padding: 40px 24px; }
  .disc-institutions { padding: 24px 24px 48px; }
  .disc-inst-row { gap: 20px; flex-direction: column; }
}

/* ═══════════════════════════════════════════════════════════
   SHARED SECTION COMPONENTS
═══════════════════════════════════════════════════════════ */
.section { padding: 6rem 2.5rem; }
.section-inner { max-width: 1180px; margin: 0 auto; }

.section-label {
  display: flex; align-items: center; gap: .55rem;
  font-family: var(--fb); font-size: 11px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--deep); margin-bottom: 1rem;
  opacity: 0; transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease;
}
.section-label.vis { opacity: 1; transform: none; }

.section-heading {
  font-family: var(--fd);
  font-size: clamp(26px, 3.8vw, 52px);
  color: var(--black); line-height: 1.1; margin-bottom: 3rem;
  max-width: 640px;
  opacity: 0; transform: translateY(16px);
  transition: opacity .55s ease .1s, transform .55s ease .1s;
}
.section-heading.vis { opacity: 1; transform: none; }
.section-heading .acc { color: var(--deep); }

/* Reveal helpers */
.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.vis { opacity: 1; transform: none; }
.reveal-left {
  opacity: 0; transform: translateX(-18px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal-left.vis { opacity: 1; transform: none; }

/* Stats counter */
.hero-stats {
  display: flex; gap: 2.2rem; align-items: flex-start;
  justify-content: center; flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num {
  font-family: var(--fd);
  font-size: clamp(22px, 2.8vw, 34px);
  color: var(--black); line-height: 1;
  display: flex; align-items: baseline; justify-content: center; gap: 2px;
}
.stat-sup {
  font-family: var(--fb); font-size: .48em; font-weight: 700; margin-left: 1px;
}
.stat-lbl {
  font-size: 10.5px; font-weight: 500; color: var(--gray);
  letter-spacing: .07em; text-transform: uppercase; margin-top: 5px;
}

/* Lifecycle cards (used on homepage + methodology page) */
.lc-scroll {
  display: flex; gap: 0; overflow-x: auto; padding-bottom: 1rem;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.lc-scroll::-webkit-scrollbar { display: none; }
.lc-card {
  min-width: 188px; padding: 1.6rem 1.3rem; flex-shrink: 0;
  border-left: 3px solid transparent;
  transition: background .25s, border-color .25s;
}
.lc-card:hover { background: rgba(255,255,255,.7); }
.lc-card.active { background: rgba(255,255,255,.92); box-shadow: 0 2px 20px rgba(0,0,0,.07); }
.lc-num  { font-size: 10px; font-weight: 700; letter-spacing: .12em; margin-bottom: .6rem; }
.lc-title{ font-family: var(--fd); font-size: 1.05rem; color: var(--black); margin-bottom: .4rem; line-height: 1.2; }
.lc-desc { font-size: 11.5px; font-weight: 300; color: var(--gray); line-height: 1.55; }

/* Tool cards */
.tool-card {
  border: 1px solid var(--border); padding: 1.4rem;
  transition: border-color .2s, box-shadow .2s;
}
.tool-card:hover {
  border-color: var(--deep);
  box-shadow: 0 4px 22px rgba(59,94,198,.08);
}
.tool-header { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; margin-bottom: .6rem; }
.tool-name   { font-size: .88rem; font-weight: 600; color: var(--black); }
.tool-badge  { font-size: 9px; font-weight: 600; letter-spacing: .06em; padding: 3px 7px; border-radius: 3px; white-space: nowrap; flex-shrink: 0; }
.badge-auto  { background: rgba(59,94,198,.1); color: var(--deep); }
.badge-non   { background: rgba(107,114,128,.1); color: var(--gray); }
.tool-desc   { font-size: 12.5px; font-weight: 300; color: var(--gray); line-height: 1.55; margin-bottom: .9rem; }
.tool-link   { font-size: 12.5px; font-weight: 600; color: var(--deep); text-decoration: none; }
.tool-link:hover { text-decoration: underline; }

/* Team cards */
.team-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.3rem 1.5rem; border: 1px solid var(--border);
  transition: border-color .2s;
}
.team-card:hover { border-color: var(--deep); }
.team-av {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fb); font-size: .92rem; font-weight: 700; color: var(--white);
}
.team-name { font-size: .875rem; font-weight: 600; color: var(--black); margin-bottom: 2px; }
.team-role { font-size: 11.5px; color: var(--gray); }

/* Tooltip (shared by graph) */
#gtooltip {
  position: fixed; z-index: 500;
  background: var(--black); color: rgba(255,255,255,.85);
  font-family: var(--fb); font-size: 12px; font-weight: 400;
  line-height: 1.55; padding: 10px 14px; border-radius: 8px;
  max-width: 240px; pointer-events: none;
  opacity: 0; transform: translateY(5px);
  transition: opacity .15s, transform .15s;
  box-shadow: 0 8px 28px rgba(0,0,0,.3);
}
#gtooltip.show { opacity: 1; transform: translateY(0); }
#gtooltip strong { display: block; color: #fff; margin-bottom: 4px; font-size: 11px; letter-spacing: .04em; }

/* Node label overlay (graph.js) */
#graph-labels {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.gnode-label {
  position: absolute; transform: translate(-50%, -50%);
  font-family: var(--fb); font-size: 10px; font-weight: 600;
  white-space: nowrap; padding: 3px 8px; border-radius: 20px;
  background: rgba(255,255,255,.92); border: 1.5px solid;
  pointer-events: none; transition: opacity .2s;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

/* ═══════════════════════════════════════════════════════════
   PAGE-SPECIFIC HELPERS
═══════════════════════════════════════════════════════════ */
/* Page hero (non-homepage) */
.page-hero {
  padding: 10rem 2.5rem 5rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.page-hero-inner { max-width: 840px; margin: 0 auto; }
.page-hero-label {
  font-size: 11px; font-weight: 600; letter-spacing: .22em;
  text-transform: uppercase; color: var(--deep);
  display: flex; align-items: center; gap: .5rem; margin-bottom: 1.4rem;
}
.page-hero h1 {
  font-family: var(--fd);
  font-size: clamp(32px, 5vw, 68px);
  color: var(--black); line-height: 1.08; margin-bottom: 1.5rem;
}
.page-hero h1 .acc { color: var(--deep); }
.page-hero p {
  font-size: 1rem; font-weight: 300; color: var(--gray);
  max-width: 560px; line-height: 1.8;
}

/* Dark section (dataset, etc) */
.dark-section { background: var(--navy); color: var(--white); }
.dark-section .section-heading { color: var(--white); }
.dark-section .section-label   { color: var(--sky); }

/* Pull quote */
.pull-quote {
  font-family: var(--fd); font-style: italic;
  font-size: clamp(18px, 2.4vw, 28px);
  color: var(--deep); line-height: 1.45;
  border-left: 3px solid var(--deep);
  padding: 1rem 0 1rem 1.8rem;
  margin: 3rem 0;
  max-width: 600px;
}

/* ═══════════════════════════════════════════════════════════
   KEYFRAMES
═══════════════════════════════════════════════════════════ */
@keyframes fadeUp   { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:none} }
@keyframes bounce   { 0%,100%{transform:translateY(0)} 50%{transform:translateY(8px)} }
@keyframes woRowIn  { from{opacity:0;transform:translateY(22px)} to{opacity:1;transform:none} }
@keyframes woRowOut { from{opacity:1;transform:none} to{opacity:0;transform:translateY(-18px)} }

/* ── Section divider ────────────────────────────────────── */
.section-divider {
  display: block;
  height: 1px;
  max-width: 1100px;
  margin: 0 auto;
  background: rgba(59,94,198,.15);
  border: none;
}

/* ── Global bg stipple ─────────────────────────────────── */
#bg-stipple {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none; display: block;
}

/* ── Words overlay (hero cycle) ────────────────────────── */
#words-overlay {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 48px; pointer-events: none;
  opacity: 0; transition: opacity .05s;
}
.wo-row {
  display: flex; align-items: center; gap: 20px;
  opacity: 0; transform: translateY(22px);
}
.wo-dot {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
}
.wo-word {
  font-family: Georgia, 'DM Serif Display', serif;
  font-size: 52px; font-weight: 700;
  color: #0D0F14; letter-spacing: -1.5px;
}
.wo-row.wo-in  { animation: woRowIn  .5s ease forwards; }
.wo-row.wo-out { animation: woRowOut .45s ease forwards; }

@media (max-width: 768px) {
  .wo-word { font-size: 36px; }
  .wo-dot  { width: 30px; height: 30px; }
  #words-overlay { gap: 32px; }
}

@media (max-width: 768px) {
  .section { padding: 4rem 1.5rem; }
  .page-hero { padding: 8rem 1.5rem 3.5rem; }
  .hero-stats { gap: 1.5rem; }
}
