@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

:root {
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--slate-50);
  color: var(--slate-900);
  line-height: 1.5;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.025em;
}

.text-gradient {
  background: linear-gradient(135deg, var(--slate-900) 0%, var(--slate-600) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Forms & Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--slate-900);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--slate-800);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--slate-200), 0 0 0 5px var(--slate-400);
}

.btn-outline {
  border: 1px solid var(--slate-200);
  color: var(--slate-600);
  background: var(--white);
}

.btn-outline:hover {
  border-color: var(--slate-300);
  background: var(--slate-50);
}

.btn-outline:focus-visible {
  outline: none;
  border-color: var(--slate-400);
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.25);
}

/* Touch targets: min 44px (ui-ux-pro-max) */
.btn {
  min-height: 44px;
}

/* Sections */
.section-py {
  padding: 6rem 0;
}

/* Header */
header {
  height: 80px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--slate-100);
  background: var(--white);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--slate-900);
}

/* Badge */
.badge-promo {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: var(--slate-100);
  color: var(--slate-600);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
/* Utility Classes */
.w-full { width: 100%; }
.text-left { text-align: left; }
.border-collapse { border-collapse: collapse; }
.overflow-hidden { overflow: hidden; }
.rounded-2xl { border-radius: 1rem; }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }
.border-slate-200 { border: 1px solid var(--slate-200); }
.bg-white { background-color: var(--white); }
.bg-slate-900 { background-color: var(--slate-900); }
.bg-emerald-50\/30 { background-color: rgba(16, 185, 129, 0.05); }
.text-white { color: var(--white); }
.text-slate-900 { color: var(--slate-900); }
.text-slate-500 { color: var(--slate-500); }
.text-slate-400 { color: var(--slate-400); }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.italic { font-style: italic; }
.block { display: block; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.p-6 { padding: 1.5rem; }
.divide-y > * + * { border-top: 1px solid var(--slate-100); }
.transition-colors { transition: background-color 0.2s ease; }
.hover\:bg-slate-50:hover { background-color: var(--slate-50); }

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

/* Table container scrollable on mobile */
#efficiency-matrix-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -1.5rem;
  padding: 0 1.5rem;
  /* Add shadow mask to indicate scroll */
  mask-image: linear-gradient(to right, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
}

#efficiency-matrix-container table {
  min-width: 600px;
  border-spacing: 0;
  width: 100%;
}

@media (max-width: 768px) {
  /* Header: Stack nav items */
  header {
    height: auto;
    padding: 1rem 0;
  }
  
  nav {
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
  }
  
  .nav-links .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }
  
  /* Hero: Single column */
  .hero-content,
  .hero-visual {
    grid-column: 1 / -1;
  }
  
  /* Section padding reduced */
  .section-py {
    padding: 3rem 0;
  }
  
  /* Typography scaling */
  h1 {
    font-size: 2.25rem !important;
  }
  
  h2 {
    font-size: 1.75rem !important;
  }
  
  /* Rules Engine: Stack layout */
  .rules-visual,
  .rules-content {
    grid-column: 1 / -1;
  }
  
  /* Migration Concierge: Stack 3-step timeline */
  [style*="grid-template-columns: repeat(3, 1fr)"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 2rem !important;
  }
  
  /* Pricing card padding */
  [style*="padding: 3rem"] {
    padding: 1.5rem !important;
  }
  
  /* Matrix table cells scaling */
  #efficiency-matrix-container td, 
  #efficiency-matrix-container th {
    padding: 1rem 0.75rem !important;
    font-size: 0.875rem;
  }

  /* CTA buttons full width on mobile */
  .cta-row {
    flex-direction: column !important;
  }
  
  .cta-row .btn {
    width: 100%;
    text-align: center;
  }
}

/* ========================================
   UI/UX Pro Max: focus, reduced-motion, link focus
   ======================================== */

/* Visible focus for all interactive elements */
a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--slate-300);
  border-radius: 4px;
}

/* Respect reduced motion (no transitions/animations) */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .hover\:bg-slate-50:hover,
  tr.transition-colors {
    transition: none !important;
  }

  [style*="animation: spin"],
  .hero-spinner {
    animation: none !important;
  }
}

/* Skip link (accessibility): visible on focus */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  padding: 0.75rem 1rem;
  background: var(--slate-900);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  z-index: 100;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
  outline: none;
  box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--slate-900);
}

.list-icon {
  flex-shrink: 0;
  color: var(--emerald-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
