/* =========================================================
   Eidos Research — styles.css
   Sections: tokens · base · nav · hero · sections · mission
   · research · projects · partners · principles · contact · footer · responsive
   ========================================================= */

/* ---------- Design tokens — dark (default) ---------- */
:root {
  --void:        #06070a;
  --void-2:      #0b0d14;
  --panel:       #11141d;
  --line:        #1d2230;
  --text:        #e8eaf0;
  --text-dim:    #9095a6;
  --text-faint:  #5a6072;
  --accent:      #60a5fa;
  --accent-deep: #3b82f6;
  --violet:      #a78bfa;
  --gold:        #f59e0b;
  --green:       #4ade80;
  --display: 'Space Grotesk', sans-serif;
  --body:    'Inter', sans-serif;
  --mono:    'JetBrains Mono', monospace;
  --nav-bg:  rgba(6, 7, 10, 0.72);
  --nav-open-bg: rgba(6, 7, 10, 0.97);
}

/* ---------- Design tokens — light ---------- */
[data-theme="light"] {
  --void:        #f4f6fb;
  --void-2:      #eaecf5;
  --panel:       #ffffff;
  --line:        #d4d8ea;
  --text:        #0d1017;
  --text-dim:    #47506e;
  --text-faint:  #8890aa;
  --accent:      #2563eb;
  --accent-deep: #1d4ed8;
  --violet:      #7c3aed;
  --gold:        #d97706;
  --green:       #16a34a;
  --nav-bg:  rgba(244, 246, 251, 0.88);
  --nav-open-bg: rgba(244, 246, 251, 0.98);
}

/* ---------- Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--void);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--void); }

/* ---------- Nav ---------- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: var(--nav-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
nav.scrolled { border-bottom-color: var(--line); }

.logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.logo-mark { width: 24px; height: 24px; flex-shrink: 0; }

.nav-links { display: flex; gap: 34px; align-items: center; }
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  border: 1px solid var(--line);
  padding: 8px 18px;
  border-radius: 100px;
  color: var(--text) !important;
  transition: all 0.2s;
}
.nav-cta:hover { border-color: var(--accent); background: rgba(96, 165, 250, 0.08); }

.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 13px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: border-color 0.2s;
}
.menu-btn:hover { border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
#field {
  position: absolute;
  inset: 0;
  opacity: 0.55;
}
.hero-glow {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 760px;
  height: 760px;
  background: radial-gradient(
    circle,
    rgba(96, 165, 250, 0.11) 0%,
    rgba(167, 139, 250, 0.06) 50%,
    transparent 70%
  );
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 840px;
  padding: 120px 60px 80px;
}
.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  padding: 6px 14px;
  border-radius: 100px;
}
.hero-content h1 {
  font-family: var(--display);
  font-size: clamp(42px, 6vw, 80px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.grad {
  background: linear-gradient(135deg, var(--accent) 0%, var(--violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-content p {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 600px;
  margin-bottom: 40px;
  line-height: 1.72;
}
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 26px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--display);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 60px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--text-faint);
}

/* ---------- Generic section layout ---------- */
.sec-pad { padding: 112px 0; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 40px; }

.sec-head { text-align: center; margin-bottom: 72px; }
.sec-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.sec-head h2 {
  font-family: var(--display);
  font-size: clamp(28px, 3.5vw, 46px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}
.sec-head p {
  color: var(--text-dim);
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---------- Mission ---------- */
.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.mission-text h2 {
  font-family: var(--display);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  line-height: 1.22;
}
.mission-text p {
  color: var(--text-dim);
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.72;
}
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px 24px;
  text-align: center;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: rgba(96, 165, 250, 0.35); }
.stat-num {
  font-family: var(--display);
  font-size: 40px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
}

/* ---------- Research cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 28px;
  transition: border-color 0.25s, transform 0.25s;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}
.card-icon {
  width: 38px;
  height: 38px;
  color: var(--accent);
  margin-bottom: 18px;
}
.card h3 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.card p { color: var(--text-dim); font-size: 14.5px; line-height: 1.66; }

/* ---------- Projects ---------- */
.projects { background: var(--void-2); }

.featured-project {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 48px;
  margin-bottom: 28px;
  transition: border-color 0.25s;
}
.featured-project:hover { border-color: rgba(96, 165, 250, 0.38); }

.proj-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--green);
  border: 1px solid rgba(74, 222, 128, 0.28);
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 28px;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

.proj-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}
.proj-logo { width: 54px; height: 54px; flex-shrink: 0; }
.proj-name {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 6px;
}
.proj-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.22);
  padding: 3px 10px;
  border-radius: 100px;
}
.proj-desc {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.72;
  max-width: 780px;
  margin-bottom: 32px;
}
.proj-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.proj-url {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-faint);
}

.proj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.proj-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 28px;
}
.proj-card.soon { opacity: 0.65; }
.proj-card.soon:hover { opacity: 0.9; }
.soon-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  color: var(--text-faint);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.proj-card h4 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  margin: 16px 0 8px;
  letter-spacing: -0.01em;
}
.proj-card .proj-tag { margin-bottom: 12px; }
.proj-card p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.66;
  margin-top: 12px;
}

/* ---------- Partners ---------- */
.partners { position: relative; overflow: hidden; }

