/* Watch & Alert — Buchwebseite
   Dunkles, ruhiges Design passend zum Buch (dunkler Hintergrund, Türkis-Akzent).
   Keine externen Schriften, keine externen Ressourcen, kein Tracking. */

:root {
  --bg:        #0a1622;
  --bg-alt:    #0e1d2e;
  --panel:     #142538;
  --panel-2:   #192d44;
  --border:    #1f3550;
  --text:      #eaf1f8;
  --muted:     #9fb1c4;
  --accent:    #22b3a3;   /* Teal aus dem Cover (Rückseite "Nie wieder…") */
  --accent-2:  #7ec5e3;   /* Hellblau-Cyan aus dem Cover-Untertitel */
  --warn:      #ffb454;
  --link:      #82d8ff;
  --maxw:      1100px;
  --radius:    14px;
  --shadow:    0 6px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Body min-height, damit Footer nicht „klebt" wenn Inhalt kürzer als Viewport */
  min-height: 100vh;
  display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }

img, svg { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* Skip link */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #001;
  padding: 8px 12px; border-radius: 6px; font-weight: 600;
}
.skip:focus { left: 12px; top: 12px; z-index: 100; }
.sr-only {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* Header / Nav */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,18,32,.85);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); font-weight: 700; letter-spacing: .2px;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #00131a; font-weight: 800; font-size: 13px;
  box-shadow: var(--shadow);
}
.brand-name { font-size: 1.05rem; }

.site-header nav a {
  margin-left: 18px; color: var(--muted); font-weight: 500;
}
.site-header nav a:hover { color: var(--text); text-decoration: none; }

/* Sprachumschalter (DE/EN-Buttons) sitzt im Flex-Container rechts,
   nach den Menü-Links — wird durch nav-justify-content: end erzwungen. */
.lang-switch { margin-left: auto; }

/* Hero */
.hero {
  padding: 64px 0 48px;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(48,224,160,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(76,201,240,.08), transparent 60%),
    var(--bg);
}
.hero-grid {
  display: grid; grid-template-columns: 1.2fr .9fr; gap: 48px; align-items: center;
}
.eyebrow {
  color: var(--accent); font-weight: 600; letter-spacing: 1.2px;
  text-transform: uppercase; font-size: 13px; margin: 0 0 12px;
}
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.1; margin: 0 0 18px; font-weight: 800;
  letter-spacing: -.5px;
}
.lead { font-size: 1.12rem; color: #d8e1ee; margin: 0 0 14px; }
.lead-sub { color: var(--muted); margin: 0 0 28px; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px;
  font-weight: 600; text-decoration: none; transition: transform .15s ease, background .15s ease;
  touch-action: manipulation; /* schnelleres Tap auf iOS, kein 300ms-Delay */
}
.btn-icon { width: 18px; height: 18px; flex-shrink: 0; }
.btn.primary { background: var(--accent); color: #001; }
.btn.primary:hover { transform: translateY(-1px); text-decoration: none; }
.btn.ghost { border: 1px solid var(--border); color: var(--text); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Echtes Cover-Bild (Taschenbuch) */
.hero-cover { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cover-img {
  width: 100%; max-width: 320px; height: auto;
  border-radius: 4px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.05) inset,
    0 18px 40px rgba(0,0,0,.5),
    0 4px 12px rgba(0,0,0,.35);
  transition: transform .25s ease, box-shadow .25s ease;
}
.cover-img:hover {
  transform: translateY(-3px) rotate(-.4deg);
  box-shadow: 0 24px 50px rgba(0,0,0,.55), 0 6px 14px rgba(0,0,0,.4);
}
.cover-caption { color: var(--muted); font-size: .9rem; margin: 0; text-align: center; }

/* Sektionen */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-alt); }
.section h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 10px;
  letter-spacing: -.3px;
}
.section-lead { color: var(--muted); max-width: 60ch; margin: 0 0 32px; }

