/* ─────────────────────────────────────────────────────────────────────
   OJAS — Ayurveda / wellness storefront
   Warm-earthy parchment canvas, gold primary, deep-green secondary
   accent, Marcellus serif editorial + Inter body. Ritualistic, ancient,
   grounded. Mobile responsive.
   ───────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

:root {
  /* Palette — overridden by settings_schema → CSS vars in theme.liquid */
  --color-bg:           #F5EDDC;          /* warm parchment */
  --color-surface:      #FBF5E8;
  --color-surface-2:    #EFE4CC;
  --color-text:         #3A281B;          /* deep brown ink */
  --color-text-muted:   #8A7355;
  --color-text-soft:    #B0A088;
  --color-border:       #E6DAC2;          /* hairline */
  --color-border-soft:  #EFE6D2;
  --color-primary:      #C1852B;          /* gold */
  --color-primary-text: #F5EDDC;
  --color-primary-tint: #F2E2C4;
  --color-accent:       #4C5D39;          /* deep green */
  --color-accent-warm:  #8B5E34;
  --color-success:      #4C5D39;
  --color-overlay:      rgba(28,19,11,0.45);
  --color-overlay-dark: rgba(28,19,11,0.72);

  --font-heading:   'Marcellus', Georgia, 'Times New Roman', serif;
  --font-editorial: 'Marcellus', Georgia, 'Times New Roman', serif;
  --font-body:      'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:      'Inter', system-ui, -apple-system, sans-serif;

  --text-xs:    0.6875rem;   /* 11px */
  --text-sm:    0.8125rem;   /* 13px */
  --text-base:  0.875rem;    /* 14px */
  --text-md:    1rem;        /* 16px */
  --text-lg:    1.125rem;    /* 18px */
  --text-xl:    1.375rem;    /* 22px */
  --text-2xl:   1.75rem;     /* 28px */
  --text-3xl:   2.125rem;    /* 34px */
  --text-4xl:   clamp(2.25rem, 4.4vw, 3.25rem);
  --text-5xl:   clamp(2.75rem, 6vw, 3.5rem);
  --text-6xl:   clamp(3.25rem, 8vw, 4.5rem);

  --leading-tight: 1.03;
  --leading-snug:  1.15;
  --leading-base:  1.55;
  --leading-loose: 1.7;

  --tracking-tight:   -0.01em;
  --tracking-display: -0.01em;
  --tracking-eyebrow:  0.24em;
  --tracking-wide:     0.1em;

  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.5rem;
  --space-6:  2rem;
  --space-7:  3rem;
  --space-8:  4.5rem;
  --space-10: 6rem;
  --space-12: 8rem;

  --radius-xs: 0px;
  --radius-sm: 0px;
  --radius-md: 2px;
  --radius-lg: 4px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(58, 40, 27, 0.05);
  --shadow-md: 0 8px 24px rgba(58, 40, 27, 0.08);
  --shadow-lg: 0 18px 40px rgba(58, 40, 27, 0.12);

  --header-height-desktop: 74px;
  --header-height-mobile:  60px;

  --container-max: 1280px;
  --container-pad-desktop: 40px;
  --container-pad-mobile:  22px;

  --transition-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

html, body { margin: 0; padding: 0; }

body.ojas-body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--leading-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── Typography defaults ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-tight);
  margin: 0;
  color: var(--color-text);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); font-weight: 500; }
h4 { font-size: var(--text-2xl); font-weight: 500; letter-spacing: var(--tracking-tight); }
h5 { font-size: var(--text-xl);  font-weight: 500; letter-spacing: var(--tracking-tight); }
h6 { font-size: var(--text-md);  font-family: var(--font-body); font-weight: 600; letter-spacing: 0; margin: 0; }

p { margin: 0 0 var(--space-4) 0; }
p:last-child { margin-bottom: 0; }

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

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Visually-hidden — accessibility skip-link + screen-reader-only labels */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.visually-hidden:focus {
  position: static; width: auto; height: auto; margin: 0;
  overflow: visible; clip: auto; white-space: normal;
  background: var(--color-primary); color: var(--color-primary-text);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm);
  z-index: 9999;
}

/* ── Editorial / Fraunces helper ─────────────────────────────────────── */
.editorial {
  font-family: var(--font-editorial);
  font-style: italic;
  letter-spacing: 0;
  font-weight: 500;
}
.editorial-eyebrow {
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--color-primary);
  font-size: var(--text-xs);
}

/* ── Eyebrow / kicker labels (wide-tracked gold uppercase Inter) ──────── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--color-primary);
  display: inline-block;
}

/* ── Layout container ────────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad-desktop);
}
@media (max-width: 768px) {
  .container { padding: 0 var(--container-pad-mobile); }
}

/* ── Section padding ─────────────────────────────────────────────────── */
.section-pad   { padding-block: var(--space-8); }
.section-pad-sm { padding-block: var(--space-6); }
@media (max-width: 768px) {
  .section-pad   { padding-block: var(--space-7); }
  .section-pad-sm { padding-block: var(--space-5); }
}

/* ── Reveal animation (toggled by scroll-reveal IO in layout) ────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
[data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ── Selection ───────────────────────────────────────────────────────── */
::selection {
  background: var(--color-primary);
  color: var(--color-primary-text);
}

/* ── Focus visible (a11y) ────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Common section title pattern (used by many home sections) ───────── */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.section-head__title {
  font-size: var(--text-2xl);
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
}
.section-head__link {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-primary);
}
@media (max-width: 640px) {
  .section-head { align-items: flex-start; flex-direction: row; }
  .section-head__title { font-size: var(--text-xl); }
}

/* ── Tabular numerals for prices / counts / chips ────────────────────── */
.num-tab, .price, .chip-num, .stat-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}
