/* GIL — light theme (v3): white background, near-black headings, blue accents, light-blue cards. */

:root {
  --bg:      #eef5fc;   /* soft blue page wash */
  --bg-2:    #ffffff;   /* raised blocks stay white for contrast */
  --panel:   #eaf4fb;   /* light-blue card */
  --panel-2: #ffffff;   /* banners — white */
  --ink:     #15202b;   /* near-black heading */
  --fg:      #15202b;
  --fg-dim:  #39434e;
  --muted:   #6b7580;
  --line:    #dce7ef;
  --line-2:  #c3d7e4;

  --blue:    #1f90d2;   /* bright accent (slide) */
  --blue-strong: #1573ad;
  --blue-ink:    #15688f;  /* darker blue for small bold text (contrast on white) */
  --navy:    #0f3a5a;
  --teal:    #0f9a86;
  --indigo:  #2f6fb0;
  --amber:   #b9871a;
  --accent:  var(--blue);

  --maxw: 1140px;
  --gutter: clamp(20px, 5vw, 64px);
  --sans: "Helvetica Neue", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}


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

/* ---------- layout ---------- */
.wrap { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
section { position: relative; z-index: 1; padding: clamp(84px, 12vh, 150px) 0; }
section + section { border-top: 1px solid var(--line); }

/* ---------- typography ---------- */
h1, h2, h3 { font-family: var(--sans); font-weight: 600; letter-spacing: -0.02em; line-height: 1.06; margin: 0; color: var(--ink); }
.display { font-size: clamp(2.4rem, 6.2vw, 4.4rem); font-weight: 680; line-height: 1.03; letter-spacing: -0.03em; }
.h-section { font-size: clamp(1.9rem, 4.2vw, 3.0rem); font-weight: 640; letter-spacing: -0.025em; max-width: 20ch; color: var(--blue); }

.eyebrow {
  font-size: 12px; font-weight: 650; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--blue); margin: 0 0 22px; display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--blue); display: inline-block; }

.lede { font-size: clamp(1.08rem, 1.5vw, 1.24rem); color: var(--fg-dim); max-width: 62ch; line-height: 1.62; }
.muted { color: var(--muted); }
.accent { color: var(--blue); }
.hl { color: var(--ink); font-weight: 600; }
.hl-cyan { color: var(--blue); font-weight: 650; }

/* ---------- nav ---------- */
header.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s var(--ease);
  border-bottom: 1px solid transparent; }
header.nav.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px) saturate(130%); -webkit-backdrop-filter: blur(12px) saturate(130%);
  border-bottom: 1px solid var(--line);
}
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 15px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { height: 34px; width: auto; display: block; }
.brand .wordmark { font-size: 21px; font-weight: 700; letter-spacing: 0.03em; color: var(--ink); line-height: 1; }
.brand .wordmark .dot-i { position: relative; font-style: normal; }
.brand .wordmark .dot-i::after {
  content: ""; position: absolute; left: 50%; top: -0.02em; transform: translateX(-50%);
  width: 0.24em; height: 0.24em; border-radius: 50%; background: var(--blue);
}
.nav-links { display: flex; align-items: center; gap: clamp(16px, 3vw, 34px); }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--muted); transition: color .25s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-links a.cta { color: #fff; background: var(--blue); padding: 9px 18px; border-radius: 4px; font-weight: 650;
  transition: background .25s var(--ease), transform .25s var(--ease); }
.nav-links a.cta:hover { background: var(--blue-strong); transform: translateY(-1px); }
@media (max-width: 680px) { .nav-links a.lk { display: none; } }

/* ---------- hero ---------- */
.hero { min-height: 100svh; display: flex; align-items: center; padding-top: 120px; padding-bottom: 72px; }
.hero-logo { height: clamp(72px, 10vw, 104px); width: auto; margin-bottom: 30px; display: block; }
.hero h1 { margin-bottom: 22px; max-width: 17ch; }
.hero h1 .grad { color: var(--blue); }
.hero .lede { margin-bottom: 34px; }
.hero-cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

