/* ============================================
   CLAPSLEY — Shared Stylesheet
   Poppins + JetBrains Mono · Two-mode design system
   ============================================ */

:root {
  --bg:        #f8fafc;
  --bg-warm:   #f5f1ea;
  --bg-dark:   #0a0e1a;
  --panel:     #ffffff;
  --ink:       #0f172a;
  --ink-2:     #1e293b;
  --text-2:    #475569;
  --text-3:    #94a3b8;

  /* Co-pilot accent (Mode 01) */
  --accent:    #3b82f6;
  --accent-2:  #1d4ed8;
  --accent-glow: rgba(59, 130, 246, 0.15);

  /* Auto-mode accent (Mode 02) */
  --auto-orange: #f97316;
  --auto-orange-2: #ea580c;
  --auto-glow: rgba(249, 115, 22, 0.15);

  --success:   #10b981;
  --warning:   #f59e0b;
  --whatsapp:  #25D366;
  --whatsapp-dark: #128C7E;
  --ai-purple: #8b5cf6;
  --ai-cyan:   #06b6d4;
  --border:    #e2e8f0;
  --border-strong: #cbd5e1;

  --sans:  'Poppins', system-ui, -apple-system, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, monospace;

  --shadow-sm: 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md: 0 4px 6px -1px rgba(15,23,42,0.06), 0 2px 4px -2px rgba(15,23,42,0.04);
  --shadow-lg: 0 25px 50px -12px rgba(15,23,42,0.18);
  --shadow-xl: 0 35px 80px -20px rgba(15,23,42,0.25);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --container: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; }

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

/* TYPOGRAPHY */
h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ink);
}
h1 { font-size: clamp(38px, 5.8vw, 70px); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(30px, 4vw, 48px); font-weight: 600; }
h3 { font-size: clamp(20px, 2vw, 26px); font-weight: 600; line-height: 1.25; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
}
.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 8px;
  vertical-align: 1px;
  box-shadow: 0 0 0 4px rgba(16,185,129,0.15);
}
.eyebrow.ai .dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
.eyebrow.auto .dot { background: var(--auto-orange); box-shadow: 0 0 0 4px var(--auto-glow); }

.italic { font-style: italic; font-weight: 500; }

.ai-grad {
  background: linear-gradient(120deg, var(--accent) 0%, var(--ai-purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
}
.auto-grad {
  background: linear-gradient(120deg, var(--auto-orange) 0%, var(--ai-purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
}

/* HEADER */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: rgba(248, 250, 252, 0.78);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
header.site.scrolled { border-color: var(--border); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.logo-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--ink);
  display: grid; place-items: center;
  color: white;
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
  position: relative;
  overflow: hidden;
}
.logo-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 50%, rgba(37, 211, 102, 0.7) 50%);
  opacity: .9;
}
.logo-mark span { position: relative; z-index: 2; }

nav.links { display: flex; gap: 32px; }
nav.links a {
  font-size: 14.5px;
  color: var(--text-2);
  font-weight: 500;
  transition: color .15s ease;
  position: relative;
}
nav.links a:hover, nav.links a.active { color: var(--ink); }
nav.links a.active::after {
  content: '';
  position: absolute;
  bottom: -22px;
  left: 0; right: 0;
  height: 2px;
  background: var(--ink);
}

.nav-cta { display: flex; align-items: center; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 500;
  transition: all .15s ease;
  white-space: nowrap;
  border: 1px solid transparent;
  font-family: var(--sans);
}
.btn-primary { background: var(--ink); color: white; }
.btn-primary:hover { background: var(--ink-2); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost {
  color: var(--ink);
  border-color: var(--border-strong);
  background: transparent;
}
.btn-ghost:hover { background: var(--ink); color: white; border-color: var(--ink); }
.btn-lg { padding: 15px 28px; font-size: 15.5px; border-radius: 12px; }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* SECTIONS */
section { padding: 100px 0; position: relative; }
.section-head {
  max-width: 720px;
  margin: 0 auto 64px;
  text-align: center;
}
.section-head .eyebrow { display: inline-block; margin-bottom: 16px; }
.section-head h2 { margin-bottom: 16px; }
.section-head p {
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.6;
}

/* AI BADGES */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(120deg, var(--accent) 0%, var(--ai-purple) 100%);
  color: white;
  padding: 5px 12px 5px 9px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ai-badge.auto { background: linear-gradient(120deg, var(--auto-orange) 0%, var(--ai-purple) 100%); }
.ai-badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 6px rgba(255,255,255,0.8);
  animation: pulse-ai 1.5s ease-in-out infinite;
}
@keyframes pulse-ai {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* MODE PILLS — used inline */
.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.mode-pill.copilot { background: rgba(59, 130, 246, 0.08); color: var(--accent-2); }
.mode-pill.automode { background: rgba(249, 115, 22, 0.08); color: var(--auto-orange-2); }
.mode-pill.both {
  background: linear-gradient(120deg, rgba(59, 130, 246, 0.08), rgba(249, 115, 22, 0.08));
  color: var(--ink);
}
.mode-pill::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
}
.mode-pill.copilot::before { background: var(--accent); }
.mode-pill.automode::before { background: var(--auto-orange); }
.mode-pill.both::before { background: linear-gradient(135deg, var(--accent), var(--auto-orange)); }

/* FOOTER */
footer.site {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 80px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}
.footer-brand .logo { color: white; margin-bottom: 16px; }
.footer-brand p {
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 320px;
  color: rgba(255,255,255,0.6);
}
footer h5 {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
}
footer ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
footer ul a {
  font-size: 14.5px;
  color: rgba(255,255,255,0.75);
  transition: color .15s ease;
}
footer ul a:hover { color: white; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 36px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* WHATSAPP FAB */
.wa-fab {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 56px; height: 56px;
  background: var(--whatsapp);
  color: white;
  border-radius: 50%;
  display: grid; place-items: center;
  z-index: 100;
  box-shadow: 0 12px 24px rgba(37, 211, 102, 0.3);
  transition: all .2s ease;
  animation: wa-pulse 2.5s ease-in-out infinite;
}
.wa-fab:hover { transform: scale(1.08); }
@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 12px 24px rgba(37, 211, 102, 0.3), 0 0 0 0 rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 12px 24px rgba(37, 211, 102, 0.3), 0 0 0 16px rgba(37, 211, 102, 0); }
}
.wa-fab svg { width: 28px; height: 28px; }

/* RESPONSIVE BASE */
@media (max-width: 960px) {
  section { padding: 70px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  nav.links { display: none; }
}
@media (max-width: 480px) {
  .nav-cta .btn-ghost { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
