/* =========================================================
   Voceo.ai — shared design system
   Tokens, reset, layout, components, a11y utilities.
   Used by: index.html, features.html, pricing.html,
            solutions.html, integrations.html, addons.html.
   ========================================================= */

/* ─── DESIGN TOKENS ─── */
:root {
  /* Color — text */
  --text-primary: #1E1B4B;
  --text-secondary: #312E81;
  --text-muted: #6B7280;
  --text-on-dark: #ffffff;
  --text-on-dark-muted: rgba(255,255,255,0.55);
  --text-on-dark-faint: rgba(255,255,255,0.4);

  /* Color — surface */
  --bg-white: #ffffff;
  --bg-gray: #FAF5FF;
  --bg-off-white: #FDFCFF;
  --border: #DDD6FE;
  --divider: #E5E7EB;
  --dark-surface: rgba(255,255,255,0.04);
  --dark-border: rgba(255,255,255,0.08);
  --dark-hover-surface: rgba(124,58,237,0.06);
  --dark-hover-border: rgba(124,58,237,0.25);

  /* Color — brand */
  --navy: #1E1B4B;
  --navy-mid: #312E81;
  --violet: #7C3AED;
  --violet-light: #A78BFA;
  --violet-glow: rgba(124,58,237,0.12);
  --cyan: #06B6D4;
  --cyan-hover: #0891B2;
  --cyan-text: #0E7490; /* WCAG AA on white backgrounds (4.74:1) */
  --cta-green: #06B6D4; /* alias used in legacy markup */

  /* Color — semantic */
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;

  /* Radius */
  --radius-sm: 3px;
  --radius: 5px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 16px;
  --radius-pill: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(30,27,75,0.06);
  --shadow: 0 2px 4px rgba(161,169,197,0.2);
  --shadow-md: 0 8px 16px rgba(161,169,197,0.35);
  --shadow-lg: 0 20px 48px rgba(30,27,75,0.12);
  --shadow-cta: 0 4px 24px rgba(6,182,212,0.35);
  --shadow-cta-hover: 0 8px 32px rgba(6,182,212,0.45);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 150ms;
  --dur: 200ms;
  --dur-slow: 300ms;

  /* Layout */
  --container: 1200px;
  --section-py: 72px;
  --section-px: 80px;
  --nav-height: 88px;

  /* z-index scale */
  --z-nav: 100;
  --z-sticky: 50;
  --z-modal-backdrop: 900;
  --z-modal: 1000;
  --z-skip: 1100;
}

/* ─── RESET ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-off-white);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }
a { color: inherit; }

/* ─── A11Y UTILITIES ─── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -44px; left: 16px; z-index: var(--z-skip);
  background: var(--navy); color: #fff; padding: 12px 20px;
  border-radius: var(--radius); text-decoration: none;
  font-weight: 600; font-size: 14px;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 16px; outline: 3px solid var(--cyan); outline-offset: 2px; }

/* Visible keyboard focus on all interactive elements */
:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
  border-radius: var(--radius);
}
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

