/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0b0;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.15);
  --font-stack: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1200px;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-stack);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-logo span {
  color: var(--accent);
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.5rem 1.2rem;
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

/* ===== HIGHLIGHT (first letters) ===== */
.highlight {
  color: var(--text-primary);
  font-weight: 700;
}

/* ===== SECTIONS (shared) ===== */
section {
  padding: 8rem 2rem;
}

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

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

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 10rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 1.5rem;
  position: relative;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 3rem;
  position: relative;
}

.hero-robot {
  width: 100%;
  max-width: 400px;
  margin: 2rem auto 0;
  position: relative;
  opacity: 0.9;
}

/* ===== ABOUT / WHAT WE BUILD ===== */
.about {
  background: var(--bg-secondary);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.about-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-visual svg {
  width: 100%;
  max-width: 500px;
}

/* ===== CAPABILITIES ===== */
.capabilities {
  background: var(--bg-primary);
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.capability-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  transition: all 0.3s ease;
}

.capability-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.capability-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-glow);
}

.capability-icon svg {
  width: 24px;
  height: 24px;
}

.capability-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.capability-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== CONTACT ===== */
.contact {
  background: var(--bg-secondary);
  text-align: center;
}

.contact-email {
  display: inline-block;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 600;
  color: var(--accent);
  margin-top: 1rem;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.contact-email:hover {
  border-bottom-color: var(--accent);
}

.contact-links {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.contact-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.contact-links a:hover {
  color: var(--accent);
}

/* ===== ESSAY (masterplan) ===== */
.essay {
  padding: 10rem 2rem 6rem;
  background: var(--bg-primary);
}

.essay-container {
  max-width: 900px;
  margin: 0 auto;
}

.essay-header {
  margin-bottom: 3rem;
}

.essay-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.essay-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

.essay p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.essay h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
}

.essay em {
  color: var(--text-primary);
  font-style: italic;
}

.essay-list {
  list-style: decimal;
  padding-left: 1.5rem;
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
}

.essay-list li {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.9;
  padding-left: 0.5rem;
}

/* ===== NAV LINKS (multi-page) ===== */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.nav-link-text:hover {
  color: var(--text-primary);
}

/* ===== FLEET / ROBOTS PAGE ===== */
.fleet-hero {
  padding-top: 10rem;
  padding-bottom: 4rem;
  background: var(--bg-primary);
}

.fleet-intro {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 700px;
}

.fleet-hero-image {
  margin-top: 3rem;
  width: 100%;
  max-width: 900px;
  opacity: 0.9;
}

.robot-section {
  padding: 6rem 2rem;
  background: var(--bg-primary);
}

.robot-section-dark {
  background: var(--bg-secondary);
}

.robot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.robot-grid-reverse .robot-visual {
  order: -1;
}

.robot-designation {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--accent);
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.robot-name {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.robot-role {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.robot-description {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.robot-specs {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.robot-specs li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.robot-specs li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.robot-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.robot-visual img {
  width: 100%;
  max-width: 400px;
  opacity: 0.9;
}

/* ===== MASTERPLAN PAGE ===== */
.page-hero {
  padding-top: 10rem;
  padding-bottom: 4rem;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.5;
}

.page-hero .section-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  position: relative;
}

.page-hero .fleet-intro {
  position: relative;
}

.vision-section {
  background: var(--bg-secondary);
  padding: 6rem 2rem;
}

.vision-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  margin-top: 3rem;
}

.vision-card {
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.vision-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.vision-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.vision-card-full {
  grid-column: 1 / -1;
}

/* ===== MILESTONES / ROADMAP PAGE ===== */
.timeline {
  position: relative;
  padding: 4rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  transform: translateX(-50%);
}

.milestone {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
  position: relative;
}

.milestone::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 1.5rem;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 20px var(--accent-glow);
}

.milestone-left {
  text-align: right;
  padding-right: 2rem;
}

.milestone-right {
  padding-left: 2rem;
}

.milestone-phase {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.milestone-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.milestone-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== TEAM PAGE ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  text-align: center;
}

.team-card-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-glow);
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.team-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.team-card .role {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.team-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.partners-section {
  background: var(--bg-secondary);
  padding: 6rem 2rem;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.partner-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}

.partner-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.partner-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ===== FOOTER ===== */
.footer {
  padding: 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== MOBILE NAV HAMBURGER ===== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  position: relative;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
  position: absolute;
  left: 50%;
  margin-left: -11px;
}

.nav-toggle span:nth-child(1) {
  top: 12px;
}

.nav-toggle span:nth-child(2) {
  top: 19px;
}

.nav-toggle span:nth-child(3) {
  top: 26px;
}

.nav-toggle.active span:nth-child(1) {
  top: 19px;
  transform: rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  top: 19px;
  transform: rotate(-45deg);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .capabilities-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-visual {
    order: -1;
  }

  .robot-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .robot-grid-reverse .robot-visual {
    order: 0;
  }

  .robot-visual {
    order: -1;
  }

  .vision-grid {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    left: 1rem;
  }

  .milestone {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding-left: 3rem;
  }

  .milestone::before {
    left: 1rem;
  }

  .milestone-left {
    text-align: left;
    padding-right: 0;
  }

  .milestone-right {
    padding-left: 0;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .partners-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 75%;
    max-width: 300px;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-secondary);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 105;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 1rem 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-links .nav-link {
    margin-top: 1rem;
    text-align: center;
    justify-content: center;
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 4px;
    padding: 0.75rem 1.2rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.4);
  }

  .nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
  }

  .nav-overlay.open {
    display: block;
  }

  /* Hero adjustments */
  .hero {
    padding-top: 8rem;
    min-height: auto;
    padding-bottom: 4rem;
  }

  .hero-title {
    font-size: clamp(2.5rem, 12vw, 5rem);
  }

  .hero-subtitle {
    font-size: 1rem;
    padding: 0 0.5rem;
  }

  .hero-robot {
    max-width: 280px;
  }

  /* Section adjustments */
  section {
    padding: 4rem 1.2rem;
  }

  .section-title {
    font-size: clamp(1.6rem, 6vw, 2.5rem);
  }

  /* About section */
  .about-text p {
    font-size: 1rem;
  }

  /* Capabilities */
  .capability-card {
    padding: 1.8rem 1.5rem;
  }

  /* Robot pages */
  .fleet-hero {
    padding-top: 7rem;
    padding-bottom: 3rem;
  }

  .robot-section {
    padding: 3rem 1.2rem;
  }

  .robot-name {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .robot-specs {
    grid-template-columns: 1fr;
  }

  .robot-description {
    font-size: 0.95rem;
  }

  /* Essay / Masterplan */
  .essay {
    padding: 7rem 1.2rem 4rem;
  }

  .essay-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .essay p {
    font-size: 0.95rem;
  }

  .essay h2 {
    font-size: 1.15rem;
  }

  /* Page Hero (milestones, company, operations, team) */
  .page-hero {
    padding-top: 7rem;
    padding-bottom: 3rem;
  }

  .page-hero .section-title {
    font-size: clamp(2rem, 7vw, 3.5rem);
  }

  .fleet-intro {
    font-size: 1rem;
  }

  /* Vision cards */
  .vision-section {
    padding: 4rem 1.2rem;
  }

  .vision-card {
    padding: 1.8rem 1.5rem;
  }

  .vision-card h3 {
    font-size: 1.1rem;
  }

  .vision-card p {
    font-size: 0.9rem;
  }

  /* Timeline/Milestones */
  .milestone-title {
    font-size: 1.2rem;
  }

  .milestone-desc {
    font-size: 0.9rem;
  }

  /* Team page */
  .team-card {
    padding: 2rem 1.5rem;
  }

  /* Partners */
  .partners-section {
    padding: 4rem 1.2rem;
  }

  /* Contact */
  .contact-email {
    font-size: clamp(1rem, 4vw, 1.4rem);
  }

  .contact-links {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  /* Nav top spacing */
  .nav {
    padding: 1rem 1.2rem;
  }

  /* Footer */
  .footer {
    padding: 1.5rem 1.2rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 400px) {
  .hero-title {
    font-size: clamp(2rem, 14vw, 3.5rem);
  }

  .nav-logo {
    font-size: 0.95rem;
  }

  section {
    padding: 3rem 1rem;
  }

  .robot-section {
    padding: 2.5rem 1rem;
  }

  .capability-card {
    padding: 1.5rem 1.2rem;
  }

  .vision-card {
    padding: 1.5rem 1.2rem;
  }

  .essay {
    padding: 6rem 1rem 3rem;
  }
}
