/* ==========================================================================
   Ratnavi Foundation - Design System & Global Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Color Palette */
  --color-primary: #FF6B00; /* Warm Orange from Logo */
  --color-secondary: #4B0082; /* Deep Purple from Logo */
  --color-tertiary: #E63946; /* Accent Red */
  --color-quaternary: #8B1A8A; /* Magenta/Purple blend */
  
  --color-accent: #FFB347; /* Warm Gold Highlight */
  --color-success: #28A745;
  --color-info: #2196F3;
  --color-warning: #FFC107;
  --color-danger: #DC3545;

  /* Neutrals */
  --color-white: #FFFFFF;
  --color-bg-light: #FAFBFC;
  --color-bg-alt: #F3F4F6;
  
  --color-text-primary: #1A1A2E; /* Very Dark Blue/Black */
  --color-text-secondary: #4A4A6A;
  --color-text-muted: #8888A0;
  
  --color-border-light: #E8E8F0;
  --color-border-dark: #D1D1E0;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  --gradient-sunset: linear-gradient(135deg, #FF6B00, #E63946, #8B1A8A, #4B0082);
  --gradient-overlay: linear-gradient(to bottom, rgba(26, 26, 46, 0.2), rgba(26, 26, 46, 0.8));
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));

  /* Typography */
  --font-primary: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Font Weights */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(26, 26, 46, 0.08);
  --shadow-lg: 0 10px 24px rgba(26, 26, 46, 0.12);
  --shadow-hover: 0 16px 32px rgba(75, 0, 130, 0.15);
  --shadow-colored: 0 8px 24px rgba(255, 107, 0, 0.25);
  
  /* Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 9999px;
  --radius-blob: 40% 60% 70% 30% / 40% 50% 60% 50%;

  /* Spacing */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-24: 6rem;    /* 96px */
  --space-32: 8rem;    /* 128px */
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-bounce: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  /* Z-Index */
  --z-negative: -1;
  --z-normal: 1;
  --z-tooltip: 10;
  --z-fixed: 100;
  --z-modal: 1000;
  --z-overlay: 9999;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  width: 100%;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text-primary);
  background-color: var(--color-bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip !important;
  width: 100%;
  position: relative;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: var(--fw-bold);
  line-height: 1.2;
  margin-bottom: var(--space-4);
  color: var(--color-text-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-secondary);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover, a:focus {
  color: var(--color-secondary);
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font: inherit;
  outline: none;
}

/* --------------------------------------------------------------------------
   Layout Utilities
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.section {
  padding-block: var(--space-16);
}

.section-padding-lg {
  padding-block: var(--space-24);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-gap-4 { gap: var(--space-4); }
.grid-gap-6 { gap: var(--space-6); }
.grid-gap-8 { gap: var(--space-8); }

/* --------------------------------------------------------------------------
   Accessibility (Screen Reader Only)
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* --------------------------------------------------------------------------
   Text Gradients & Accents
   -------------------------------------------------------------------------- */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.text-gradient-sunset {
  background: var(--gradient-sunset);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.section-heading {
  margin-bottom: var(--space-12);
  text-align: center;
}

.section-subtitle {
  color: var(--color-primary);
  font-weight: var(--fw-bold);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.95rem;
  background: rgba(255, 107, 0, 0.08);
  border: 1px solid rgba(255, 107, 0, 0.18);
  border-radius: 50px;
}

.section-subtitle i {
  font-size: 1.05rem;
  color: var(--color-primary);
}

.section-title {
  margin-bottom: var(--space-4);
}

.section-description {
  max-width: 700px;
  margin-inline: auto;
  font-size: 1.125rem;
}

/* Margin Utility Helpers */
.mt-8 { margin-top: 2.5rem !important; }
.mb-8 { margin-bottom: 2.5rem !important; }
