/* ============================================
   AI Automation Consulting Sites — Design System
   Forked from satellite-sites-7, stripped of Lido branding
   ============================================ */

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-50: #e0e7ff;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --green: #059669;
  --green-light: #ecfdf5;
  --navy: #0f172a;
  --navy-light: #1e293b;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); font-size: 1.0625rem; line-height: 1.7; color: var(--gray-800); background: var(--white); }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container--narrow { max-width: 800px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section--alt { background: var(--gray-50); }
.section--primary-light { background: var(--primary-light); }
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }

/* Typography */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; color: var(--gray-900); letter-spacing: -0.02em; }
h1 { font-size: 3.25rem; }
h2 { font-size: 2.25rem; margin-bottom: 1rem; }
h3 { font-size: 1.375rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.125rem; }
p + p { margin-top: 1rem; }
.subtitle { font-size: 1.25rem; color: var(--gray-500); line-height: 1.6; max-width: 640px; }
.section-header { margin-bottom: 3.5rem; }
.section-header .subtitle { margin-top: 0.75rem; }
.badge { display: inline-block; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--primary); background: var(--primary-light); padding: 0.25rem 0.75rem; border-radius: 100px; margin-bottom: 1rem; }

/* Grid */
.grid { display: grid; gap: 2rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---- NAV ---- */
.nav { padding: 0.875rem 0; background: var(--white); border-bottom: 1px solid var(--gray-200); position: sticky; top: 0; z-index: 100; }
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.nav-logo { font-size: 1.25rem; font-weight: 700; color: var(--gray-900); letter-spacing: -0.02em; white-space: nowrap; flex-shrink: 0; }
.nav-logo span { color: var(--primary); }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { color: var(--gray-600); font-size: 0.9375rem; font-weight: 500; transition: color 0.15s; }
.nav-links a:hover { color: var(--gray-900); }
.nav-toggle { display: none; background: none; border: none; color: var(--gray-700); cursor: pointer; padding: 0.5rem; }
.nav-toggle svg { width: 24px; height: 24px; }

/* ---- HERO ---- */
.hero { padding: 5rem 0 4rem; background: var(--white); }
.hero-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.hero h1 { color: var(--gray-900); margin-bottom: 1.25rem; }
.hero .subtitle { color: var(--gray-500); margin-bottom: 2.5rem; margin-left: auto; margin-right: auto; font-size: 1.1875rem; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.875rem 1.75rem; font-size: 1rem; font-weight: 600; font-family: var(--font);
  border: none; border-radius: var(--radius); cursor: pointer; transition: all 0.15s;
  text-decoration: none;
}
.btn--primary { background: var(--primary); color: var(--white); }
.btn--primary:hover { background: var(--primary-hover); color: var(--white); }
.btn--secondary { background: var(--white); color: var(--gray-800); border: 1px solid var(--gray-200); }
.btn--secondary:hover { border-color: var(--gray-300); background: var(--gray-50); color: var(--gray-800); }
.btn--ghost { background: transparent; color: var(--primary); padding: 0.875rem 0; }
.btn--ghost:hover { color: var(--primary-hover); }
.btn--small { padding: 0.5rem 1.25rem; font-size: 0.875rem; }
.btn--full { width: 100%; }

/* ---- HOW IT WORKS (Steps) ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; counter-reset: step; }
.step { text-align: center; position: relative; }
.step-number { width: 48px; height: 48px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; font-weight: 700; margin: 0 auto 1.25rem; }
.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--gray-500); font-size: 0.9375rem; line-height: 1.65; }
.step + .step::before {
  content: ''; position: absolute; top: 24px; left: -1.25rem; right: calc(100% + 1.25rem);
  height: 2px; background: var(--gray-200);
}

/* ---- FEATURE CARDS ---- */
.feature-card { padding: 2rem; border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--gray-200); transition: border-color 0.15s, box-shadow 0.15s; }
.feature-card:hover { border-color: var(--gray-300); box-shadow: var(--shadow-md); }
.feature-icon { width: 48px; height: 48px; border-radius: var(--radius); background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1.25rem; }
.feature-card h3 { margin-bottom: 0.75rem; }
.feature-card p { color: var(--gray-500); font-size: 0.9375rem; line-height: 1.65; }

/* ---- EDITORIAL / LONG-FORM ---- */
.editorial { max-width: 800px; margin: 0 auto; }
.editorial h2 { margin-bottom: 1.5rem; }
.editorial p { color: var(--gray-600); margin-bottom: 1.25rem; }
.editorial p:last-child { margin-bottom: 0; }
.editorial ul, .editorial ol { margin: 1rem 0; padding-left: 1.5rem; }
.editorial li { color: var(--gray-600); margin-bottom: 0.5rem; }

/* ---- ANSWER BOX ---- */
.answer-box { background: var(--primary-light); border-left: 3px solid var(--primary); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; border-radius: 0 var(--radius) var(--radius) 0; }
.answer-box p { color: var(--gray-700); font-size: 1.0625rem; line-height: 1.7; margin: 0; }

