/* ============================================================
   CHIKITSAALYE — BASE STYLES
   Reset, body defaults, typography, utility classes
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
@import url('tokens.css');

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--surface-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--brand-teal);
  text-decoration: none;
  transition: var(--transition-fast);
}
a:hover { color: var(--brand-navy); }

ul, ol { list-style: none; }

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

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

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
}

h1 { font-size: var(--text-5xl); font-weight: var(--weight-bold); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

p { line-height: var(--leading-relaxed); }

/* ── SCROLL ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface-muted); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--brand-teal); }

/* ── FOCUS ──────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--brand-teal);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── TYPOGRAPHY UTILITIES ───────────────────────────────────── */
.text-xs    { font-size: var(--text-xs); }
.text-sm    { font-size: var(--text-sm); }
.text-base  { font-size: var(--text-base); }
.text-md    { font-size: var(--text-md); }
.text-lg    { font-size: var(--text-lg); }
.text-xl    { font-size: var(--text-xl); }
.text-2xl   { font-size: var(--text-2xl); }
.text-3xl   { font-size: var(--text-3xl); }
.text-4xl   { font-size: var(--text-4xl); }

.font-normal   { font-weight: var(--weight-normal); }
.font-medium   { font-weight: var(--weight-medium); }
.font-semibold { font-weight: var(--weight-semibold); }
.font-bold     { font-weight: var(--weight-bold); }

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-faint     { color: var(--text-faint); }
.text-brand     { color: var(--brand-teal); }
.text-navy      { color: var(--brand-navy); }
.text-danger    { color: var(--color-danger); }
.text-success   { color: var(--color-success); }
.text-warning   { color: var(--color-warning); }
.text-inverse   { color: var(--text-inverse); }

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

.uppercase   { text-transform: uppercase; }
.tracking-wider { letter-spacing: var(--tracking-wider); }

/* ── DISPLAY UTILITIES ──────────────────────────────────────── */
.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.flex-wrap  { flex-wrap: wrap; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.items-end     { align-items: flex-end; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.gap-1  { gap: var(--space-1); }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }

.grid        { display: grid; }
.hidden      { display: none !important; }
.block       { display: block; }
.inline-flex { display: inline-flex; }

/* ── SPACING UTILITIES ──────────────────────────────────────── */
.mt-1  { margin-top: var(--space-1); }
.mt-2  { margin-top: var(--space-2); }
.mt-3  { margin-top: var(--space-3); }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mb-1  { margin-bottom: var(--space-1); }
.mb-2  { margin-bottom: var(--space-2); }
.mb-3  { margin-bottom: var(--space-3); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }

.p-2   { padding: var(--space-2); }
.p-3   { padding: var(--space-3); }
.p-4   { padding: var(--space-4); }
.p-6   { padding: var(--space-6); }
.px-4  { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-6  { padding-left: var(--space-6); padding-right: var(--space-6); }
.py-2  { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-4  { padding-top: var(--space-4); padding-bottom: var(--space-4); }

/* ── WIDTH UTILITIES ─────────────────────────────────────────── */
.w-full  { width: 100%; }
.w-auto  { width: auto; }
.max-w   { max-width: var(--max-width); margin-left: auto; margin-right: auto; }
.flex-1  { flex: 1; }
.min-w-0 { min-width: 0; }

/* ── COLOR UTILITIES ─────────────────────────────────────────── */
.bg-white  { background: var(--surface-white); }
.bg-base   { background: var(--surface-base); }
.bg-subtle { background: var(--surface-subtle); }
.bg-navy   { background: var(--brand-navy); }
.bg-teal   { background: var(--brand-teal); }

/* ── BORDER UTILITIES ─────────────────────────────────────────── */
.border       { border: 1px solid var(--border-light); }
.border-top   { border-top: 1px solid var(--border-light); }
.border-bottom{ border-bottom: 1px solid var(--border-light); }
.rounded      { border-radius: var(--radius-md); }
.rounded-lg   { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

/* ── SHADOW UTILITIES ─────────────────────────────────────────── */
.shadow-sm  { box-shadow: var(--shadow-sm); }
.shadow-md  { box-shadow: var(--shadow-md); }
.shadow-card{ box-shadow: var(--shadow-card); }

/* ── TRUNCATE ─────────────────────────────────────────────────── */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── DIVIDER ─────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border-light);
  margin: var(--space-4) 0;
}

/* ── SKIP LINK (a11y) ─────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--brand-navy);
  color: white;
  padding: 8px 16px;
  z-index: var(--z-toast);
  border-radius: 0 0 var(--radius-md) 0;
  font-weight: var(--weight-semibold);
}
.skip-link:focus { top: 0; }

/* ── SECTION LABEL ────────────────────────────────────────────── */
.section-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--brand-teal);
  margin-bottom: var(--space-3);
}

/* ── OVERFLOW ────────────────────────────────────────────────── */
.overflow-hidden  { overflow: hidden; }
.overflow-auto    { overflow: auto; }
.overflow-x-auto  { overflow-x: auto; }

/* ── POSITION ────────────────────────────────────────────────── */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky   { position: sticky; }

/* ── SEPARATOR DOT ───────────────────────────────────────────── */
.sep-dot::before {
  content: '·';
  margin: 0 var(--space-2);
  color: var(--text-faint);
}
