/* =============================================================================
   mesh-verstehen.de — eigenstaendiges Theme
   -----------------------------------------------------------------------------
   Bewusst NICHT von theme-watch-and-alert, theme-php-buch oder
   theme-windows-absichern abgeleitet. Eigene Variablen mit "mv-"-Prefix,
   eigenes Farbsystem, eigenes Grid.

   Markenfarbe: Salbei-Gruen (Vertrauen, Mesh-Vernetzung, "freundliches" Tech)
   Hintergrund: warm-offwhite, hell und freundlich — KEIN dunkles Theme
   Stilistik:  leitet sich ab vom Buchcover "Tailscale in der Praxis",
                das Stephan Paul auf mesh-verstehen.de vermarktet.
                Eckige, klare Typografie, grosszuegige Luftrue.
   -----------------------------------------------------------------------------
   Konvention: jeder Selektor und jede Variable mit .mv- / --mv- Prefix,
   damit das Theme in einer Contao-Instanz mit anderen Themes kollisionsfrei
   coexistieren kann (wa-/wpb-/wa- nutzen ihre eigenen Praefixe).
   ============================================================================= */

:root {
  --mv-bg:           #f6f4ee;            /* warmes Offwhite (wie Buchcover) */
  --mv-bg-soft:      #ece9df;
  --mv-surface:      #ffffff;
  --mv-surface-2:    #fbfaf5;

  --mv-ink:          #1d2027;            /* Anthrazit statt reines Schwarz */
  --mv-ink-soft:     #4a4d56;
  --mv-muted:        #8a8d96;
  --mv-line:         #d0cdc3;

  --mv-brand:        #2f6f4f;            /* Salbei-Gruen — Markenfarbe */
  --mv-brand-2:      #245940;            /* Hover */
  --mv-brand-soft:   #d8e6dd;            /* Hintergruende (Lead-Box etc.) */

  --mv-warn:         #b15a2c;
  --mv-danger:       #9a2828;

  --mv-radius:       8px;
  --mv-radius-lg:    14px;
  --mv-shadow-sm:    0 1px 2px rgba(29, 32, 39, .05);
  --mv-shadow:       0 4px 18px rgba(29, 32, 39, .07);
  --mv-shadow-lg:    0 18px 48px rgba(29, 32, 39, .10);

  --mv-shell:        1120px;
  --mv-gutter:       24px;
}

/* --- Reset / Basis -------------------------------------------------------- */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body.mv-site {
  font-family: "Inter", "Helvetica Neue", ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--mv-ink);
  background: var(--mv-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--mv-brand);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
a:hover { border-bottom-color: var(--mv-brand); }

h1, h2, h3, h4, h5, h6 {
  font-family: "Inter", "Helvetica Neue", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.018em;
  color: var(--mv-ink);
  margin: 0 0 .55em;
  line-height: 1.15;
}
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); font-weight: 700; }

p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.4em; }
li { margin-bottom: .35em; }

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

hr {
  border: none;
  border-top: 1px solid var(--mv-line);
  margin: 2.2rem 0;
}

/* --- Shell --------------------------------------------------------------- */

.mv-shell {
  max-width: var(--mv-shell);
  margin: 0 auto;
  padding: 0 var(--mv-gutter);
}

/* --- Skip-Link (Barrierefreiheit) ---------------------------------------- */

.mv-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--mv-brand);
  color: white;
  padding: 12px 18px;
  z-index: 1000;
  border-radius: 0 0 var(--mv-radius) var(--mv-radius);
}
.mv-skip:focus { left: 12px; top: 12px; }

/* --- Header / Nav -------------------------------------------------------- */

.mv-header {
  background: var(--mv-bg);
  border-bottom: 1px solid var(--mv-line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(6px);
}

.mv-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 18px var(--mv-gutter);
  max-width: var(--mv-shell);
  margin: 0 auto;
}

.mv-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--mv-ink);
  border-bottom: none;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.mv-brand:hover { border-bottom: none; color: var(--mv-brand); }
.mv-brand-mark {
  width: 36px;
  height: 36px;
  background: var(--mv-brand);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  font-size: 1rem;
}
.mv-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.mv-brand-name { color: var(--mv-ink); font-weight: 800; }
.mv-brand-tag {
  color: var(--mv-muted);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.mv-primary-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.mv-primary-nav a {
  color: var(--mv-ink-soft);
  font-weight: 500;
  font-size: .96rem;
  border-bottom: none;
}
.mv-primary-nav a:hover { color: var(--mv-brand); }
.mv-primary-nav a.mv-btn-buy {
  background: var(--mv-brand);
  color: white;
  padding: 8px 18px;
  border-radius: var(--mv-radius);
  font-weight: 600;
}
.mv-primary-nav a.mv-btn-buy:hover { background: var(--mv-brand-2); color: white; }

/* Mobile-Toggle (Hamburger) */
.mv-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--mv-line);
  border-radius: var(--mv-radius);
  padding: 10px 12px;
  cursor: pointer;
}
.mv-nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--mv-ink);
  margin: 4px 0;
}

@media (max-width: 820px) {
  .mv-nav-toggle { display: block; }
  .mv-primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--mv-bg);
    border-bottom: 1px solid var(--mv-line);
    padding: 18px var(--mv-gutter);
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .mv-primary-nav[data-open="true"] { display: flex; }
}

/* --- Main / Content ------------------------------------------------------ */

.mv-main {
  padding: 48px 0 80px;
  min-height: 60vh;
}

.mv-section {
  padding: 56px 0;
}
.mv-section + .mv-section { border-top: 1px solid var(--mv-line); }