/* ---- FAQ ---- */
.faq-section { max-width: 800px; margin: 0 auto; }
.faq-section h2 { margin-bottom: 2rem; }
.faq-section details { border-bottom: 1px solid var(--gray-200); }
.faq-section details:first-of-type { border-top: 1px solid var(--gray-200); }
.faq-section summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 0; cursor: pointer; list-style: none; font-weight: 600; font-size: 1.0625rem;
  color: var(--gray-800); transition: color 0.15s;
}
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section summary:hover { color: var(--primary); }
.faq-section .faq-icon { flex-shrink: 0; width: 24px; height: 24px; position: relative; transition: transform 0.2s; }
.faq-section .faq-icon::before,
.faq-section .faq-icon::after {
  content: ''; position: absolute; background: var(--gray-400); border-radius: 2px; transition: transform 0.2s;
}
.faq-section .faq-icon::before { width: 14px; height: 2px; top: 11px; left: 5px; }
.faq-section .faq-icon::after { width: 2px; height: 14px; top: 5px; left: 11px; }
.faq-section details[open] .faq-icon::after { transform: rotate(90deg); opacity: 0; }
.faq-section .faq-answer { padding-bottom: 1.5rem; }
.faq-section .faq-answer p { color: var(--gray-600); font-size: 0.9375rem; line-height: 1.7; }

/* ---- CTA / EMAIL CAPTURE ---- */
.cta-section { padding: 5rem 0; background: var(--navy); text-align: center; }
.cta-section h2 { color: var(--white); margin-bottom: 0.75rem; }
.cta-section p { color: var(--gray-400); margin-bottom: 2rem; }
.capture-form { display: flex; gap: 0.75rem; max-width: 480px; margin: 0 auto; justify-content: center; }
.capture-form input[type="email"] {
  flex: 1; padding: 0.875rem 1rem; font-size: 1rem; font-family: var(--font);
  border: 1px solid rgba(255,255,255,0.3); border-radius: var(--radius);
  background: rgba(255,255,255,0.15); color: var(--white); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.capture-form input[type="email"]::placeholder { color: rgba(255,255,255,0.6); }
.capture-form input[type="email"]:focus { border-color: var(--white); background: rgba(255,255,255,0.2); box-shadow: 0 0 0 3px rgba(255,255,255,0.15); }
.capture-form .btn--primary { background: var(--white); color: var(--primary); font-weight: 700; }
.capture-form .btn--primary:hover { background: var(--gray-100); color: var(--primary-hover); }
.capture-note { margin-top: 0.75rem; font-size: 0.8125rem; color: var(--gray-500); }

/* ---- INTAKE FORM ---- */
.intake-form { max-width: 600px; margin: 0 auto; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-size: 0.9375rem; font-weight: 600; color: var(--gray-800); margin-bottom: 0.375rem; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 0.75rem 1rem; font-size: 1rem; font-family: var(--font);
  border: 1px solid var(--gray-300); border-radius: var(--radius); background: var(--white);
  color: var(--gray-800); outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group .radio-group,
.form-group .checkbox-group { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.25rem; }
.form-group .radio-group label,
.form-group .checkbox-group label { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; cursor: pointer; }
.form-group .radio-group input,
.form-group .checkbox-group input { width: auto; }
.form-success { display: none; text-align: center; padding: 3rem 2rem; }
.form-success h3 { color: var(--green); margin-bottom: 0.5rem; }
.form-success p { color: var(--gray-600); }

/* ---- COMPARISON TABLE (tools) ---- */
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.compare-table th { text-align: left; padding: 0.875rem 1rem; background: var(--gray-100); color: var(--gray-700); font-weight: 600; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.03em; border-bottom: 2px solid var(--gray-200); white-space: nowrap; }
.compare-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--gray-200); color: var(--gray-600); vertical-align: top; }
.compare-table tbody tr:hover { background: var(--gray-50); }

/* ---- LOGO BAR ---- */
.logo-bar { padding: 3rem 0; border-bottom: 1px solid var(--gray-200); }
.logo-bar p { text-align: center; font-size: 0.875rem; font-weight: 500; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1.5rem; }
.logo-bar .logos { display: flex; align-items: center; justify-content: center; gap: 3rem; flex-wrap: wrap; opacity: 0.5; }
.logo-bar .logos span { font-size: 1.125rem; font-weight: 600; color: var(--gray-500); }

/* ---- FOOTER ---- */
.footer { padding: 2rem 0; background: var(--navy); border-top: 1px solid rgba(255,255,255,0.06); }
.footer .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer p { font-size: 0.8125rem; color: var(--gray-500); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.8125rem; color: var(--gray-500); }
.footer-links a:hover { color: var(--gray-300); }

/* ---- PAGE HERO (subpages) ---- */
.page-hero { padding: 4rem 0 3rem; background: var(--gray-50); border-bottom: 1px solid var(--gray-200); }
.page-hero h1 { color: var(--gray-900); font-size: 2.75rem; margin-bottom: 1rem; max-width: 720px; }
.page-hero .subtitle { font-size: 1.125rem; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  h1 { font-size: 2.75rem; }
  h2 { font-size: 1.875rem; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step + .step::before { display: none; }
}

@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.625rem; }
  .page-hero h1 { font-size: 2rem; }
  .section { padding: 3.5rem 0; }
  .hero { padding: 3.5rem 0 3rem; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .step + .step::before { display: none; }
  .capture-form { flex-direction: column; }
  .capture-form .btn { width: 100%; }
  .nav-links { display: none; }
  .nav-links.active { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); padding: 1rem 1.5rem; gap: 1rem; border-bottom: 1px solid var(--gray-200); box-shadow: var(--shadow-md); }
  .nav-toggle { display: block; }
  .footer .container { flex-direction: column; text-align: center; }
  .cta-section .capture-form { flex-direction: column; align-items: stretch; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.875rem; }
  .container { padding: 0 1rem; }
}
