/* ============================================================
   LOKA Base Styles — Reset, Typography, Body
   ============================================================ */

/* --- Reset & Box Model --- */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-relaxed);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Selection --- */

::selection {
  background: var(--color-signal-mint, var(--color-signal));
  color: var(--color-earth-deep);
}

/* --- Scrollbar (webkit) --- */

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-alt);
}
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.25);
}

/* --- Focus --- */

:focus-visible {
  outline: 2px solid var(--color-signal);
  outline-offset: 3px;
  border-radius: 3px;
}

/* --- Typography --- */

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

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

/* Instrument Serif italic for hero emphasis */
.display-italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--weight-regular);
}

/* Section eyebrow / label */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-signal);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1.5px;
  background: var(--color-signal);
  flex-shrink: 0;
}

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

strong {
  color: var(--color-text-primary);
  font-weight: var(--weight-semibold);
}

em {
  font-style: italic;
  color: var(--color-text-primary);
}

/* --- Utility --- */

.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;
}

.text-signal   { color: var(--color-signal); }
.text-amber    { color: var(--color-amber); }
.text-muted    { color: var(--color-text-muted); }
.text-primary  { color: var(--color-text-primary); }
.text-center   { text-align: center; }

/* --- Divider --- */

hr {
  border: none;
  border-top: 1px solid var(--color-divider);
}

/* --- 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;
  }
}
