/* ===== GLOBAL THEME — LogicFlow ===== */
/* Shared dark indigo mesh background + glassmorphic pill navbar */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

a {
  -webkit-tap-highlight-color: transparent;
}

/* Offset for main content below fixed nav (nav uses top: 32px + pill height + breathing room). */
:root {
  --lf-nav-fixed-top: 32px;
  --lf-main-padding-top: calc(var(--lf-nav-fixed-top) + 6.25rem + 2rem);
  /* Match landing (index): system UI for copy, Playfair for display, JetBrains for mono. */
  --lf-font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
  --lf-font-display: 'Playfair Display', Georgia, serif;
  --lf-font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: #0d1222;
}

/* Light app pages use mesh + same body stack as landing marketing sections. */
body:has(> .bg-mesh) {
  font-family: var(--lf-font-body);
}

/* ── MESH GRADIENT BACKGROUND ── */
.bg-mesh {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.9;
  animation: drift 15s infinite alternate ease-in-out;
}

.blob-1 {
  width: 80vw;
  height: 80vh;
  background: #7dd3fc;
  top: -10vh;
  left: 10vw;
  animation-delay: 0s;
}

.blob-2 {
  width: 60vw;
  height: 60vw;
  background: #2563eb;
  top: -20vh;
  left: -20vw;
  animation-delay: -5s;
  animation-duration: 20s;
  opacity: 0.7;
}

.blob-3 {
  width: 70vw;
  height: 55vh;
  background: #4338ca;
  bottom: -15vh;
  right: -10vw;
  animation-delay: -10s;
  animation-duration: 22s;
}

.blob-4 {
  width: 40vw;
  height: 40vh;
  background: #ffffff;
  top: 30vh;
  left: 30vw;
  filter: blur(100px);
  opacity: 0.8;
  animation-duration: 18s;
}

@keyframes drift {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(2vw, 3vh) scale(1.05);
  }

  100% {
    transform: translate(-2vw, -2vh) scale(0.95);
  }
}

/* ── NAVBAR — glass pill aligned with landing (hero uses Playfair “LogicFlow”) ── */
nav {
  position: fixed;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: 85%;
  max-width: 1000px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50px;
  padding: 8px 8px 8px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 32px rgba(15, 15, 26, 0.06);
  font-family: var(--lf-font-body);
}

.nav-logo {
  font-family: var(--lf-font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: #0f0f1a;
  text-decoration: none;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: rgba(15, 15, 26, 0.82);
  text-decoration: none;
  font-family: var(--lf-font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.2s, opacity 0.2s;
}

.nav-links a:hover {
  color: #0f0f1a;
  opacity: 0.85;
}

.nav-links a.active {
  color: #1a56db;
  font-weight: 700;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-sign-out {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 15, 26, 0.15);
  background: rgba(255, 255, 255, 0.5);
  font-family: var(--lf-font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(15, 15, 26, 0.65);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.nav-sign-out:hover {
  background: rgba(15, 15, 26, 0.06);
  color: #0f0f1a;
}

.btn-enter {
  background: #111;
  color: #fff;
  text-decoration: none;
  font-family: var(--lf-font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 10px 22px;
  border-radius: 50px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.btn-enter:hover {
  background: #222;
  transform: scale(1.03);
}

/* ── Dropdown ── */
.dropdown {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.dropdown-content {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 100%;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  padding-top: 10px;
  z-index: 1000;
}

.dropdown-content.show {
  visibility: visible;
  opacity: 1;
}

.dropdown-menu {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  padding: 8px 0;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.nav-links .dropdown-menu a {
  padding: 10px 22px;
  color: rgba(15, 15, 26, 0.88);
  font-family: var(--lf-font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  display: block;
}

.nav-links .dropdown-menu a:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #000;
}

.nav-links .dropdown-menu a.active {
  color: #1a56db;
  font-weight: 700;
  background: rgba(26, 86, 219, 0.08);
}

#experimentDropdownBtn.active {
  color: #1a56db;
  font-weight: 700;
}

/* ── Page content area (shared padding for content below fixed nav) ── */
.page {
  position: relative;
  z-index: 10;
}

@media(max-width: 900px) {
  .nav-links {
    display: none;
  }
}