/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Warm palette with stone undertones */
  --bg-primary: #0c0a09;
  --bg-secondary: #1c1917;
  --bg-elevated: #292524;
  --bg-hover: #3f3a36;

  /* Warm-tinted text (not pure gray) */
  --text-primary: #faf8f6;
  --text-secondary: #d4cfc9;
  --text-muted: #9c958e;

  /* Coral/orange as primary accent (60% of color) */
  --accent: #f97316;
  --accent-hover: #fb923c;
  --accent-light: #fed7aa;
  --accent-muted: rgba(249, 115, 22, 0.15);
  --accent-glow: rgba(249, 115, 22, 0.4);

  /* Teal as secondary accent (30% of color) */
  --secondary: #14b8a6;
  --secondary-hover: #2dd4bf;
  --secondary-light: #99f6e4;
  --secondary-muted: rgba(20, 184, 166, 0.15);
  --secondary-glow: rgba(20, 184, 166, 0.3);

  /* Semantic colors */
  --success: #22c55e;
  --success-muted: rgba(34, 197, 94, 0.15);
  --error: #ef4444;
  --error-muted: rgba(239, 68, 68, 0.15);
  --warning: #f59e0b;
  --warning-muted: rgba(245, 158, 11, 0.15);
  --info: #3b82f6;
  --info-muted: rgba(59, 130, 246, 0.15);

  /* Warm borders (tinted, not pure gray) */
  --border: #4a443f;
  --border-subtle: #2e2a27;

  /* Distinctive fonts */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  /* Fluid spacing */
  --space-xs: clamp(0.5rem, 1vw, 0.75rem);
  --space-sm: clamp(0.75rem, 2vw, 1rem);
  --space-md: clamp(1rem, 3vw, 1.5rem);
  --space-lg: clamp(1.5rem, 4vw, 2.5rem);
  --space-xl: clamp(2.5rem, 6vw, 4rem);
  --space-2xl: clamp(4rem, 10vw, 8rem);
}

html {
  scroll-behavior: smooth;
}

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

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

section {
  padding: var(--space-2xl) 0;
  position: relative;
  contain: layout style;
}

/* Typography - Dramatic scale with Space Grotesk display */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 700;
}

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

h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}

h4 {
  font-size: 1.125rem;
  margin-bottom: var(--space-xs);
}

p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease-out;
}

a:hover {
  color: var(--accent-hover);
}

/* Buttons - Playful with micro-interactions */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent);
  color: #0c0a09;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #0c0a09;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--text-primary);
  transform: translateY(-2px);
}

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

