:root {
  --void: #09090f;
  --photon: #c8f5ff;
  --photon-rgb: 200, 245, 255;
  --iris: #7b6fff;
  --iris-rgb: 123, 111, 255;
  --ember: #ff6b35;
  --ember-rgb: 255, 107, 53;
  --surface: #111118;
  --ink: #e8e8f0;
  --ghost: #4a4a5e;
}

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

html,
body {
  height: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  background: var(--void);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: "JetBrains Mono", monospace;
}

.display {
  font-family: "Space Grotesk", sans-serif;
}

a {
  color: inherit;
}

/* ==== Nav ==== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.5rem 2.5rem;
  background: rgba(9, 9, 15, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(var(--iris-rgb), 0.15);
}

.wordmark {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ghost);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* ==== Hero ==== */

#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 5rem;
  overflow: hidden;
  background: radial-gradient(
      ellipse 60% 50% at 50% 30%,
      rgba(var(--iris-rgb), 0.16) 0%,
      transparent 70%
    ),
    var(--void);
}

.fiber-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.fiber-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow-mono {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ghost);
  margin-bottom: 1.75rem;
}

.hero-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 7.5vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.gradient-word {
  background: linear-gradient(90deg, var(--photon) 0%, var(--iris) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.subhead {
  margin-top: 1.75rem;
  max-width: 620px;
  font-family: "Inter", sans-serif;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
  opacity: 0.8;
}

.scroll-cue {
  position: absolute;
  bottom: 2.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 56px;
  background: rgba(var(--iris-rgb), 0.3);
  z-index: 1;
}

.scroll-cue::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ghost);
  animation: scrollDot 2.4s ease-in-out infinite;
}

@keyframes scrollDot {
  0% {
    top: 0;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

/* ==== Section shell ==== */

.section-eyebrow {
  display: block;
}

.display-h2 {
  margin-top: 1rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-body {
  margin-top: 1.5rem;
  max-width: 480px;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
  opacity: 0.8;
}

/* ==== Metric instruments ==== */

.metrics {
  background: var(--surface);
  padding: 5.5rem 2.5rem;
}

.metrics-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.metric-panel {
  border: 1px solid rgba(var(--iris-rgb), 0.6);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
}

.metric-readout {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 48px;
  font-weight: 600;
  color: var(--photon);
  line-height: 1;
}

.metric-unit {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--ghost);
}

.metric-label {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ghost);
}

/* ==== Problem / Solution (text + schematic) ==== */

.split-section {
  padding: 7rem 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.diagram-wrap {
  width: 100%;
}

.diagram {
  width: 100%;
  height: auto;
  overflow: visible;
}

.diagram-static {
  fill: none;
  stroke: var(--iris);
  stroke-width: 1.5;
  opacity: 0.9;
}

.diagram-dot {
  fill: var(--iris);
}

.flow-dot {
  fill: var(--photon);
  filter: drop-shadow(0 0 3px rgba(var(--photon-rgb), 0.8));
}

@media (prefers-reduced-motion: reduce) {
  .flow-dot {
    display: none;
  }
}

.diagram-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: var(--ghost);
}

.js .draw-path {
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  transition: stroke-dashoffset 1.4s ease;
}

.js .reveal.is-visible .draw-path {
  stroke-dashoffset: 0;
}

.js .reveal.is-visible .draw-path:nth-of-type(2) {
  transition-delay: 0.15s;
}

.js .reveal.is-visible .draw-path:nth-of-type(3) {
  transition-delay: 0.3s;
}

@media (prefers-reduced-motion: reduce) {
  .js .draw-path {
    stroke-dashoffset: 0;
    transition: none;
  }
}

/* ==== The Edge ==== */

.edge {
  padding: 7rem 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ==== Footer / CTA ==== */

.footer-cta {
  position: relative;
  background: var(--void);
  padding: 8rem 2.5rem 3rem;
  text-align: center;
  overflow: hidden;
}

.footer-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.footer-sub {
  margin: 1.5rem auto 0;
  max-width: 520px;
  font-family: "Inter", sans-serif;
  color: var(--ghost);
  line-height: 1.7;
}

.footer-cta-link {
  margin-top: 2.25rem;
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--photon);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.footer-cta-link:hover {
  border-color: var(--photon);
}

.footer-bar {
  margin-top: 5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(74, 74, 94, 0.3);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--ghost);
}

.footer-bar a {
  color: var(--ghost);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-bar a:hover {
  color: var(--photon);
}

.affiliation {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.affiliation-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ghost);
}

.affiliation-logo {
  height: 22px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.affiliation-link:hover .affiliation-logo {
  opacity: 1;
}

/* ==== Impressum ==== */

.legal {
  max-width: 600px;
  margin: 0 auto;
  padding: 7rem 1.5rem 6rem;
  text-align: left;
}

.legal-title {
  margin-top: 0.75rem;
}

.legal-rule {
  margin: 2rem 0;
  height: 1px;
  background: var(--iris);
  opacity: 0.6;
}

.legal-body p {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
}

.legal-body p + p {
  margin-top: 1.5rem;
}

/* ==== About page: intro + team ==== */

.page-hero {
  position: relative;
  min-height: 60vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2.5rem 4rem;
  text-align: left;
  overflow: hidden;
}

.page-hero .hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.page-hero .subhead {
  margin-left: 0;
  text-align: left;
}

.origin {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 2.5rem 5rem;
}

.origin .section-body {
  max-width: 640px;
}

.team {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2.5rem 6rem;
}

.team-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px solid var(--iris);
  padding-top: 1.5rem;
  margin-bottom: 2.5rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 2.5rem;
  row-gap: 2rem;
}

.member {
  display: block;
  width: 100%;
  border-top: 1px solid rgba(var(--iris-rgb), 0.4);
  padding: 1.5rem 0 0;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.member:hover,
.member:focus-visible {
  border-top-color: var(--photon);
  outline: none;
}

.member-more {
  display: inline-block;
  margin-top: 1rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ghost);
  transition: color 0.2s ease;
}

.member:hover .member-more,
.member:focus-visible .member-more {
  color: var(--photon);
}

.member-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}

