/*
Theme Name: AnbauWerkstatt
Theme URI: https://anbauwerkstatt.de
Author: Colin
Description: Custom-Theme für AnbauWerkstatt – Rechner, Wissen und Bibliothek rund um Pflanzenbau, als Erweiterung zum Buch „Südbalkongrow“.
Version: 1.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: anbauwerkstatt
License: Privates Theme, nicht für die Weitergabe bestimmt.
*/

:root {
  --wald: #173F2A;
  --blattgruen: #45652F; /* dunkler als zuvor — Kontrast-Fix */
  --gold: #B78A2D;
  --blau-ui: #4E6354;
  --blau: #5C6F61;
  --blauhell: #EEF1E9;
  --creme: #F6F2E8;
  --papierweiss: #FFFCF5;
  --text-dunkel: #17221A;
  --linie: #D8D2C5;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dunkel);
  background: var(--creme);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Lora', serif; font-weight: 600; color: var(--text-dunkel); line-height: 1.2; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--wald);
  outline-offset: 3px;
}
.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: 100;
  padding: 10px 14px; border-radius: 8px;
  background: var(--wald); color: var(--papierweiss);
  font-size: 14px; font-weight: 700;
  transform: translateY(-150%);
  transition: transform 0.18s ease;
}
.skip-link:focus { transform: translateY(0); }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* --- Header --- */
header { background: rgba(255, 252, 245, 0.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 20; }
header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { font-family: 'Lora', serif; font-size: 25px; font-weight: 700; color: var(--wald); white-space: nowrap; letter-spacing: -0.025em; line-height: 1; }
.logo-anbau { color: var(--wald); }
.logo-werkstatt { color: var(--gold); }
nav ul { list-style: none; display: flex; gap: 32px; }
nav a { font-size: 15px; font-weight: 500; color: var(--text-dunkel); padding: 6px 2px; border-bottom: 2px solid transparent; transition: border-color 0.18s ease, color 0.18s ease; }
nav a:hover, nav a:focus-visible { color: var(--wald); border-bottom-color: var(--gold); }

/* Mobile-Menü */
.nav-toggle { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 40px; height: 40px; background: none; border: none; padding: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--wald); border-radius: 2px; }
.nav-mobile { border-bottom: 1px solid var(--linie); background: var(--papierweiss); }
.nav-mobile ul { list-style: none; padding: 6px 24px 18px; display: flex; flex-direction: column; }
.nav-mobile a { display: block; padding: 12px 2px; font-size: 15px; font-weight: 500; color: var(--text-dunkel); border-bottom: 1px solid var(--linie); }
.nav-mobile li:last-child a { border-bottom: none; }
@media (min-width: 561px) { .nav-mobile { display: none !important; } }
@media (max-width: 560px) { .nav-desktop { display: none; } .nav-toggle { display: flex; } }

/* --- Hero --- */
.hero {
  position: relative; overflow: hidden; padding: 72px 0 66px; border-bottom: 1px solid var(--linie);
  background: linear-gradient(135deg, #FFFCF5 0%, #F6F2E8 58%, #F1EEE4 100%);
}
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 60% 40% 65% 35%; pointer-events: none; }
.hero::before { width: 270px; height: 165px; right: -60px; top: 20px; transform: rotate(-18deg); background: rgba(69,101,47,0.065); }
.hero::after { width: 200px; height: 125px; left: -65px; bottom: -18px; transform: rotate(22deg); background: rgba(183,138,45,0.045); }

.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; gap: 0; align-items: start; }
.eyebrow { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blau); margin-bottom: 23px; text-align: center; }
.hero h1 { font-size: clamp(32px, 4.3vw, 49px); line-height: 1.15; margin: 0 auto 25px; max-width: 790px; text-wrap: balance; text-align: center; }
.hero p.sub { font-size: 17px; color: var(--text-dunkel); opacity: 0.8; max-width: 620px; margin: 0 auto 35px; line-height: 1.68; text-align: center; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 13px 26px; border-radius: 8px; font-size: 15px; font-weight: 600; letter-spacing: 0.01em; transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease; }
.btn-primary { background: var(--wald); color: var(--papierweiss); box-shadow: 0 8px 20px rgba(23,63,42,0.14); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-secondary { background: #FBF6EA; color: #4F3A17; border: 1px solid var(--gold); box-shadow: inset 0 0 0 1px rgba(183,138,45,0.04); }
.btn-secondary:hover { background: #F8F0DE; border-color: #9D7628; }
.btn:focus-visible, nav a:focus-visible, .nav-toggle:focus-visible { outline: 2px solid var(--wald); outline-offset: 2px; }

/* Werkstatt-Prinzip: horizontale Prozesslinie */
.hero-process-wrap {
  margin-top: 42px;
  padding: 24px 0 4px;
  border-top: 1px solid rgba(216,210,197,0.95);
}
.hero-process-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blattgruen);
}
.hero-process-label::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}
.hero-process {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  max-width: 1020px;
}
.hero-process::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(183,138,45,0.55) 0%,
    rgba(23,63,42,0.28) 35%,
    rgba(23,63,42,0.28) 65%,
    rgba(183,138,45,0.55) 100%
  );
  z-index: 0;
}
.hero-process-step {
  position: relative;
  z-index: 1;
  min-width: 0;
}
.hero-process-num {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  background: var(--papierweiss);
  border: 1px solid rgba(183,138,45,0.82);
  box-shadow: 0 0 0 5px rgba(246,242,232,0.88);
  color: var(--wald);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.hero-process-step strong {
  display: block;
  margin-bottom: 5px;
  font-family: 'Lora', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--wald);
}
.hero-process-step span:last-child {
  display: block;
  max-width: 205px;
  font-size: 12.75px;
  line-height: 1.52;
  color: var(--text-dunkel);
  opacity: 0.72;
}

