/* ============================================================
   h-imports — Shared Styles fuer alle 3 Onepager-Varianten

   Wird von A-catalogue.html, B-terminal.html und C-editorial.html
   gleichermassen geladen. Hier liegen alle Tokens, Base-Styles
   und Komponenten die in allen Varianten identisch sind.

   Variante-spezifische Styles bleiben inline in der jeweiligen
   HTML-Datei (Hero-Layout, Hauptelement-Tabellen, etc.).

   Aenderungen hier wirken auf ALLE drei Varianten gleichzeitig.
   ============================================================ */


/* ============================================================
   1. BRAND TOKENS
   Hier liegen alle Farben, Fonts und Spacing-Werte.
   Aenderungen hier sind das einfachste Steuerelement fuer
   das gesamte Brand-System.
   ============================================================ */
:root {
  /* --- Farben --- */
  --bg: #F5F2EC;            /* Cream Paper — warmes Off-White */
  --bg-card: #FFFFFF;       /* Reinweiss fuer Cards (Akzent zur Cream-BG) */
  --bg-dark: #111111;       /* Ink Black */
  --text: #111111;          /* Body-Text */
  --muted: #6B6660;         /* Stone — waermer als #707070 grey */
  --on-dark: #F5F2EC;       /* Text auf dunklem BG */
  --accent: #D4502A;        /* Rost-Orange — der einzige Akzent */
  --accent-dark: #B23E1D;   /* Hover-State fuer Accent */
  --accent-soft: rgba(212, 80, 42, 0.08);
  --hairline: #DDD8CE;      /* Cream Border */
  --border: #111111;        /* Default Border-Farbe */

  /* --- Typografie --- */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* --- Layout --- */
  --container: 1320px;
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --section-y: clamp(3rem, 7vw, 5rem);

  /* --- Border-Width --- */
  --border-w: 1.5px;        /* mittel — nicht hairline (1px), nicht heavy (2px) */
}

html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }


/* ============================================================
   2. RESET / BASE
   ============================================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Lenis Smooth Scroll Klassen — werden vom Lenis-JS gesetzt */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  -webkit-tap-highlight-color: rgba(212, 80, 42, 0.15);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }


/* ============================================================
   3. CUSTOM SCROLLBAR
   Brand-konform statt Browser-Default.
   Variante C ueberschreibt mit dickerer Variante.
   ============================================================ */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track {
  background: var(--bg);
  border-left: 1px solid var(--hairline);
}
::-webkit-scrollbar-thumb {
  background: var(--text);
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
html {
  scrollbar-width: thin;
  scrollbar-color: var(--text) var(--bg);
}


/* ============================================================
   4. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.75rem, 6vw, 5rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.5rem, 2.25vw, 2rem); }
h4 { font-size: 1.125rem; font-weight: 500; }

p { max-width: 60ch; margin-bottom: 1rem; }
p.lead { font-size: 1.15rem; line-height: 1.55; max-width: 55ch; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}


/* ============================================================
   5. LAYOUT — Container & Section Base
   ============================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section {
  padding: var(--section-y) 0;
  border-bottom: var(--border-w) solid var(--text);
}

/* Skip-Link — BFSG / WCAG Pflicht */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 0.75rem 1rem;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
  gap: 2rem;
}
@media (max-width: 700px) {
  .section-head { flex-direction: column; align-items: start; gap: 0.5rem; }
  .section-head .section-num { order: -1; }
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}


/* ============================================================
   6. STILELEMENT 01 — Box Bullet
   Die echte Box-Form aus dem Logo (per potrace extrahiert).
   SVG als data-URL inline → funktioniert auch unter file://
   (kein CORS). Faerbt sich per currentColor.
   ============================================================ */
.bullet {
  --box-mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 469 469'%3E%3Cg transform='translate(0,469) scale(0.1,-0.1)' fill='%23000'%3E%3Cpath d='M2775 4566 c-16 -7 -57 -33 -90 -58 -62 -46 -2470 -1907 -2539 -1962 -87 -70 -116 -175 -74 -267 14 -30 110 -164 214 -299 927 -1204 1347 -1743 1390 -1786 86 -88 195 -96 303 -21 61 41 2501 1926 2569 1984 29 25 62 62 72 84 27 51 27 146 1 198 -29 55 -1554 2029 -1607 2078 -65 61 -166 81 -239 49z m823 -1248 c742 -962 742 -962 720 -984 -13 -12 -574 -447 -1247 -967 -1224 -945 -1224 -945 -1246 -919 -103 125 -1458 1888 -1459 1899 -1 11 2469 1933 2484 1932 3 0 339 -432 748 -961z'/%3E%3C/g%3E%3C/svg%3E");
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  background-color: currentColor;
  -webkit-mask: var(--box-mask) no-repeat center / contain;
          mask: var(--box-mask) no-repeat center / contain;
  margin-right: 0.55em;
  vertical-align: -0.1em;
}
.bullet.accent { color: var(--accent); }

