/* ============================================================
   divinelore.com — base.css
   Reset, body, typography scale, multilingual fonts, utilities.
   ============================================================ */

/* ---------- Google Fonts (font-display: swap) ---------- */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Cormorant:wght@300;400;500&family=DM+Sans:wght@300;400;500;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300;400;500&family=Noto+Sans+Devanagari:wght@300;400;500&family=Noto+Sans+Telugu:wght@300;400;500&family=Noto+Sans+Tamil:wght@300;400;500&display=swap");

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  min-height: 100vh;
  background-color: var(--color-base-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  font-weight: 400;
  letter-spacing: var(--tracking-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--section-accent); color: var(--color-text-inverse); }

/* ---------- Typography classes ---------- */
.text-hero {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-hero);
  line-height: var(--lh-hero);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}
.text-h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}
.text-h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--tracking-display);
}
.text-h3 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-h3);
  line-height: var(--lh-h3);
}
.text-h4 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-h4);
  line-height: 1.5;
}
.text-body-lg {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-body-lg);
  line-height: var(--lh-body-lg);
  text-wrap: pretty;
}
.text-body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-body);
  line-height: var(--lh-body);
  text-wrap: pretty;
}
.text-sm {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
}
.text-xs {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-xs);
  line-height: 1.5;
}
.text-tool-num {
  font-family: var(--font-numeral);
  font-weight: 300;
  font-size: var(--text-tool-num);
  line-height: 1;
  letter-spacing: -0.02em;
}
.text-eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-xs);
  line-height: 1.4;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.text-mute  { color: var(--color-text-secondary); }
.text-faint { color: var(--color-text-tertiary); }

/* Italic + pull-quote variants */
.text-quote {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: 24px;
  line-height: 1.45;
  letter-spacing: var(--tracking-display);
  color: var(--color-text-primary);
}

/* ---------- Mobile type scale ---------- */
@media (max-width: 640px) {
  .text-hero    { font-size: 38px; }
  .text-h1      { font-size: 30px; }
  .text-h2      { font-size: 22px; }
  .text-body-lg { font-size: 16px; }
  .text-tool-num{ font-size: 44px; }
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
@media (min-width: 1024px) {
  .container { padding-inline: var(--space-6); }
}

.content-width { max-width: var(--content-max); margin-inline: auto; }
.tool-width    { max-width: var(--tool-max);    margin-inline: auto; }

.stack > * + * { margin-top: var(--stack, var(--space-4)); }
.row     { display: flex; align-items: center; gap: var(--space-3); }
.row-end { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-3); }
.col     { display: flex; flex-direction: column; gap: var(--space-3); }
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }

.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--space-6); }
@media (max-width: 1024px) { .grid-12 { grid-template-columns: repeat(2, 1fr); gap: var(--space-5); } }
@media (max-width: 640px)  { .grid-12 { grid-template-columns: 1fr; gap: var(--space-4); } }

/* Visually hide but keep accessible */
.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 ring — uses section accent for that "section aware" feel */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--section-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Multilingual font fallbacks — applied via lang attribute */
:lang(hi) { font-family: "DM Sans", "Noto Sans Devanagari", "Noto Sans", sans-serif; }
:lang(te) { font-family: "DM Sans", "Noto Sans Telugu", "Noto Sans", sans-serif; }
:lang(ta) { font-family: "DM Sans", "Noto Sans Tamil", "Noto Sans", sans-serif; }
