/* ========================================
   PALETTE MARKETING SITE
   Design tokens from app.css
   ======================================== */

:root {
  /* Core palette — from app CSS */
  --bg: #0f172a;
  --bg-card: #1e293b;
  --border: #334155;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --green: #10b981;
  --red: #ef4444;
  --amber: #f59e0b;
  --purple: #8b5cf6;

  /* Layout */
  --container: 1120px;
  --section-pad: 6rem 0;
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.25s ease;
}

/* ========================================
   RESET & BASE
   ======================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

img { max-width: 100%; display: block; }
a { color: var(--accent-hover); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--text); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center { text-align: center; }

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); letter-spacing: -0.015em; }
h3 { font-size: 1.15rem; }
h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }

.section-heading {
  text-align: center;
  margin-bottom: 1rem;
}

.section-subheading {
  text-align: center;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
}

.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.85rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1.05rem; }

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

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--text-dim);
  color: var(--text);
}

/* ========================================
   HEADER / NAV
   ======================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

/* Wordmark */
.wordmark {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.15rem;
  letter-spacing: -0.01em;
}
.wordmark:hover { color: var(--text); }
.wordmark-icon {
  color: var(--accent);
  font-size: 0.7em;
  margin-right: 0.25rem;
  display: inline-block;
  transform: rotate(0deg);
  transition: transform 0.4s ease;
}
.wordmark:hover .wordmark-icon { transform: rotate(90deg); }
.wordmark-accent { color: var(--accent); }
.wordmark-sm { font-size: 1.15rem; }

/* Nav list */
.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}
.nav-list a {
  padding: 0.45rem 0.85rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all var(--transition);
}
.nav-list a:hover { color: var(--text); background: rgba(255,255,255,0.05); }

/* Hamburger */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ========================================
   HERO
   ======================================== */

.hero {
  padding: 10rem 0 6rem;
  position: relative;
  overflow: hidden;
}

/* Subtle gradient glow behind hero */
.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
  max-width: 520px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Dashboard mock in hero */
.hero-dashboard-mock {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.mock-header {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.mock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}
.mock-dot:first-child { background: var(--red); }
.mock-dot:nth-child(2) { background: var(--amber); }
.mock-dot:last-child { background: var(--green); }

.mock-body { padding: 1.5rem; }

.mock-stat {
  display: inline-flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 0 0.5rem 1rem 0;
}
.mock-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.mock-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.mock-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 80px;
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.mock-bar {
  flex: 1;
  height: var(--h);
  background: var(--border);
  border-radius: 4px 4px 0 0;
  transition: height 0.6s ease;
}
.mock-bar.accent { background: var(--accent); }

/* ========================================
   SECTIONS
   ======================================== */

.section { padding: var(--section-pad); }
.section-alt { background: var(--bg-card); }

/* ========================================
   PROBLEM / SOLUTION
   ======================================== */

.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.problem-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: border-color var(--transition);
}
.problem-card:hover { border-color: var(--text-dim); }
.problem-card .icon {
  font-size: 1.3rem;
  color: var(--amber);
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.problem-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.solution-block {
  margin-top: 2.5rem;
  text-align: center;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
.solution-block p {
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.75;
}

/* ========================================
   FEATURES GRID
   ======================================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  transition: border-color var(--transition), transform var(--transition);
}
.feature-card:hover {
  border-color: var(--text-dim);
  transform: translateY(-2px);
}

.feature-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99,102,241,0.1);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.feature-icon .icon {
  font-size: 1.15rem;
  color: var(--accent-hover);
}

.feature-card h3 { margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

/* ========================================
   VOICE TRACKS SPOTLIGHT
   ======================================== */

.spotlight-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.spotlight-content h2 { margin-bottom: 1.25rem; }
.spotlight-content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}
.spotlight-content strong { color: var(--text); }

.spotlight-visual {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.workspace-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  transition: border-color var(--transition);
}
.workspace-card.active { border-color: var(--accent); }
.workspace-card.coming-soon { opacity: 0.55; }

.workspace-card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99,102,241,0.1);
  border-radius: var(--radius);
}
.workspace-card-icon .icon { font-size: 1.1rem; color: var(--accent-hover); }
.workspace-card.coming-soon .workspace-card-icon { background: rgba(100,116,139,0.15); }
.workspace-card.coming-soon .workspace-card-icon .icon { color: var(--text-dim); }

