/* ============================================================
   SHARED STYLES — MotionLab Landing Pages
   ============================================================ */

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

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-alt: #0e0e16;
  --border: rgba(255,255,255,0.08);
  --text: #f0f0f0;
  --text-muted: #8a8a9a;
  --accent: #5eaaff;
  --success: #50fa7b;
  --warning: #f1fa8c;
  --radius: 12px;

  /* Glass Station tokens — mirror the panel */
  --gs-accent-h: 212;
  --gs-dim-15: hsl(var(--gs-accent-h) 100% 68% / 0.15);
  --gs-dim-22: hsl(var(--gs-accent-h) 100% 68% / 0.22);
  --gs-dim-35: hsl(var(--gs-accent-h) 100% 68% / 0.35);
  --gs-card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  --gs-card-bg-hover: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018));
  --gs-card-border: rgba(255, 255, 255, 0.08);
  --gs-card-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);

  /* Home v2 redesign tokens — used by index.html / home.css */
  --bg-deep: #07070c;
  --bg-elev-2: #0c0c14;
  --bg-elev-3: #12121e;
  --card: #14141e;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);
  --ink-2: #b8b8c8;
  --ink-3: #6a6a7a;
  --ml-accent-h: var(--gs-accent-h);
  --ml-accent-s: 100%;
  --ml-glow: 1;
}

[data-theme="light"] {
  --bg: #f5f5f7;
  --bg-card: #ffffff;
  --bg-alt: #eaeaef;
  --border: rgba(0,0,0,0.1);
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --accent: #0071e3;
  --success: #28a745;

  --gs-accent-h: 210;
  --gs-dim-15: hsl(var(--gs-accent-h) 80% 48% / 0.10);
  --gs-dim-22: hsl(var(--gs-accent-h) 80% 48% / 0.16);
  --gs-dim-35: hsl(var(--gs-accent-h) 80% 48% / 0.28);
  --gs-card-bg: #ffffff;
  --gs-card-bg-hover: #ffffff;
  --gs-card-border: rgba(0, 0, 0, 0.08);
  --gs-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);

  /* Home v2 redesign tokens — light parity */
  --bg-deep: #ffffff;
  --bg-elev-2: #f5f5f7;
  --bg-elev-3: #eaeaef;
  --card: #ffffff;
  --line: rgba(0, 0, 0, 0.06);
  --line-strong: rgba(0, 0, 0, 0.12);
  --ink-2: #4a4a52;
  --ink-3: #6e6e73;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  color: var(--text);
}

.nav-logo img {
  width: 28px;
  height: 28px;
}
.nav-logo .logo-dark { display: none; }

.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a.btn-primary { color: #fff; }
.nav-links a:hover { color: var(--text); }

/* HAMBURGER */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text);
}
.nav-hamburger svg { width: 24px; height: 24px; }

.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 200;
  background: rgba(10,10,15,0.95);
  backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-decoration: none;
  transition: color .15s ease;
}
.mobile-menu a:hover {
  color: var(--text);
  text-decoration: none;
}
.mobile-menu-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
}
.mobile-menu-close svg { width: 28px; height: 28px; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(180deg, hsl(var(--gs-accent-h) 80% 58%), hsl(var(--gs-accent-h) 80% 42%));
  border: 1px solid hsl(var(--gs-accent-h) 80% 50%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 8px 20px var(--gs-dim-35);
}
.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 12px 28px var(--gs-dim-35);
}
.btn-primary:active {
  transform: translateY(0);
  filter: brightness(0.96);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: var(--gs-dim-15);
  border-color: var(--gs-dim-35);
  color: var(--text);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--gs-dim-15);
  border-color: var(--gs-dim-35);
  color: var(--text);
}

.btn-large {
  padding: 14px 36px;
  font-size: 16px;
  border-radius: 10px;
}

.btn-loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading .btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* THEME TOGGLE */
.theme-toggle {
  background: var(--gs-card-bg);
  border: 1px solid var(--gs-card-border);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  box-shadow: var(--gs-card-shadow);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--gs-dim-15);
  border-color: var(--gs-dim-35);
  color: hsl(var(--gs-accent-h) 80% 82%);
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }

[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

/* PAGE HEADER — used by releases, pricing, etc. */
.page-header {
  padding: 140px 24px 60px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.page-header p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* SECTION HEADER */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.section-header p {
  color: var(--text-muted);
  font-size: 16px;
}

/* CTA SECTION */
.cta-section {
  text-align: center;
  padding: 120px 24px;
}

.cta-section h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}

.cta-section p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 32px;
}

/* FAQ — used by pricing page */
.faq-section {
  padding: 80px 24px;
}

.faq-section h2 {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 40px;
}

.faq-list {
  max-width: 640px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  padding: 20px 32px 20px 0;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.faq-item h3::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gs-dim-15);
  border: 1px solid var(--gs-dim-35);
  color: hsl(var(--gs-accent-h) 80% 82%);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, background 0.2s, border-color 0.2s;
}

.faq-item h3:hover::after {
  background: var(--gs-dim-22);
  border-color: hsl(var(--gs-accent-h) 80% 58%);
}

.faq-item.open h3::after {
  content: '\2212';
  transform: translateY(-50%) rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 200px;
  padding-bottom: 20px;
}

.faq-item p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.faq-item a {
  color: hsl(var(--gs-accent-h) 80% 82%);
  text-decoration: none;
}

.faq-item a:hover { text-decoration: underline; }

/* SCROLL REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* LEGAL PAGES (privacy, terms) */
.legal { line-height: 1.7; }
.legal body { background: var(--bg-deep); }

.legal-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 32px 96px;
  background: var(--bg-deep);
}

.legal-body h2 {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text);
  margin-top: 48px;
  margin-bottom: 14px;
}

.legal-body h2:first-child { margin-top: 0; }

.legal-body p,
.legal-body li {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.7;
  margin-bottom: 14px;
}

.legal-body ul {
  padding-left: 22px;
  margin-bottom: 14px;
}

.legal-body li { margin-bottom: 8px; }

.legal-body strong {
  color: var(--text);
  font-weight: 600;
}

.legal-body a {
  color: hsl(var(--ml-accent-h, 212) var(--ml-accent-s, 100%) 60%);
  text-decoration: none;
}
.legal-body a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .legal-body { padding: 48px 16px 72px; }
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

footer a { color: var(--text-muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* LIGHT MODE OVERRIDES */
[data-theme="light"] nav {
  background: rgba(245,245,247,0.85);
}
[data-theme="light"] .mobile-menu {
  background: rgba(245,245,247,0.95);
}
[data-theme="light"] .nav-logo .logo-dark {
  display: block;
}
[data-theme="light"] .nav-logo .logo-light {
  display: none;
}

/* IMAGE ZOOM LIGHTBOX */
.img-zoomable { cursor: zoom-in; }

.img-zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  cursor: zoom-out;
  transition: opacity 0.2s ease;
}

.img-zoom-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.img-zoom-overlay img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  border: 1px solid var(--gs-card-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 30px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.96);
  transition: transform 0.2s ease;
}

.img-zoom-overlay.open img {
  transform: scale(1);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  nav { padding: 12px 16px; }
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .page-header { padding: 120px 16px 40px; }
  .img-zoom-overlay { padding: 16px; }
}
