/* ============================================
   EXOBEACON - Global Styles
   ============================================ */

/* CSS Variables */
:root {
  --primary: #00BCD4;
  --primary-dark: #0097A7;
  --primary-light: #26C6DA;
  --bg-dark: #0a0e17;
  --bg-card: #111827;
  --bg-card-hover: #1a2332;
  --bg-input: #0d1117;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: #1e293b;
  --border-accent: #00BCD4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gradient-primary: linear-gradient(135deg, #00BCD4 0%, #0097A7 100%);
  --gradient-hero: linear-gradient(180deg, #0a0e17 0%, #0f1923 50%, #0a0e17 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(0, 188, 212, 0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s ease;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-light); }

img { max-width: 100%; height: auto; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #334155; }

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 2rem;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 14, 23, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo img {
  height: 36px;
  width: auto;
}

.nav-logo-text {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-logo-text .exo { color: var(--primary); }
.nav-logo-text .beacon { color: var(--text-primary); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  padding: 8px 20px !important;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  color: var(--text-primary) !important;
  font-weight: 600 !important;
}

.nav-cta::after { display: none !important; }
.nav-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-glow); }

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 2rem 60px;
  position: relative;
  overflow: hidden;
  background: var(--gradient-hero);
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg .grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 188, 212, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 188, 212, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-bg .glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}

.hero-bg .glow-orb-1 {
  width: 500px;
  height: 500px;
  background: rgba(0, 188, 212, 0.12);
  top: -150px;
  right: -100px;
}

.hero-bg .glow-orb-2 {
  width: 400px;
  height: 400px;
  background: rgba(0, 151, 167, 0.08);
  bottom: -100px;
  left: -100px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(0, 188, 212, 0.1);
  border: 1px solid rgba(0, 188, 212, 0.2);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero h1 .highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: var(--font-main);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 188, 212, 0.3);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 100px 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ============================================
   FEATURES / CARDS
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 188, 212, 0.3);
  box-shadow: var(--shadow-glow);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(0, 188, 212, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
  color: var(--primary);
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ============================================
   TOOLS SECTION
   ============================================ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 188, 212, 0.3);
  box-shadow: var(--shadow-glow);
}

.tool-icon-large {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: rgba(0, 188, 212, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
  color: var(--primary);
}

.tool-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.tool-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex: 1;
}

.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
}

.tool-link:hover {
  gap: 10px;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ============================================
   CALCULATOR PAGES
   ============================================ */
.tool-page {
  padding-top: 90px;
  min-height: 100vh;
}

.tool-hero {
  text-align: center;
  padding: 2rem 2rem 3rem;
}

.tool-hero h1 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.tool-hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.calculator-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.calc-section {
  margin-bottom: 2rem;
}

.calc-section:last-child {
  margin-bottom: 0;
}

.calc-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-main);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.1);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.btn-calculate {
  width: 100%;
  padding: 12px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-main);
  transition: var(--transition);
}

.btn-calculate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 188, 212, 0.3);
}

.results-panel {
  background: rgba(0, 188, 212, 0.05);
  border: 1px solid rgba(0, 188, 212, 0.15);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
}

.result-row:last-child {
  border-bottom: none;
}

.result-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.result-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-mono);
}

.result-highlight {
  font-size: 1.2rem;
  color: var(--text-primary);
}

/* Info Box */
.info-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 2rem;
}

.info-box h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.info-box p,
.info-box li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.info-box ul {
  list-style: none;
  padding: 0;
}

.info-box li {
  padding: 4px 0 4px 16px;
  position: relative;
}

.info-box li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* ============================================
   COMPOUND GROWTH TABLE
   ============================================ */
.growth-table-container {
  overflow-x: auto;
  margin-top: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.growth-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.growth-table th {
  background: rgba(0, 188, 212, 0.1);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  border-bottom: 1px solid var(--border-color);
}

.growth-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.3);
  color: var(--text-secondary);
}

.growth-table tr:hover td {
  background: rgba(0, 188, 212, 0.03);
}

.growth-table .positive { color: var(--success); }
.growth-table .negative { color: var(--danger); }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 3rem 2rem 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.footer-logo img { height: 28px; }

.footer-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .navbar { padding: 0 1rem; }

  .nav-links {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 23, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
  }

  .nav-links.open { display: flex; }
  .nav-mobile-toggle { display: block; }

  .hero { padding: 90px 1.5rem 40px; }
  .hero-buttons { flex-direction: column; align-items: center; }

  .section { padding: 60px 1.5rem; }

  .features-grid,
  .tools-grid { grid-template-columns: 1fr; }

  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .form-row { grid-template-columns: 1fr; }

  .calculator-container { padding: 0 1rem 3rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .section-title { font-size: 1.6rem; }
  .about-stats { grid-template-columns: 1fr; }
}

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

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

.fade-in-up:nth-child(2) { animation-delay: 0.1s; }
.fade-in-up:nth-child(3) { animation-delay: 0.2s; }
.fade-in-up:nth-child(4) { animation-delay: 0.3s; }
.fade-in-up:nth-child(5) { animation-delay: 0.4s; }

/* Back to tools link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.back-link:hover {
  color: var(--primary);
}
