/*
 * Plotdesk Landing V6 — Seiten-Chrome: Resets, Knöpfe, Header, Footer, Fortschritt und der
 * Vorschau-Umschalter. Tokens, Raster, Typo-Skala, Kapitelkopf, Motion-Primitive und Logo-Leiste liegen
 * in core.css (gemeinsam mit V7), Kapitel-CSS je Kapitel in sections/, Hero-CSS je Option in heroes/.
 * Design-Vertrag mit allen Regeln: docs/landing-v6.md.
 *
 * Haltung: Schweizer Raster (Müller-Brockmann, Niggli) trifft Apple-Story. Zwölf Spalten, Achterrhythmus,
 * Linien statt Kästen, warmes Papier und grünliches Schwarz statt Reinweiß und Reinschwarz, Mint als
 * einzige Farbe. Bewegung kommt aus dem Scrollen, nie aus Selbstläufern (einzige Ausnahme: die Logo-Leiste).
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}

body.is-locked {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

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

a {
  color: inherit;
}

p,
li,
blockquote,
figcaption,
small {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

::selection {
  background: var(--mint);
  color: var(--ink);
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1000;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--mint);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

.button:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

/* ---------- Knöpfe und Links ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 24px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 300ms var(--ease), background 220ms ease, color 220ms ease, border-color 220ms ease, box-shadow 300ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0) scale(0.99);
}

.button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button--small {
  min-height: 40px;
  padding-inline: 18px;
  font-size: 14px;
}

.button--large {
  min-height: 60px;
  padding-inline: 30px;
  font-size: 17px;
}

.button--mint,
.button--accent {
  background: var(--mint);
  color: #041b10;
}

.button--mint:hover,
.button--accent:hover {
  background: var(--mint-2);
  box-shadow: 0 14px 40px rgba(115, 241, 166, 0.28);
}

.button--ghost {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.button--ghost:hover {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.09);
}

[data-theme="light"] .button--ghost {
  border-color: rgba(5, 12, 13, 0.22);
  background: rgba(5, 12, 13, 0.03);
  color: var(--text);
}

[data-theme="light"] .button--ghost:hover {
  border-color: rgba(5, 12, 13, 0.55);
  background: rgba(5, 12, 13, 0.06);
}

.button--dark {
  background: var(--ink);
  color: var(--white);
}

.button--dark:hover {
  background: var(--ink-3);
}

.button--line-dark {
  border-color: rgba(5, 12, 13, 0.24);
  background: transparent;
  color: var(--ink);
}

.button--line-dark:hover {
  border-color: var(--ink);
}

.text-link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: color 200ms ease;
}

.text-link:hover {
  color: var(--text);
}

.text-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 0;
  background: none;
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.text-arrow span {
  transition: transform 260ms var(--ease);
}

.text-arrow:hover span {
  transform: translate(2px, -2px);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 320ms ease, backdrop-filter 320ms ease, border-color 320ms ease, color 320ms ease;
}

.site-header.is-scrolled {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 12, 13, 0.68);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

/* Über hellen Kapiteln dreht der Header auf dunkle Schrift (app.js setzt is-on-light). */
.site-header.is-on-light {
  border-bottom-color: rgba(5, 12, 13, 0.08);
  background: rgba(244, 242, 236, 0.74);
  color: #0e1614;
}

.site-header.is-on-light .brand img {
  filter: invert(1) hue-rotate(180deg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand img {
  display: block;
  width: 118px;
  height: auto;
}

.desktop-nav {
  display: flex;
  gap: 26px;
}

.desktop-nav a {
  color: inherit;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.78;
  text-decoration: none;
  transition: opacity 200ms ease;
}

.desktop-nav a:hover {
  opacity: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-header.is-on-light .text-link {
  color: rgba(14, 22, 20, 0.72);
}

.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.site-header.is-on-light .menu-toggle {
  border-color: rgba(5, 12, 13, 0.2);
  background: rgba(5, 12, 13, 0.04);
}

.menu-toggle span:not(.sr-only) {
  position: absolute;
  left: 13px;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transition: transform 300ms var(--ease), top 300ms var(--ease);
}

.menu-toggle span:nth-child(1) { top: 18px; }
.menu-toggle span:nth-child(2) { top: 24px; }

.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

.mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 24px 28px;
  background: rgba(5, 12, 13, 0.94);
  color: var(--white);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.mobile-menu nav a {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 19px;
  font-weight: 500;
  text-decoration: none;
}

/* ---------- Fortschritt ---------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 101;
  height: 2px;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--mint);
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--white);
  padding: 72px 0 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 40px;
}

.footer-brand {
  grid-column: span 4;
}

.footer-brand p {
  margin: 16px 0 0;
  color: var(--text-3);
  font-size: 15px;
}

.footer-links {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links strong {
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.footer-links a {
  color: var(--text-2);
  font-size: 15px;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-action {
  grid-column: 9 / span 4;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.footer-action > span {
  color: var(--text-2);
  font-size: 15px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 56px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  color: var(--text-3);
  font-size: 13px;
}

.footer-bottom div {
  display: flex;
  gap: 20px;
}

.footer-bottom a {
  color: inherit;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--white);
}

/* ---------- Vorschau-Umschalter (partials/hero-switcher.blade.php) ---------- */
.preview-switch {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 4px;
  background: rgba(5, 12, 13, 0.8);
  color: var(--white);
  font-size: 12px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: opacity 300ms ease, transform 300ms var(--ease);
}

/* Nach dem Hero tritt der Umschalter ab (app.js): unten links liegen sonst Kapitel-Navigationen. */
.preview-switch.is-hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.preview-switch a {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
  transition: background 200ms ease;
}

.preview-switch a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.preview-switch span {
  padding: 0 8px;
  white-space: nowrap;
}

.preview-switch b {
  font-family: var(--font-numeric);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .desktop-nav {
    display: none;
  }
}

@media (max-width: 900px) {
  .desktop-only {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .footer-brand,
  .footer-action {
    grid-column: 1 / -1;
  }

  .footer-links {
    grid-column: span 6;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .footer-links {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .preview-switch {
    left: 12px;
    bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button,
  .text-arrow span {
    transition: none;
  }
}
