/* ============================================================
   BASE.CSS — Reset, Variables, Typography, Utilities
   Divyam.AI Website
   ============================================================ */

/* --- Custom Properties --- */
:root {
  /* Brand Colors — dark purple accent on white, no gradients */
  --color-primary:        #4F1587;
  --color-primary-light:  #6B2BA6;
  --color-primary-deep:   #3B0F66;
  --color-primary-muted:  #EDE2FF;
  --color-primary-faint:  rgba(79, 21, 135, 0.05);

  /* Backgrounds (light theme) */
  --color-bg:             #FFFFFF;
  --color-bg-elevated:    #F8F8FA;
  --color-bg-subtle:      #F1F0F5;

  /* Text */
  --color-text:           #3D3D4E;
  --color-text-secondary: #6E6E82;
  --color-white:          #FFFFFF;
  --color-heading:        #1A1A2E;

  /* Borders */
  --color-border:         #E2E2EA;

  /* Semantic */
  --color-success:        #059669;
  --color-error:          #DC2626;
  --color-focus:          #4F1587;

  /* Typography */
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-lg:    1.125rem;
  --text-xl:    1.25rem;
  --text-2xl:   1.5rem;
  --text-3xl:   1.875rem;
  --text-4xl:   2.25rem;
  --text-5xl:   3rem;
  --text-6xl:   3.75rem;

  --leading-tight:  1.2;
  --leading-normal: 1.6;

  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* Spacing (8px grid) */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --container-max:    1200px;
  --container-pad:    var(--space-6);
  --section-pad-y:    var(--space-20);
  --border-radius:    0.5rem;
  --border-radius-lg: 1rem;
  --nav-height:       72px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg:  0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 30px rgba(79, 21, 135, 0.15);

  /* Transitions */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --duration:     300ms;
}


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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}


/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-heading);
  line-height: var(--leading-tight);
}

h1 {
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
}

h2 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
}

h3 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
}

h4 {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
}

p {
  color: var(--color-text);
}

@media (min-width: 768px) {
  h1 { font-size: var(--text-5xl); }
  h2 { font-size: var(--text-4xl); }
  h3 { font-size: var(--text-3xl); }
}

@media (min-width: 1024px) {
  h1 { font-size: var(--text-6xl); }
}


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

.section {
  padding-block: var(--section-pad-y);
}

.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;
}


/* --- Focus States --- */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible {
  border-radius: 2px;
}


/* --- Selection --- */
::selection {
  background-color: rgba(79, 21, 135, 0.15);
  color: var(--color-heading);
}
