/* ---------- Design tokens ---------- */
:root {
  --bg: #07070a;
  --text: #f5f5f7;
  --muted: #9b9ba6;
  --border: rgba(255, 255, 255, 0.08);
  --surface: rgba(255, 255, 255, 0.025);
  --accent: #5b9dff;
  --accent-2: #9b6bff;
  --maxw: 1080px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: 28px;
}

/* ---------- Animated background ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% -10%, #0e1020 0%, var(--bg) 55%);
}

.bg-grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(100% 70% at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(100% 70% at 50% 0%, #000 0%, transparent 75%);
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}

.bg-glow-1 {
  width: 620px;
  height: 620px;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(91, 157, 255, 0.55), transparent 65%);
  animation: drift1 16s ease-in-out infinite alternate;
}

.bg-glow-2 {
  width: 520px;
  height: 520px;
  top: 40px;
  right: -160px;
  background: radial-gradient(circle, rgba(155, 107, 255, 0.4), transparent 65%);
  animation: drift2 20s ease-in-out infinite alternate;
}

.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes drift1 {
  from { transform: translateX(-50%) translateY(0); }
  to   { transform: translateX(-42%) translateY(40px); }
}

@keyframes drift2 {
  from { transform: translateY(0); }
  to   { transform: translateY(60px) translateX(-40px); }
}

@media (prefers-reduced-motion: reduce) {
  .bg-glow { animation: none; }
}

/* ---------- Nav ---------- */
.nav {
  position: relative;
  z-index: 2;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: calc(100% + 4px);
    right: 28px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 170px;
    padding: 10px 12px;
    background: #101014;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.85);
    display: none;
    z-index: 6;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    width: 100%;
    padding: 9px 6px;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 44px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 0.82fr;
  gap: 56px;
  align-items: center;
  text-align: left;
}

.hero-copy {
  min-width: 0;
}

.wordmark {
  font-size: 3.9rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 24px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted);
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(8px);
  margin-bottom: 32px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(91, 157, 255, 0.6);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(91, 157, 255, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(91, 157, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(91, 157, 255, 0); }
}

.hero-title {
  font-size: clamp(2.3rem, 5.2vw, 4rem);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}

.grad {
  background: linear-gradient(100deg, #fff 10%, var(--accent) 55%, var(--accent-2) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-sub {
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 22px;
}

/* Compact three-word tagline */
.hero-tagline {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px 22px;
  margin-top: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-tagline span {
  position: relative;
}

.hero-tagline span + span::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
}

/* Hero equations — the physics behind the product, in the right column */
/* Right column: noisy signal plot stacked over faint equations */
.hero-side {
  justify-self: end;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding-left: 30px;
  border-left: 1px solid var(--border);
}

.hero-plot {
  width: 100%;
  height: auto;
  max-height: 210px;
}

.hero-eqs {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(18px, 2.6vh, 34px);
  font-size: clamp(1rem, 1.9vw, 1.6rem);
  color: #c7d2ff;
}

.hero-eqs .eq {
  line-height: 1;
  opacity: 0.1;
}

.hero-eqs .eq:nth-child(even) {
  transform: translateX(16px);
}

.hero-eqs .eq:nth-child(5) {
  font-size: 0.8em;
}

.hero-eqs mjx-container {
  margin: 0 !important;
}

/* ---------- Problem / Solution ---------- */
.ps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  margin-top: 32px;
  padding-bottom: 120px;
}

.ps-card {
  position: relative;
}

.ps-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.ps-problem .ps-label { color: #ff9b9b; }
.ps-solution .ps-label { color: var(--accent); }

.ps-body {
  font-size: 1.02rem;
  line-height: 1.6;
  color: #f1f1f5;
}

/* ---------- Page header (interior pages) ---------- */
.page-head {
  padding-top: 56px;
  padding-bottom: 40px;
}

.page-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-top: 6px;
}

/* ---------- Generic section ---------- */
.section {
  padding-bottom: 96px;
}

.section-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 40px;
  max-width: 640px;
}

/* ---------- How it works ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.step {
  position: relative;
  padding: 32px 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  backdrop-filter: blur(10px);
}

.step-num {
  font-family: system-ui, monospace;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.step-title {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 12px 0 10px;
}

.step-body {
  font-size: 1rem;
  color: var(--muted);
}

/* ---------- Capabilities ---------- */
.caps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.cap {
  padding: 24px 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.cap:hover {
  transform: translateY(-3px);
  border-color: rgba(91, 157, 255, 0.6);
}

.cap-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  margin-bottom: 14px;
  color: var(--accent);
  background: rgba(91, 157, 255, 0.12);
  border: 1px solid rgba(91, 157, 255, 0.28);
}

