/* =====================================================================
   IHA Spaces — Base styles
   Element resets and HTML defaults. Map type styles to semantic HTML
   so authors can write content without thinking about classes.
   ===================================================================== */

/* ---------- Reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--text-body-m);
  font-weight: 400;
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
  background: var(--surface-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

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

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

figure {
  margin: 0;
}

/* ---------- Typography defaults mapped to semantic HTML ---------- */

h1 {
  font-family: var(--font-serif);
  font-size: var(--text-display-m);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--space-5);
}

h2 {
  font-family: var(--font-serif);
  font-size: var(--text-heading-l);
  font-weight: 400;
  line-height: var(--leading-snug);
  margin: 0 0 var(--space-5);
}

h3 {
  font-family: var(--font-serif);
  font-size: var(--text-heading-m);
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 var(--space-4);
}

h4 {
  font-family: var(--font-serif);
  font-size: var(--text-heading-s);
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 var(--space-3);
}

p {
  font-family: var(--font-serif);
  font-size: var(--text-body-m);
  line-height: var(--leading-relaxed);
  max-width: 65ch;
  margin: 0 0 var(--space-5);
}

small {
  font-family: var(--font-sans);
  font-size: var(--text-caption);
  line-height: var(--leading-normal);
  color: var(--text-secondary);
}

em {
  font-style: italic;
  font-family: inherit;
}

strong {
  font-weight: 500;   /* The system has no bold. */
}

/* ---------- Links ---------- */

a {
  color: var(--text-brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 200ms ease;
}
a:hover { color: var(--text-brand-strong); }
a:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 3px;
}

/* ---------- Selection ---------- */

::selection {
  background: var(--athangudi-100);
  color: var(--athangudi-900);
}

/* ---------- 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;
  }
  html { scroll-behavior: auto; }
}
