/* ─────────────────────────────────────────────────────────────
   DOSSIER — Theme-Overrides für Hextra
   Petrol-Grün auf dunklem Grund (Architektur-Studio-Ästhetik)
   ───────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

/* Krungthep — DOSSIER-Display-Font (Mac-System-Font lokal gebundelt) */
@font-face {
  font-family: 'Krungthep';
  src: url('/fonts/Krungthep.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* — Primary-HSL: Petrol #5fa896 — */
:root {
  --primary-hue: 165deg;
  --primary-saturation: 28%;
  --primary-lightness: 51%;

  /* DOSSIER-Palette */
  --dossier-bg:        #0e1413;
  --dossier-surface:   #161d1c;
  --dossier-surface2:  #1b2422;
  --dossier-dark:      #0a100f;
  --dossier-dark2:     #1f2826;
  --dossier-accent:    #5fa896;
  --dossier-accent-2:  #4a8a7c;
  --dossier-accent-3:  #2f5d54;
  --dossier-text:      #e6e8e6;
  --dossier-text-2:    #b4bcb8;
  --dossier-text-3:    #828a86;
  --dossier-text-4:    #5a625e;
  --dossier-border:    #232b29;
  --dossier-border-2:  #2e3633;
}

.dark {
  --primary-hue: 165deg;
  --primary-saturation: 38%;
  --primary-lightness: 51%;
  --color-dark: var(--dossier-bg);
}

/* — Body & Backgrounds — */
.dark body {
  background: var(--dossier-bg);
  color: var(--dossier-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

.dark ::selection {
  background: rgba(95, 168, 150, 0.30);
  color: #fff;
}

/* — Typografie — Headings serifig, Body monospaced — */
.dark .hextra-toc,
.dark .content,
.dark .prose {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

.dark h1, .dark h2, .dark h3, .dark h4,
.hextra-home h1, .hextra-home h2, .hextra-home h3,
.hx\:text-2xl, .hx\:text-3xl, .hx\:text-4xl, .hx\:text-5xl, .hx\:text-6xl {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
}

/* Navbar-Logo: DOSSIER in Krungthep/Archivo Black — nur navbar! */
.hextra-navbar-title,
nav .hextra-navbar-title,
nav .hextra-max-navbar-width .hx\:font-bold {
  font-family: Krungthep, 'Archivo Black', sans-serif !important;
  letter-spacing: -0.02em !important;
  font-weight: 900 !important;
}

/* — Navbar dunkel mit Border — */
.dark .nav-container {
  background: rgba(14, 20, 19, 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--dossier-border) !important;
}

.dark .nav-container-blur {
  background: transparent !important;
}

/* — Sidebar — */
.dark aside.sidebar-container,
.dark .sidebar-container {
  background: var(--dossier-bg) !important;
  border-right: 1px solid var(--dossier-border);
}

.dark .sidebar-container a {
  color: var(--dossier-text-2);
}

.dark .sidebar-container a:hover {
  color: var(--dossier-accent);
  background: var(--dossier-surface);
}

.dark .sidebar-active-item,
.dark .sidebar-container .sidebar-active-item {
  background: rgba(95, 168, 150, 0.12) !important;
  color: var(--dossier-accent) !important;
  border-color: rgba(95, 168, 150, 0.20) !important;
}

/* — Links — */
.dark a {
  transition: color 0.15s;
}

.dark .content a,
.dark .prose a {
  color: var(--dossier-accent);
  text-decoration: none;
}

.dark .content a:hover,
.dark .prose a:hover {
  color: #6db5a4;
  text-decoration: underline;
}

/* Hextra-Card-Links (<cards>-Shortcode) sollen NIE unterstrichen werden */
.hextra-card,
.hextra-card:hover,
.hextra-card:focus,
.hextra-card:active,
.hextra-card *,
.hextra-card:hover * {
  text-decoration: none !important;
}

a.hextra-card:hover,
a.hextra-card:focus {
  outline: none;
  text-decoration: none !important;
}

/* — Buttons / Hero-Button — */
.hextra-hero-button {
  background: var(--dossier-accent) !important;
  color: #0a1715 !important;
  border-radius: 20px !important;
  padding: 13px 28px !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.07em !important;
  text-transform: uppercase !important;
  box-shadow: 0 6px 18px rgba(95, 168, 150, 0.22);
  transition: all 0.18s;
}

.hextra-hero-button:hover {
  background: #6db5a4 !important;
  box-shadow: 0 10px 26px rgba(95, 168, 150, 0.32);
  transform: translateY(-1px);
}

/* — DOSSIER Hero-Buttons — eigene Pills im RAPPORT-Layout-Pattern — */
.dossier-hero-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
  margin-bottom: 8px;
}

.dossier-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 999px;
  padding: 14px 30px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  user-select: none;
  white-space: nowrap;
}

/* Primary — Petrol-Akzent mit Tiefe */
.dossier-btn-primary {
  background: var(--dossier-accent);
  color: #0a1715 !important;
  border: 1px solid var(--dossier-accent);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.10) inset,
    0 2px 4px rgba(0,0,0,0.30),
    0 8px 20px rgba(0,0,0,0.40),
    0 16px 40px rgba(95,168,150,0.22);
}

.dossier-btn-primary:hover {
  background: #6db5a4;
  border-color: #6db5a4;
  color: #0a1715 !important;
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.10) inset,
    0 4px 8px rgba(0,0,0,0.36),
    0 14px 28px rgba(0,0,0,0.42),
    0 24px 56px rgba(95,168,150,0.32);
}

.dossier-btn-primary:active {
  transform: translateY(0);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.10) inset,
    0 2px 4px rgba(0,0,0,0.30),
    0 4px 12px rgba(0,0,0,0.36);
}

