/* ============================================================
   Lumitox – gemeinsames Stylesheet
   Öffentliche Seite und interner Bereich benutzen dieselbe Datei.
   ============================================================ */

:root {
  /* Helle Grundfläche – der "Tag" */
  --ground:      #F5F8F7;
  --surface:     #FFFFFF;
  --surface-2:   #E9F0EE;
  --ink:         #0D1A19;
  --ink-soft:    #546866;
  --line:        #D1DEDB;
  --line-strong: #B1C4C0;

  /* Biolumineszenz – die Markenfarbe, 490 nm */
  --glow:        #0B7C6E;   /* auf hellem Grund */
  --glow-bright: #16C6A4;   /* auf dunklem Grund */
  --glow-soft:   #DDF2EE;

  /* Nacht – Hero und interner Bereich */
  --night:       #05100F;
  --night-2:     #0B1E1C;
  --night-ink:   #DDEDE9;
  --night-soft:  #7E9A96;
  --night-line:  #1B3936;

  --signal:      #A85808;
  --signal-soft: #FAEEE1;
  --good:        #2C7A3E;
  --bad:         #A82A20;

  --f-display: "Newsreader", Georgia, "Times New Roman", serif;
  --f-body:    "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --f-mono:    "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --measure: 66ch;
  --pad:     clamp(20px, 5vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground:      #060F0E;
    --surface:     #0C1B1A;
    --surface-2:   #122624;
    --ink:         #DFEDEA;
    --ink-soft:    #89A19E;
    --line:        #1F3936;
    --line-strong: #2D504C;
    --glow:        #37DDBB;
    --glow-soft:   #0C2C29;
    --signal:      #F0AD54;
    --signal-soft: #2E2110;
    --good:        #61CC7B;
    --bad:         #FF8A7A;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Grundtypografie ---------- */

h1, h2, h3 { text-wrap: balance; }

p { margin: 0 0 18px; }
p:last-child { margin-bottom: 0; }

a { color: var(--glow); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }

code, .mono { font-family: var(--f-mono); font-size: 0.88em; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--glow);
  margin: 0 0 16px;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--glow); color: #fff; padding: 10px 16px; z-index: 99;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- Kopfleiste ---------- */

.topbar {
  background: var(--night);
  color: var(--night-ink);
  border-bottom: 1px solid var(--night-line);
}
.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--night-ink);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.01em;
}
.wordmark:hover { text-decoration: none; }
.wordmark .tox { color: var(--glow-bright); }

.mainnav {
  display: flex;
  gap: 6px 22px;
  flex-wrap: wrap;
  font-size: 15px;
}
.mainnav a {
  color: var(--night-soft);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.mainnav a:hover,
.mainnav a[aria-current="page"] {
  color: var(--glow-bright);
  border-bottom-color: var(--glow-bright);
}

/* ---------- Hero: immer Nacht ---------- */

.hero {
  background: var(--night);
  color: var(--night-ink);
  border-bottom: 1px solid var(--night-line);
  position: relative;
  overflow: hidden;
}
.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(48px, 9vw, 96px) var(--pad);
  position: relative;
  z-index: 1;
  display: grid;
  gap: 40px;
}
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.35fr 1fr; align-items: center; }
}

.hero h1 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 5.4vw, 3.7rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  max-width: 18ch;
}
.hero .standfirst {
  font-family: var(--f-display);
  font-size: clamp(1.08rem, 2.1vw, 1.3rem);
  line-height: 1.5;
  color: var(--night-soft);
  max-width: 50ch;
  margin: 0 0 30px;
}
.hero .eyebrow { color: var(--glow-bright); }

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 3px;
  text-decoration: none;
  border: 1px solid var(--glow-bright);
  transition: background-color .15s ease, color .15s ease;
}
.btn-solid { background: var(--glow-bright); color: var(--night); }
.btn-solid:hover { background: #4EE9CB; text-decoration: none; }
.btn-ghost { color: var(--glow-bright); background: transparent; }
.btn-ghost:hover { background: rgba(22,198,164,.12); text-decoration: none; }

/* Quorum-Grafik im Hero */
.quorum { width: 100%; height: auto; max-width: 380px; margin-inline: auto; display: block; }
.q-dot { fill: #16C6A4; opacity: .18; }
.q-dot.lit { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .q-dot.lit { animation: pulse 4s ease-in-out infinite; }
  .q-dot.lit:nth-of-type(3n) { animation-delay: .7s; }
  .q-dot.lit:nth-of-type(3n+1) { animation-delay: 1.5s; }
}
@keyframes pulse {
  0%, 100% { opacity: .85; }
  50%      { opacity: 1; }
}

/* ---------- Seitenraster ---------- */

main { display: block; }

.band { border-bottom: 1px solid var(--line); }
.band.alt { background: var(--surface); }

.band-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--pad);
}

.band h2 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  line-height: 1.16;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
  max-width: 22ch;
}

.band h3 {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 1.02rem;
  margin: 30px 0 8px;
}

.prose { max-width: var(--measure); }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 1.15em; }
.prose li { margin-bottom: 7px; }

.lead {
  font-family: var(--f-display);
  font-size: 1.16rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 58ch;
  margin-bottom: 24px;
}

.two-col { display: grid; gap: 32px; }
@media (min-width: 880px) {
  .two-col { grid-template-columns: 1fr 1fr; gap: 48px; }
}

/* ---------- Karten ---------- */

