/* ==========================================================================
   TerraCelest Base Reset & Typography
   Path: /css/base.css
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  width: 100%;
  min-height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg);
  color: var(--text-main);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--transition-base), color var(--transition-base);
}

body.full-bleed {
  min-height: 100dvh;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--navy);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.025em;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4 {
  color: var(--text-main);
}

a {
  color: var(--primary);
  text-decoration: none;
  touch-action: manipulation;
}

a:hover {
  text-decoration: underline;
}

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

button {
  border: none;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}

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

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

/* Accessibility Focus Ring */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}
