/* =============================================================
   Astera Ecosystem — Full Theme Styles
   Dark grey/blue design system
   ============================================================= */

/* ---------- CSS Variables ---------- */
:root {
  --primary: #3d85c6;
  --primary-dark: #2b6aa8;
  --primary-light: #5a9fd4;
  --accent: #4da6ff;

  --bg-darkest: #0a0e14;
  --bg-dark: #11151c;
  --bg-card: #1a1e26;
  --bg-surface: #22262f;

  --text-primary: #e6eaf2;
  --text-secondary: #8b95a5;
  --text-muted: #5a6375;

  --border: #2a3040;
  --border-light: #353b4a;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --shadow-card: 0 1px 3px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.5);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;

  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-darkest);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

.section-padding {
  padding: 100px 0;
}

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

p {
  color: var(--text-secondary);
}

.section-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary-light);
  background: rgba(61, 133, 198, 0.1);
  border: 1px solid rgba(61, 133, 198, 0.2);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 12px;
}

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

/* ---------- Header ---------- */
.astera-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 14, 20, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 12px 0;
  transition: background var(--transition), padding var(--transition);
}

.astera-header.scrolled {
  background: rgba(10, 14, 20, 0.95);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

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

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary) !important;
}
.header-logo:hover {
  opacity: 0.85;
}
.header-logo img {
  width: 36px;
  height: 36px;
}
.header-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.logo-main {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.logo-sub {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.header-nav {
  display: flex;
  gap: 32px;
  align-items: center;
}
.header-nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}
.header-nav a:hover {
  color: var(--text-primary);
}
.nav-cta {
  color: var(--primary) !important;
  border: 1px solid var(--primary);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition) !important;
}
.nav-cta:hover {
  background: var(--primary);
  color: #fff !important;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--transition);
}
.hamburger::before,
.hamburger::after {
  content: '';
}
.hamburger::before { transform: translateY(-7px); }
.hamburger::after  { transform: translateY(5px); }

/* ---------- Hero ---------- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-darkest);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at center, transparent 30%, var(--bg-darkest) 85%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 24px;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary-light);
  background: rgba(61, 133, 198, 0.12);
  border: 1px solid rgba(61, 133, 198, 0.25);
  padding: 8px 18px;
  border-radius: 24px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.5rem, 5.5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero-title .highlight {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 36px;
}

.hero-stat {
  text-align: center;
}
.hero-stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}
.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

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

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--text-secondary);
  color: #fff;
}

.btn-outline-light {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-outline-light:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}

/* ---------- Scroll Indicator ---------- */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
}
.scroll-text {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ---------- Companies Section ---------- */
.companies-section {
  background: var(--bg-dark);
  text-align: center;
}

.companies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.company-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: left;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.company-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.company-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.company-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.company-card p {
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.company-link {
  font-weight: 600;
  font-size: 0.9rem;
}
.company-link.coming-soon {
  color: var(--text-muted);
  pointer-events: none;
}

/* ---------- Stats Bar ---------- */
.stats-bar {
  background: var(--bg-darkest);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.stat-card {
  text-align: center;
  padding: 20px;
}

.stat-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 12px;
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ---------- Technology Section ---------- */
.technology-section {
  background: var(--bg-dark);
}

.technology-section .section-badge,
.technology-section .section-title,
.technology-section .section-subtitle {
  text-align: center;
}
.technology-section .section-subtitle {
  margin: 0 auto 48px;
}

.technology-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.tech-process {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.tech-process h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.tech-process > p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.tech-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tech-step {
  display: flex;
  gap: 16px;
}

.tech-step-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.4;
  line-height: 1;
  min-width: 48px;
}

.tech-step-content h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}
.tech-step-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ---------- Tech Metrics ---------- */
.tech-metrics {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tech-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.metric-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.metric-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-light);
}

.metric-bar-wrapper {
  width: 100%;
  height: 6px;
  background: var(--bg-darkest);
  border-radius: 3px;
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Photonics Section ---------- */
.photonics-section {
  background: var(--bg-darkest);
}

.photonics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.photonics-content .section-badge {
  margin-bottom: 12px;
}

.photonics-content h2 {
  margin-bottom: 16px;
}

.photonics-intro {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}

.photonics-problems {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.photonics-problem {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.problem-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.problem-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.problem-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.photonics-visual {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.photonics-visual h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}
.photonics-visual > p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.photonics-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.photonics-stat {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.photonics-stat .stat-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-info {
  display: flex;
  flex-direction: column;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}
.stat-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ---------- CTA Section ---------- */
.cta-section {
  background: var(--bg-dark);
  text-align: center;
}

.cta-content-wrapper {
  max-width: 640px;
  margin: 0 auto;
}

.cta-content-wrapper h2 {
  margin-bottom: 16px;
}

.cta-content-wrapper > p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.astera-footer {
  background: var(--bg-darkest);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
}
.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.footer-social {
  display: flex;
  gap: 12px;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: border-color var(--transition), color var(--transition);
}
.footer-social a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col ul a {
  font-size: 0.88rem;
  color: var(--text-muted);
}
.footer-col ul a:hover {
  color: var(--text-primary);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.footer-contact-item a {
  color: var(--text-muted);
}
.footer-contact-item a:hover {
  color: var(--text-primary);
}
.contact-icon {
  font-size: 0.9rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}
.footer-bottom-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.footer-bottom-links a:hover {
  color: var(--text-primary);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .companies-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .technology-grid,
  .photonics-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
  .header-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-darkest);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    gap: 16px;
  }

  .companies-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero-stats {
    gap: 24px;
  }
  .hero-stat-number {
    font-size: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .section-padding {
    padding: 60px 0;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}
