/* ═══════════════════════════════════════════════════════════════
   MULU CODE — DARK THEME v2
   Shared stylesheet for all Mulu Code landing pages.
   Clean, minimal, Vercel-inspired dark theme.
   ═══════════════════════════════════════════════════════════════ */

/* ─── VARIABLES ─── */
:root {
  /* Dark layers */
  --void: #050505;
  --abyss: #0a0a0a;
  --deep: #111111;
  --surface: #171717;
  --elevated: #1f1f1f;

  /* Borders */
  --border-dim: #1a1a1a;
  --border-subtle: #282828;

  /* Text */
  --text-primary: #ededed;
  --text-secondary: #a1a1a1;
  --text-muted: #666666;

  /* Accent */
  --blue: #2563eb;
  --blue-light: #3b82f6;
  --success: #22c55e;

  /* Font */
  --font: 'Host Grotesk', system-ui, -apple-system, sans-serif;

  /* Compat aliases */
  --bg: #050505;
  --bg-alt: #0a0a0a;
  --accent: #2563eb;
  --text: #ededed;
  --border: #1a1a1a;
}

/* ─── 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; background: var(--void); }

body {
  font-family: var(--font);
  background: var(--void);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(255, 255, 255, 0.15); color: #fff; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

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

/* ─── AMBIENT BACKGROUND ─── */
@keyframes ambientRotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
body::before {
  content: '';
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 0;
  pointer-events: none;
  background: conic-gradient(
    from 0deg at 50% 35%,
    transparent 0deg,
    rgba(37, 99, 235, 0.04) 60deg,
    rgba(59, 130, 246, 0.06) 120deg,
    transparent 180deg,
    rgba(37, 99, 235, 0.03) 240deg,
    transparent 360deg
  );
  animation: ambientRotate 50s linear infinite;
  filter: blur(40px);
}

/* ─── NOISE TEXTURE ─── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ─── LAYOUT ─── */
.page-content { position: relative; z-index: 2; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ─── NAVBAR ─── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0;
  pointer-events: none;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border-bottom: 1px solid var(--border-dim);
}
.nav-outer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  pointer-events: auto;
  position: relative;
  padding: 0 24px;
}
.nav-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border: none;
  background: transparent;
  width: 100%;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 14px 0;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.7; }
.nav-logo img { width: 24px; height: 24px; border: none; }

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0;
  justify-self: center;
}
.nav-links > li { display: flex; }
.nav-links a,
.nav-links button {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border: none;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 8px;
  transition: color 0.15s;
}
.nav-links a:hover,
.nav-links button:hover {
  color: var(--text-primary);
}

.nav-actions {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nav-signin {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  white-space: nowrap;
  transition: color 0.15s;
}
.nav-signin:hover { color: var(--text-primary); }
.nav-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--text-primary);
  color: var(--void);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  border-radius: 8px;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.nav-download:hover {
  opacity: 0.85;
}

/* ─── DROPDOWN ─── */
.dropdown-wrap { position: relative; }
.dropdown-chevron { transition: transform 0.2s ease; opacity: 0.4; width: 10px; height: 10px; }
.dropdown-wrap:hover .dropdown-chevron { transform: rotate(180deg); opacity: 0.8; }
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
  z-index: 100;
}
.dropdown-wrap:hover .dropdown-menu,
.dropdown-wrap:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.dropdown-panel {
  width: 560px;
  background: var(--surface);
  border: 1px solid var(--border-dim);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}
.dropdown-panel-sm { width: 320px; grid-template-columns: 1fr; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.1s;
  white-space: normal;
  min-width: 0;
  border-bottom: 1px solid var(--border-dim);
}
.dropdown-panel > .dropdown-item:nth-child(odd) { border-right: 1px solid var(--border-dim); }
.dropdown-panel-sm > .dropdown-item:nth-child(odd) { border-right: none; }
.dropdown-panel > .dropdown-item:last-child:nth-child(odd) { border-right: none; }
.dropdown-item:last-child,
.dropdown-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }
.dropdown-item:hover { background: rgba(255, 255, 255, 0.04); }
.dropdown-item.active { background: rgba(255, 255, 255, 0.06); }
.dropdown-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dropdown-item.active .dropdown-icon { background: var(--blue); }
.dropdown-icon svg { width: 14px; height: 14px; color: var(--text-muted); }
.dropdown-item:hover .dropdown-icon svg,
.dropdown-item.active .dropdown-icon svg { color: var(--text-primary); }
.dropdown-item strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1px;
  color: var(--text-primary);
}
.dropdown-item span {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}
.dropdown-menu-right { left: 50%; transform: translateX(-50%); }

/* ─── MOBILE NAV ─── */
.mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-primary);
  margin-left: auto;
  border-radius: 8px;
  transition: background 0.15s;
}
.mobile-toggle:hover { background: rgba(255, 255, 255, 0.05); }
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}
.mobile-menu.open { display: block; }
.mobile-menu-inner {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: min(340px, 85vw);
  background: var(--surface);
  border-left: 1px solid var(--border-dim);
  padding: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.mobile-menu-close {
  align-self: flex-end;
  margin: 12px 12px 8px;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-primary);
  padding: 6px;
  transition: background 0.15s;
}
.mobile-menu-close:hover { background: rgba(255, 255, 255, 0.05); }
.mobile-section-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 16px 20px 6px;
}
.mobile-menu-inner a {
  display: block;
  padding: 10px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border-dim);
  transition: color 0.15s;
}
.mobile-menu-inner a:hover { color: var(--text-primary); }
.mobile-divider { height: 1px; background: var(--border-dim); margin: 4px 0; }

