/* ==========================================================================
   wd-erde.de – Grundstil
   Dunkel, nordisch-modern. Neutrales Grau, schwarz lasiertes Holz, Gold.
   Dieselbe Datei dient später als Basis für das WordPress-Theme (blog.wd-erde.de).
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Grautöne (neutral, kein Braunstich) */
  --bg:         #1b1c1e;
  --surface:    #232427;
  --surface-2:  #2b2d30;
  --surface-3:  #333539;
  --line:       #3a3c40;
  --line-soft:  #2e3033;

  --text:       #dcdde0;
  --muted:      #9b9ea3;   /* Menütext */
  --faint:      #6f7277;

  /* Gold: als Verlauf, damit es metallisch statt flach-gelb wirkt */
  --gold:       #c9a656;
  --gold-light: #f1dfa4;
  --gold-dark:  #7a5c24;
  --gold-sheen: linear-gradient(100deg, #8c6a2c 0%, #d9b968 30%, #f4e6b2 48%, #c79f4f 62%, #7e602a 100%);

  --radius:   16px;
  --radius-s: 10px;
  --page-w:   1440px;
  --pad:      clamp(24px, 4vw, 56px);

  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-light); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 600; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 300; letter-spacing: .02em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p  { margin: 0 0 1em; }

/* padding-bottom: sonst schneidet der Verlauf (background-clip) Unterlängen wie g, p, y ab */
.gold-text { color: var(--gold); padding-bottom: .12em; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .gold-text {
    background: var(--gold-sheen);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* --- Top-Menü: gleiche Helligkeit wie der Hintergrund, grauer Text ------- */

.topbar { background: var(--bg); }

.topbar__inner {
  width: min(var(--page-w), calc(100% - 32px));
  margin-inline: auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: .08em;
}
.brand:hover { color: var(--text); }
.brand__mark { display: block; width: 28px; height: 28px; }

.mainnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.mainnav a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: .95rem;
  letter-spacing: .03em;
  transition: color .15s, background-color .15s;
}
.mainnav a:hover { color: var(--text); background: var(--surface); }
.mainnav a[aria-current="page"] { color: var(--text); }

/* --- Ornamentstreifen: schwarz lasiertes Holz mit Gold ------------------- */

.band {
  position: relative;
  height: 22px;
  background: #0e0e0f url("../img/holz.svg") center / 100% 100% no-repeat;
  border-block: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}
.band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/ornament.svg") center / auto 100% repeat-x;
  opacity: .92;
}

/* --- Body-Container ------------------------------------------------------ */

.sheet {
  width: min(var(--page-w), calc(100% - 32px));
  min-height: 500px;
  margin: clamp(20px, 3vw, 36px) auto 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 20px 50px rgba(0, 0, 0, .25);
}

.content { padding: var(--pad); min-width: 0; }

/* Linkes Menü: nur durch eine Trennlinie abgesetzt */
.sheet--sidebar { grid-template-columns: 280px minmax(0, 1fr); }

.sidenav {
  border-right: 1px solid var(--line);
  padding: var(--pad) 0 var(--pad) 20px;
}
.sidenav ul { list-style: none; margin: 0; padding: 0; position: sticky; top: 24px; }
.sidenav a {
  display: block;
  padding: 8px 16px;
  margin-right: -1px;
  border-right: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: .95rem;
}
.sidenav a:hover { color: var(--text); }
.sidenav a[aria-current="page"] { color: var(--text); border-right-color: var(--gold); }

/* --- Inhaltsbausteine ---------------------------------------------------- */

.intro { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }

.eyebrow {
  margin: 0 0 .75em;
  color: var(--faint);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.lead { color: var(--muted); font-size: 1.15rem; }

.section { margin-bottom: clamp(32px, 5vw, 56px); }

.section__title {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text);
}
.section__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.cards,
.posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  transition: background-color .2s, border-color .2s, transform .2s;
}
.card p { color: var(--muted); margin-bottom: 0; }
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--gold-sheen);
  opacity: 0;
  transition: opacity .2s;
}
a.card:hover { background: var(--surface-3); border-color: var(--line); color: var(--text); transform: translateY(-2px); }
a.card:hover::before { opacity: 1; }

