/* =========================================================
   GAZO – Design System
   Eine Lehrküche, kein Software-Produkt: Papier, Kohle,
   Kupfer statt SaaS-Grün und Cream-Card-Kit.
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500&family=Karla:wght@400;500;600;700&display=swap");

:root {
  --paper: #ede7da;
  --paper-raised: #f6f2e8;
  --ink: #2a2721;
  --ink-soft: #665f52;
  --line: #d9d0bd;

  --green: #3c6b2e;
  --green-deep: #2b4e21;
  --copper: #a15a2a;
  --copper-deep: #82471f;
  --teal: #2e5c68;
  --teal-deep: #204650;

  --danger: #a3372a;
  --danger-bg: #f4e2dc;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Karla", -apple-system, "Segoe UI", Arial, sans-serif;

  --radius: 3px;
  --radius-badge: 999px;

  --container: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #211f1a;
    --paper-raised: #2a2721;
    --ink: #ece6d8;
    --ink-soft: #b3aa97;
    --line: #453f34;

    --green: #7cb35f;
    --green-deep: #9bcf80;
    --copper: #d38a54;
    --copper-deep: #e6a878;
    --teal: #6fa5b3;
    --teal-deep: #8fc0cc;

    --danger: #d97e6e;
    --danger-bg: #3a2420;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--teal-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-deep); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.45em;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--ink-soft); max-width: 62ch; }

ul.plain { list-style: none; margin: 0; padding: 0; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  text-decoration: none !important;
}
.btn-primary { background: var(--ink); color: var(--paper-raised); border-color: var(--ink); }
.btn-primary:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { border-color: var(--green-deep); color: var(--green-deep); }
.btn-accent { background: var(--copper); color: #fff; border-color: var(--copper); }
.btn-accent:hover { background: var(--copper-deep); border-color: var(--copper-deep); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { filter: brightness(0.92); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--teal-deep);
  outline-offset: 2px;
}

.text-link {
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
}
.text-link:hover { border-color: var(--green-deep); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
}
.brand img { height: 40px; width: auto; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--ink);
  margin: 6px 0;
  transition: 0.2s;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu > li { position: relative; }
.nav-menu > li > a,
.nav-menu > li > button.nav-link {
  display: block;
  padding: 8px 13px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.94rem;
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}
.nav-menu > li > a:hover,
.nav-menu > li > button.nav-link:hover,
.nav-menu > li.active > a { border-color: var(--copper); text-decoration: none; }

.dropdown { position: relative; }
.dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 230px;
  padding: 6px;
  margin-top: 4px;
}
.dropdown:hover .dropdown-panel,
.dropdown:focus-within .dropdown-panel { display: block; }
.dropdown-panel a {
  display: block;
  padding: 9px 11px;
  color: var(--ink);
  font-size: 0.9rem;
  border-bottom: none !important;
}
.dropdown-panel a:hover { background: var(--paper); text-decoration: none; color: var(--green-deep); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 16px;
  }
  .nav-menu.open { display: flex; }
  .dropdown-panel { position: static; border: none; margin: 0 0 0 12px; display: none; }
  .dropdown.open .dropdown-panel { display: block; }
}

/* ---------- Hero (homepage): photo-led, no gradient wash ---------- */
/* Fixed dark ground + fixed light text on purpose — the photo/scrim always
   sit on top, but this must stay readable on its own in both themes. */
