/* ==========================================================================
   Merava Private — Base Styles
   --------------------------------------------------------------------------
   Globale Defaults für native HTML-Elemente (kein Komponenten-Styling).
   Alles tokenbasiert.
   ========================================================================== */

/* -------------------------------------------------------------------------
   Self-hosted Fonts (DSGVO — kein Google-CDN)
   ------------------------------------------------------------------------- */

@font-face {
  font-family: "Righteous";
  src: url("../fonts/righteous/Righteous-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins/Poppins-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* -------------------------------------------------------------------------
   Body — Background + Body-Type-Defaults
   ------------------------------------------------------------------------- */

body {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: var(--text-base);
  line-height: var(--leading-body);          /* 1.6 — Webflow-Default */
  color: var(--text-primary);                /* #000 */
  background-color: var(--bg-primary);       /* #FEFCF8 */
}

/* -------------------------------------------------------------------------
   Headings — 1:1 nach Webflow-Spec
   -------------------------------------------------------------------------
   ALLE Headings = Righteous Regular (font-weight 400).
   Sizes Webflow-Skala:
     h1 84px / h2 60px / h3 48px / h4 40px / h5 32px / h6 26px
   Letter-Spacing dezent positiv (1% der Font-Size).
   ------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  color: var(--text-primary);
}

h1 {
  font-size: var(--text-6xl);                /* 84 px desktop */
  line-height: var(--leading-tight);         /* 1.1 */
  letter-spacing: var(--tracking-h1);
}

h2 {
  font-size: var(--text-5xl);                /* 60 px */
  line-height: var(--leading-snug);          /* 1.2 */
  letter-spacing: var(--tracking-h2);
}

h3 {
  font-size: var(--text-4xl);                /* 48 px */
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-h3);
}

h4 {
  font-size: var(--text-3xl);                /* 40 px */
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-h4);
}

h5 {
  font-size: var(--text-2xl);                /* 32 px */
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-h5);
}

h6 {
  font-size: var(--text-xl);                 /* 26 px */
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-h6);
}

/* -------------------------------------------------------------------------
   Paragraphs & Inline-Text
   ------------------------------------------------------------------------- */

p {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
  max-width: 65ch;   /* optimale Lesebreite — kann per Klasse aufgehoben werden */
}

p + p {
  margin-top: var(--space-4);
}

strong, b {
  font-weight: var(--weight-semibold);
}

em, i {
  font-style: italic;
}

small {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* -------------------------------------------------------------------------
   Links — generischer Hover; Komponenten haben spezifische Stile
   ------------------------------------------------------------------------- */

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  /* Kein globales transition: color — Buttons & Nav haben ihre eigene Logik */
}

/* Hover-Color NUR für Body-Text-Links (in <p> oder .prose).
   <li> wird NICHT mit eingeschlossen — Listen sind typischerweise Nav,
   Card-Listings oder Item-Listen mit eigenen Link-Stilen. Body-Text-Links
   in Markdown-Listen brauchen entweder eine .prose-Hülle oder einen
   explizit gesetzten Link-Stil. */
p a:not(.btn),
.prose a:not(.btn) {
  text-decoration: underline;
  transition: color var(--duration-fast) var(--ease-default);
}

p a:not(.btn):hover,
.prose a:not(.btn):hover {
  color: var(--accent);
}

/* .prose — Wrapper für Kirbytext-Output mit mehreren <p> oder Listen. Sorgt
   für vertikale Trennung, weil unser globales `* { margin: 0 }` reset alle
   Browser-Defaults killt. */
.prose > p + p,
.prose > p + ul,
.prose > p + ol,
.prose > ul + p,
.prose > ol + p {
  margin-top: var(--space-4);
}

/* -------------------------------------------------------------------------
   Buttons (Generic) — feinere Varianten als Komponentenklassen (Stage 2)
   ------------------------------------------------------------------------- */

button {
  font-family: var(--font-body);
}

/* -------------------------------------------------------------------------
   Images & Figures
   ------------------------------------------------------------------------- */

img {
  background-repeat: no-repeat;
  background-size: cover;
}

figure {
  margin: 0;
}

figcaption {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-3);
}

/* -------------------------------------------------------------------------
   Horizontal Rule — Hairline statt klobiger Default
   ------------------------------------------------------------------------- */

hr {
  border: 0;
  height: 1px;
  background-color: var(--border);
  margin: var(--space-7) 0;
}

/* -------------------------------------------------------------------------
   Code / Pre (Styleguide / Legal Docs)
   ------------------------------------------------------------------------- */

code,
kbd,
samp,
pre {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
}

code {
  background-color: var(--color-cream-deep);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);     /* 4 px — Konsistenz */
}

pre {
  background-color: var(--color-dark);
  color: var(--text-on-dark);
  padding: var(--space-5);
  border-radius: var(--radius-card);    /* 8 px — wie Cards */
  overflow-x: auto;
}

pre code {
  background: transparent;
  padding: 0;
}
