/* ═══════════════════════════════════════════
   ECLIPTA — Theme & Base Styles
   ═══════════════════════════════════════════ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── CSS Variables — Light (default) ── */
:root {
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --surface-alt: #EEF1F5;
  --text: #1A1A2E;
  --text-muted: #5A6175;
  --primary: #0E3049;
  --primary-light: #164163;
  --accent: #00B4D8;
  --warm: #E8863A;
  --border: #D8DCE4;
  --shadow: 0 2px 20px rgba(14,48,73,0.07);
  --shadow-lg: 0 8px 32px rgba(14,48,73,0.12);
  --nav-bg: rgba(255,255,255,0.92);
  --hero-grad: linear-gradient(135deg, #0E3049 0%, #1B4D6E 50%, #0A5C5C 100%);
  --logo-fill: #0E3049;
  --logo-cutout: #F7F8FA;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.35s ease;
  --max-w: 840px;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Dark Mode ── */
[data-theme="dark"] {
  --bg: #0B0F19;
  --surface: #131829;
  --surface-alt: #1A2035;
  --text: #E4E8F1;
  --text-muted: #8A91A8;
  --primary: #1B6B9E;
  --primary-light: #2488C4;
  --accent: #00D4FF;
  --warm: #F0943E;
  --border: #252D42;
  --shadow: 0 2px 24px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.45);
  --nav-bg: rgba(19,24,41,0.92);
  --hero-grad: linear-gradient(135deg, #070B14 0%, #0E3049 50%, #0A3A3A 100%);
  --logo-fill: #00D4FF;
  --logo-cutout: #0B0F19;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color 0.2s; }
a:hover { color: var(--accent); }
button { font-family: inherit; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 6px;
}

.section-title {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--font-display);
}

/* ── Container ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  outline: none;
  text-decoration: none;
}
.btn:hover { transform: scale(1.04); }
.btn:active { transform: scale(0.98); }

.btn-accent { background: var(--accent); color: #fff; }
.btn-warm { background: var(--warm); color: #fff; }
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-weight: 600;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform 0.25s, box-shadow 0.25s;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ── Animations ── */
@keyframes pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  :root { --max-w: 100%; }
  .section-title { font-size: 22px; }
  .hide-mobile { display: none !important; }
}

@media (max-width: 480px) {
  .section-title { font-size: 20px; }
}

/* ── PRELOADER ── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0B0F19;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}
.preloader.fade-out { opacity: 0; pointer-events: none; }

.preloader-eclipse {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
}
.preloader-eclipse::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(0,180,216,0.3), 0 0 60px rgba(0,180,216,0.1);
  animation: preloaderGlow 2s ease-in-out infinite;
}
.preloader-eclipse svg { position: relative; z-index: 1; }

.preloader-brand {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 6px;
  color: #E4E8F1;
  font-family: var(--font-display);
  animation: preloaderFadeIn 1s ease 0.3s both;
}

.preloader-bar {
  width: 120px;
  height: 2px;
  background: rgba(255,255,255,0.06);
  border-radius: 1px;
  margin-top: 16px;
  overflow: hidden;
}
.preloader-bar-fill {
  height: 100%;
  background: #00B4D8;
  border-radius: 1px;
  animation: preloaderBar 1.8s ease-in-out forwards;
}

@keyframes preloaderGlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
@keyframes preloaderFadeIn {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes preloaderBar {
  0% { width: 0%; }
  60% { width: 70%; }
  100% { width: 100%; }
}