.bullet-list { list-style: none; padding: 0; }
.bullet-list li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.4rem 0;
  font-size: 1rem;
}
.bullet-list li::before {
  content: '';
  flex-shrink: 0;
  width: 0.85em;
  height: 0.85em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 469 469'%3E%3Cg transform='translate(0,469) scale(0.1,-0.1)' fill='%23000'%3E%3Cpath d='M2775 4566 c-16 -7 -57 -33 -90 -58 -62 -46 -2470 -1907 -2539 -1962 -87 -70 -116 -175 -74 -267 14 -30 110 -164 214 -299 927 -1204 1347 -1743 1390 -1786 86 -88 195 -96 303 -21 61 41 2501 1926 2569 1984 29 25 62 62 72 84 27 51 27 146 1 198 -29 55 -1554 2029 -1607 2078 -65 61 -166 81 -239 49z m823 -1248 c742 -962 742 -962 720 -984 -13 -12 -574 -447 -1247 -967 -1224 -945 -1224 -945 -1246 -919 -103 125 -1458 1888 -1459 1899 -1 11 2469 1933 2484 1932 3 0 339 -432 748 -961z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 469 469'%3E%3Cg transform='translate(0,469) scale(0.1,-0.1)' fill='%23000'%3E%3Cpath d='M2775 4566 c-16 -7 -57 -33 -90 -58 -62 -46 -2470 -1907 -2539 -1962 -87 -70 -116 -175 -74 -267 14 -30 110 -164 214 -299 927 -1204 1347 -1743 1390 -1786 86 -88 195 -96 303 -21 61 41 2501 1926 2569 1984 29 25 62 62 72 84 27 51 27 146 1 198 -29 55 -1554 2029 -1607 2078 -65 61 -166 81 -239 49z m823 -1248 c742 -962 742 -962 720 -984 -13 -12 -574 -447 -1247 -967 -1224 -945 -1224 -945 -1246 -919 -103 125 -1458 1888 -1459 1899 -1 11 2469 1933 2484 1932 3 0 339 -432 748 -961z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
}


/* ============================================================
   7. STILELEMENT 10 — N-Pfeil Header-Marker
   ============================================================ */
.compass-n {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  line-height: 1;
  color: var(--text);
}
.compass-n::before {
  content: '↑';
  font-size: 1rem;
  line-height: 1;
  margin-bottom: 1px;
}


/* ============================================================
   9. BUTTONS
   Wipe-Hover via background-image (kein z-index-Hack noetig,
   Text liegt automatisch ueber dem animierten Background-Layer).
   Lift via translate + Hard-Shadow, Press-Down via :active.
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: var(--border-w) solid var(--text);
  color: var(--text);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background-color: transparent;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0% 100%;
  transition: background-size 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.15s ease 0.18s,
              border-color 0.3s ease,
              transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.btn:hover {
  background-size: 100% 100%;
  color: var(--bg);
  border-color: var(--text);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--text);
}
.btn:active {
  transform: translate(0, 0);
  box-shadow: 0 0 0 var(--text);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Primary: gefuellt schwarz, Hover-Wipe orange */
.btn-primary {
  background-color: var(--text);
  color: var(--bg);
}
.btn-primary:hover {
  color: var(--bg);
  border-color: var(--text);
}

/* Accent: gefuellt orange, Hover-Wipe schwarz */
.btn-accent {
  background-color: var(--accent);
  background-image: linear-gradient(var(--text), var(--text));
  color: var(--bg);
  border-color: var(--accent);
}
.btn-accent:hover {
  color: var(--bg);
  border-color: var(--text);
  box-shadow: 4px 4px 0 var(--accent);
}

.btn-sm { padding: 10px 18px; font-size: 0.7rem; }

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn:hover,
  .btn:active {
    transition: background-color 0.2s ease, color 0.2s ease;
    transform: none;
    box-shadow: none;
  }
  .btn:hover { background-color: var(--accent); background-size: 100% 100%; }
}


/* ============================================================

/* 13. REVEAL ANIMATIONS (IntersectionObserver Trigger)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out,
              transform 0.6s ease-out;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================================
/* 14. IMAGE PARALLAX
   shared.js wickelt alle Bilder in den relevanten Containern
   (.hero-image, .about-image, .story-image, .cat-card .image)
   in einen .parallax-inner Wrapper. Der Wrapper ist leicht
   groesser als der Container und wird beim Scrollen sanft
   vertikal versetzt, sodass die Bilder im Rahmen lebendig
   wirken. Hover-Effekte auf dem <img> selbst (scale, filter)
   bleiben dadurch unveraendert — sie wirken auf das innere
   Element, der Parallax auf den Wrapper.
   ============================================================ */
.parallax-inner {
  position: absolute;
  top: -8%;
  left: 0;
  width: 100%;
  height: 116%;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}