.card__kicker {
  margin-bottom: 8px;
  color: var(--faint);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.card__title { margin-bottom: .4em; }
.card__more {
  margin-top: auto;
  padding-top: 16px;
  color: var(--gold);
  font-size: .9rem;
}
.card__more::after { content: " \2192"; }

.card--placeholder {
  background: transparent;
  border: 1px dashed var(--line);
}

.posts__note { color: var(--muted); grid-column: 1 / -1; }

/* --- Zeitleiste (Werdegang) ---------------------------------------------- */

.timeline {
  position: relative;
  max-width: 760px;
  margin: 0;
  padding: 0 0 0 28px;
  list-style: none;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 6px;
  width: 1px;
  background: linear-gradient(var(--gold-dark), var(--line));
}
.timeline li { position: relative; padding-bottom: 28px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: -27px;
  width: 11px;
  height: 11px;
  background: var(--surface);
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}
.timeline__date {
  color: var(--gold);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.timeline h3 { margin: 2px 0 6px; }
.timeline p { margin: 0; color: var(--muted); }

/* --- Formulare ----------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
}
textarea { resize: vertical; }
input:focus,
textarea:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(201, 166, 86, .2);
}
label { display: block; margin-bottom: 6px; color: var(--muted); font-size: .92rem; }

.form { max-width: 760px; }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 20px; }
.field { margin: 0 0 20px; }
.field [aria-invalid="true"] { border-color: #c4705f; }
.field__error { display: block; margin-top: 6px; color: #e3907e; font-size: .88rem; }
.form__hint { color: var(--faint); font-size: .9rem; }
.form .btn { margin-top: 8px; }
.form__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.notice {
  max-width: 760px;
  padding: 16px 20px;
  background: var(--surface-2);
  border-left: 2px solid var(--gold);
  border-radius: 0 8px 8px 0;
}
.notice--error { border-left-color: #c4705f; }

/* --- Buttons: zwei Stück, gleichmäßig verteilt --------------------------- */

.actions {
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
  gap: 32px 64px;
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: clamp(32px, 5vw, 48px);
  border-top: 1px solid var(--line);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 280px;
  min-height: 64px;
  padding: 0 32px;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  background:
    linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
    var(--gold-sheen) border-box;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  transition: color .2s, transform .2s, box-shadow .2s;
}
.btn:hover {
  background:
    linear-gradient(var(--surface-3), var(--surface-3)) padding-box,
    var(--gold-sheen) border-box;
  color: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}

/* --- Schlussvignette zwischen Body und Footer ---------------------------- */

.vignette {
  width: min(640px, calc(100% - 32px));
  margin: 0 auto 20px;
  display: grid;
  grid-template-columns: 1fr 56px 1fr;
  align-items: center;
}
.vignette::before,
.vignette::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dark));
  opacity: .8;
}
.vignette::after { background: linear-gradient(90deg, var(--gold-dark), transparent); }
.vignette span {
  height: 28px;
  background: url("../img/vignette.svg") center / contain no-repeat;
}

/* --- Fehlerseite (404) --------------------------------------------------- */

.error-page {
  max-width: 640px;
  margin: clamp(16px, 5vw, 56px) auto 0;
  text-align: center;
}
.vignette--large {
  width: 100%;
  margin-bottom: 32px;
  grid-template-columns: 1fr 120px 1fr;
}
.vignette--large span { height: 60px; }
.error-page .actions { margin-top: 32px; padding-top: 0; border-top: 0; gap: 16px 32px; }
.error-page .btn { min-width: 220px; }
.error-page .search-form { margin: 24px auto 0; }

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

.site-footer {
  width: min(var(--page-w), calc(100% - 32px));
  margin: 0 auto 32px;
  padding: 28px var(--pad);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px 56px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: .92rem;
}
.site-footer__col { display: flex; flex-direction: column; gap: 2px; }
.site-footer__name { color: var(--text); font-weight: 600; letter-spacing: .04em; }
.site-footer__label { color: var(--faint); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.site-footer__col a { color: var(--muted); }
.site-footer__col a:hover { color: var(--text); }
.site-footer__legal { display: flex; gap: 20px; margin-left: auto; }
.site-footer__legal a { color: var(--muted); text-decoration: none; }
.site-footer__legal a:hover { color: var(--text); }
.site-footer__copy { width: 100%; margin: 0; padding-top: 16px; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: .85rem; }

/* --- Schmale Bildschirme ------------------------------------------------- */

@media (max-width: 760px) {
  .sheet--sidebar { grid-template-columns: minmax(0, 1fr); }
  .sidenav { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .sidenav ul { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .sidenav a { border-right: 0; border-bottom: 2px solid transparent; padding: 6px 10px; margin: 0; }
  .sidenav a[aria-current="page"] { border-bottom-color: var(--gold); }
  .site-footer__legal { margin-left: 0; }
}

@media (max-width: 640px) {
  .btn { width: 100%; min-width: 0; }
  .mainnav a { padding: 6px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
