/* d:\SaaS Platform\css\index.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@600;700;800&display=swap');

:root {
  /* Colors */
  --base: #0B0C14;
  --c-surface: #0D1220;
  --c-raised: #131929;
  --c-border: #1E2A40;

  /* Indigo scale */
  --c-indigo-300: #A5B4FC;
  --c-indigo-400: #818CF8;
  --c-indigo-500: #6366F1;
  --c-indigo-600: #4F46E5;

  /* Accent palette */
  --c-violet: #8B5CF6;
  --c-cyan: #22D3EE;
  --c-emerald: #10B981;
  --c-amber: #F59E0B;

  /* Text colors */
  --c-text-primary: #F8FAFC; /* Snow */
  --c-text-sec: #94A3B8;     /* Slate */
  --c-text-muted: #475569;   /* Slate 600 */
  --c-text-subtle: #334155;  /* Slate 700 */

  /* Spacing Scale (N * 4px) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;
  --sp-32: 128px;

  /* Border Radius */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 24px;
  --r-3xl: 32px;
  --r-full: 9999px;
  --r-none: 0;

  /* Typography Sizes (Mobile-first, scaled via media queries) */
  --fs-hero-h1: 48px;
  --lh-hero-h1: 56px;
  --fs-page-hero: 36px;
  --lh-page-hero: 44px;
  --fs-h2: 28px;
  --lh-h2: 36px;
  --fs-h3: 22px;
  --lh-h3: 30px;
  --fs-h4: 18px;
  --lh-h4: 26px;
  --fs-lead: 18px;
  --lh-lead: 28px;
  --fs-body: 16px;
  --lh-body: 24px;
  --fs-small: 14px;
  --lh-small: 22px;
  --fs-caption: 12px;
  --lh-caption: 16px;

  /* Motion Tokens */
  --dur-instant: 50ms;
  --dur-fast: 100ms;
  --dur-normal: 200ms;
  --dur-slow: 300ms;
  --dur-reveal: 500ms;
  --dur-counter: 1500ms;
  --dur-glow: 3000ms;

  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-linear: linear;

  /* Constraints */
  --max-width: 1200px;
  --gutter-mobile: 24px;
  --gutter-tablet: 48px;
  --gutter-desktop: 80px;
}

/* Responsive Typography Adjustments (Desktop overrides) */
@media (min-width: 1024px) {
  :root {
    --fs-hero-h1: 64px;
    --lh-hero-h1: 72px;
    --fs-page-hero: 44px;
    --lh-page-hero: 52px;
    --fs-h2: 36px;
    --lh-h2: 44px;
  }
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--base);
  color: var(--c-text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  background-color: var(--base);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

/* Heading Typography */
h1, h2, h3 {
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
  color: var(--c-text-primary);
}

h1 {
  font-size: var(--fs-page-hero);
  line-height: var(--lh-page-hero);
  font-weight: 700;
}

h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: 700;
}

h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 600;
}

h4 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: var(--fs-h4);
  line-height: var(--lh-h4);
  font-weight: 600;
  color: var(--c-text-primary);
}

p {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-text-sec);
  font-weight: 400;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-normal) var(--ease-out);
}

/* Accessibility Focus Outline */
*:focus-visible {
  outline: 2px solid var(--c-indigo-400);
  outline-offset: 4px;
}

/* Skip-to-main-content Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--sp-4);
  background-color: var(--c-indigo-500);
  color: var(--c-text-primary);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-md);
  z-index: 9999;
  transition: top var(--dur-normal) var(--ease-out);
  font-weight: 600;
  font-size: var(--fs-small);
}

.skip-link:focus {
  top: var(--sp-4);
}

/* Motion Classes */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out);
}

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

/* Reduce Motion Media Query */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Shared Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter-mobile);
  padding-right: var(--gutter-mobile);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--gutter-tablet);
    padding-right: var(--gutter-tablet);
  }
}

@media (min-width: 1280px) {
  .container {
    padding-left: var(--gutter-desktop);
    padding-right: var(--gutter-desktop);
  }
}

.text-center { text-align: center; }
.text-indigo { color: var(--c-indigo-400); }
.text-cyan { color: var(--c-cyan); }
.text-emerald { color: var(--c-emerald); }
.text-violet { color: var(--c-violet); }
.text-amber { color: var(--c-amber); }

.mt-1 { margin-top: var(--sp-1); }
.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mt-12 { margin-top: var(--sp-12); }
.mt-16 { margin-top: var(--sp-16); }

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--base);
}

::-webkit-scrollbar-thumb {
  background: var(--c-border);
  border-radius: var(--r-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--c-text-muted);
}