.workspace-card-info { display: flex; flex-direction: column; gap: 0.2rem; }
.workspace-card-name { font-weight: 600; font-size: 0.95rem; }
.workspace-card-status { font-size: 0.7rem; }

/* ========================================
   HOW IT WORKS
   ======================================== */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.step-card { text-align: center; }

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(99,102,241,0.15);
  color: var(--accent-hover);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.step-card h3 { margin-bottom: 0.75rem; }
.step-card p { color: var(--text-muted); font-size: 0.95rem; max-width: 320px; margin: 0 auto; }

/* ========================================
   DELEGATION
   ======================================== */

.delegation-layout {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  max-width: 780px;
  margin: 0 auto;
}

.delegation-icon-wrap {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99,102,241,0.1);
  border-radius: 50%;
}
.delegation-icon-wrap .icon {
  font-size: 1.5rem;
  color: var(--accent-hover);
}

.delegation-content h2 { margin-bottom: 0.75rem; font-size: clamp(1.3rem, 2.5vw, 1.6rem); }
.delegation-content p { color: var(--text-muted); line-height: 1.7; }

/* ========================================
   ROADMAP / COMING SOON
   ======================================== */

.roadmap-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* ========================================
   BADGES
   ======================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-green { background: rgba(16,185,129,0.15); color: var(--green); }
.badge-muted { background: rgba(100,116,139,0.15); color: var(--text-dim); }
.badge-accent { background: rgba(99,102,241,0.15); color: var(--accent-hover); }
.badge-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* ========================================
   CTA SECTION
   ======================================== */

.section-cta {
  background: linear-gradient(180deg, var(--bg) 0%, rgba(99,102,241,0.08) 100%);
  padding: 5rem 0;
}

.section-cta h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 1rem;
}

.cta-subtext {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

.cta-btn {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

.cta-form-wrap {
  margin-top: 2.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2rem;
  background: var(--bg);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 3rem;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.footer-links {
  display: flex;
  gap: 3rem;
}

.footer-col h4 { margin-bottom: 0.75rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}
.footer-bottom p {
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* ========================================
   MOBILE NAV OVERLAY
   ======================================== */

.mobile-nav-open .main-navigation {
  display: flex;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .mobile-menu-toggle { display: flex; }

  .main-navigation {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2rem 1.5rem;
    z-index: 99;
  }

  .mobile-nav-open .main-navigation {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  .nav-list a {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
  }

  .hero { padding: 8rem 0 4rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero-content { text-align: center; }
  .hero-tagline { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }

  .problem-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .spotlight-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .steps-grid { grid-template-columns: 1fr; gap: 1.5rem; }

  .delegation-layout { flex-direction: column; text-align: center; }

  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-links { flex-direction: column; gap: 2rem; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.8rem; }
  .hero { padding: 7rem 0 3rem; }
  .btn-lg { padding: 0.75rem 1.5rem; font-size: 0.95rem; }
}

/* ========================================
   ANIMATIONS (subtle)
   ======================================== */

@media (prefers-reduced-motion: no-preference) {
  .feature-card,
  .problem-card,
  .step-card,
  .workspace-card {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.5s ease forwards;
  }

  @keyframes fadeUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Stagger delays for grids */
  .feature-card:nth-child(1), .problem-card:nth-child(1), .step-card:nth-child(1), .workspace-card:nth-child(1) { animation-delay: 0.05s; }
  .feature-card:nth-child(2), .problem-card:nth-child(2), .step-card:nth-child(2), .workspace-card:nth-child(2) { animation-delay: 0.1s; }
  .feature-card:nth-child(3), .problem-card:nth-child(3), .step-card:nth-child(3), .workspace-card:nth-child(3) { animation-delay: 0.15s; }
  .feature-card:nth-child(4), .problem-card:nth-child(4), .workspace-card:nth-child(4) { animation-delay: 0.2s; }
  .feature-card:nth-child(5) { animation-delay: 0.25s; }
  .feature-card:nth-child(6) { animation-delay: 0.3s; }
  .feature-card:nth-child(7) { animation-delay: 0.35s; }
  .feature-card:nth-child(8) { animation-delay: 0.4s; }
}