/* ─── NAV ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav);
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--section-px);
  background: rgba(249,249,249,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nav-logo {
  font-weight: 700; font-size: 20px;
  color: var(--navy); letter-spacing: -0.5px;
  text-decoration: none;
}
.nav-logo span { color: var(--cyan-text); }
.nav-links {
  display: flex; gap: 36px; list-style: none;
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
}
.nav-links a {
  text-decoration: none; color: inherit;
  transition: color var(--dur) var(--ease);
  padding: 4px 2px;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--navy); }
.nav-links a[aria-current="page"] { color: var(--navy); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 14px; }

.lang-switcher {
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--bg-gray); border-radius: var(--radius-md); padding: 3px;
}
.lang-btn {
  padding: 5px 11px; border-radius: 6px; border: none; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600;
  background: transparent; color: var(--text-muted);
  transition: all var(--dur-fast) var(--ease); letter-spacing: 0.3px;
}
.lang-btn[aria-pressed="true"] {
  background: var(--navy); color: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.lang-btn:not([aria-pressed="true"]):hover { color: var(--navy); }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; cursor: pointer; padding: 10px; background: none; border: none;
  min-width: 44px; min-height: 44px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--navy); border-radius: 2px;
  transition: all var(--dur-slow) var(--ease);
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 24px; border-radius: var(--radius); height: 54px;
  font-family: inherit; font-size: 18px; font-weight: 600;
  border: none; cursor: pointer; text-decoration: none;
  transition: all var(--dur) var(--ease);
  min-width: 120px; white-space: nowrap;
}
.btn-primary {
  background: var(--cyan); color: #fff;
  box-shadow: var(--shadow-cta);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--cyan-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-cta-hover);
}
.btn-dark {
  background: #0b0204; color: #fff;
}
.btn-dark:hover, .btn-dark:focus-visible {
  background: var(--navy-mid);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent; color: #0b0204;
  border: 1.5px solid #0b0204;
}
.btn-outline:hover, .btn-outline:focus-visible {
  background: var(--navy); color: #fff; border-color: var(--navy);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent; color: rgba(255,255,255,0.8);
  border: 1.5px solid rgba(255,255,255,0.4);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  color: #fff; border-color: rgba(255,255,255,0.7);
}
.btn[aria-disabled="true"], .btn:disabled {
  opacity: 0.55; cursor: not-allowed; transform: none;
}

/* ─── TYPOGRAPHY ─── */
.tag {
  display: inline-block;
  font-size: 12px; font-weight: 600;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--cyan-text); margin-bottom: 16px;
}
.tag.on-dark { color: var(--cyan); }
h1, h2, h3, h4, h5, h6 { font-family: inherit; color: var(--navy); letter-spacing: -0.5px; }
h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.18; font-weight: 700; margin-bottom: 20px; }
h3 { font-size: 20px; font-weight: 600; line-height: 1.35; letter-spacing: -0.3px; }
.lead {
  font-size: 18px; color: var(--text-muted); line-height: 1.55;
  font-weight: 400; max-width: 60ch;
}
.on-dark h1, .on-dark h2, .on-dark h3 { color: #fff; }
.on-dark .lead { color: var(--text-on-dark-muted); }

/* ─── SECTION / CONTAINER ─── */
section { padding: var(--section-py) var(--section-px); }
.container { max-width: var(--container); margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header .lead { margin-left: auto; margin-right: auto; }

/* ─── SURFACES ─── */
.surface-dark { background: var(--navy); color: #fff; }
.surface-dark::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% -10%, var(--violet-glow) 0%, transparent 70%);
  pointer-events: none;
}
.surface-light { background: var(--bg-off-white); }
.surface-gray { background: var(--bg-gray); }

/* ─── CARDS ─── */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: all var(--dur) var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--cyan);
}
.card h3 { color: var(--navy); margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--text-muted); line-height: 1.55; }

.card-dark {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all var(--dur) var(--ease);
}
.card-dark:hover {
  background: var(--dark-hover-surface);
  border-color: var(--dark-hover-border);
  transform: translateY(-3px);
}
.card-dark h3 { color: #fff; margin-bottom: 8px; }
.card-dark p { font-size: 14px; color: rgba(255,255,255,0.55); line-height: 1.55; }

/* Icon wrapper inside cards */
.icon-wrap {
  width: 48px; height: 48px; border-radius: var(--radius-lg);
  background: var(--bg-gray);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  color: var(--violet);
}
.icon-wrap.on-dark {
  background: var(--violet-glow);
  color: var(--cyan);
}
.icon-wrap svg { width: 24px; height: 24px; }

/* Check-list (dark variant used in hero, light on sections) */
.check-list {
  list-style: none; display: flex; flex-direction: column; gap: 10px;
}
.check-list li {
  font-size: 15px; color: var(--text-secondary); line-height: 1.55;
  display: flex; align-items: flex-start; gap: 12px;
}
.check-list li::before {
  content: ''; flex-shrink: 0; margin-top: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--cyan);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230b0204' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 11px;
}
.on-dark .check-list li { color: rgba(255,255,255,0.8); }
.check-list.subtle li::before {
  background: var(--violet-glow);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%237C3AED' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  width: 18px; height: 18px; margin-top: 4px; background-size: 9px;
}

/* ─── PAGE HERO (subpages) ─── */
.page-hero {
  background: var(--navy); color: #fff;
  padding: 160px var(--section-px) 80px;
  text-align: center; position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% -10%, var(--violet-glow) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero > * { position: relative; z-index: 1; }
.page-hero h1 {
  font-size: clamp(32px, 4.5vw, 56px); font-weight: 700;
  color: #fff; line-height: 1.15;
  max-width: 780px; margin: 0 auto 20px;
}
.page-hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--violet), var(--violet-light));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-hero .lead {
  color: rgba(255,255,255,0.65); max-width: 600px; margin: 0 auto;
}