/* ─── HERO ─── */
.hero {
  text-align: center;
  padding: 160px 24px 80px;
  position: relative;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
}
.hero h1 {
  font-family: var(--font);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text-primary);
}
.highlight {
  color: var(--blue);
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.6;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

/* ─── BUTTONS ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
  background: var(--blue);
  padding: 10px 20px;
  border: none;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.btn-primary:hover {
  background: var(--blue-light);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary svg { width: 16px; height: 16px; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  background: transparent;
  padding: 10px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}
.btn-secondary:active { transform: translateY(0); }

/* ─── HERO VISUAL ─── */
.screenshot-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.08);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.screenshot-placeholder:hover { border-color: rgba(59,130,246,0.25); box-shadow: 0 0 28px rgba(59, 130, 246, 0.14); }
.screenshot-placeholder span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── SECTIONS ─── */
.section { padding: 120px 24px; }
.section-alt {
  background: var(--abyss);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}
.section-label {
  display: inline-block;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 14px;
  color: var(--text-primary);
}
.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── FEATURES GRID ─── */
.powers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 960px;
  margin: 0 auto;
}
.power-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.08);
  transition: background 0.2s, border-color 0.15s, transform 0.15s, box-shadow 0.2s;
}
.power-card:hover { background: var(--abyss); border-color: rgba(59,130,246,0.3); transform: translateY(-2px); box-shadow: 0 0 28px rgba(59, 130, 246, 0.14); }
.power-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.power-icon svg { width: 18px; height: 18px; color: var(--blue); }
.power-card h3 {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.power-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ─── FEATURE ROWS ─── */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  margin-bottom: 100px;
}
.feature-row:last-child { margin-bottom: 0; }
.feature-row.reverse .feature-text { order: 2; }
.feature-row.reverse .feature-visual { order: 1; }
.feature-text .section-label { text-align: left; }
.feature-text h3 {
  font-family: var(--font);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--text-primary);
}
.feature-text p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.feature-list li svg {
  width: 18px;
  height: 18px;
  color: var(--blue);
  flex-shrink: 0;
  margin-top: 2px;
}
.feature-visual {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 36px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.08);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.feature-visual:hover { border-color: rgba(59,130,246,0.3); box-shadow: 0 0 28px rgba(59, 130, 246, 0.14); }
.feature-visual-inner {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--abyss);
  border: 1px dashed var(--border-subtle);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
.feature-visual-inner span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── SECTION DIVIDER ─── */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
}
.divider-line {
  width: 100%;
  max-width: 80px;
  height: 1px;
  background: var(--border-dim);
}

/* ─── FINAL CTA ─── */
.final-cta {
  text-align: center;
  padding: 120px 24px;
  background: var(--void);
  border-top: 1px solid var(--border-dim);
}
.final-cta h2 {
  font-family: var(--font);
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  color: var(--text-primary);
}
.final-cta p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 460px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

/* ─── FOOTER ─── */
footer {
  background: var(--void);
  border-top: 1px solid var(--border-dim);
  padding: 64px 24px 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .nav-logo {
  color: var(--text-primary);
  margin-bottom: 12px;
  font-weight: 700;
  padding-left: 0;
}
.footer-brand p {
  font-size: 0.82rem;
  max-width: 240px;
  line-height: 1.5;
  color: var(--text-muted);
}
.footer-col h4 {
  font-family: var(--font);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  border-top: 1px solid var(--border-dim);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-bottom p { font-size: 0.75rem; color: var(--text-muted); }
.footer-socials { display: flex; gap: 4px; }
.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--text-muted);
  transition: color 0.15s;
}
.footer-socials a:hover { color: var(--text-primary); }
.footer-socials svg { width: 16px; height: 16px; }

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

.power-card.reveal.visible { transition: background 0.2s, border-color 0.15s, transform 0.15s; }
.power-card.reveal.visible:hover { background: var(--abyss); border-color: var(--border-subtle); transform: translateY(-2px); }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  nav { top: 0; padding: 0; }
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .mobile-toggle { display: flex; }
  .powers-grid { grid-template-columns: 1fr 1fr; }
  .feature-row { grid-template-columns: 1fr; gap: 40px; }
  .feature-row.reverse .feature-text { order: 1; }
  .feature-row.reverse .feature-visual { order: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hero { padding: 130px 20px 60px; }
  .hero h1 { font-size: clamp(1.8rem, 9vw, 2.6rem); }
  .hero-ctas { flex-direction: column; }
  .hero-ctas a, .hero-ctas button { width: 100%; justify-content: center; }
  .powers-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .section { padding: 80px 20px; }
  .feature-row { gap: 32px; margin-bottom: 64px; }
  .feature-visual { padding: 24px; min-height: 240px; }
}