.cards { display: grid; gap: 16px; margin-top: 8px; }
@media (min-width: 720px) { .cards.c3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 720px) { .cards.c2 { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 22px 24px;
}
.band.alt .card { background: var(--ground); }
.card h3 { margin-top: 0; }
.card p { font-size: 15.5px; line-height: 1.55; color: var(--ink-soft); }

/* ---------- Statusanzeige ---------- */

.status {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin: 28px 0;
}
@media (min-width: 760px) { .status { grid-template-columns: repeat(4, 1fr); } }

.status-cell {
  background: var(--surface);
  padding: 18px 20px;
}
.band.alt .status-cell { background: var(--ground); }
.status-cell .k {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 8px;
}
.status-cell .v {
  font-family: var(--f-display);
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 600;
}
.status-cell .v.pending { color: var(--signal); }
.status-cell .v.done    { color: var(--good); }

.pill {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  border: 1px solid currentColor;
}
.pill.offen    { color: var(--signal); }
.pill.laeuft   { color: var(--glow); }
.pill.fertig   { color: var(--good); }
.pill.verworfen{ color: var(--bad); }

/* ---------- Tabellen ---------- */

.tablewrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  margin: 24px 0;
}
table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 520px; }
th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th {
  font-family: var(--f-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--surface-2);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Hinweisboxen ---------- */

.note {
  border-left: 2px solid var(--glow);
  background: var(--glow-soft);
  padding: 16px 20px;
  border-radius: 0 4px 4px 0;
  margin: 24px 0;
}
.note.warn { border-left-color: var(--signal); background: var(--signal-soft); }
.note .tag {
  display: block;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--glow);
  margin-bottom: 7px;
}
.note.warn .tag { color: var(--signal); }
.note p { font-size: 15.5px; line-height: 1.55; }

/* ---------- Figur / Diagramm ---------- */

figure { margin: 30px 0; }
figure svg { display: block; width: 100%; height: auto; color: var(--ink-soft); }
figcaption {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-top: 12px;
  border-left: 2px solid var(--line);
  padding-left: 12px;
}
.svg-glow { fill: var(--glow); }
.svg-glow-s { stroke: var(--glow); }
.svg-label { font-family: "IBM Plex Mono", monospace; font-size: 11px; fill: var(--ink-soft); }
.svg-label-em { font-family: "IBM Plex Mono", monospace; font-size: 11px; fill: var(--glow); }
.svg-panel { fill: var(--surface-2); }

/* ---------- Kontakt ---------- */

.contact-grid { display: grid; gap: 28px; }
@media (min-width: 820px) { .contact-grid { grid-template-columns: 1.1fr 1fr; gap: 48px; } }

.contact-box {
  background: var(--night);
  color: var(--night-ink);
  border-radius: 4px;
  padding: 28px 30px;
}
.contact-box h3 { color: var(--night-ink); margin-top: 0; }
.contact-box p { color: var(--night-soft); font-size: 15.5px; }
.contact-box a { color: var(--glow-bright); }
.mailto {
  font-family: var(--f-mono);
  font-size: 16px;
  display: inline-block;
  margin-top: 6px;
}

/* ---------- Fusszeile ---------- */

.footer {
  background: var(--night);
  color: var(--night-soft);
  font-size: 14.5px;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px var(--pad);
  display: grid;
  gap: 24px;
}
@media (min-width: 760px) { .footer-inner { grid-template-columns: 2fr 1fr 1fr; } }
.footer h4 {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--night-ink);
  margin: 0 0 12px;
  font-weight: 500;
}
.footer a { color: var(--night-soft); text-decoration: none; }
.footer a:hover { color: var(--glow-bright); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 7px; }
.footer .fine { color: #4E6764; font-size: 13px; }

/* ---------- Interner Bereich ---------- */

body.intern { background: var(--night); color: var(--night-ink); }
body.intern .band { border-bottom-color: var(--night-line); }
body.intern .band.alt { background: var(--night-2); }
body.intern .card,
body.intern .status-cell,
body.intern .tablewrap { background: var(--night-2); border-color: var(--night-line); }
body.intern .band.alt .card,
body.intern .band.alt .status-cell { background: var(--night); }
body.intern th, body.intern td { border-bottom-color: var(--night-line); }
body.intern thead th { background: var(--night); color: var(--night-soft); }
body.intern .status { background: var(--night-line); border-color: var(--night-line); }
body.intern .card p,
body.intern .lead,
body.intern .status-cell .k,
body.intern figcaption { color: var(--night-soft); }
body.intern a { color: var(--glow-bright); }
body.intern .note { background: #0C2C28; border-left-color: var(--glow-bright); }
body.intern .note .tag { color: var(--glow-bright); }
body.intern .note.warn { background: #2C2010; border-left-color: var(--signal); }
body.intern .svg-label { fill: var(--night-soft); }
body.intern .svg-label-em, body.intern .svg-glow { fill: var(--glow-bright); }
body.intern .svg-glow-s { stroke: var(--glow-bright); }
body.intern figure svg { color: var(--night-soft); }

.intern-badge {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--signal);
  border: 1px solid var(--signal);
  border-radius: 100px;
  padding: 2px 10px;
  margin-left: 10px;
  vertical-align: middle;
}

/* Laborbuch-Einträge */
.logbook { border-top: 1px solid var(--night-line); margin-top: 8px; }
.entry {
  display: grid;
  gap: 6px 28px;
  padding: 24px 0;
  border-bottom: 1px solid var(--night-line);
}
@media (min-width: 800px) { .entry { grid-template-columns: 150px 1fr; } }
.entry .when {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--glow-bright);
  font-variant-numeric: tabular-nums;
}
.entry h3 { margin: 0 0 6px; font-size: 1.05rem; }
.entry p { color: var(--night-soft); font-size: 15.5px; margin-bottom: 10px; }
.entry .who {
  font-family: var(--f-mono);
  font-size: 12px;
  color: #5E7B78;
}

@media print {
  .topbar, .mainnav, .hero-cta, .footer { display: none; }
  body, body.intern { background: #fff; color: #000; }
}
