/* Background video (subtle atmosphere behind the graph) */
.bg-video {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  object-fit: cover;
  z-index: 0;
  opacity: 0.18;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .bg-video { display: none; }
}

/* Neural-graph canvas (background ornament) */
.graph-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  z-index: 1;
  pointer-events: none;
  opacity: 0.75;
}

/* Nav */
.nav {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  gap: 0.1rem 1.5rem;
}

.nav-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  color: var(--foreground);
  line-height: 1;
}
.nav-logo {
  font-size: 1.875rem;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--foreground);
  white-space: nowrap;
}
.nav-tagline {
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
}

.nav-link {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 180ms var(--ease);
}
.nav-link:hover,
.nav-link.is-active { color: var(--foreground); }

.nav-cta { white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.4;
  transition: transform 240ms var(--ease), opacity 240ms var(--ease);
  will-change: transform;
}
.btn:hover { transform: scale(1.03); }
.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--foreground);
  color: #FFFFFF;
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
}

/* Hero */
.hero {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: calc(4rem - 12px) 1.5rem 10rem;
}
@media (min-width: 768px) {
  .hero { padding-top: calc(6rem - 20px); padding-bottom: 10rem; }
}

.hero-title {
  max-width: 80rem;
  margin: 0;
  font-size: clamp(2.45rem, 6.85vw, 5.85rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--foreground);
  text-wrap: balance;
}
.hero-title > span { display: block; }
.hero-em {
  color: var(--muted);
  font-style: italic;
}

.hero-lead {
  max-width: 42rem;
  margin: 2rem 0 0;
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  line-height: 1.65;
  color: var(--muted);
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
}

.hero-cta {
  margin-top: 3rem;
  padding: 1.125rem 3.25rem;
  font-size: 1rem;
}

/* Footer */
.footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1rem 2rem;
  font-size: 0.75rem;
  color: var(--muted);
  z-index: 10;
  pointer-events: none;
}
.footer > * { pointer-events: auto; }

/* Entrances */
@keyframes fade-rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
[data-fade] {
  opacity: 0;
  animation: fade-rise 0.8s var(--ease) forwards;
}
[data-fade="1"] { animation-delay: 0s; }
[data-fade="2"] { animation-delay: 0.2s; }
[data-fade="3"] { animation-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  [data-fade] { animation: none; opacity: 1; }
}

/* Responsive polish */
@media (max-width: 640px) {
  .nav-menu {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 1.75rem;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav-menu::-webkit-scrollbar { display: none; }
  .nav-menu li { flex-shrink: 0; }
  .nav-link { font-size: 0.8125rem; }
}

@media (max-width: 520px) {
  .nav { padding: 1.25rem 1.25rem; gap: 0.75rem 0.75rem; }
  .nav-cta { padding: 0.5rem 1.1rem; font-size: 0.8125rem; }
  .footer { padding: 0.75rem 1.25rem; font-size: 0.6875rem; }
  .footer > span:last-child { text-align: right; }
}
