/* ============================================================
   BASE — Reset, Fonts, Typography, Links, Focus
   Shri Ram Jyotish Kendra — Cosmic Wisdom Design System
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  hanging-punctuation: first last;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ── MEDIA DEFAULTS ───────────────────────────────────────── */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  font-style: italic;
  vertical-align: middle;
}

/* ── FORM RESET ───────────────────────────────────────────── */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

textarea {
  resize: vertical;
}

/* ── LIST RESET ───────────────────────────────────────────── */
ul,
ol {
  list-style: none;
}

/* ── LINK RESET ───────────────────────────────────────────── */
a {
  color: var(--color-blue);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--color-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-heading);
  color: var(--color-navy);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-h1);
  line-height: var(--leading-display);
}

h2 {
  font-size: var(--text-h2);
}

h3 {
  font-size: var(--text-h3);
}

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

p {
  text-wrap: pretty;
  max-width: 72ch;
}

strong, b {
  font-weight: var(--weight-semibold);
}

small {
  font-size: var(--text-small);
}

/* ── FOCUS STYLES ─────────────────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ── SELECTION ────────────────────────────────────────────── */
::selection {
  background-color: rgba(212, 175, 55, 0.2);
  color: var(--color-navy);
}

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

/* ── UTILITY: 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;
}

/* ── UTILITY: EYEBROW LABEL ───────────────────────────────── */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-3);
}

.eyebrow--light {
  color: var(--color-gold-light);
}

/* ── UTILITY: GOLD DIVIDER ────────────────────────────────── */
.divider-gold {
  display: block;
  width: 60px;
  height: 2px;
  background: var(--color-gold);
  border: none;
  margin: var(--space-4) 0;
}

.divider-gold--center {
  margin-left: auto;
  margin-right: auto;
}

/* ── UTILITY: SECTION HEADING ─────────────────────────────── */
.section-heading {
  margin-bottom: var(--space-5);
}

.section-heading--center {
  text-align: center;
}

.section-heading--center .divider-gold {
  margin-left: auto;
  margin-right: auto;
}

.section-heading--center p {
  margin-left: auto;
  margin-right: auto;
}

.section-subtitle {
  font-size: var(--text-body-lg);
  color: var(--color-muted);
  margin-top: var(--space-3);
  max-width: 56ch;
}

/* ── SCROLL REVEAL ANIMATION BASE ─────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-reveal) var(--ease-out),
              transform var(--duration-reveal) var(--ease-out);
}

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