/* Secondary — Outline */
.dossier-btn-secondary {
  background: transparent;
  color: var(--dossier-text-2) !important;
  border: 1.5px solid var(--dossier-border-2);
  box-shadow: 0 2px 6px rgba(0,0,0,0.20);
}

.dossier-btn-secondary:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--dossier-text-3);
  color: var(--dossier-text) !important;
  transform: translateY(-2px);
  box-shadow:
    0 6px 14px rgba(0,0,0,0.28),
    0 12px 28px rgba(0,0,0,0.20);
}

.dossier-btn-secondary:active {
  transform: translateY(0);
}

/* — Hero-Badge — */
.hextra-badge {
  background: var(--dossier-surface) !important;
  border: 1px solid var(--dossier-border-2) !important;
  border-radius: 20px !important;
  padding: 5px 14px !important;
  font-size: 10px !important;
  letter-spacing: 0.12em !important;
  color: var(--dossier-text-3) !important;
  text-transform: uppercase !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif !important;
}

/* — Feature-Cards — */
.hextra-feature-card {
  background: var(--dossier-surface) !important;
  border: 1px solid var(--dossier-border) !important;
  border-radius: 14px !important;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s !important;
}

.hextra-feature-card:hover {
  border-color: var(--dossier-border-2) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.40), 0 2px 8px rgba(0, 0, 0, 0.28) !important;
}

.hextra-feature-card h3 {
  font-family: 'Playfair Display', serif !important;
  color: var(--dossier-text) !important;
  font-weight: 700 !important;
}

.hextra-feature-card p {
  color: var(--dossier-text-3) !important;
  font-size: 12px !important;
  line-height: 1.8 !important;
}

/* — Generic Cards (Hextra <cards> shortcode) — */
.dark .hextra-card {
  background: var(--dossier-surface);
  border: 1px solid var(--dossier-border);
  border-radius: 12px;
  transition: border-color 0.2s, transform 0.2s;
}

.dark .hextra-card:hover {
  border-color: var(--dossier-accent-2);
  transform: translateY(-1px);
}

/* — Code-Blocks — nur innerer pre/highlight bekommt Box, äusserer Wrapper bleibt transparent — */
.dark .hextra-code-block {
  background: transparent !important;
  border: none !important;
}

.dark .hextra-code-block pre,
.dark .hextra-code-block .highlight,
.dark .highlight pre,
.dark pre.chroma {
  background: var(--dossier-dark) !important;
  border: 1px solid var(--dossier-border) !important;
  border-radius: 12px !important;
}

