/* === VARIABLES & RESET === */
:root {
  --color-bg: #020617;
  --color-bg-alt: #0b1224;
  --color-surface: rgba(15, 23, 42, 0.55);
  --color-border: rgba(148, 163, 184, 0.14);
  --color-accent: #0ea5e9;
  --color-accent-glow: rgba(14, 165, 233, 0.45);
  --color-text: #e2e8f0;
  --color-text-muted: #94a3b8;

  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-head: 'Jura', system-ui, sans-serif;

  --radius: 16px;
  --radius-sm: 12px;
}

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

html {
  scroll-behavior: smooth;
}

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

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

ul {
  list-style: none;
}

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

address {
  font-style: normal;
}

/* === UTILITIES === */
.container {
  width: 92%;
  max-width: 1200px;
  margin-inline: auto;
}

.section {
  padding: 120px 0;
}

.center {
  text-align: center;
}

.glass {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-radius: var(--radius);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.85s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 0.85s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  line-height: 1.2;
}
.btn-large {
  padding: 1rem 2.2rem;
  font-size: 1.05rem;
}
.btn-small {
  padding: 0.6rem 1.1rem;
  font-size: 0.85rem;
}

.btn-glow {
  background: linear-gradient(135deg, #0369a1, #0ea5e9);
  color: #fff;
  box-shadow: 0 0 0 rgba(14,165,233,0);
}
.btn-glow:hover {
  box-shadow: 0 0 24px var(--color-accent-glow);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255,255,255,0.03);
  color: var(--color-text);
  border: 1px solid rgba(148,163,184,0.2);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(148,163,184,0.35);
}

/* === HEADER & NAV === */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
  background: rgba(2,6,23,0.85);
  border-bottom-color: var(--color-border);
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}
.logo-icon {
  width: 28px;
  height: 28px;
  border: 2px solid var(--color-accent);
  transform: rotate(45deg);
  display: inline-block;
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(14,165,233,0.35);
}
.logo-text {
  color: var(--color-text);
}
.logo-accent {
  color: var(--color-accent);
  font-weight: 500;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-list {
  display: flex;
  gap: 1.25rem;
}
.nav-link {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 0.4rem 0;
  transition: color 0.25s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.nav-link:hover {
  color: var(--color-text);
}
.nav-link:hover::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}
.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.35s ease;
}
.hamburger {
  position: relative;
}
.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}
.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* === HERO === */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1000px 500px at 120% 10%, rgba(14,165,233,0.12), transparent 60%),
    radial-gradient(800px 400px at -10% 90%, rgba(99,102,241,0.10), transparent 60%),
    linear-gradient(180deg, rgba(2,6,23,0.2) 0%, rgba(2,6,23,0.75) 100%);
  z-index: 2;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 4;
  padding: 8rem 0 6rem;
}
.hero-eyebrow {
  font-family: var(--font-head);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-accent);
  margin-bottom: 1rem;
}
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5.2vw, 4rem);
  line-height: 1.1;
  max-width: 900px;
  margin-bottom: 1.25rem;
}
.hero-title .line {
  display: block;
}
.hero-title .accent {
  background: linear-gradient(90deg, #e2e8f0, #94a3b8, #cbd5e1, #e2e8f0);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
}
.hero-subtitle {
  color: var(--color-text-muted);
  max-width: 640px;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Animated flight path */
.flight-path-svg {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  z-index: 3;
  pointer-events: none;
}
.flight-path-line {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: drawPath 3.5s ease-out forwards;
}

/* === ABOUT === */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.about-media {
  position: relative;
  padding: 2.5rem;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.media-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.hud-title {
  color: var(--color-text-muted);
}
.hud-status {
  color: var(--color-accent);
  animation: pulse 2s ease-in-out infinite;
}
.media-body {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
}
.pulsing-ring {
  position: absolute;
  width: 140px;
  height: 140px;
  border: 1px solid rgba(14,165,233,0.28);
  border-radius: 50%;
  animation: pulseRing 2.5s ease-out infinite;
}
.core-icon svg {
  filter: drop-shadow(0 0 10px rgba(14,165,233,0.25));
}

.about-heading {
  font-family: var(--font-head);
  font-size: 1.6rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}
.about-text p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}
.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}
.about-stats li {
  display: flex;
  flex-direction: column;
}
.stat-value {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.35rem;
}

/* === PROGRAMS === */
.section-header {
  margin-bottom: 3.5rem;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 0.6rem;
}
.section-subtitle {
  color: var(--color-text-muted);
  max-width: 560px;
  margin-inline: auto;
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.program-card {
  position: relative;
  padding: 2rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  overflow: hidden;
}
.program-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.35), 0 0 0 1px rgba(14,165,233,0.18);
}
.card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0.6;
  transition: opacity 0.3s ease;
}
.program-card:hover .card-accent {
  opacity: 1;
}
.card-icon {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
}
.card-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}
.card-desc {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}
.card-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-accent);
  transition: opacity 0.25s ease;
}
.card-link:hover {
  opacity: 0.85;
  text-decoration: underline;
}

/* === FLIGHT LAB === */
.lab-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.lab-item {
  transition: transform 0.35s ease;
}
.lab-item:hover {
  transform: translateY(-8px);
}
.lab-visual {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius) var(--radius) 0 0;
}
.lab-number {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  font-family: var(--font-head);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: rgba(226,232,240,0.55);
}
.lab-icon svg {
  filter: drop-shadow(0 0 8px currentColor);
}
.lab-caption {
  padding: 1.25rem;
}
.lab-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}
.lab-desc {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* === CONTACTS === */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.contact-card {
  padding: 2rem 1.5rem;
  text-align: center;
}
.contact-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(14,165,233,0.18);
  border-radius: 14px;
  background: rgba(14,165,233,0.06);
}
.contact-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}
.contact-link,
.contact-address {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  transition: color 0.25s ease;
}
.contact-link:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* === FOOTER === */
.site-footer {
  border-top: 1px solid rgba(148,163,184,0.08);
  padding: 48px 0;
}
.footer-inner {
  text-align: center;
}
.footer-brand {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
}
.footer-copy {
  font-size: 0.85rem;
  color: #64748b;
}

/* === ANIMATIONS === */
@keyframes shimmer {
  to { background-position: 200% center; }
}
@keyframes drawPath {
  to { stroke-dashoffset: 0; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes pulseRing {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; }
  .programs-grid { grid-template-columns: repeat(2, 1fr); }
  .lab-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .section { padding: 84px 0; }
  .menu-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    right: 4vw;
    left: 4vw;
    background: rgba(2,6,23,0.95);
    border: 1px solid var(--color-border);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    border-radius: var(--radius);
    padding: 1.2rem;
    flex-direction: column;
    gap: 1rem;
  }
  .main-nav.is-open { display: flex; }
  .nav-list { flex-direction: column; gap: 0.5rem; }
  .nav-cta { margin-left: 0; width: 100%; text-align: center; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }

  .programs-grid,
  .lab-grid,
  .contacts-grid { grid-template-columns: 1fr; }
  .about-stats { gap: 1.2rem; }
}
@media (max-width: 480px) {
  .hero-title { font-size: clamp(1.7rem, 6vw, 2.2rem); }
  .section-title { font-size: clamp(1.5rem, 5vw, 2rem); }
  .stat-value { font-size: 1.6rem; }
  .about-media { min-height: 300px; }
}