/* Hero (Startseite-Banner) */
.mv-hero {
  padding: 72px 0 48px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
}
.mv-hero h1 { margin-bottom: 18px; }
.mv-hero .mv-hero-eyebrow {
  display: inline-block;
  font-size: .82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mv-brand);
  font-weight: 700;
  margin-bottom: 18px;
}
.mv-hero .mv-hero-sub {
  color: var(--mv-ink-soft);
  font-size: 1.18rem;
  line-height: 1.55;
  max-width: 540px;
  margin-bottom: 28px;
}
.mv-hero-cover {
  border-radius: var(--mv-radius-lg);
  box-shadow: var(--mv-shadow-lg);
}
@media (max-width: 820px) {
  .mv-hero { grid-template-columns: 1fr; gap: 32px; padding-top: 32px; }
  .mv-hero-cover { max-width: 320px; margin: 0 auto; }
}

/* Lead-Box (Klappentext, Salbei-Hintergrund) */
.mv-lead {
  background: var(--mv-brand-soft);
  border-left: 6px solid var(--mv-brand);
  border-radius: var(--mv-radius);
  padding: 32px 36px;
  margin: 24px 0 36px;
  font-size: 1.08rem;
  line-height: 1.55;
}
.mv-lead p { margin-bottom: 14px; }
.mv-lead p:last-child { margin-bottom: 0; }

/* "Was dieses Buch anders macht" (3-spaltig) */
.mv-diff { margin: 40px 0; }
.mv-diff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}
.mv-diff-item {
  background: var(--mv-surface);
  border: 1px solid var(--mv-line);
  border-radius: var(--mv-radius-lg);
  padding: 24px;
}
.mv-diff-item h3 {
  font-size: 1.08rem;
  margin: 0 0 10px;
}
.mv-diff-item p {
  margin: 0;
  color: var(--mv-ink-soft);
  font-size: .95rem;
  line-height: 1.5;
}
@media (max-width: 820px) {
  .mv-diff-grid { grid-template-columns: 1fr; }
}

/* Teil-Gruppen (3-spaltig wie Cover) */
.mv-parts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0;
}
.mv-part {
  background: var(--mv-surface);
  border: 1px solid var(--mv-line);
  border-radius: var(--mv-radius-lg);
  padding: 28px 24px;
}
.mv-part-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.mv-part-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--mv-radius);
  object-fit: cover;
  flex-shrink: 0;
}
.mv-part-header .mv-part-head,
.mv-part-header .mv-part-title { margin-bottom: 0; }
.mv-part-head {
  font-size: .82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mv-brand);
  font-weight: 700;
  margin-bottom: 6px;
}
.mv-part-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--mv-ink);
  margin-bottom: 16px;
}
.mv-part-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mv-part-list li {
  padding: 8px 0;
  border-bottom: 1px dotted var(--mv-line);
  font-size: .98rem;
  color: var(--mv-ink-soft);
}
.mv-part-list li:last-child { border-bottom: none; }
.mv-part-list .mv-num {
  font-weight: 700;
  color: var(--mv-muted);
  margin-right: 10px;
}
@media (max-width: 820px) {
  .mv-parts { grid-template-columns: 1fr; }
}

/* --- Buttons ------------------------------------------------------------- */

.mv-btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--mv-radius);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.mv-btn-primary {
  background: var(--mv-brand);
  color: white;
  border-color: var(--mv-brand);
}
.mv-btn-primary:hover {
  background: var(--mv-brand-2);
  border-color: var(--mv-brand-2);
  color: white;
}
.mv-btn-secondary {
  background: transparent;
  color: var(--mv-brand);
  border-color: var(--mv-brand);
}
.mv-btn-secondary:hover {
  background: var(--mv-brand);
  color: white;
}

/* --- Footer -------------------------------------------------------------- */

.mv-footer {
  background: var(--mv-bg-soft);
  border-top: 1px solid var(--mv-line);
  padding: 48px 0 32px;
  margin-top: 64px;
}
.mv-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.mv-footer-brand {
  font-weight: 800;
  color: var(--mv-ink);
  font-size: 1.05rem;
  margin: 0 0 6px;
}
.mv-footer-meta { color: var(--mv-muted); font-size: .92rem; margin: 0; }
.mv-footer-head {
  font-size: .82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mv-ink);
  font-weight: 700;
  margin: 0 0 14px;
}
.mv-footer nav a {
  display: block;
  padding: 5px 0;
  color: var(--mv-ink-soft);
  font-size: .96rem;
  border-bottom: none;
}
.mv-footer nav a:hover { color: var(--mv-brand); }
.mv-footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--mv-line);
  text-align: center;
  color: var(--mv-muted);
  font-size: .88rem;
}
@media (max-width: 820px) {
  .mv-footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* --- Legal-Pages Wrapper (Impressum/Datenschutz) ------------------------- */

.inside.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.inside.legal h2 { margin-top: 32px; font-size: 1.4rem; }
.inside.legal h3 { margin-top: 24px; font-size: 1.1rem; }

/* --- Utility ------------------------------------------------------------- */

.mv-mt-0 { margin-top: 0; }
.mv-mt-1 { margin-top: .5rem; }
.mv-mt-2 { margin-top: 1rem; }
.mv-mt-3 { margin-top: 1.5rem; }
.mv-mt-4 { margin-top: 2rem; }
.mv-mb-0 { margin-bottom: 0; }
.mv-text-muted { color: var(--mv-muted); }
.mv-text-center { text-align: center; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
