/* ---------- Reset & tokens ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body, h1, h2, h3, p, figure { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

:root {
  --ink: #12121a;
  --ink-soft: #4a4a56;
  --paper: #ffffff;
  --paper-alt: #f7f6f9;
  --navy: #0b0f19;
  --navy-soft: #131a2c;
  --violet: #7c3aed;
  --amber: #f5a623;
  --line: rgba(18,18,26,0.1);
  --line-dark: rgba(255,255,255,0.12);
  --radius: 16px;
  --font-display: 'Montserrat', system-ui, sans-serif;
  --font-body: 'Montserrat', system-ui, sans-serif;
  --container: 1120px;
  --shadow: 0 20px 50px -20px rgba(18,18,26,0.25);
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 8px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

.brand-accent { color: var(--amber); }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
}
.eyebrow-dark { color: var(--violet); }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  background: rgba(255,255,255,0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark { width: 32px; height: 32px; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav a { position: relative; padding: 6px 0; color: var(--ink-soft); transition: color 0.2s ease; }
.nav a:hover { color: var(--ink); }
.nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--amber);
  transition: width 0.25s ease;
}
.nav a:hover::after { width: 100%; }
.nav-cta {
  background: var(--ink);
  color: #fff !important;
  padding: 9px 18px !important;
  border-radius: 999px;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--violet); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 120px 0 80px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(124,58,237,0.08), transparent 60%),
    radial-gradient(45% 40% at 85% 20%, rgba(245,166,35,0.10), transparent 60%),
    var(--paper);
  z-index: -1;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero-logo { width: 144px; height: 144px; margin-bottom: 20px; }
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 11vw, 7rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
}
.hero-sub {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin-top: 14px;
}
.hero-tagline {
  margin-top: 18px;
  font-size: clamp(0.7rem, 3.6vw, 1.15rem);
  color: var(--ink-soft);
  white-space: nowrap;
}
.hero-actions {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  border: 1.5px solid transparent;
}
.btn-primary {
  background: #4d4d4d;
  color: #fff;
}
.btn-primary:hover { background: var(--violet); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 38px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
}
.scroll-cue span {
  display: block;
  width: 4px;
  height: 8px;
  background: var(--amber);
  border-radius: 999px;
  margin: 6px auto 0;
  animation: scrollcue 1.8s ease-in-out infinite;
}
@keyframes scrollcue {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- Intro (dark tech band) ---------- */
.intro {
  position: relative;
  background: var(--navy);
  color: #fff;
  padding: 110px 0;
  overflow: hidden;
}
.intro-bg { position: absolute; inset: 0; z-index: 0; }
.intro-grid { width: 100%; height: 100%; }
.intro-inner { position: relative; z-index: 1; max-width: 640px; }
.intro .section-title { margin-bottom: 16px; }
.intro-statement {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.intro-statement em { color: var(--amber); font-style: normal; }
.intro-text { color: rgba(255,255,255,0.72); font-size: 1.05rem; max-width: 56ch; }

/* ---------- Lab ---------- */
.lab { padding: 110px 0; background: var(--paper-alt); }
.lab-heading { text-align: center; }
.lab-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  perspective: 1200px;
  align-items: start;
}
.lab-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  min-height: 228px;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s ease;
  transform-style: preserve-3d;
  will-change: transform;
}
.lab-card:hover {
  transform: translateZ(30px) translateY(-10px) scale(1.015);
  box-shadow: 0 32px 56px -24px rgba(18,18,26,0.32), 0 14px 26px -14px rgba(124,58,237,0.22);
  border-color: transparent;
}
.lab-card-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--navy);
  color: var(--amber);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.lab-card:hover .lab-card-icon { transform: translateZ(24px) scale(1.08) rotate(-4deg); }
.lab-status {
  display: inline-flex;
  align-items: center;
  min-height: 47px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.status-production { background: rgba(34,197,94,0.12); color: #15803d; }
.status-validation { background: rgba(245,166,35,0.15); color: #b4790c; }
.status-development { background: rgba(124,58,237,0.12); color: #6d28d9; }
.status-mvp { background: rgba(37,99,235,0.12); color: #1d4ed8; }

.lab-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 12px;
}
.lab-card p { color: var(--ink-soft); font-size: 0.96rem; }

.lab-card-desc {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.lab-card-desc p { overflow: hidden; margin: 0; }
.lab-card:hover .lab-card-desc { grid-template-rows: 1fr; }

/* ---------- Team ---------- */
.team { padding: 110px 0; background: var(--paper); }
.team-heading { text-align: center; }
.team-org { margin-top: 56px; }
.team-tier {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
}
.team-tier + .team-tier { margin-top: 56px; }
.team-card { text-align: center; width: 250px; }
.team-photo {
  width: 188px;
  height: 188px;
  border-radius: var(--radius);
  background: var(--paper-alt);
  border: 1.5px dashed var(--line);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 auto 20px;
}
.team-photo.has-photo { border-style: solid; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; }
.team-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.31rem;
}
.team-role { color: var(--ink-soft); font-size: 1.13rem; margin-top: 5px; }
.team-bio { color: var(--ink-soft); font-size: 1.06rem; margin-top: 12px; }

/* ---------- Join ---------- */
.join {
  padding: 120px 0;
  background: var(--ink);
  color: #fff;
  text-align: center;
}
.join .eyebrow { color: var(--amber); }
.join .section-title { max-width: 20ch; margin-left: auto; margin-right: auto; }
.join-text {
  color: rgba(255,255,255,0.72);
  max-width: 62ch;
  margin: 0 auto 22px;
}
.join .btn-primary { margin-top: 24px; background: var(--amber); color: var(--navy); }
.join .btn-primary:hover { background: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}
.footer-mark {
  background: #fff;
  border-radius: 7px;
  padding: 3px;
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; font-size: 0.9rem; color: rgba(255,255,255,0.95); }
.footer-links a:hover { color: #fff; }
.footer-copy { width: 100%; font-size: 0.8rem; margin-top: 12px; text-align: center; color: rgba(255,255,255,0.4); }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue span { animation: none; }
  .lab-card, .lab-card-icon, .lab-card-desc { transition: none; }
  .lab-card:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav {
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 24px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav-cta { margin-top: 12px; text-align: center; }
  .nav-toggle { display: flex; }

  .lab-grid { grid-template-columns: 1fr; }
  /* Touch devices can't reliably hover, so keep descriptions always visible
     rather than trapping content behind an interaction that won't fire. */
  .lab-card-desc { grid-template-rows: 1fr; }
  .lab-card { min-height: 0; }
}

@media (max-width: 560px) {
  .hero { padding-top: 100px; }
  .intro, .lab, .team, .join { padding: 72px 0; }
}
