/* ============================================================
   SpA Research AI Laboratory — Stylesheet
   ============================================================ */

:root {
  --primary: #1a56db;
  --primary-dark: #1340b0;
  --accent: #06b6d4;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --mid: #334155;
  --light: #f8fafc;
  --light-2: #f1f5f9;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --white: #ffffff;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 40px rgba(0,0,0,0.12);
  --font: 'Inter', sans-serif;
  --font-serif: 'Lora', serif;
  --transition: 0.25s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; display: block; }

/* ── UTILITIES ─────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

.section { padding: 6rem 0; }
.section-dark { background: var(--dark); color: var(--white); }
.section-dark .section-label { color: var(--accent); }
.section-dark p { color: #94a3b8; }
.section-dark h2 { color: var(--white); }

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.section-intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 3rem;
}

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }

.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.85rem; }

.section-dark .btn-outline { color: var(--accent); border-color: var(--accent); }
.section-dark .btn-outline:hover { background: var(--accent); color: var(--dark); }

/* ── NAVIGATION ─────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
#navbar.scrolled { box-shadow: var(--shadow); }

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--dark);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}
.nav-links a {
  color: var(--mid);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--primary); }

.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  padding: 6rem 2rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  background: #eff6ff;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--dark);
  margin-bottom: 1.5rem;
}
.hero h1 em { color: var(--primary); font-style: italic; }

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 2.5rem;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Hex grid visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hex-grid {
  position: relative;
  width: 380px;
  height: 380px;
}

.hex {
  position: absolute;
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 4s ease-in-out infinite;
}
.hex span {
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.03em;
}

.h1 { top: 50%; left: 50%; transform: translate(-50%, -50%); width: 110px; height: 110px; background: linear-gradient(135deg, var(--primary-dark), var(--primary)); animation-delay: 0s; }
.h1 span { font-size: 1rem; }
.h2 { top: 10%; left: 50%; transform: translateX(-50%); animation-delay: 0.3s; }
.h3 { top: 30%; right: 5%; animation-delay: 0.6s; }
.h4 { bottom: 10%; right: 15%; animation-delay: 0.9s; }
.h5 { bottom: 15%; left: 5%; animation-delay: 1.2s; }
.h6 { top: 30%; left: 5%; animation-delay: 1.5s; }
.h7 { bottom: 30%; right: 5%; animation-delay: 1.8s; background: linear-gradient(135deg, #7c3aed, var(--primary)); }

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(-50%); }
  50% { transform: translateY(-10px) translateX(-50%); }
}
.h1 { animation-name: floatCenter; }
@keyframes floatCenter {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% - 8px)); }
}
.h3, .h4, .h7 { animation-name: floatRight; }
@keyframes floatRight {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.h5, .h6 { animation-name: floatLeft; }
@keyframes floatLeft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ── ABOUT ─────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.about-text p { color: var(--text-muted); margin-bottom: 1.25rem; }

.about-pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.pillar {
  background: var(--light-2);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.pillar:hover { box-shadow: var(--shadow); }
.pillar-icon { font-size: 1.8rem; margin-bottom: 0.75rem; }
.pillar h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.5rem; }
.pillar p { font-size: 0.875rem; color: var(--text-muted); }

/* ── RESEARCH ───────────────────────────────────────────────── */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.research-card {
  background: var(--dark-2);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid #1e3a5f;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}
.research-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.3); }
.research-card h3 { font-size: 1.05rem; font-weight: 600; color: var(--white); margin-bottom: 0.75rem; }
.research-card p { font-size: 0.9rem; color: #94a3b8; margin-bottom: 1.25rem; }

.card-status { font-size: 0.75rem; font-weight: 600; margin-bottom: 0.75rem; }
.status-active .card-status { color: #4ade80; }
.status-planning .card-status { color: #94a3b8; }

.card-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.card-tags span {
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(26, 86, 219, 0.2);
  color: var(--accent);
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  letter-spacing: 0.03em;
}

.research-note {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  color: #94a3b8 !important;
}
.research-note a { color: var(--accent); }
.research-note a:hover { color: white; }

/* ── PIPELINE ───────────────────────────────────────────────── */
.pipeline {
  display: flex;
  align-items: flex-start;
  gap: 0;
  flex-wrap: wrap;
}
.pipeline-step {
  flex: 1;
  min-width: 180px;
  background: var(--light-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  position: relative;
  transition: box-shadow var(--transition);
}
.pipeline-step:hover { box-shadow: var(--shadow); }
.step-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.25;
  margin-bottom: 0.5rem;
  font-family: var(--font-serif);
}
.pipeline-step h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.5rem; }
.pipeline-step p { font-size: 0.85rem; color: var(--text-muted); }
.pipeline-arrow {
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  color: var(--primary);
  font-size: 1.5rem;
  margin-top: 3rem;
  opacity: 0.4;
}

/* ── TEAM ───────────────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.team-card {
  background: var(--dark-2);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid #1e3a5f;
  text-align: center;
  transition: transform var(--transition);
}
.team-card:hover { transform: translateY(-4px); }
.team-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin: 0 auto 1.25rem;
}

.team-avatar-photo {
  width: 96px; height: 96px;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  overflow: hidden;
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.2);
}
.team-avatar-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}
.team-avatar.open {
  background: var(--dark);
  border: 2px dashed #334155;
  color: #475569;
}
.team-card h3 { font-size: 1.05rem; font-weight: 600; color: var(--white); margin-bottom: 0.35rem; }
.team-role { font-size: 0.8rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1rem; }
.team-card p { font-size: 0.875rem; color: #94a3b8; margin-bottom: 1.25rem; }
.team-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.team-links a { font-size: 0.85rem; color: var(--accent); }
.team-links a:hover { color: white; }
.team-open { border-style: dashed; opacity: 0.8; }

/* ── CONTACT ────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-item { display: flex; align-items: flex-start; gap: 1rem; }
.contact-icon { font-size: 1.5rem; margin-top: 0.1rem; }
.contact-item strong { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.2rem; }
.contact-item a { color: var(--primary); font-weight: 500; }

.contact-form-note {
  background: var(--light-2);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
}
.contact-form-note p { color: var(--text-muted); margin-bottom: 1rem; font-weight: 600; }
.contact-form-note ul { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.contact-form-note li {
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.contact-form-note li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
.footer {
  background: var(--dark);
  color: #64748b;
  padding: 2rem 0;
  border-top: 1px solid #1e293b;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-left { display: flex; flex-direction: column; gap: 0.2rem; }
.footer-left strong { color: #94a3b8; font-size: 0.9rem; }
.footer-left span { font-size: 0.8rem; }
.footer-right { font-size: 0.8rem; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 7rem;
    min-height: auto;
  }
  .hero-cta { justify-content: center; }
  .hero-sub { margin: 0 auto 2.5rem; }
  .hero-visual { display: none; }

  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }

  .pipeline { flex-direction: column; }
  .pipeline-arrow { transform: rotate(90deg); margin: 0.25rem auto; }

  .nav-links { display: none; flex-direction: column; gap: 0; position: absolute; top: 68px; left: 0; right: 0; background: white; border-bottom: 1px solid var(--border); padding: 1rem 2rem; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: block; }
}

@media (max-width: 600px) {
  .section { padding: 4rem 0; }
  .about-pillars { grid-template-columns: 1fr; }
  .research-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
}
