/* ============================================
   EOTG — Echo of the Galaxy | Main Stylesheet
   Star Wars Clone Wars Fan Project
   Мягкая sci-fi палитра: тёмно-синий, бирюзовый,
   пепельно-золотой, туманный серый
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;900&family=Exo+2:wght@300;400;500;600&display=swap');

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

:root {
  --bg-void:    #060a12;
  --bg-deep:    #0b1120;
  --bg-panel:   rgba(11, 23, 42, 0.72);
  --bg-card:    rgba(16, 30, 55, 0.65);

  --col-teal:   #4fb8c8;
  --col-teal2:  #7dd4e0;
  --col-blue:   #3d7fc1;
  --col-navy:   #1a3560;
  --col-gold:   #c8a84b;
  --col-amber:  #e6c46a;
  --col-mist:   #8aaabb;
  --col-white:  #d8e8f0;
  --col-dim:    #5a7080;

  --nav-h: 68px;
  --radius: 6px;
  --glow-teal: 0 0 18px rgba(79,184,200,0.35);
  --glow-gold:  0 0 18px rgba(200,168,75,0.35);

  --font-display: 'Orbitron', sans-serif;
  --font-body:    'Exo 2', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--col-white);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── SPACE BACKGROUND ─── */
.space-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

#starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: nebulaPulse 12s ease-in-out infinite alternate;
}

.nebula-1 {
  width: 60vw; height: 50vh;
  top: -10vh; right: -10vw;
  background: radial-gradient(ellipse, rgba(30,60,110,0.55) 0%, rgba(15,35,70,0.2) 60%, transparent 80%);
  animation-delay: 0s;
}
.nebula-2 {
  width: 50vw; height: 60vh;
  bottom: -15vh; left: -10vw;
  background: radial-gradient(ellipse, rgba(20,70,90,0.45) 0%, rgba(15,50,75,0.15) 60%, transparent 80%);
  animation-delay: -5s;
}
.nebula-3 {
  width: 40vw; height: 40vh;
  top: 30vh; left: 30vw;
  background: radial-gradient(ellipse, rgba(50,40,90,0.2) 0%, transparent 70%);
  animation-delay: -3s;
}

@keyframes nebulaPulse {
  from { opacity: 0.7; transform: scale(1); }
  to   { opacity: 1;   transform: scale(1.08); }
}

/* Silhouette planets */
.planet {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.planet-1 {
  width: 280px; height: 280px;
  bottom: -60px; right: 8vw;
  background: radial-gradient(circle at 35% 35%, #1a2c4a, #0a1520);
  box-shadow: inset -20px -20px 60px rgba(79,184,200,0.12), 0 0 60px rgba(13,40,70,0.7);
  opacity: 0.5;
}
.planet-2 {
  width: 120px; height: 120px;
  top: 15vh; left: 6vw;
  background: radial-gradient(circle at 40% 40%, #22304a, #0d1a28);
  box-shadow: inset -10px -10px 30px rgba(100,160,200,0.1), 0 0 30px rgba(10,30,55,0.6);
  opacity: 0.35;
}

.scan-lines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.04) 3px,
    rgba(0,0,0,0.04) 4px
  );
}

/* ─── NAVIGATION ─── */
.nav-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  background: rgba(6, 12, 24, 0.7);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(79, 184, 200, 0.12);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.nav-bar.scrolled {
  background: rgba(6, 12, 24, 0.92);
  box-shadow: 0 2px 30px rgba(0,0,0,0.5);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--col-white);
  cursor: pointer;
}
.nav-logo-icon {
  width: 32px; height: 32px;
  color: var(--col-teal);
  animation: rotateLogo 20s linear infinite;
}
@keyframes rotateLogo {
  to { transform: rotate(360deg); }
}
.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--col-white);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.95rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--col-mist);
  text-decoration: none;
  border-radius: var(--radius);
  transition: color 0.25s ease, background 0.25s ease;
  overflow: hidden;
}
.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(79,184,200,0.08), rgba(79,184,200,0.04));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.nav-link:hover { color: var(--col-teal2); }
.nav-link:hover::before { opacity: 1; }

.nav-link.active {
  color: var(--col-teal);
  background: rgba(79,184,200,0.1);
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 15%; right: 15%;
  height: 2px;
  background: var(--col-teal);
  border-radius: 2px;
  box-shadow: var(--glow-teal);
}

.nav-link-icon {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Burger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}
.nav-burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--col-teal);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ─── HERO SECTION ─── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--nav-h) + 4rem) 6vw 5rem;
  gap: 2rem;
}

.hero-content {
  max-width: 600px;
}

.hero-pre-title {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--col-gold);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  opacity: 0.85;
  animation: fadeSlideUp 0.8s ease both;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.04em;
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}
.title-line {
  display: block;
  color: var(--col-white);
  animation: fadeSlideUp 0.8s ease both;
  animation-delay: 0.1s;
}
.title-line.accent-line {
  color: var(--col-teal);
  text-shadow: 0 0 40px rgba(79,184,200,0.55), 0 0 80px rgba(79,184,200,0.2);
  animation-delay: 0.2s;
}

.hero-subtitle {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--col-mist);
  margin-bottom: 2.5rem;
  max-width: 480px;
  animation: fadeSlideUp 0.8s ease both;
  animation-delay: 0.35s;
}