.partner-logos {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 28px;
}
.partner-badge {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 36px;
  text-align: center;
  min-width: 180px;
  transition: border-color 0.25s, transform 0.25s;
}
.partner-badge:hover { border-color: var(--accent); transform: translateY(-2px); }
.partner-abbr {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 7px;
}
.partner-full {
  font-size: 11px;
  color: var(--text-faint);
  max-width: 130px;
  line-height: 1.4;
  margin: 0 auto;
}

.partner-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 0 auto 52px;
  max-width: 680px;
}
.partner-note svg { color: var(--gold); flex-shrink: 0; margin-top: 1px; }
.partner-note p { font-size: 13px; color: var(--text-dim); line-height: 1.55; }

.partner-cta {
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 52px 48px;
}
.partner-cta h3 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.partner-cta p { color: var(--text-dim); margin-bottom: 28px; font-size: 16px; }

/* ---------- Principles ---------- */
.principle-row {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.p-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
  min-width: 56px;
  padding-top: 4px;
}
.principle-row h3 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.principle-row p { color: var(--text-dim); font-size: 15px; line-height: 1.66; }

.safety-note {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: rgba(96, 165, 250, 0.05);
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 16px;
  padding: 30px 32px;
  margin-top: 40px;
}
.safety-note svg { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.safety-note h4 {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.safety-note p { color: var(--text-dim); font-size: 14px; line-height: 1.66; }

/* ---------- Contact ---------- */
.contact { position: relative; overflow: hidden; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 72px;
  align-items: start;
}
.contact-intro h2 {
  font-family: var(--display);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 16px 0 20px;
  line-height: 1.12;
}
.contact-intro p { color: var(--text-dim); font-size: 16px; margin-bottom: 28px; line-height: 1.7; }
.contact-points { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.contact-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 15px;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.contact-form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.field input,
.field textarea,
.field select {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 16px;
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  transition: border-color 0.2s;
  outline: none;
  width: 100%;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); }
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--accent); }
.field select { -webkit-appearance: none; cursor: pointer; }
.field textarea { resize: vertical; min-height: 100px; }
.err { font-size: 12px; color: #f87171; min-height: 16px; }
.form-status {
  font-size: 13px;
  text-align: center;
  color: var(--text-dim);
  min-height: 20px;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 64px 40px 32px;
  max-width: 1120px;
  margin: 0 auto;
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}
.foot-brand p {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 14px;
  line-height: 1.66;
  max-width: 280px;
}
.foot-col h5 {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}
.foot-col a {
  display: block;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 10px;
  transition: color 0.2s;
}
.foot-col a:hover { color: var(--text); }
.foot-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-faint);
  font-family: var(--mono);
  letter-spacing: 0.05em;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive: tablet ---------- */
@media (max-width: 960px) {
  nav { padding: 16px 24px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--nav-open-bg);
    backdrop-filter: blur(20px);
    z-index: 99;
    justify-content: center;
    align-items: center;
    gap: 44px;
    font-size: 22px;
  }
  .nav-links.open a { font-size: 22px; }
  .menu-btn { display: block; }
  .hero-content { padding: 100px 24px 60px; }
  .scroll-hint { left: 24px; }
  .container { padding: 0 24px; }
  .sec-pad { padding: 80px 0; }
  .mission-grid { grid-template-columns: 1fr; gap: 44px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .featured-project { padding: 32px 24px; }
  .proj-grid { grid-template-columns: 1fr; }
  .partner-logos { gap: 14px; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .foot-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ---------- Responsive: mobile ---------- */
@media (max-width: 580px) {
  .hero-content h1 { font-size: 36px; }
  .hero-btns { flex-direction: column; }
  .cards { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .proj-links { flex-direction: column; align-items: flex-start; }
  .partner-logos { flex-direction: column; align-items: center; }
  .partner-badge { width: 100%; max-width: 280px; }
  .foot-grid { grid-template-columns: 1fr; }
  .principle-row { flex-direction: column; gap: 12px; }
}

/* ---------- Theme toggle button ---------- */
.theme-toggle {
  background: none;
  border: 1px solid var(--line);
  color: var(--text-dim);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(96,165,250,0.08);
}
.theme-toggle svg { width: 16px; height: 16px; display: block; }

/* ---------- Light theme — specific overrides ---------- */
[data-theme="light"] body { background: var(--void); }
[data-theme="light"] ::selection { background: var(--accent); color: #fff; }
[data-theme="light"] .hero-glow {
  background: radial-gradient(
    circle,
    rgba(37,99,235,0.10) 0%,
    rgba(124,58,237,0.05) 50%,
    transparent 70%
  );
}
[data-theme="light"] .safety-note {
  background: rgba(37,99,235,0.04);
  border-color: rgba(37,99,235,0.18);
}
[data-theme="light"] .partner-note {
  background: rgba(217,119,6,0.06);
  border-color: rgba(217,119,6,0.22);
}
[data-theme="light"] .proj-tag {
  background: rgba(37,99,235,0.08);
  border-color: rgba(37,99,235,0.22);
}
[data-theme="light"] .eyebrow {
  border-color: rgba(37,99,235,0.28);
}
[data-theme="light"] #field { opacity: 0.30; }

/* smooth colour transition on theme switch */
body, nav, .stat-card, .card, .featured-project, .proj-card,
.partner-badge, .partner-cta, .foot-grid, footer {
  transition: background 0.25s, border-color 0.25s, color 0.2s;
}