/* Cards */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
}
.card-icon {
  display: block;
  width: 64px; height: 64px;
  border-radius: 10px;
  margin-bottom: 4px;
}
.card h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--accent); }
.card p { margin: 0; color: #d2dbeb; }

/* Inhalt / TOC */
.toc {
  display: grid; grid-template-columns: 1fr; gap: 10px;
}
.toc details {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
}
.toc details[open] { background: var(--panel-2); }
.toc summary {
  cursor: pointer; font-weight: 600; color: var(--text);
  list-style: none; padding-right: 24px; position: relative;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after {
  content: "+"; position: absolute; right: 0; top: 0;
  color: var(--accent); font-weight: 700; font-size: 1.2rem;
}
.toc details[open] summary::after { content: "−"; }
.toc details p { margin: 8px 0 0; color: var(--muted); }

/* Leseprobe-Card */
.lp-card {
  display: grid; grid-template-columns: 280px 1fr; gap: 28px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.lp-thumb {
  display: flex; gap: 8px; justify-content: center; align-items: flex-end;
  padding: 12px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.lp-page {
  width: 100px; height: auto;
  background: #fafafa;
  border-radius: 2px;
  display: block;
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 4px 10px rgba(0,0,0,.4),
    0 1px 3px rgba(0,0,0,.3);
  transition: transform .2s ease;
}
.lp-page:hover { transform: translateY(-3px); }
.lp-body h3 { margin: 0 0 14px; color: var(--accent); font-size: 1.1rem; }
.lp-body .check { margin: 0 0 18px; }
.lp-body .check li { font-size: .98rem; padding-left: 26px; margin: 6px 0; }
.lp-body .check li::before { width: 18px; height: 18px; line-height: 18px; font-size: .85rem; }
.lp-download { margin-top: 4px; }
@media (max-width: 760px) {
  .lp-card { grid-template-columns: 1fr; }
  .lp-thumb { padding: 18px; }
}

/* Was Sie lernen */
.learn-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px;
}
.learn-list li {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  color: #d6e1ee;
}
.learn-list .dot {
  flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); margin-top: 8px;
  box-shadow: 0 0 0 4px rgba(34,179,163,.18);
}
@media (max-width: 700px) { .learn-list { grid-template-columns: 1fr; } }

/* Open Source Repo Card */
.repo-card {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 16px; align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color .15s ease, transform .15s ease;
}
.repo-card:hover { border-color: var(--accent); transform: translateY(-1px); text-decoration: none; }
.repo-icon {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: rgba(255,255,255,.04); border-radius: 10px; color: var(--text);
}
.repo-icon svg { width: 26px; height: 26px; }
.repo-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.repo-title { font-weight: 700; color: var(--accent); word-break: break-all; }
.repo-desc { color: var(--muted); font-size: .95rem; }
.repo-cta { color: var(--link); font-weight: 600; white-space: nowrap; }
@media (max-width: 640px) {
  .repo-card { grid-template-columns: auto 1fr; }
  .repo-cta { grid-column: 1 / -1; }
  .repo-title { font-size: .95rem; }
}

/* Referenzprojekt */
.ref-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start;
}
.check { padding: 0; margin: 0; list-style: none; }
.check li {
  position: relative; padding-left: 28px; margin: 10px 0; color: #d8e1ee;
}
.check li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; line-height: 20px; text-align: center;
  border-radius: 50%; background: var(--accent); color: #001; font-weight: 800;
}
.ref-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.ref-card h3 { margin: 0 0 12px; color: var(--accent-2); }
.ref-card pre {
  margin: 0; padding: 14px; border-radius: 10px;
  background: #06101e; color: #cfe7d8;
  border: 1px solid var(--border);
  overflow-x: auto; font-size: .92rem;
}
.ref-note { color: var(--muted); margin: 12px 0 0; font-style: italic; }

/* Autor mit Porträt */
.author-bio {
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start;
}
.author-portrait {
  display: block;
  width: 120px; height: 158px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 8px 20px rgba(0,0,0,.45),
    0 2px 6px rgba(0,0,0,.3);
}
.author-portrait img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center 30%;
}

