/* ============================================================
   Scriptica — Base styles
   Reset, typography baseline, focus, utilities.
   ============================================================ */

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

html,
body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style: none;
}

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

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

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

a {
  color: var(--color-default-highlight);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  text-decoration: underline;
}

/* --- Root typography --- */
html {
  font-size: var(--font-size-body);
  font-family: var(--font-family-base);
  color: var(--color-text-primary);
  line-height: var(--line-height-normal);
  background: var(--color-surface-2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background: var(--color-surface-2);
  color: var(--color-text-primary);
}

/* --- Headings --- */
h1 {
  font-size: var(--font-size-headline-1);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
}

h2 {
  font-size: var(--font-size-headline-2);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
}

h3 {
  font-size: var(--font-size-headline-3);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
}

p {
  line-height: var(--line-height-normal);
}

/* --- Focus ring --- */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-default-highlight);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* --- Utilities --- */
.text-muted {
  color: var(--color-text-muted);
}

.text-secondary {
  color: var(--color-text-secondary);
}

.text-critical {
  color: var(--color-critical);
}

.text-success {
  color: var(--color-success);
}

.text-pending {
  color: var(--color-pending);
}

.text-small {
  font-size: var(--font-size-small);
}

.text-tiny {
  font-size: var(--font-size-tiny);
}

.text-bold {
  font-weight: var(--font-weight-bold);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