/* Buttons */
.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeSlideUp 0.8s ease both;
  animation-delay: 0.5s;
  margin-bottom: 3rem;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.9rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  border-radius: var(--radius);
  transition: transform 0.25s ease, box-shadow 0.3s ease;
  cursor: pointer;
  overflow: hidden;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, #2a6b82, #1e8fa8);
  color: #fff;
  box-shadow: 0 4px 20px rgba(30,143,168,0.4);
}
.btn-primary:hover {
  box-shadow: 0 6px 30px rgba(30,143,168,0.6), var(--glow-teal);
}
.btn-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.15) 0%, transparent 70%);
}
.btn-arrow {
  width: 18px; height: 18px;
  transition: transform 0.25s ease;
}
.btn-primary:hover .btn-arrow { transform: translateX(4px); }

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(79,184,200,0.35);
  color: var(--col-teal2);
  text-transform: uppercase;
}
.btn-ghost:hover {
  background: rgba(79,184,200,0.08);
  border-color: rgba(79,184,200,0.6);
  box-shadow: var(--glow-teal);
}

/* Stats bar */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  animation: fadeSlideUp 0.8s ease both;
  animation-delay: 0.65s;
}
.stat-item { text-align: center; }
.stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--col-teal);
  line-height: 1;
}
.stat-suffix { font-size: 0.9rem; }
.stat-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--col-dim);
  text-transform: uppercase;
  margin-top: 0.25rem;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(79,184,200,0.2);
}

/* ─── HOLOGRAPHIC EMBLEM ─── */
.hero-emblem {
  position: relative;
  width: min(380px, 40vw);
  aspect-ratio: 1;
  flex-shrink: 0;
  animation: fadeSlideUp 1s ease both;
  animation-delay: 0.3s;
}

.emblem-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(79, 184, 200, 0.25);
}
.ring-outer {
  inset: 0;
  animation: spinSlow 25s linear infinite;
  background: radial-gradient(ellipse, rgba(79,184,200,0.03) 0%, transparent 70%);
}
.ring-mid {
  inset: 12%;
  animation: spinSlow 18s linear infinite reverse;
  border-color: rgba(200,168,75,0.2);
}
.ring-inner {
  inset: 25%;
  animation: spinSlow 10s linear infinite;
  border-color: rgba(79,184,200,0.4);
}
@keyframes spinSlow { to { transform: rotate(360deg); } }

.emblem-center {
  position: absolute;
  inset: 30%;
  color: var(--col-teal);
  filter: drop-shadow(0 0 12px rgba(79,184,200,0.6));
  animation: emblPulse 4s ease-in-out infinite;
}
@keyframes emblPulse {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(79,184,200,0.6)); opacity: 0.9; }
  50%       { filter: drop-shadow(0 0 24px rgba(79,184,200,0.9)); opacity: 1; }
}

.emblem-scan {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(to bottom, rgba(79,184,200,0.06) 0%, transparent 50%);
  animation: scanRotate 4s linear infinite;
}
@keyframes scanRotate { to { transform: rotate(360deg); } }

/* ─── FEATURES STRIP ─── */
.features-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: rgba(79,184,200,0.07);
  border-top: 1px solid rgba(79,184,200,0.1);
  border-bottom: 1px solid rgba(79,184,200,0.1);
}

.feature-card {
  padding: 2rem 1.8rem;
  background: rgba(6,12,26,0.8);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  border-right: 1px solid rgba(79,184,200,0.06);
}
.feature-card:last-child { border-right: none; }
.feature-card:hover {
  background: rgba(16,30,55,0.9);
  transform: translateY(-3px);
}

.feature-icon {
  font-size: 1.5rem;
  color: var(--col-teal);
  margin-bottom: 0.75rem;
  display: block;
  opacity: 0.85;
}
.feature-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--col-white);
  margin-bottom: 0.5rem;
}
.feature-desc {
  font-size: 0.82rem;
  color: var(--col-dim);
  line-height: 1.6;
}

/* ─── TICKER ─── */
.ticker-wrap {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: rgba(79,184,200,0.06);
  border-bottom: 1px solid rgba(79,184,200,0.1);
  padding: 0.7rem 0;
}
.ticker-track {
  display: inline-flex;
  gap: 2.5rem;
  white-space: nowrap;
  animation: ticker 40s linear infinite;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--col-mist);
}
.ticker-dot {
  color: var(--col-gold);
  opacity: 0.6;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── ACCENT ─── */
.accent { color: var(--col-teal); }

/* ─── ANIMATIONS ─── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
    padding: calc(var(--nav-h) + 3rem) 6vw 4rem;
  }
  .hero-emblem {
    width: min(260px, 70vw);
    align-self: center;
  }
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(6, 12, 24, 0.97);
    backdrop-filter: blur(16px);
    padding: 1rem;
    gap: 0.3rem;
    border-bottom: 1px solid rgba(79,184,200,0.15);
    transform: translateY(-120%);
    transition: transform 0.4s cubic-bezier(.77,0,.18,1);
    pointer-events: none;
  }
  .nav-links.open {
    transform: translateY(0);
    pointer-events: all;
  }
  .nav-link { font-size: 0.8rem; padding: 0.7rem 1rem; }
  .nav-burger { display: flex; }
}

@media (max-width: 520px) {
  .hero-title { font-size: 2.2rem; }
  .features-strip { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 1rem; }
}