.parallax-inner > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* ============================================================
/* 15. ACCESSIBILITY — prefers-reduced-motion
   Schaltet alle Animationen aus damit BFSG-konform.
   Variante-spezifische Animationen muessen das in ihrer
   eigenen reduced-motion query nochmal nachziehen.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .parallax-inner {
    top: 0;
    height: 100%;
    transform: none !important;
  }
}

  /* ============================================================
     C-EDITORIAL — Variante-spezifische Styles
     Alles was NICHT in shared.css liegt:
     - Custom Cursor (Dot + Ring, Desktop-only)
     - Hero mit Wort-Rotation + Parallax + FIG 01
     - Marquee-Streifen
     - Brand-Row Liste (Stilelement 09)
     - Routes / Story / Final-CTA
     - Footer-Override mit Wind-Rose
     ============================================================ */

  /* Body overflow wegen Marquee */
  body { overflow-x: hidden; }

  /* C-spezifische Scrollbar-Ueberschreibung — dicker, brutaler */
  ::-webkit-scrollbar { width: 12px; }
  ::-webkit-scrollbar-track {
    background: var(--bg);
    border-left: 1.5px solid var(--text);
  }
  ::-webkit-scrollbar-thumb {
    background: var(--text);
    border: 3px solid var(--bg);
  }
  @media (max-width: 700px) {
    ::-webkit-scrollbar { width: 8px; }
    ::-webkit-scrollbar-thumb { border-width: 2px; }
  }

  /* Hero H1 Ueberschreibung — groesser als shared Default */
  .hero h1 {
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 0.95;
    letter-spacing: -0.025em;
  }


  /* ============================================================
     C-SPEZIFISCHE REDUCED-MOTION OVERRIDES
     ============================================================ */
  @media (prefers-reduced-motion: reduce) {
    .marquee-track { animation: none; }
    .hero h1 .rotator::after { animation: none; opacity: 1; }
    .wind-rose svg { animation: none; }
    .cursor-dot, .cursor-ring { display: none; }
    *, *::before, *::after { cursor: auto !important; }
  }


/* ============================================================
   16. WORDPRESS BLOCK-THEME RESETS
   FSE setzt Default-Paddings/Margins auf die Site-Wrapper,
   die fuer das pixel-genaue Design zurueckgedreht werden muessen.
   ============================================================ */
html { scroll-behavior: auto; }

body.wp-site-blocks,
.wp-site-blocks {
  margin: 0;
  padding: 0 !important;
}
.wp-site-blocks > * + * { margin-block-start: 0 !important; }
.wp-site-blocks > header,
.wp-site-blocks > main,
.wp-site-blocks > footer { margin: 0; }

.entry-content > *,
.wp-block-post-content > *,
.wp-block-group { margin-top: 0; margin-bottom: 0; }

.wp-block-post-content,
.entry-content {
  max-width: none;
  padding: 0;
  margin: 0;
}

.is-root-container,
.wp-site-blocks,
.editor-styles-wrapper {
  --wp--style--block-gap: 0;
  --wp--style--root--padding-top: 0;
  --wp--style--root--padding-bottom: 0;
  --wp--style--root--padding-left: 0;
  --wp--style--root--padding-right: 0;
}

.skip-link.screen-reader-text { display: none !important; }


/* ============================================================
   17. LEGAL PAGES (Impressum, Datenschutz)
   Typografie-Abstaende fuer Content-Pages die ueber page.html
   gerendert werden. Die FSE-Resets oben setzen
   .wp-block-group { margin: 0 } universell — hier spezifischer
   wieder hochdrehen, damit der Lesefluss atmet.
   ============================================================ */
main.legal-page {
  padding-top: clamp(6rem, 12vw, 9rem);
  padding-bottom: clamp(4rem, 10vw, 7rem);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
main.legal-page .entry-content,
main.legal-page .wp-block-post-content,
main.legal-page .wp-block-group.is-layout-constrained {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
main.legal-page h1 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  margin-bottom: 2.5rem;
  line-height: 1.05;
}
main.legal-page h2 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin-top: 3rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}
main.legal-page h3 {
  font-size: 1.125rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
main.legal-page p {
  max-width: none;
  margin-bottom: 1.25rem;
  line-height: 1.7;
  color: var(--text);
}
main.legal-page p + p { margin-top: 0; }
main.legal-page a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
main.legal-page a:hover { color: var(--accent-dark); }
main.legal-page ul,
main.legal-page ol {
  margin: 1rem 0 1.5rem;
  padding-left: 1.5rem;
}
main.legal-page li {
  margin-bottom: 0.5rem;
  line-height: 1.65;
}
main.legal-page li::marker { color: var(--muted); }
main.legal-page strong { font-weight: 600; }
main.legal-page em { color: var(--muted); }

.wp-block-image img { border-radius: 0; }