.member-role {
  margin-top: 0.4rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--photon);
}

.member-bio {
  margin-top: 0.65rem;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  color: var(--ghost);
  line-height: 1.6;
}

/* ==== Team member modal ==== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(9, 9, 15, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-overlay[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 84vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid rgba(var(--iris-rgb), 0.5);
  padding: 2.75rem 2.25rem 2.25rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  background: none;
  border: 1px solid rgba(var(--iris-rgb), 0.4);
  color: var(--ghost);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  color: var(--photon);
  border-color: var(--photon);
  outline: none;
}

.modal-photo {
  display: block;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(var(--iris-rgb), 0.6);
  box-shadow: 0 0 26px rgba(var(--photon-rgb), 0.2);
  margin-bottom: 1.5rem;
}

.modal-photo[hidden] {
  display: none;
}

.modal-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ink);
  padding-right: 2rem;
}

.modal-role {
  margin-top: 0.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--photon);
}

.modal-bio {
  margin-top: 1.25rem;
  font-family: "Inter", sans-serif;
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--ink);
  opacity: 0.85;
}

body.modal-open {
  overflow: hidden;
}

/* ==== Custom cursor ==== */
/* only enabled by cursor.js on fine-pointer devices, so touch/no-JS keep the native cursor */

.custom-cursor-active,
.custom-cursor-active * {
  cursor: none !important;
}

#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--photon);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity 0.25s ease, width 0.2s ease, height 0.2s ease,
    background 0.2s ease;
  will-change: transform;
}

#custom-cursor.is-visible {
  opacity: 1;
}

#custom-cursor.is-hover {
  width: 36px;
  height: 36px;
  background: rgba(var(--photon-rgb), 0.15);
}

/* ==== Scroll reveal ==== */
/* content is visible by default; only animates once JS confirms it can run */

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  transition-delay: var(--reveal-delay, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.metric-panel:nth-child(1) {
  --reveal-delay: 0s;
}
.metric-panel:nth-child(2) {
  --reveal-delay: 0.08s;
}
.metric-panel:nth-child(3) {
  --reveal-delay: 0.16s;
}
.metric-panel:nth-child(4) {
  --reveal-delay: 0.24s;
}

.member:nth-child(1) {
  --reveal-delay: 0s;
}
.member:nth-child(2) {
  --reveal-delay: 0.1s;
}
.member:nth-child(3) {
  --reveal-delay: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==== Responsive ==== */

@media (max-width: 1000px) {
  .split-section {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 5rem 1.75rem;
  }

  .diagram-wrap {
    order: -1;
    max-width: 420px;
  }
}

@media (max-width: 900px) {
  .nav {
    padding: 1.25rem 1.75rem;
  }

  .metrics-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-grid {
    grid-template-columns: 1fr;
    row-gap: 1.75rem;
  }

  .team {
    padding: 1rem 1.75rem 4.5rem;
  }
}

@media (max-width: 600px) {
  .nav {
    padding: 1.1rem 1.25rem;
  }

  .nav-right {
    gap: 1rem;
  }

  #hero {
    padding: 5.5rem 1.25rem 4rem;
  }

  .metrics {
    padding: 4rem 1.25rem;
  }

  .metrics-inner {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .metric-readout {
    font-size: 40px;
  }

  .edge,
  .footer-cta {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .page-hero {
    padding: 5rem 1.25rem 3rem;
  }
}