/* ─── TRUST BAR ─── */
.trust-bar {
  background: var(--bg-gray); padding: 40px var(--section-px);
  border-bottom: 1px solid var(--divider);
}
.trust-bar-inner {
  max-width: var(--container); margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  gap: 48px; flex-wrap: wrap;
}
.trust-label {
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  letter-spacing: 0.3px;
}
.trust-logos {
  display: flex; align-items: center; gap: 40px; flex-wrap: wrap;
  justify-content: center;
}
.trust-logo-text {
  font-size: 16px; font-weight: 700; color: #6B7280;
  letter-spacing: -0.3px;
  transition: color var(--dur) var(--ease);
}
.trust-logo-text:hover { color: var(--navy); }

/* ─── FOOTER ─── */
.site-footer {
  background: var(--bg-gray); border-top: 1px solid var(--divider);
  padding: 40px var(--section-px) 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 48px;
  max-width: var(--container); margin: 0 auto;
  padding-bottom: 28px; border-bottom: 1px solid var(--divider);
  margin-bottom: 24px;
}
.footer-intro p {
  font-size: 13px; color: var(--text-muted);
  max-width: 260px; line-height: 1.55; margin-top: 8px;
}
.footer-col h3 {
  font-size: 13px; font-weight: 700; color: var(--navy);
  letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 14px;
}
.footer-col a {
  display: block; font-size: 14px; font-weight: 400;
  color: var(--text-muted); text-decoration: none;
  line-height: 1.8;
  transition: color var(--dur) var(--ease);
  padding: 4px 0;
}
.footer-col a:hover, .footer-col a:focus-visible { color: var(--text-primary); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
  max-width: var(--container); margin: 0 auto;
}
.footer-bottom p { font-size: 12px; color: var(--text-muted); }

/* ─── CTA SECTION ─── */
.cta-section {
  background: var(--navy); padding: 80px var(--section-px);
  text-align: center; position: relative; overflow: hidden; color: #fff;
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 100%, var(--violet-glow) 0%, transparent 70%);
  pointer-events: none;
}
.cta-section > * { position: relative; z-index: 1; }
.cta-section h2 { color: #fff; max-width: 640px; margin: 0 auto 16px; }
.cta-section .lead {
  color: rgba(255,255,255,0.55); margin: 0 auto 40px; max-width: 560px;
}
.cta-actions {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 16px;
}
.cta-note { font-size: 14px; color: rgba(255,255,255,0.4); }

/* ─── MODAL (video + generic) ─── */
.modal-backdrop {
  display: none; position: fixed; inset: 0; z-index: var(--z-modal-backdrop);
  background: rgba(0,0,0,0.88);
  align-items: center; justify-content: center; padding: 24px;
}
.modal-backdrop[aria-hidden="false"] { display: flex; }
.modal-content {
  position: relative; width: 100%; max-width: 860px;
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6); z-index: var(--z-modal);
  background: #fff;
}
.modal-content.video { background: #000; }
.modal-close {
  position: absolute; top: -44px; right: 0;
  background: none; border: none; color: rgba(255,255,255,0.7);
  font-size: 28px; cursor: pointer; padding: 4px 12px;
  transition: color var(--dur) var(--ease);
  min-width: 44px; min-height: 44px;
}
.modal-close:hover, .modal-close:focus-visible { color: #fff; }
.video-wrap { position: relative; padding-bottom: 56.25%; background: #000; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ─── UTILITIES ─── */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  html { scroll-behavior: auto; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1199px) {
  :root { --section-px: 32px; }
  .nav { padding: 14px var(--section-px); }
  .trust-bar, .cta-section, .page-hero { padding-left: var(--section-px); padding-right: var(--section-px); }
  .site-footer { padding: 32px var(--section-px) 24px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-intro { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  :root { --section-px: 24px; --section-py: 48px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(249,249,249,0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding: 8px 0;
  }
  .nav-links.open li a {
    display: block; padding: 14px 24px; font-size: 15px;
    min-height: 44px;
  }
  .hamburger { display: flex; }
  .nav-right .btn-outline { display: none; }
  .page-hero { padding-top: 120px; padding-bottom: 60px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .trust-logos { gap: 24px; }
  h2 { font-size: 28px; }
  .btn { font-size: 16px; height: 50px; padding: 14px 20px; }
}