/* CTA / Interessentenliste / Kontaktformular */
.cta-section {
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(48,224,160,.10), transparent 60%),
    var(--bg);
}
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin: 14px 0;
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field-wide { grid-column: 1 / -1; }
.form-field > span {
  font-size: .9rem; color: var(--muted); font-weight: 600;
  letter-spacing: .2px;
}
.form-field input,
.form-field select,
.form-field textarea {
  padding: 10px 12px; border-radius: 8px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border);
  font-size: 1rem; font-family: inherit;
  transition: border-color .15s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent); outline: none;
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 32px; }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.form-actions .btn { margin: 0; }
.form-actions .btn:disabled { opacity: .6; cursor: wait; }
.form-msg { margin: 0; color: var(--accent); min-height: 1.4em; flex: 1 1 200px; }
.form-msg.error { color: var(--warn); }

/* Honeypot: verstecktes Feld, das Bots ausfüllen, Menschen nicht */
.hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important; height: 1px !important;
  overflow: hidden !important;
  pointer-events: none;
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; padding: 18px; }
}
.small { color: var(--muted); font-size: .92rem; margin: 6px 0; }
.small code, code {
  background: rgba(255,255,255,.06); padding: 1px 6px; border-radius: 4px;
  font-size: .9em; color: var(--text);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border); background: var(--bg-alt);
  padding: 22px 0;
}
.site-footer .wrap {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: .92rem;
}
.site-footer nav a { color: var(--muted); margin-left: 14px; }
.site-footer nav a:hover { color: var(--text); text-decoration: none; }

/* Legal pages */
.legal { padding: 56px 24px 80px; max-width: 760px; }
.legal h1 { font-size: 2rem; margin: 0 0 8px; }
.legal h2 { font-size: 1.15rem; margin-top: 28px; color: var(--accent-2); }
.legal p, .legal address { color: #d8e1ee; }
.legal a { color: var(--link); }

/* Burger-Button: nur auf Mobile sichtbar */
.nav-toggle {
  display: none;
  background: transparent; border: 0; cursor: pointer;
  width: 40px; height: 40px;
  padding: 8px;
  border-radius: 8px;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
}
.nav-toggle:hover { background: rgba(255,255,255,.06); }
.nav-toggle-bar {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Responsive — Mobile zuerst für Mobile, Desktop bekommt dann was es braucht */
@media (max-width: 880px) {
  .nav { flex-wrap: wrap; gap: 10px; padding: 12px 20px; }
  .site-header nav a { margin-left: 0; margin-right: 14px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-cover { order: -1; }
  .ref-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .lp-card { grid-template-columns: 1fr; }
  .lp-thumb { padding: 18px; }
}
@media (max-width: 700px) {
  .learn-list { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .repo-card { grid-template-columns: auto 1fr; }
  .form-grid { grid-template-columns: 1fr; padding: 18px; }
  /* Burger statt voll sichtbarer Nav */
  .nav-toggle { display: inline-flex; }
  .site-header nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    margin-top: 8px;
    padding: 8px 0;
    border-top: 1px solid var(--border);
  }
  .site-header nav.is-open { display: flex; }
  .site-header nav a {
    margin: 0;
    padding: 12px 4px;
    border-bottom: 1px solid rgba(255,255,255,.04);
    font-size: 1rem;
  }
  .site-header nav a:last-child { border-bottom: 0; }
  .site-header nav a.cta-link {
    margin: 8px 0 0;
    text-align: center;
    border: 1px solid var(--accent);
    border-bottom: 1px solid var(--accent);
    padding: 10px;
  }
}
@media (max-width: 540px) {
  .hero { padding: 36px 0 24px; }
  .section { padding: 48px 0; }
  .author-bio { grid-template-columns: 1fr; }
  .author-portrait { width: 96px; height: 126px; }
  .hero h1 { font-size: clamp(1.6rem, 8vw, 2.2rem); }
  .lead { font-size: 1rem; }
  .lead-sub { font-size: .95rem; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-meta { gap: 18px; }
  .footer .wrap, .site-footer .wrap { flex-direction: column; align-items: flex-start; gap: 10px; }
  .site-footer nav a { margin: 0 10px 0 0; }
  .ref-grid > div pre, .ref-card pre { font-size: .82rem; }
  .cards { grid-template-columns: 1fr; }
  .ref-grid { grid-template-columns: 1fr; }
}
