/* ═══════════════════════════════════════════════════════════════════
   ui-kit / core / reset.css
   ───
   Opinionated baseline. Load before tokens.css and components.css.
   ═══════════════════════════════════════════════════════════════════ */

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

html {
  height: 100%;
  /* Prevent font size inflation on mobile */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Smooth scroll — honour reduced-motion below */
  scroll-behavior: smooth;
  /* Better tap highlight on iOS */
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100%;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: var(--text-base, 15px);
  line-height: var(--leading-normal, 1.5);
  color: var(--text-1, #f0eff2);
  background: var(--bg, #080809);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Prevent horizontal scroll from overflowing children */
  overflow-x: hidden;
  /* Safe area for notched devices */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

/* Typography resets */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display, Georgia, serif);
  font-weight: var(--weight-bold, 700);
  line-height: var(--leading-tight, 1.1);
  letter-spacing: var(--tracking-tight, -0.02em);
  color: var(--text-1);
}

p {
  line-height: var(--leading-relaxed, 1.7);
  color: var(--text-2);
}

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

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

img {
  /* Prevent layout shift while loading */
  height: auto;
  /* Improve rendering */
  image-rendering: -webkit-optimize-contrast;
}

/* Form resets */
button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  -webkit-appearance: none;
  appearance: none;
}

input, textarea, select {
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

textarea {
  resize: vertical;
}

/* List resets */
ul, ol {
  list-style: none;
}

/* Table resets */
table {
  border-collapse: collapse;
  width: 100%;
}

/* Focusable elements — always provide focus ring */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

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

/* Selection */
::selection {
  background: var(--brand-soft, rgba(230,57,70,0.2));
  color: var(--text-1);
}

/* Scrollbar — webkit */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--border-str); }

/* Firefox */
* { scrollbar-width: thin; scrollbar-color: var(--border-hi) transparent; }