.btn-ghost:hover {
  background: var(--bg-elevated);
  border-color: var(--secondary);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Teal variant button */
.btn-teal {
  background: var(--secondary);
  color: #0c0a09;
  box-shadow: 0 4px 20px var(--secondary-glow);
}

.btn-teal:hover {
  background: var(--secondary-hover);
  color: #0c0a09;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px var(--secondary-glow);
}

.btn-teal:active {
  transform: translateY(0) scale(0.98);
}

/* Navigation - Clean and confident */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(12, 10, 9, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.logo-link {
  display: flex;
  align-items: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-link:hover {
  transform: scale(1.05);
}

.logo-svg {
  display: block;
  height: auto;
}

.footer-logo {
  margin-bottom: var(--space-sm);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s ease-out;
}

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

.nav-links .btn {
  padding: 0.625rem 1.25rem;
}

/* Hero Section - DRAMATIC and playful */
.hero {
  padding-top: 10rem;
  padding-bottom: var(--space-2xl);
  position: relative;
  overflow: hidden;
}

/* Animated gradient background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 0%, var(--accent-muted), transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 20%, var(--secondary-muted), transparent 50%);
  /* Removed infinite animation - static gradient is performant */
  opacity: 0.8;
}

/* Floating decorative shapes */
.hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  right: -100px;
  top: 100px;
  background: radial-gradient(circle, var(--accent-muted) 0%, transparent 70%);
  border-radius: 50%;
  /* Removed infinite float animation - static element is performant */
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin-bottom: var(--space-md);
  max-width: 14ch;
  /* Staggered entrance animation */
  animation: slide-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero h1 span {
  color: var(--accent);
  display: inline-block;
  animation: pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both;
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-subhead {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  max-width: 540px;
  color: var(--text-secondary);
  line-height: 1.7;
  animation: slide-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.hero-cta {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-lg);
  animation: slide-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

/* Problem Section - Bold statement */
.problem {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

/* Diagonal accent line */
.problem::before {
  content: '';
  position: absolute;
  width: 120%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--secondary), transparent);
  top: 0;
  left: -10%;
  transform: skewY(-2deg);
}

.problem .container {
  text-align: center;
  position: relative;
  z-index: 1;
}

.problem h2 {
  margin-bottom: var(--space-md);
}

.problem p {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.1875rem;
  line-height: 1.8;
}

/* Pillars - Playful card hover effects */
.pillars {
  background: var(--bg-primary);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.pillar {
  padding: var(--space-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

/* Animated gradient border on hover */
.pillar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1.25rem;
  padding: 2px;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.pillar:hover::before {
  opacity: 1;
}

.pillar:hover {
  transform: translateY(-8px) scale(1.02);
  background: var(--bg-elevated);
}

/* Staggered entrance for pillars */
.pillar:nth-child(1) { animation: slide-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both; }
.pillar:nth-child(2) { animation: slide-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both; }
.pillar:nth-child(3) { animation: slide-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both; }

.pillar-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-muted);
  border-radius: 1rem;
  margin-bottom: var(--space-md);
  color: var(--accent);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.3s ease-out;
}

/* Alternate pillar icons between coral and teal */
.pillar:nth-child(2) .pillar-icon {
  background: var(--secondary-muted);
  color: var(--secondary);
}

.pillar:hover .pillar-icon {
  transform: scale(1.1) rotate(-5deg);
}

.pillar h3 {
  color: var(--text-primary);
}

.pillar p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Code Section - Terminal with personality */
.code-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

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

.code-block {
  max-width: 760px;
  margin: 0 auto;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow:
    0 4px 6px rgba(0,0,0,0.1),
    0 20px 40px rgba(0,0,0,0.2);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease-out;
}

.code-block:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow:
    0 8px 12px rgba(0,0,0,0.15),
    0 30px 60px rgba(0,0,0,0.25);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-dot:nth-child(1) { background: #ef4444; }
.code-dot:nth-child(2) { background: #eab308; }
.code-dot:nth-child(3) { background: #22c55e; }

.code-filename {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.code-block pre {
  padding: var(--space-lg);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.8;
}

.code-block code {
  color: var(--text-secondary);
}

.code-comment { color: var(--text-muted); }
.code-keyword { color: #c084fc; }
.code-function { color: var(--secondary); }
.code-string { color: var(--accent); }
.code-property { color: #fbbf24; }

/* Features - Asymmetric grid with varied sizes */
.features {
  background: var(--bg-primary);
  position: relative;
}

/* Decorative corner accent */
.features::before {
  content: '';
  position: absolute;
  top: var(--space-xl);
  right: var(--space-xl);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--secondary-muted) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.features h2 {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}

.feature {
  padding: var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

/* Subtle left accent that appears on hover - alternating colors */
.feature::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transform: scaleY(0);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

/* Alternate features between coral and teal accents */
.feature:nth-child(2)::before,
.feature:nth-child(4)::before,
.feature:nth-child(6)::before,
.feature:nth-child(8)::before {
  background: var(--secondary);
}

.feature:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

.feature:hover {
  background: var(--bg-elevated);
  transform: translateX(4px);
}

.feature h4 {
  color: var(--text-primary);
  font-family: var(--font-display);
}

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

/* Use Cases - Bold left-aligned cards */
.use-cases {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.use-cases h2 {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.use-case {
  padding: var(--space-lg);
  background: var(--bg-elevated);
  border-radius: 1rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease-out, background-color 0.3s ease-out;
}

/* Accent bar - alternating colors for visual rhythm */
.use-case::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-hover));
}

/* Odd use cases get teal accent */
.use-case:nth-child(2)::before,
.use-case:nth-child(4)::before {
  background: linear-gradient(180deg, var(--secondary), var(--secondary-hover));
}

.use-case:hover {
  background: var(--bg-hover);
  transform: translateX(8px);
}

.use-case h4 {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.use-case p {
  font-size: 1rem;
  margin-top: var(--space-xs);
}

/* Pricing - Dramatic with highlighted popular plan */
.pricing {
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

/* Background decoration */
.pricing::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-muted) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0.5;
}

.pricing h2 {
  text-align: center;
  margin-bottom: var(--space-xl);
  position: relative;
  z-index: 1;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.pricing-card {
  position: relative;
  padding: var(--space-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pricing-card:hover {
  transform: translateY(-8px);
}

/* Popular card - Dramatic standout */
.pricing-card.popular {
  border: 2px solid var(--accent);
  background: linear-gradient(180deg, var(--accent-muted) 0%, var(--bg-secondary) 40%);
  transform: scale(1.05);
  z-index: 2;
}

.pricing-card.popular:hover {
  transform: scale(1.05) translateY(-8px);
}

.popular-badge {
  position: absolute;
  top: -0.875rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.375rem 1.25rem;
  background: var(--accent);
  color: #0c0a09;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.pricing-card h3 {
  font-size: 1.375rem;
  margin-bottom: var(--space-xs);
}

.price {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 3.5rem);
  font-weight: 700;
  margin-bottom: var(--space-md);
  line-height: 1;
  letter-spacing: -0.02em;
}

.price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-card ul {
  list-style: none;
  margin-bottom: var(--space-lg);
  flex-grow: 1;
}

.pricing-card li {
  padding: 0.625rem 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pricing-card li::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Scale tier gets teal bullets */
.pricing-card:last-child li::before {
  background: var(--secondary);
}

.pricing-card .btn {
  width: 100%;
}

/* Final CTA - Big and bold */
.final-cta {
  text-align: center;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

/* Animated gradient background */
.final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 50% at 50% 100%, var(--accent-muted), transparent 60%);
  /* Removed infinite animation - static gradient is performant */
  opacity: 0.6;
}

.final-cta .container {
  position: relative;
  z-index: 1;
}

.final-cta h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--space-lg);
}

.final-cta .hero-cta {
  justify-content: center;
  animation: none;
}

.contact {
  margin-top: var(--space-lg);
  font-size: 0.9375rem;
}

/* Footer - Clean with personality */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-xl) 0 var(--space-lg);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-brand p {
  margin-top: var(--space-xs);
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: var(--space-xl);
}

.footer-column h5 {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.footer-column a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: var(--space-xs);
  transition: color 0.2s ease-out, transform 0.2s ease-out;
}

.footer-column a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
}

.footer-bottom p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Modal - Refined with playful touches */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 9, 0.9);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: var(--space-lg);
  max-width: 440px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modal-enter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-enter {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: var(--bg-elevated);
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: transform 0.2s ease-out, background-color 0.2s ease-out, color 0.2s ease-out;
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: scale(1.1);
}

.modal-content h2 {
  font-family: var(--font-display);
  margin-bottom: var(--space-xs);
}

/* Modal Header with Plan Badge */
.modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--space-xs);
}

.modal-header h2 {
  margin-bottom: 0;
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.875rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.plan-badge-pro {
  background: var(--accent);
  color: #0c0a09;
}

.plan-badge-scale {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
  color: #0c0a09;
}

.modal-content > p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

/* Form - Refined inputs */
.form-group {
  margin-bottom: var(--space-sm);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-xs);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group .optional {
  color: var(--text-muted);
  font-weight: 400;
}

.form-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-family: var(--font-body);
  background: var(--bg-primary);
  border: 2px solid var(--border-subtle);
  border-radius: 0.75rem;
  color: var(--text-primary);
  transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-muted);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.btn-full {
  width: 100%;
  margin-top: var(--space-xs);
}

.error-message {
  padding: 0.875rem;
  margin-bottom: var(--space-sm);
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 0.75rem;
  color: #fca5a5;
  font-size: 0.875rem;
}

.spinner {
  display: inline-block;
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 0.5rem;
}

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

/* Success State */
.success-icon {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-sm);
  color: var(--success);
  animation: success-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes success-pop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

#signup-success h2 {
  text-align: center;
}

#signup-success > p {
  text-align: center;
}

.api-key-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 0.75rem;
  margin: var(--space-md) 0;
}

.api-key-box code {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  word-break: break-all;
  color: var(--accent);
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 0.875rem;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              color 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.copy-btn:hover {
  background: var(--bg-hover);
  border-color: var(--secondary);
  color: var(--text-primary);
  transform: scale(1.05);
}

.next-steps {
  text-align: center;
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .pillars-grid,
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  section {
    padding: var(--space-xl) 0;
  }

  .nav-links a:not(.btn) {
    display: none;
  }

  .hero {
    padding-top: 8rem;
    padding-bottom: var(--space-xl);
  }

  .hero h1 {
    font-size: clamp(2.5rem, 12vw, 3.5rem);
  }

  .hero-subhead {
    font-size: 1.0625rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    max-width: 320px;
  }

  .pillars-grid,
  .features-grid,
  .use-cases-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .pricing-card.popular {
    transform: none;
  }

  .pricing-card.popular:hover {
    transform: translateY(-8px);
  }

  .footer-content {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .footer-links {
    flex-direction: column;
    gap: var(--space-lg);
  }
}

/* ===========================================
   PROFESSIONAL DELIGHT - Subtle Micro-interactions
   =========================================== */

/* Scroll-triggered reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Staggered children animation */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }
.reveal-stagger.visible > *:nth-child(7) { transition-delay: 0.35s; }
.reveal-stagger.visible > *:nth-child(8) { transition-delay: 0.4s; }

.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Code block copy button */
.code-block-wrapper {
  position: relative;
}

.copy-code-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.5rem 0.875rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease-out,
              background-color 0.2s ease-out,
              color 0.2s ease-out,
              transform 0.2s ease-out;
  z-index: 10;
}

.code-block:hover .copy-code-btn {
  opacity: 1;
}

.copy-code-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.copy-code-btn:active {
  transform: scale(0.95);
}

.copy-code-btn.copied {
  background: var(--success);
  color: #0c0a09;
  border-color: var(--success);
}

/* Smooth focus states for accessibility */
.btn:focus-visible,
.copy-code-btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Subtle link underline animation */
.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:not(.btn) {
  position: relative;
}

.nav-links a:not(.btn):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Pricing card selection feedback */
.pricing-card:active {
  transform: scale(0.98);
}

.pricing-card.popular:active {
  transform: scale(1.03);
}

/* Feature card subtle glow on hover */
.feature:hover {
  box-shadow: 0 0 0 1px var(--accent-muted);
}

/* Smooth scroll padding for anchor links */
html {
  scroll-padding-top: 6rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .reveal-stagger > * {
    opacity: 1;
    transform: none;
  }
}