.btn { font-size: 0.92rem; font-weight: 650; letter-spacing: 0.01em; padding: 13px 24px; border-radius: 4px;
  border: 1px solid var(--line-2); color: var(--ink); background: #fff; transition: all .25s var(--ease); }
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { transform: translateY(-1px); background: var(--blue-strong); box-shadow: 0 10px 26px rgba(31,144,210,0.22); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.link-arrow { font-size: 0.92rem; font-weight: 650; color: var(--blue); display: inline-flex; align-items: center; gap: 8px; }
.link-arrow .ar { transition: transform .25s var(--ease); }
.link-arrow:hover .ar { transform: translateX(5px); }

/* ---------- cards / metrics ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 46px; }
.card { background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 24px 22px;
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease); }
.card:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(31,144,210,0.10); }
.card .c-k { font-size: 11px; font-weight: 650; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue); margin-bottom: 12px; }
.card h3 { font-size: 1.12rem; font-weight: 650; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.96rem; margin: 0; line-height: 1.55; }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-top: 46px; }
.metric { border: 1px solid var(--line-2); border-radius: 10px; padding: 24px; background: var(--bg-2); }
.metric .big { font-size: clamp(2.0rem, 3.6vw, 2.9rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.metric .big.c { color: var(--blue); } .metric .big.m { color: var(--teal); }
.metric .big.g { color: var(--amber); } .metric .big.b { color: var(--indigo); }
.metric .lab { color: var(--muted); font-size: 0.92rem; margin-top: 12px; }

/* ---------- three ticks ---------- */
.ticks { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 2px; max-width: 760px; }
.ticks li { display: grid; grid-template-columns: 26px 1fr; gap: 14px; padding: 16px 2px; border-top: 1px solid var(--line); align-items: baseline; }
.ticks li:last-child { border-bottom: 1px solid var(--line); }
.ticks .ck { color: var(--blue); font-weight: 700; }
.ticks .tk { color: var(--fg-dim); } .ticks .tk b { color: var(--ink); font-weight: 650; }

/* ---------- diagrams ---------- */
.figure { width: 100%; }
.figure svg { width: 100%; height: auto; display: block; overflow: visible; }
.figcaption { font-size: 0.95rem; color: var(--blue); font-weight: 600; margin-top: 20px; text-align: center; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5vw, 80px); align-items: center; }
.split.rev .split-fig { order: 2; }
@media (max-width: 880px) { .split, .split.rev { grid-template-columns: 1fr; gap: 44px; } .split.rev .split-fig { order: 0; } }

/* SVG shared */
.d-line { stroke: var(--line-2); stroke-width: 1.25; fill: none; }
.d-line-dim { stroke: var(--line); stroke-width: 1.25; fill: none; }
.d-node { fill: #ffffff; stroke: var(--line-2); stroke-width: 1.25; }
.d-label { fill: var(--ink); font-family: var(--sans); font-size: 15px; font-weight: 650; letter-spacing: 0.06em; }
.d-label-sm { fill: var(--muted); font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.03em; }

.flow-path { stroke: var(--blue); stroke-width: 1.4; fill: none; stroke-dasharray: 5 9; opacity: 0.85; animation: dash 2.4s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -140; } }
.loop-travel { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 90 852.5; animation: travel 6.5s linear infinite; }
@keyframes travel { to { stroke-dashoffset: -942.48; } }
.pulse { animation: pulse 3.4s var(--ease) infinite; } @keyframes pulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* ---------- fabless vertical/horizontal ---------- */
.fab { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px,4vw,56px); margin-top: 48px; }
@media (max-width: 760px){ .fab { grid-template-columns: 1fr; gap: 28px; } }
.fab .col h4 { font-size: 12px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.fab .col.next h4 { color: var(--blue); }

/* ---------- join ---------- */
.join { text-align: center; background: var(--panel-2); }
.join .display { margin: 0 auto 22px; max-width: 16ch; }
.join .lede { margin: 0 auto 36px; color: var(--fg-dim); }
.join-cta { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

/* ---------- footnotes ---------- */
.fineprint { margin-top: 40px; color: var(--muted); font-size: 0.82rem; line-height: 1.6; max-width: 70ch; }
.fineprint sup { color: var(--blue); }

/* ---------- footer ---------- */
footer { position: relative; z-index: 1; border-top: 1px solid var(--line-2); padding: 60px 0 52px; background: var(--bg-2); }
.foot-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; max-width: 360px; }
.foot-brand img { height: 36px; width: auto; }
.foot-tag { color: var(--muted); font-size: 0.96rem; line-height: 1.5; }
.foot-cols { display: flex; gap: clamp(36px, 6vw, 88px); flex-wrap: wrap; }
.foot-col h4 { font-size: 11px; font-weight: 650; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.foot-col a { display: block; color: var(--fg-dim); font-size: 0.96rem; margin-bottom: 11px; transition: color .2s var(--ease); }
.foot-col a:hover { color: var(--blue); }
.foot-bottom { margin-top: 50px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 0.84rem; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }

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

/* fab chain boxes (defined after base so they win) */
.chain { display: flex; align-items: stretch; gap: 10px; }
.chain .box { flex: 1; border: 1px solid var(--line-2); border-radius: 8px; padding: 16px 12px; text-align: center;
  font-weight: 650; font-size: 0.98rem; background: #fff; color: var(--ink); }
.chain .box.gil { border-color: var(--blue); color: var(--blue-ink); background: var(--panel); }
.chain .box.foundry { border-style: dashed; color: var(--muted); }
.chain .box small { display:block; font-weight: 500; font-size: .72rem; color: var(--muted); margin-top: 4px; }
.chain .arr { align-self: center; color: var(--muted); font-size: 1.1rem; }
.fab .note { color: var(--muted); font-size: 0.95rem; margin-top: 18px; line-height: 1.55; }