.cap-icon svg {
  width: 21px;
  height: 21px;
}

.cap:hover .cap-icon {
  color: var(--accent-2);
  border-color: rgba(155, 107, 255, 0.5);
}

.cap-title {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.cap-body {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 152px 1fr;
  gap: 32px;
  align-items: start;
}

.about-photo,
.about-photo img,
.about-monogram {
  width: 152px;
  height: 152px;
  border-radius: 50%;
}

.about-photo img {
  object-fit: cover;
  display: block;
}

.about-monogram {
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #06121f;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.about-name {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Shared eyebrow label — keeps "Director" and "The name" consistent */
.about-role,
.name-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}

.about-body {
  font-size: 1.08rem;
  color: #d7d7de;
  max-width: 720px;
}

/* ---------- The name ---------- */
.name-band {
  margin-bottom: 80px;
}

.name-body {
  font-size: 1.12rem;
  color: #eaeaf0;
}

/* Historical images — shown whole, sized by aspect ratio at a shared height */
.figures {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px 28px;
  margin-top: 32px;
}

.figure {
  margin: 0;
  max-width: 100%;
}

/* Widths track each image's aspect ratio so heights match (~490px) with no crop */
.fig-tall { width: 300px; }   /* poster, 492×800 (portrait) */
.fig-wide { width: 486px; }   /* aerodrome, 798×800 (near-square) */

.figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

.figure figcaption {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
  padding-top: 12px;
}

/* ---------- CTA ---------- */
.cta {
  text-align: left;
  padding-bottom: 120px;
}

.cta-title {
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.cta-sub {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 28px;
}

.cta-btn {
  display: inline-block;
  font-size: 0.98rem;
  font-weight: 600;
  color: #06121f;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  padding: 13px 28px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(91, 157, 255, 0.55);
}

/* ---------- Legal / prose ---------- */
.legal {
  max-width: 720px;
  color: #d7d7de;
  font-size: 1.02rem;
}

.legal p {
  margin-bottom: 18px;
}

.legal h2 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 30px 0 10px;
}

.legal a {
  color: var(--accent);
}

.legal a:hover {
  color: var(--accent-2);
}

.legal-meta {
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 26px;
}

.legal-note {
  font-size: 0.86rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 18px;
  margin-top: 28px;
}

/* ---------- Footer ---------- */
.footer {
  padding: 56px 0;
  background: linear-gradient(120deg, #142744 0%, #201d40 55%, #2b1c40 100%);
  color: #e8ecf5;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 36px 72px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-brand-col {
  gap: 16px;
}

/* Align the link + email columns with the address line, not the logo */
.footer-links,
.footer-contact {
  margin-top: 40px;
}

.footer-brand img {
  height: 24px;
  width: auto;
}

.footer-address {
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.68);
}

.footer-company {
  display: block;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2px;
}

.footer-links {
  gap: 0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
}

.footer-links a,
.footer-contact a {
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: #ffffff;
}

.footer-contact a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
}

.footer-copy {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------- Responsive ---------- */
/* Capabilities: 4 → 2 columns on medium screens */
@media (max-width: 960px) {
  .caps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Hero: stack text over a constrained image on narrow screens */
@media (max-width: 820px) {
  .hero-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }
  .hero-copy {
    width: 100%;
  }
  .hero-side {
    width: 100%;
    max-width: 100%;
    border-left: none;
    padding-left: 0;
    padding-top: 4px;
    align-items: center;
    overflow: hidden;
  }
  .hero-eqs {
    align-items: center;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
  }
  .hero-eqs .eq:nth-child(even) {
    transform: none;
  }
}

@media (max-width: 760px) {
  .ps {
    grid-template-columns: 1fr;
    padding-bottom: 80px;
  }
  .hero {
    padding: 40px 0 22px;
  }
  .hero-title {
    font-size: clamp(1.7rem, 7vw, 2.3rem);
    overflow-wrap: break-word;
  }
  .wordmark {
    font-size: 3rem;
  }
  .ps-card {
    padding: 32px 26px;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .caps {
    grid-template-columns: 1fr;
  }
  .section {
    padding-bottom: 72px;
  }
  .hero-visual {
    margin-top: 40px;
  }
  .about {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .figures .figure {
    width: 100%;
  }
  .footer-links,
  .footer-contact {
    margin-top: 0;
  }
}
