/* ============================================================
   Centre for Law & Intelligent Systems — design tokens
   ============================================================ */
:root {
  --bg:        #05060d;
  --bg-2:      #080b16;
  --bg-3:      #0b1020;
  --panel:     rgba(255, 255, 255, 0.025);
  --panel-2:   rgba(255, 255, 255, 0.04);
  --line:      rgba(150, 180, 255, 0.10);
  --line-2:    rgba(150, 180, 255, 0.18);
  --text:      #eaf0fb;
  --muted:     #97a6c4;
  --muted-2:   #69789a;
  --cyan:      #4cc9ff;
  --violet:    #9b7bff;
  --cyan-dim:  rgba(76, 201, 255, 0.14);
  --violet-dim:rgba(155, 123, 255, 0.14);
  --grad:      linear-gradient(110deg, #4cc9ff 0%, #9b7bff 100%);
  --font-sans: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --maxw: 1240px;
  --pad: clamp(20px, 5vw, 64px);
}

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

html { scroll-behavior: smooth; }

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

::selection { background: rgba(76, 201, 255, 0.28); color: #fff; }

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

/* ---------- shared typography ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--cyan);
  opacity: 0.6;
}
h1, h2, h3 { font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; }

.section-title {
  font-size: clamp(30px, 4.4vw, 58px);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.lead { color: var(--muted); font-size: clamp(17px, 1.6vw, 21px); max-width: 56ch; text-wrap: pretty; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--pad);
  transition: background .4s ease, border-color .4s ease, backdrop-filter .4s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(5, 6, 13, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: -0.01em; }
.brand .glyph {
  width: 26px; height: 26px; position: relative; flex: none;
}
.brand .glyph::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 14px 2px rgba(76, 201, 255, 0.55);
}
.brand .glyph::after {
  content: ""; position: absolute; inset: 7px; border-radius: 50%;
  background: var(--bg);
}
.brand b { font-weight: 600; }
.brand .sub { color: var(--muted-2); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; }
.nav-links { display: flex; gap: 30px; font-size: 14.5px; color: var(--muted); }
.nav-links a { transition: color .2s; position: relative; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 0.04em;
  padding: 9px 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--text);
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.nav-cta:hover { border-color: var(--cyan); box-shadow: 0 0 24px -6px rgba(76,201,255,.6); background: rgba(76,201,255,.06); }
@media (max-width: 860px) { .nav-links { display: none; } }

/* ============================================================
   HERO — scroll sequence
   ============================================================ */
.hero {
  position: relative;
  height: 420vh;              /* scroll runway */
  background: var(--bg);
}
.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
#hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.hero-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 40%, rgba(5,6,13,0.6) 100%),
    linear-gradient(to bottom, rgba(5,6,13,.5), transparent 22%, transparent 70%, rgba(5,6,13,.85));
}
.hero-stage {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  text-align: center;
  pointer-events: none;
  padding: 0 var(--pad);
}
.hero-text {
  position: absolute;
  max-width: 820px;
  opacity: 0;
  transform: translateY(18px);
  will-change: opacity, transform;
}
.hero-text .eyebrow { margin-bottom: 22px; }
.hero-text h1 {
  font-size: clamp(40px, 8vw, 104px);
  letter-spacing: -0.04em;
  line-height: 0.98;
  text-shadow: 0 2px 60px rgba(5,6,13,0.9);
}
.hero-text p {
  margin-top: 22px; color: var(--muted);
  font-size: clamp(16px, 2vw, 22px);
  text-shadow: 0 2px 30px rgba(5,6,13,1);
}
.hero-final .actions {
  margin-top: 38px;
  display: flex; gap: 14px; justify-content: center;
  pointer-events: auto;
}
.btn {
  font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.02em;
  padding: 14px 26px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 10px;
  transition: transform .2s, box-shadow .25s, background .25s, border-color .25s;
}
.btn-primary { background: var(--grad); color: #04060f; font-weight: 600; box-shadow: 0 8px 40px -10px rgba(76,201,255,.7); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 50px -8px rgba(155,123,255,.8); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--cyan); background: rgba(76,201,255,.06); }

.scroll-cue {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--muted-2);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: opacity .3s;
}
.scroll-cue .bar { width: 1px; height: 38px; background: linear-gradient(var(--cyan), transparent); animation: cuepulse 2s ease-in-out infinite; }
@keyframes cuepulse { 0%,100%{opacity:.3; transform:scaleY(.7);} 50%{opacity:1; transform:scaleY(1);} }

/* progress readout */
.hero-hud {
  position: absolute; bottom: 34px; right: var(--pad);
  font-family: var(--font-mono); font-size: 11px; color: var(--muted-2);
  text-align: right; line-height: 2; pointer-events: none;
  display: flex; flex-direction: column; gap: 2px;
}
.hero-hud .val { color: var(--cyan); }
@media (max-width: 720px){ .hero-hud { display:none; } }

/* ============================================================
   CONTENT (sits above the fixed neural-OS background)
   ============================================================ */
#bg-canvas {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.content { position: relative; z-index: 2; background: linear-gradient(to bottom, var(--bg), var(--bg) 6%, transparent 14%); }
.section { position: relative; padding: clamp(90px, 12vh, 150px) var(--pad); max-width: var(--maxw); margin: 0 auto; }
.section-head { display: flex; flex-direction: column; gap: 20px; margin-bottom: 56px; }
.section-head .lead { margin-top: 4px; }

/* mission */
.mission { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: start; }
.mission h2 { font-size: clamp(28px, 3.4vw, 46px); text-wrap: balance; }
.mission .statement { color: var(--text); font-size: clamp(20px, 2.4vw, 30px); line-height: 1.35; letter-spacing: -0.01em; }
.mission .statement em { font-style: normal; }
.mission .col-r { display: flex; flex-direction: column; gap: 26px; padding-top: 8px; }
.stat { border-top: 1px solid var(--line); padding-top: 18px; }
.stat .num { font-size: clamp(34px, 4vw, 52px); font-weight: 600; letter-spacing: -0.03em; }
.stat .lbl { color: var(--muted); font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.06em; margin-top: 4px; }
@media (max-width: 820px){ .mission { grid-template-columns: 1fr; gap: 40px; } }

/* objectives grid */
.obj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.obj {
  background: var(--bg-2);
  padding: 34px 30px 40px;
  position: relative;
  min-height: 230px;
  display: flex; flex-direction: column;
  transition: background .3s;
}
.obj:hover { background: var(--bg-3); }
.obj .idx { font-family: var(--font-mono); font-size: 12px; color: var(--cyan); letter-spacing: 0.1em; }
.obj h3 { font-size: 22px; margin: 18px 0 12px; letter-spacing: -0.02em; }
.obj p { color: var(--muted); font-size: 15.5px; }
.obj .dot { position: absolute; top: 34px; right: 30px; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 12px 1px rgba(76,201,255,.6); opacity:.5; transition: opacity .3s, transform .3s; }
.obj:hover .dot { opacity: 1; transform: scale(1.4); }
@media (max-width: 900px){ .obj-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 580px){ .obj-grid { grid-template-columns: 1fr; } }

/* research themes */
.themes { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.theme {
  display: grid; grid-template-columns: 64px 1fr auto;
  gap: 28px; align-items: center;
  padding: 30px 6px;
  border-bottom: 1px solid var(--line);
  cursor: default;
  transition: padding-left .3s, background .3s;
}
.theme:hover { padding-left: 22px; background: linear-gradient(90deg, rgba(76,201,255,.05), transparent 60%); }
.theme .num { font-family: var(--font-mono); color: var(--muted-2); font-size: 14px; }
.theme .body h3 { font-size: clamp(22px, 2.6vw, 32px); letter-spacing: -0.02em; }
.theme .body p { color: var(--muted); margin-top: 8px; font-size: 15.5px; max-width: 64ch; }
.theme .tags { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; max-width: 240px; }
.tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 11px; white-space: nowrap; }
@media (max-width: 760px){ .theme { grid-template-columns: 40px 1fr; } .theme .tags { display: none; } }

/* events */
.events { display: flex; flex-direction: column; gap: 22px; }
.event {
  display: grid; grid-template-columns: 92px 1fr 150px; gap: 28px; align-items: start;
  padding: 30px 6px; border-top: 1px solid var(--line);
  transition: background .25s;
}
.event:last-child { border-bottom: 1px solid var(--line); }
.event:hover { background: rgba(255,255,255,0.018); }
.event-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 78px; padding: 14px 0; border: 1px solid var(--line-2); border-radius: 14px;
  background: var(--cyan-dim);
}
.event-date .day { font-family: var(--font-mono); font-size: 30px; font-weight: 600; line-height: 1; color: var(--cyan); }
.event-date .mon { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.event-body .event-kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--violet); margin-bottom: 10px; }
.event-body h3 { font-size: clamp(20px, 2.2vw, 27px); font-weight: 500; letter-spacing: -0.01em; line-height: 1.22; }
.event-body .event-note { color: var(--text); font-size: 16.5px; margin-top: 14px; }
.event-body .event-note .event-q { color: var(--cyan); font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.event-body p { color: var(--muted); font-size: 15.5px; line-height: 1.7; margin-top: 14px; max-width: 70ch; text-wrap: pretty; }
.event-tag { font-family: var(--font-mono); font-size: 12px; color: var(--muted-2); text-align: right; letter-spacing: 0.04em; text-transform: uppercase; }
.event-tag span { display:block; color: var(--muted); }
@media (max-width: 760px){
  .event { grid-template-columns: 78px 1fr; }
  .event-tag { display: none; }
}

/* people */
.people-leads { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.people-members { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.people-subhead { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2); margin: 48px 0 18px; display: flex; align-items: center; gap: 12px; }
.people-subhead::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.person {
  background: var(--bg-2);
  padding: 32px 30px;
  display: flex; gap: 24px; align-items: flex-start;
  transition: background .3s;
}
.person:hover { background: var(--bg-3); }
.person-lead { padding: 36px 32px; }

.person-photo {
  width: 92px; height: 92px; flex: none;
  border-radius: 14px;
  position: relative; overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
}
.person-photo::before {
  content: ""; position: absolute; inset: 0;
  background: var(--grad); opacity: 0.12;
}
.person-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}
.person-photo .ph {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em;
  color: var(--muted-2); position: relative;
}
.person-photo .ph-initials {
  font-family: var(--font-sans); font-size: 30px; font-weight: 600;
  letter-spacing: -0.02em; position: relative;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.person-lead .person-photo { width: 116px; height: 116px; }
.person-lead .person-photo .ph-initials { font-size: 38px; }

.person-body .role { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan); }
.person-body h3 { font-size: clamp(20px, 2.2vw, 27px); margin: 10px 0 12px; letter-spacing: -0.02em; }
.person-lead .person-body h3 { font-size: clamp(22px, 2.6vw, 30px); }
.person-body p { color: var(--muted); font-size: 15px; max-width: 52ch; }

@media (max-width: 820px){ .people-leads, .people-members { grid-template-columns: 1fr; } }
@media (max-width: 480px){ .person { flex-direction: column; gap: 18px; } }

/* roadmap */
.roadmap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.phase { background: var(--bg-2); padding: 32px 26px 38px; position: relative; }
.phase .yr { font-family: var(--font-mono); font-size: 13px; color: var(--cyan); letter-spacing: 0.08em; }
.phase .track { height: 2px; background: var(--line-2); margin: 18px 0 22px; position: relative; overflow: hidden; }
.phase .track::before { content:""; position:absolute; inset:0; width: var(--fill, 30%); background: var(--grad); }
.phase h3 { font-size: 19px; margin-bottom: 14px; letter-spacing: -0.01em; }
.phase ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.phase li { color: var(--muted); font-size: 14.5px; padding-left: 18px; position: relative; }
.phase li::before { content:""; position:absolute; left:0; top:9px; width:6px; height:6px; border-radius:50%; background: var(--violet); opacity:.7; }
@media (max-width: 900px){ .roadmap { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 540px){ .roadmap { grid-template-columns: 1fr; } }

/* CTA band */
.cta-band { text-align: center; padding: clamp(90px,14vh,160px) var(--pad); position: relative; }
.cta-band h2 { font-size: clamp(34px, 6vw, 76px); letter-spacing: -0.04em; text-wrap: balance; }
.cta-band p { color: var(--muted); margin: 22px auto 0; max-width: 48ch; font-size: clamp(16px,1.8vw,20px); }
.cta-band .actions { margin-top: 40px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 64px var(--pad) 48px; position: relative; z-index: 2; background: var(--bg); }
.footer-grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer .brand { margin-bottom: 18px; }
.footer .about { color: var(--muted); font-size: 14.5px; max-width: 34ch; }
.footer h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 16px; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer ul a { color: var(--muted); font-size: 14.5px; transition: color .2s; }
.footer ul a:hover { color: var(--text); }
.footer-base { max-width: var(--maxw); margin: 48px auto 0; padding-top: 26px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; color: var(--muted-2); font-family: var(--font-mono); font-size: 12px; flex-wrap: wrap; }
@media (max-width: 760px){ .footer-grid { grid-template-columns: 1fr 1fr; } }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

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