/* Doppelten Border vermeiden wenn pre & highlight beide gestyled werden */
.dark .hextra-code-block .highlight {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
}

.dark code, .dark pre, .dark pre code, .dark kbd, .dark samp, .dark tt {
  font-family: ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, 'Liberation Mono', monospace !important;
}

.dark code {
  color: var(--dossier-accent) !important;
  background: rgba(95, 168, 150, 0.08) !important;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.dark pre code {
  color: var(--dossier-text-2) !important;
  background: transparent !important;
  padding: 0;
}

/* — Callouts — */
.dark .hextra-callout {
  background: var(--dossier-surface) !important;
  border-color: var(--dossier-border-2) !important;
}

/* — Footer — */
.dark .hextra-footer,
.dark footer {
  background: var(--dossier-dark);
  border-top: 1px solid var(--dossier-border-2);
  color: var(--dossier-text-4);
}

.dark .hextra-footer a {
  color: var(--dossier-text-3);
}

.dark .hextra-footer a:hover {
  color: var(--dossier-accent);
}

/* — TOC — */
.dark .hextra-toc a {
  color: var(--dossier-text-3);
}

.dark .hextra-toc a:hover,
.dark .hextra-toc .active {
  color: var(--dossier-accent) !important;
}

/* Hextra-Sticky-Bottom-Fades (TOC "Nach oben" + Sidebar-Footer) — */
/* der hardcoded #111-Fade passt nicht zum petrol-dunklen DOSSIER-Bg */
.hextra-toc div:has(> #backToTop),
[data-toggle-animation] {
  background: var(--dossier-bg) !important;
  box-shadow: none !important;
  border-top-color: var(--dossier-border) !important;
}

/* — Search — */
.dark .hextra-search-wrapper input {
  background: var(--dossier-surface) !important;
  border: 1px solid var(--dossier-border) !important;
  color: var(--dossier-text) !important;
}

.dark .hextra-search-wrapper input:focus {
  border-color: var(--dossier-accent-2) !important;
}

/* — Tabellen — */
.dark table {
  border-color: var(--dossier-border) !important;
}

.dark thead {
  background: var(--dossier-surface) !important;
}

.dark th, .dark td {
  border-color: var(--dossier-border) !important;
}

/* — Hero-Section Hintergrund-Glow — */
.hextra-home::before,
body.hextra-home::before {
  content: "";
  position: fixed;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 720px;
  background: radial-gradient(circle, rgba(95, 168, 150, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

/* — DOSSIER-Logo-Karte (für hero) — Pill-Form — */
.dossier-logo-card {
  background: var(--dossier-surface);
  border: 1px solid var(--dossier-border-2);
  border-radius: 999px;
  padding: 28px 64px 26px;
  display: inline-block;
  box-shadow: 6px 0 20px rgba(0, 0, 0, 0.40), 0 6px 16px rgba(0, 0, 0, 0.28);
  text-align: center;
  margin: 0 auto 32px;
}

.dossier-logo-text {
  font-family: Krungthep, 'Archivo Black', sans-serif;
  font-size: 42px;
  letter-spacing: -0.02em;
  color: var(--dossier-text);
  line-height: 0.95;
}

.dossier-logo-sub {
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--dossier-accent);
  text-transform: uppercase;
  margin-top: 8px;
  font-weight: 500;
}

/* — Hero-Meta-Pillen — */
.dossier-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

.dossier-meta-item {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--dossier-text-4);
  text-transform: uppercase;
  padding: 0 10px;
  border-right: 1px solid var(--dossier-border);
}

.dossier-meta-item:last-child {
  border-right: none;
}

/* — Status-Badges (in Arbeit / Geplant / Stabil) — */
.dossier-status {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 10px;
  margin-bottom: 8px;
  font-weight: 500;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

.dossier-status.active {
  background: rgba(95, 168, 150, 0.12);
  color: var(--dossier-accent);
  border: 1px solid rgba(95, 168, 150, 0.20);
}

.dossier-status.planned {
  background: rgba(255, 255, 255, 0.04);
  color: var(--dossier-text-3);
  border: 1px solid var(--dossier-border-2);
}

.dossier-status.stable {
  background: rgba(95, 168, 150, 0.20);
  color: #e6e8e6;
  border: 1px solid var(--dossier-accent-2);
}

/* — Stack-Bar (am Footer) — */
.dossier-stack-bar {
  padding: 20px 0;
  border-top: 1px solid var(--dossier-border);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 32px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

.dossier-stack-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dossier-text-4);
  flex-shrink: 0;
}

.dossier-stack-items {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dossier-stack-item {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--dossier-text-3);
  background: var(--dossier-surface);
  border: 1px solid var(--dossier-border);
  border-radius: 6px;
  padding: 4px 10px;
}

/* — Reduce default content max-width slightly for monospace lines — */
.content article {
  max-width: 100%;
}

/* ─────────────────────────────────────────────────────────────
   HOME-HERO — zentriertes Layout wie auf der alten Website
   ───────────────────────────────────────────────────────────── */

/* Inhalt der home Page zentrieren (override hextra-home.html) */
.hextra-home {
  align-items: center !important;
  text-align: center;
  max-width: 100%;
}

/* Subtitle zentriert, schmaler max-width, Playfair Display wie alt */
.hextra-home > p,
.hextra-home .not-prose.hx\:text-xl {
  font-family: 'Playfair Display', serif !important;
  font-size: clamp(16px, 2.2vw, 24px) !important;
  font-weight: 400 !important;
  color: var(--dossier-text-2) !important;
  max-width: 560px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  line-height: 1.55 !important;
  text-align: center;
}

/* Buttons immer in einer zentrierten Zeile */
.hextra-home > div.hx\:flex,
.hextra-home > .hx\:flex {
  justify-content: center;
  align-items: center;
}

/* Hero-Button matches DOSSIER design */
.hextra-home .hextra-hero-button,
a.hextra-hero-button {
  background: var(--dossier-accent);
  color: #0a1715 !important;
  border-radius: 20px;
  padding: 13px 28px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.07em !important;
  text-transform: uppercase !important;
  box-shadow: 0 6px 18px rgba(95, 168, 150, 0.22);
  transition: all 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

/* Feature-Grid wieder linksbündig (text in cards) */
.hextra-home .hextra-feature-grid,
.hextra-home .dossier-stack-bar {
  text-align: left;
  width: 100%;
}

/* Cards & Stack-Bar Inhalte: text wieder normal ausrichten */
.hextra-home .hextra-feature-card * {
  text-align: left;
}

.dossier-stack-bar {
  justify-content: flex-start;
  text-align: left;
}

/* Section-Heading & Eyebrow vor dem Feature-Grid auch zentrieren */
.hextra-home h2,
.hextra-home > div > h2 {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* DOSSIER-Logo bleibt zentriert */
.hextra-home .dossier-logo-card {
  margin-left: auto;
  margin-right: auto;
  display: block;
}

/* Hero-Badge zentrieren */
.hextra-home .hextra-badge,
.hextra-home > p:has(.hextra-badge) {
  margin-left: auto;
  margin-right: auto;
  display: inline-flex !important;
}

/* Hero-Background-Glow — sanfter Petrol-Halo */
body:has(.hextra-home)::before {
  content: "";
  position: fixed;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 720px;
  background: radial-gradient(circle, rgba(95, 168, 150, 0.10) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* DOSSIER-Logo grösser und expressiver */
.dossier-logo-text {
  font-family: 'Krungthep', 'Archivo Black', sans-serif !important;
  font-size: 48px;
  letter-spacing: -0.02em;
  color: var(--dossier-text);
  line-height: 0.95;
  font-weight: 400;
}

/* Navbar-Logo — DOSSIER-Schriftzug in Krungthep, etwas grösser */
.hextra-navbar-title,
nav a[href="/"] span,
nav [class*="font-bold"] {
  font-family: 'Krungthep', 'Archivo Black', sans-serif !important;
  letter-spacing: -0.02em !important;
  font-weight: 400 !important;
  font-size: 23px !important;
  line-height: 1 !important;
}

/* DOSSIER-Meta-Pillen zentriert */
.dossier-meta {
  justify-content: center;
  text-align: center;
}