@media (max-width: 760px) {
  .hero-process-wrap { margin-top: 36px; padding-top: 22px; }
  .hero-process { grid-template-columns: 1fr 1fr; gap: 26px 24px; }
  .hero-process::before { display: none; }
  .hero-process-step { padding-left: 38px; }
  .hero-process-num { position: absolute; left: 0; top: -2px; margin-bottom: 0; box-shadow: none; }
  .hero-process-step span:last-child { max-width: none; }
}

@media (max-width: 480px) {
  .hero-process { grid-template-columns: 1fr; gap: 22px; }
  .hero-process-label { margin-bottom: 20px; }
}

/* --- Sektion: Zwei Wege --- */
.section { padding: 62px 0; }
.section-head { max-width: 720px; margin: 0 auto 32px; text-align: center; }
.section-head .eyebrow::before { content: "●"; color: var(--gold); font-size: 9px; margin-right: 8px; vertical-align: middle; }
.section-head h2 { font-size: 26px; margin-bottom: 8px; }
.section-head p { color: var(--text-dunkel); opacity: 0.75; line-height: 1.6; font-size: 15.5px; }

.paths { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.path { border-radius: 16px; padding: 30px 28px; position: relative; overflow: hidden; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.path:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(23,34,26,0.06); }
.path:focus-within { outline: 2px solid var(--wald); outline-offset: 3px; }
.path-main-link {
  position: static;
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 18px; font-size: 13px; font-weight: 700;
}
.path-main-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 1;
}
.path.tech .path-main-link { color: #F4F7F4; }
.path.garten .path-main-link { color: var(--wald); }
.path-tools { position: relative; z-index: 3; }
.path-tools a { position: relative; z-index: 4; }
.path > :not(.path-main-link):not(.path-tools) { position: relative; z-index: 2; }
.path-main-link:focus-visible {
  outline: 2px solid var(--wald);
  outline-offset: 3px;
  border-radius: 4px;
}

@supports selector(.path:has(.path-main-link:focus-visible)) {
  .path-main-link:focus-visible { outline: none; }
  .path:has(.path-main-link:focus-visible) {
    outline: 2px solid var(--wald);
    outline-offset: 3px;
  }
}

.path.tech {
  background: linear-gradient(135deg, #173F2A 0%, #28553B 100%);
}
.path.tech::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  width: 46px;
  height: 3px;
  background: var(--gold);
  border-radius: 0 0 3px 3px;
  opacity: 0.95;
}
.path.garten { background: linear-gradient(145deg, #FFFCF5, #F0F2E8); border: 1px solid #D5D8C8; padding: 34px 32px; }
.path.garten::after {
  content: ""; position: absolute; top: 14px; right: 18px; width: 112px; height: 78px;
  border: 1px solid rgba(69,101,47,0.11);
  border-radius: 70% 30% 68% 32% / 58% 42% 58% 42%;
  transform: rotate(-18deg);
  pointer-events: none;
}
.path.garten::before {
  content: ""; position: absolute; top: 52px; right: 34px; width: 82px; height: 1px;
  background: rgba(69,101,47,0.08);
  transform: rotate(-18deg);
  transform-origin: right center;
  pointer-events: none;
}

.path-label { display: inline-block; font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; position: relative; }
.path.tech .path-label { color: #E6EEE9; }
.path.garten .path-label { color: var(--blattgruen); }
.path.garten .path-label::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 2px;
  margin-right: 8px;
  vertical-align: middle;
  background: var(--gold);
  border-radius: 2px;
  opacity: 0.9;
}
.path h3 { font-size: 20px; margin-bottom: 8px; position: relative; }
.path.tech h3 { color: var(--papierweiss); }
.path p.lead { font-size: 14.5px; line-height: 1.6; margin-bottom: 18px; position: relative; }
.path.tech p.lead { color: #DCE7DD; }
.path.garten p.lead { color: var(--text-dunkel); opacity: 0.75; }

.path-tools { display: flex; flex-wrap: wrap; gap: 8px; position: relative; }
.path-tools a { background: rgba(255,255,255,0.13); color: var(--papierweiss); font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 20px; transition: background 0.15s ease; }
.path-tools a:hover { background: rgba(255,255,255,0.20); box-shadow: inset 0 0 0 1px rgba(183,138,45,0.65); }

.path ul { list-style: none; font-size: 14px; line-height: 2.1; color: var(--text-dunkel); opacity: 0.78; position: relative; }
.path ul li::before { content: "— "; opacity: 0.55; }

.support { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card-sm { background: var(--papierweiss); border: 1px solid var(--linie); border-radius: 14px; padding: 20px 22px; box-shadow: 0 8px 22px rgba(23,34,26,0.032); position: relative; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.card-sm::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  width: 28px;
  height: 3px;
  background: var(--gold);
  border-radius: 0 0 3px 3px;
  opacity: 0.72;
}
.card-sm:hover { transform: translateY(-1px); border-color: #BFC2AF; box-shadow: 0 9px 22px rgba(23,34,26,0.055); }
.card-sm:focus-within { outline: 2px solid var(--wald); outline-offset: 3px; }
.card-link {
  position: static;
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--wald);
}
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.card-link:focus-visible {
  outline: 2px solid var(--wald);
  outline-offset: 3px;
  border-radius: 4px;
}

@supports selector(.card-sm:has(.card-link:focus-visible)) {
  .card-link:focus-visible { outline: none; }
  .card-sm:has(.card-link:focus-visible) {
    outline: 2px solid var(--wald);
    outline-offset: 3px;
  }
}
.card-sm .mini { font-family: 'Inter', sans-serif; font-size: 11.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--blattgruen); display: block; margin-bottom: 8px; }
.card-sm h4 { font-size: 17px; margin-bottom: 6px; }
.card-sm p { font-size: 14px; color: var(--text-dunkel); opacity: 0.75; line-height: 1.5; }

/* --- Generische Seiten (page.php / index.php) --- */
.page-content { max-width: 760px; margin: 0 auto; }
.page-content h1 { font-size: 32px; margin-bottom: 22px; }
.page-content .entry-content { font-size: 16px; line-height: 1.7; }
.page-content .entry-content p { margin-bottom: 18px; }
.page-content .entry-content h2 { font-size: 22px; margin: 32px 0 12px; }
.page-content .entry-content h3 { font-size: 18px; margin: 24px 0 10px; }
.page-content .entry-content ul, .page-content .entry-content ol { margin: 0 0 18px 22px; }
.page-content article + article { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--linie); }
.page-content article h2 { font-size: 22px; margin-bottom: 8px; }
.page-content article h2 a:hover { color: var(--wald); text-decoration: underline; text-decoration-color: var(--gold); }

/* --- Footer --- */
footer { background: #FFFCF5; border-top: 1px solid var(--linie); padding: 40px 0 28px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-brand { font-family: 'Lora', serif; font-size: 19px; font-weight: 700; color: var(--wald); }
.footer-claim { display: block; margin-top: 5px; font-family: 'Inter', sans-serif; font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; color: var(--blau); }
.footer-claim::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 8px;
  vertical-align: middle;
  background: var(--gold);
  border-radius: 2px;
}
.footer-links { list-style: none; display: flex; gap: 24px; }
.footer-links a { font-size: 13.5px; color: var(--text-dunkel); opacity: 0.72; }
.footer-links a:hover { opacity: 1; color: var(--wald); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
.footer-note { width: 100%; font-size: 12.5px; color: var(--text-dunkel); opacity: 0.5; margin-top: 18px; }

@media (hover: hover) {
  .path-main-link span,
  .card-link span { transition: transform 0.18s ease; display: inline-block; color: var(--gold); }
  .path:hover .path-main-link span,
  .card-sm:hover .card-link span { transform: translateX(2px); }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .paths { grid-template-columns: 1fr; }
  .support { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero { padding: 44px 0 48px; }
  .logo { font-size: 22px; }
  .path, .path.garten { padding: 26px 22px; }
}

@media (max-width: 420px) {
  .wrap { padding-left: 18px; padding-right: 18px; }
  .hero-actions { flex-direction: column; gap: 10px; }
  .hero-actions .btn { width: 100%; }
  .hero h1 { font-size: clamp(30px, 9.6vw, 38px); line-height: 1.13; text-wrap: balance; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .path:hover, .card-sm:hover, .btn-primary:hover, .path-main-link span, .card-link span { transform: none !important; }
}
