/*
 * MARKT_UI_SYSTEM_V1 — base.css
 * Batch 5.2 · DIETRICH OS · betongoldmarkt.de
 *
 * Global base primitives. Uses only --mc-* tokens from tokens.css.
 * Additive resets and defaults — no component rules, no layout rules.
 * Load order: tokens.css → base.css → layout.css → markt.css
 */


/* ═══════════════════════════════════════════════════════
   BOX-SIZING — universal border-box
═══════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
}


/* ═══════════════════════════════════════════════════════
   HTML / BODY BASE
═══════════════════════════════════════════════════════ */
html {
  font-size: 100%;
  line-height: var(--mc-leading-normal);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  tab-size: 4;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--mc-bg);
  color: var(--mc-text);
  font-family: var(--mc-font-body);
  font-size: var(--mc-type-body);
  line-height: var(--mc-leading-normal);
  min-height: 100vh;
}


/* ═══════════════════════════════════════════════════════
   FONT SMOOTHING
═══════════════════════════════════════════════════════ */
body,
input,
button,
select,
textarea {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ═══════════════════════════════════════════════════════
   IMAGE DEFAULTS
═══════════════════════════════════════════════════════ */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}


/* ═══════════════════════════════════════════════════════
   LINK DEFAULTS
   Preserve markt.css/style.css overrides — these apply
   only where no other rule is in scope.
═══════════════════════════════════════════════════════ */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}


/* ═══════════════════════════════════════════════════════
   BUTTON RESET
   Strips browser chrome. Does NOT style buttons —
   component rules handle appearance.
═══════════════════════════════════════════════════════ */
button {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  line-height: inherit;
}


/* ═══════════════════════════════════════════════════════
   FOCUS-VISIBLE BASELINE
   Visible ring for keyboard navigation only.
   Component-level :focus rules are not overridden.
═══════════════════════════════════════════════════════ */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--mc-gold);
  outline-offset: 3px;
  border-radius: var(--mc-radius-sm);
}


/* ═══════════════════════════════════════════════════════
   REDUCED-MOTION SUPPORT
   Kills transitions and animations for users who
   prefer reduced motion. Does not affect layout.
═══════════════════════════════════════════════════════ */
@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;
  }
}


/* ═══════════════════════════════════════════════════════
   TYPOGRAPHY BASELINE
   Headings inherit body font so display font can be
   applied per-component via var(--mc-font-display).
═══════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  line-height: var(--mc-leading-tight);
}

p {
  margin: 0;
}

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


/* ═══════════════════════════════════════════════════════
   FORM ELEMENT BASELINE
   Ensures form elements inherit body font.
   Does NOT style inputs — forms are untouched.
═══════════════════════════════════════════════════════ */
input,
button,
select,
textarea {
  font: inherit;
}

textarea {
  resize: vertical;
}