.hero {
  position: relative;
  background: #201d18;
  color: #f2ede0;
  overflow: hidden;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
}
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(20,17,12,0.92) 0%, rgba(20,17,12,0.55) 45%, rgba(20,17,12,0.15) 75%);
}
.hero-inner {
  position: relative;
  padding: 64px 0 56px;
  max-width: 720px;
}
.hero .kicker {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: #d8cdb5;
  margin-bottom: 14px;
}
.hero h1 { color: #fff; }
.hero p.lead { color: #e4ddcc; font-size: 1.12rem; max-width: 54ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.hero-actions .btn-primary { background: #f2ede0; color: #201d18; border-color: #f2ede0; }
.hero-actions .btn-primary:hover { background: var(--copper); color: #fff; border-color: var(--copper); }
.hero-actions .btn-outline { border-color: rgba(242,237,224,0.6); color: #f2ede0; }
.hero-actions .btn-outline:hover { border-color: #f2ede0; }

@media (max-width: 700px) {
  .hero { min-height: 62vh; }
}

/* ---------- Page hero (interior pages): plain, no gradient ---------- */
.page-hero {
  padding: 52px 0 36px;
  border-bottom: 1px solid var(--line);
}
.page-hero .kicker {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-bottom: 8px;
  display: block;
}

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-tight { padding: 28px 0; }
.section-title { max-width: 640px; margin: 0 0 36px; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Editorial three-up (replaces icon-card grid) ---------- */
.editorial-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.editorial-row > div {
  padding: 28px 28px 8px 0;
  border-right: 1px solid var(--line);
}
.editorial-row > div:last-child { border-right: none; }
.editorial-row h3 { font-size: 1.15rem; margin-bottom: 10px; }
@media (max-width: 800px) {
  .editorial-row { grid-template-columns: 1fr; }
  .editorial-row > div { border-right: none; border-bottom: 1px solid var(--line); padding: 22px 0; }
  .editorial-row > div:last-child { border-bottom: none; }
}

.strength-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.strength-block.reverse { direction: rtl; }
.strength-block.reverse > * { direction: ltr; }
.strength-block img { border-radius: var(--radius); }
@media (max-width: 800px) {
  .strength-block, .strength-block.reverse { grid-template-columns: 1fr; direction: ltr; }
}

.callout {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 40px;
}
.callout h2 { margin-bottom: 10px; }

/* Plain bordered block — used sparingly for a single sidebar note, not as a
   repeating card pattern. */
.info-block {
  border-top: 2px solid var(--ink);
  padding-top: 18px;
}
.info-block + .info-block { margin-top: 30px; }
.info-block h3 { margin-bottom: 8px; }

.page-banner img { width: 100%; border-radius: var(--radius); aspect-ratio: 21/9; object-fit: cover; }

/* ---------- Building walkthrough (Kernbereiche) — numbers are literal here ---------- */
.walkthrough { border-top: 1px solid var(--line); }
.walk-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 28px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.walk-row .num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 500;
  color: var(--copper);
  line-height: 1;
}
.walk-row h3 { margin-bottom: 6px; }
.walk-row p { margin: 0; }
@media (max-width: 640px) {
  .walk-row { grid-template-columns: 48px 1fr; gap: 16px; }
  .walk-row .num { font-size: 1.6rem; }
}

/* ---------- Audience directory (Qualifizierung landing) ---------- */
.directory { border-top: 1px solid var(--line); }
.directory-row {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 20px;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.directory-row h3 { margin: 0; }
.directory-row p { margin: 0; }
.directory-row .go { white-space: nowrap; }
@media (max-width: 700px) {
  .directory-row { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- Audience tabs (Qualifizierung subpages) ---------- */
.audience-tabs {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.audience-tabs a {
  font-weight: 600;
  color: var(--ink-soft);
  padding-bottom: 4px;
}
.audience-tabs a:hover { color: var(--ink); text-decoration: none; }
.audience-tabs a.active { color: var(--ink); border-bottom: 2px solid var(--copper); }

.overview-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  max-width: 60ch;
}
.overview-list li {
  padding: 7px 0 7px 20px;
  position: relative;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}
.overview-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--copper);
}
.overview-list li:last-child { border-bottom: none; }

.content-block { margin-bottom: 30px; }
.content-block h2 { font-size: 1.35rem; }
.content-block ul { padding-left: 18px; color: var(--ink-soft); margin: 0 0 1em; }
.content-block li { margin-bottom: 6px; }

/* ---------- News: index-card / order-ticket feel ---------- */
.news-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.news-card:hover { border-color: var(--copper); }
.news-card img { aspect-ratio: 16/10; object-fit: cover; filter: grayscale(0.15); }
.news-card .body { padding: 20px; flex: 1; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.news-card.no-image .body { border-top: none; }
.news-card time {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.news-card h3 { margin: 6px 0 10px; font-size: 1.1rem; }
.news-card p { flex: 1; font-size: 0.94rem; }
.news-empty, .news-loading, .news-error {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-soft);
}
.news-error { color: var(--danger); }

/* ---------- News dialog ---------- */
dialog#news-dialog {
  background: var(--paper-raised);
  color: var(--ink);
  border: 1px solid var(--line);
}
dialog#news-dialog::backdrop { background: rgba(20, 17, 12, 0.6); }
.news-article-body p { margin-bottom: 1em; }

/* ---------- Forms ---------- */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper-raised);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--teal-deep);
}
.form-field textarea { min-height: 160px; resize: vertical; }
.form-hint { font-size: 0.82rem; color: var(--ink-soft); margin-top: 6px; }

.auth-shell {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}
.auth-card {
  width: 100%;
  max-width: 380px;
  border-top: 3px solid var(--ink);
  padding: 36px 4px 0;
}
.auth-card .brand { justify-content: center; margin-bottom: 20px; }
.auth-card h1 { text-align: center; font-size: 1.7rem; }
.auth-card > p { text-align: center; margin: 0 auto 24px; }

.alert {
  padding: 12px 15px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.alert-success { background: var(--paper-raised); color: var(--green-deep); border-color: var(--green-deep); }
[hidden] { display: none !important; }

/* ---------- Admin dashboard ---------- */
.admin-shell { min-height: calc(100vh - 140px); }
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}
.admin-topbar .who { font-size: 0.9rem; color: var(--ink-soft); }
.admin-layout { display: grid; grid-template-columns: 1.1fr 1.4fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .admin-layout { grid-template-columns: 1fr; } }

.admin-panel { border-top: 1px solid var(--ink); padding-top: 20px; }
.admin-panel h2 { font-size: 1.1rem; margin-bottom: 18px; font-family: var(--font-body); font-weight: 700; }

.news-row {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.news-row:last-child { border-bottom: none; }
.news-row img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; }
.news-row-thumb-empty { width: 56px; height: 56px; border: 1px dashed var(--line); border-radius: var(--radius); flex-shrink: 0; }
.news-row .meta { flex: 1; min-width: 0; }
.news-row .meta strong { display: block; font-size: 0.92rem; font-weight: 600; }
.news-row .meta span { font-size: 0.78rem; color: var(--ink-soft); }
.news-row .actions { display: flex; gap: 6px; flex-shrink: 0; }

.status-word { font-weight: 600; }
.status-published { color: var(--green-deep); }
.status-draft { color: var(--copper-deep); }

.table-wrap { overflow-x: auto; }

/* ---------- Footer ---------- */
/* Always a dark band, in both themes — fixed colors on purpose, not the
   theme-flipping --ink token (which would go light in dark mode and make
   this unreadable). */
.site-footer {
  background: #201d18;
  color: #cfc6b4;
  padding: 48px 0 24px;
  margin-top: 60px;
}
.site-footer a { color: #cfc6b4; }
.site-footer a:hover { color: #fff; }
.site-footer p { color: #a89f8c; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 30px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1rem; margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; font-size: 0.9rem; }
.footer-bottom {
  border-top: 1px solid rgba(207,198,180,0.18);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  color: #93897a;
}
.footer-bottom a.admin-link { color: #756c5e; }
.footer-bottom a.admin-link:hover { color: #fff; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.spacer-sm { height: 16px; }
.spacer-md { height: 32px; }

.skeleton {
  background: linear-gradient(90deg, var(--line) 25%, var(--paper) 37%, var(--line) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: var(--radius);
}
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
  html { scroll-behavior: auto; }
}
@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
