/* ================================================================
   fabric-stock24 – BASE
   Reset · Typografie · Utilities
   Abhängig von: tokens.css
================================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-3);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover { text-decoration: underline; color: var(--primary-h); }

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
}

ul, ol { list-style: none; }

/* ── Typografie ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.02em;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
h4 { font-size: 1.05rem; }
h5 { font-size: .95rem; }

p {
  color: var(--muted);
  line-height: 1.75;
}

p + p { margin-top: .75em; }

small { font-size: .8125rem; }

strong { font-weight: 700; }

/* ── Layout-Utilities ────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.container-sm {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.section {
  padding: var(--sp-20) 0;
}

.section-sm {
  padding: var(--sp-12) 0;
}

/* ── Flex / Grid Utilities ───────────────────────────────── */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center{ align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.flex-wrap   { flex-wrap: wrap; }
.flex-1      { flex: 1; }
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); }

/* ── Farb-Utilities ──────────────────────────────────────── */
.text-primary  { color: var(--primary) !important; }
.text-success  { color: var(--success) !important; }
.text-warning  { color: var(--warning) !important; }
.text-danger   { color: var(--danger) !important; }
.text-muted    { color: var(--muted) !important; }
.text-subtle   { color: var(--subtle) !important; }
.text-ink      { color: var(--ink) !important; }
.text-white    { color: var(--white) !important; }
.text-green    { color: var(--green-600) !important; }

/* ── Text-Utilities ──────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }
.text-sm     { font-size: .875rem; }
.text-xs     { font-size: .75rem; }
.text-lg     { font-size: 1.125rem; }
.font-600    { font-weight: 600; }
.font-700    { font-weight: 700; }
.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uppercase   { text-transform: uppercase; letter-spacing: .05em; }

/* ── Spacing-Utilities ───────────────────────────────────── */
.mt-1 { margin-top: var(--sp-1); }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }
.ml-auto { margin-left: auto; }

/* ── Display ─────────────────────────────────────────────── */
.block         { display: block; }
.inline-flex   { display: inline-flex; }
.hidden        { display: none !important; }
.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;
}

/* ── Visual ──────────────────────────────────────────────── */
.rounded-full { border-radius: var(--r-full); }
.rounded      { border-radius: var(--r); }
.rounded-lg   { border-radius: var(--r-lg); }
.overflow-hidden { overflow: hidden; }
.w-full       { width: 100%; }
.h-full       { height: 100%; }
.relative     { position: relative; }
.absolute     { position: absolute; }
.sticky       { position: sticky; }

/* ── Section Header Pattern ──────────────────────────────── */
.section-header {
  margin-bottom: var(--sp-12);
}

.section-header.centered {
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-l);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  margin-bottom: var(--sp-3);
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: var(--sp-3);
}

.section-title span,
.section-title .text-green {
  color: var(--primary);
}

.section-sub {
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.75;
}

/* ── Divider ──────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--sp-6) 0;
}

/* ── Smooth Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar        { width: 6px; height: 6px; }
::-webkit-scrollbar-track  { background: var(--surface); }
::-webkit-scrollbar-thumb  { background: var(--border-2); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Selection ────────────────────────────────────────────── */
::selection {
  background: var(--green-200);
  color: var(--green-800);
}

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