/* Agentique v3 — Global Styles & Dark Theme */
/* Premium dark mode SaaS design inspired by Framer, Stripe, Linear */

/* ===== RESET & FOUNDATION ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Base Colors — Dark theme, no white sections */
  --color-bg-primary: #0a0a0a;
  --color-bg-secondary: #0a0a0a;
  --color-bg-tertiary: #27272a;
  
  /* Text Colors */
  --color-text-primary: #ffffff;
  --color-text-secondary: #a1a1aa;
  --color-text-muted: #71717a;
  
  /* Accent Colors — Purple gradient */
  --color-accent-start: #a855f7;
  --color-accent-end: #ec4899;
  --color-gradient: linear-gradient(135deg, var(--color-accent-start), var(--color-accent-end));
  
  /* Status Colors */
  --color-positive: #10b981;
  --color-warning: #f59e0b;
  --color-negative: #ef4444;
  
  /* Border & Elevation */
  --border-color: #27272a;
  --border-color-hover: #3f3f46;
  
  /* Spacing — 8px grid */
  --space-xs: 0.5rem;    /* 8px */
  --space-sm: 1rem;      /* 16px */
  --space-md: 1.5rem;    /* 24px */
  --space-lg: 2rem;      /* 32px */
  --space-xl: 3rem;      /* 48px */
  --space-2xl: 4rem;     /* 64px */
  --space-3xl: 6rem;     /* 96px */
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Radius */
  --radius-sm: 0.5rem;   /* 8px */
  --radius-md: 0.75rem;  /* 12px */
  --radius-lg: 1rem;     /* 16px */
  --radius-full: 9999px;
  
  /* Container */
  --container-max: 1200px;
  --container-padding: var(--space-lg);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  color-scheme: dark;
}

/* ===== FOCUS STATES ===== */
:focus-visible {
  outline: 2px solid #a855f7;
  outline-offset: 2px;
}

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #a855f7;
  outline-offset: 2px;
}

/* ===== TOUCH ===== */
button, a, .card-hover, .tab-button, .accordion-header {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(168, 85, 247, 0.1);
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--color-text-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: var(--space-md);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--space-sm);
}

h4 {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

p {
  color: var(--color-text-secondary);
  line-height: 1.7;
  font-size: 1.0625rem;
  margin-bottom: var(--space-md);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

/* ===== LAYOUT ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section {
  padding: var(--space-3xl) 0;
  position: relative;
}

/* Seamless section transitions — handled by .section-blend dividers inserted between sections via JS */

.section-title {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
}

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(39, 39, 42, 0.5);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-sm) var(--container-padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  background: var(--color-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 240px;
  width: auto;
  display: block;
  filter: invert(1);
  margin: -100px 0;
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
  list-style: none;
}

.nav-links a {
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--color-text-primary);
}

.nav-cta {
  display: none;
}

/* Hamburger menu for mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
  background: none;
  border: none;
  padding: 0;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text-primary);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-semibold);
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-gradient);
  color: white;
  box-shadow: 0 4px 24px rgba(168, 85, 247, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 32px rgba(168, 85, 247, 0.4);
  transform: translateY(-2px);
}

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

.btn-secondary:hover {
  border-color: var(--border-color-hover);
  background: rgba(255, 255, 255, 0.05);
}

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

.btn-ghost:hover {
  color: var(--color-text-primary);
}

/* ===== CARDS ===== */
.card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  border-color: var(--border-color-hover);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transform: translateY(-4px);
}

.card h3 {
  margin-bottom: var(--space-sm);
}

.card p {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
}

/* ===== GRID LAYOUTS ===== */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

/* ===== COMPARISON MATRIX ===== */
.comparison-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}

.comparison-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.comparison-card.highlighted {
  border-color: var(--color-accent-start);
  box-shadow: 0 0 32px rgba(168, 85, 247, 0.15);
  transform: scale(1.02);
  padding: var(--space-xl) var(--space-lg);
}

.comparison-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-gradient);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.comparison-card h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  text-align: center;
}

.comparison-price {
  text-align: center;
  font-size: 1.125rem;
  color: var(--color-accent-start);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-color);
}

.comparison-list {
  list-style: none;
  margin-bottom: var(--space-lg);
}

.comparison-list li {
  padding: 0.5rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.comparison-list li::before {
  content: '';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.comparison-list.positive li::before {
  content: '✅';
}

.comparison-list.negative li::before {
  content: '❌';
}

.comparison-bottom {
  text-align: center;
  font-style: italic;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .comparison-container {
    grid-template-columns: 1fr;
  }
  
  .comparison-card.highlighted {
    transform: scale(1);
    padding: var(--space-lg);
  }
}

/* ===== ACCORDION HEADER BUTTON RESET ===== */
button.accordion-header {
  width: 100%;
  border: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  text-align: left;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-2xl) 0;
  margin-top: 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-section h4 {
  margin-bottom: var(--space-md);
  font-size: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-xs);
}

.footer-links a {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
}

.footer-links a:hover {
  color: var(--color-text-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-color);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* ===== NAV TOGGLE BETWEEN PRO AND ATELIER ===== */
.nav-toggle-theme {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 99px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
}

/* Pro version (on Pro pages) - Switch to Atelier */
.nav-toggle-theme.to-atelier {
  color: #E67E50 !important;
  font-weight: 600;
  padding: 6px 16px;
  border: 1px solid #E67E50;
  border-radius: 20px;
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.nav-toggle-theme.to-atelier:hover {
  background: #E67E50;
  color: #fff !important;
  transform: translateX(2px);
}

/* Atelier version (on Atelier pages) - defined in atelier.css */

/* ===== UTILITIES ===== */
.text-center {
  text-align: center;
}

.text-gradient {
  background: var(--color-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  :root {
    --container-padding: var(--space-md);
    --space-3xl: 4rem;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--color-bg-primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.3s ease;
    border-left: 1px solid var(--border-color);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
  }
  
  .section {
    padding: var(--space-2xl) 0;
  }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) {
  .nav-cta {
    display: block;
  }
}
