/* ============================================================
   MEA Ecosystem — Main Stylesheet
   /style.css
   ============================================================ */

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

/* ── Design Tokens ───────────────────────────────────────── */
:root {
  --bg:      #081120;
  --card:    #101827;
  --border:  #1D293D;

  --text:    #F8FAFC;
  --muted:   #94A3B8;

  --primary: #DFF4FF;
  --accent:  #7EC8FF;

  --font-heading: 'Bebas Neue', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --radius:  10px;
  --nav-h:   64px;

  --transition: 0.25s ease;
}

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

html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overflow-y: scroll;
  height: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

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

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

/* ── Scroll Snap Sections ────────────────────────────────── */
.section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── Utility ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.mono {
  font-family: var(--font-mono);
}

/* ── Navbar ──────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(8, 17, 32, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}

#navbar.scrolled {
  border-bottom-color: var(--border);
  background: rgba(8, 17, 32, 0.88);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-brand-text {
  font-family: var(--font-heading);
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--primary);
  line-height: 1;
}

/* Account Dropdown */
.nav-account {
  position: relative;
}

.nav-account-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.nav-account-btn:hover {
  border-color: var(--accent);
  background: rgba(126, 200, 255, 0.06);
}

.nav-account-btn svg {
  transition: transform var(--transition);
}

.nav-account.open .nav-account-btn svg {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 160px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-account.open .nav-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--muted);
  transition: color var(--transition), background var(--transition);
}

.nav-dropdown a:hover {
  color: var(--text);
  background: rgba(126, 200, 255, 0.07);
}

/* ── Hero Section ────────────────────────────────────────── */
#hero {
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
  align-items: center;
}

/* Ambient background glow */
#hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(ellipse, rgba(126, 200, 255, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  text-align: center;
  padding: 80px 24px;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 28px;
  opacity: 0.8;
}

.hero-logo-wrap {
  margin-bottom: 32px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(52px, 10vw, 96px);
  letter-spacing: 0.04em;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight: 500;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.hero-desc {
  font-size: 15px;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

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

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 11px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent);
  color: #05111F;
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(126, 200, 255, 0.22);
}

.btn-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 28px rgba(126, 200, 255, 0.35);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(126, 200, 255, 0.05);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
  cursor: default;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

/* ── Section Header ──────────────────────────────────────── */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0.75;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(36px, 7vw, 64px);
  letter-spacing: 0.04em;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}

.section-desc {
  font-size: 15px;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.7;
}

/* ── Products Section ────────────────────────────────────── */
#products {
  padding: 80px 0;
}

.products-header {
  margin-bottom: 56px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

/* Product Card */
.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(126, 200, 255, 0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.product-card:hover {
  border-color: rgba(126, 200, 255, 0.30);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(126, 200, 255, 0.08);
}

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

/* Active card special treatment */
.product-card--active {
  border-color: rgba(126, 200, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(126, 200, 255, 0.08);
}

.card-status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.65;
}

.card-status--active {
  color: var(--accent);
  opacity: 1;
}

.card-name {
  font-family: var(--font-heading);
  font-size: 26px;
  letter-spacing: 0.03em;
  color: var(--primary);
  line-height: 1;
}

.card-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}

.card-footer {
  padding-top: 4px;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 6px;
}

.badge--dev {
  background: rgba(126, 200, 255, 0.10);
  color: var(--accent);
  border: 1px solid rgba(126, 200, 255, 0.20);
}

.badge--dev::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

/* ── Vision Section ──────────────────────────────────────── */
#vision {
  padding: 80px 0;
}

.vision-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.vision-left {}

.vision-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.vision-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 22px;
}

.vision-block p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

.vision-block strong {
  color: var(--text);
  font-weight: 500;
}

.vision-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vision-stat-number {
  font-family: var(--font-heading);
  font-size: 48px;
  letter-spacing: 0.04em;
  color: var(--accent);
  line-height: 1;
}

.vision-stat-label {
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.vision-stats {
  display: flex;
  gap: 40px;
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

/* ── Footer ──────────────────────────────────────────────── */
#footer {
  scroll-snap-align: end;
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand-text {
  font-family: var(--font-heading);
  font-size: 16px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.footer-copy {
  font-size: 13px;
  color: var(--muted);
  opacity: 0.55;
  font-family: var(--font-mono);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  transition: border-color var(--transition), color var(--transition);
}

.footer-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Fade-in on scroll ───────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up:nth-child(2) { transition-delay: 0.08s; }
.fade-up:nth-child(3) { transition-delay: 0.16s; }
.fade-up:nth-child(4) { transition-delay: 0.24s; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .vision-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .vision-stats {
    gap: 28px;
  }

  .products-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 520px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .vision-stats {
    flex-direction: column;
    gap: 20px;
  }
}
