/*
Theme Name: Brotbaukasten
Theme URI: https://brotbaukasten.lerner.cloud
Author: Michael Kammerlohr
Author URI: https://brotbaukasten.lerner.cloud
Description: Ein handwerkliches WordPress-Theme für den Brotbaukasten von Bäckermeister Michael Kammerlohr. Warme, erdige Farben — sauber, ohne Schnörkel.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: brotbaukasten
Tags: custom-background, custom-logo, custom-menu, featured-images, one-column, two-columns, responsive-layout
*/

/* ====================================================
   DESIGN TOKENS
   ==================================================== */
:root {
  --cream:              #FAF6EE;
  --paper:              #FFFDF9;
  --crust:              #2B1D14;
  --crust-soft:         #5A4738;
  --rye:                #A8420F;
  --rye-soft:           #C96A3A;
  --sage:               #6B7F5E;
  --sage-light:         #EEF2EB;
  --wheat-line:         #E1D5BE;
  --wheat-line-strong:  #CBB994;
  --font-display:       'Fraunces', Georgia, serif;
  --font-body:          'Inter', system-ui, sans-serif;
  --font-mono:          'IBM Plex Mono', 'Courier New', monospace;
  --radius-sm:          8px;
  --radius-md:          14px;
  --radius-lg:          20px;
  --shadow-soft:        0 2px 16px rgba(43,29,20,0.07);
  --max-w:              1180px;
  --section-gap:        96px;
}

/* ====================================================
   RESET & BASE
   ==================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--crust);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rye); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--rye-soft); }

/* ====================================================
   TYPOGRAPHY
   ==================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  color: var(--crust);
}
h1 { font-size: clamp(36px, 6vw, 64px); }
h2 { font-size: clamp(26px, 4vw, 40px); }
h3 { font-size: clamp(20px, 3vw, 28px); }
h4 { font-size: 20px; }
p { margin: 0 0 1.2em; color: var(--crust-soft); }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rye);
  display: block;
  margin-bottom: 12px;
}

/* ====================================================
   LAYOUT HELPERS
   ==================================================== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: var(--section-gap) 0; }
.section--alt { background: var(--paper); }
.section--dark {
  background: var(--crust);
  color: var(--cream);
}
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: var(--cream); }
.section--dark p { color: #D8CBB4; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; gap: 36px; }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --section-gap: 60px; }
}

/* ====================================================
   HEADER & NAV
   ==================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--wheat-line);
  box-shadow: 0 1px 0 var(--wheat-line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo img {
  height: 36px;
  width: auto;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--crust);
  letter-spacing: -0.02em;
}
.logo-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--crust-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
}

/* Nav */
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  align-items: center;
}
.site-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--crust-soft);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}
.site-nav a:hover,
.site-nav .current-menu-item a {
  color: var(--crust);
  background: var(--sage-light);
}
.site-nav .nav-cta a {
  background: var(--rye);
  color: var(--cream) !important;
  font-weight: 600;
}
.site-nav .nav-cta a:hover { background: var(--rye-soft); }

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--wheat-line-strong);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  color: var(--crust);
  font-size: 18px;
}
@media (max-width: 720px) {
  .menu-toggle { display: flex; align-items: center; }
  .site-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--wheat-line);
    padding: 16px 24px;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 4px; }
  .site-nav a { display: block; }
}

/* ====================================================
   HERO
   ==================================================== */
.hero {
  background: var(--cream);
  padding: 80px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -60px;
  width: 500px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(168,66,15,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 64px;
  align-items: center;
}
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rye);
  background: rgba(168,66,15,0.08);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.hero h1 { margin-bottom: 20px; }
.hero .hero-sub {
  font-size: 18px;
  color: var(--crust-soft);
  max-width: 46ch;
  margin-bottom: 36px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-card {
  background: var(--paper);
  border: 1px solid var(--wheat-line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-soft);
}
.hero-card .stat {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 600;
  color: var(--rye);
  display: block;
  line-height: 1;
  margin-bottom: 4px;
}
.hero-card .stat-label {
  font-size: 13px;
  color: var(--crust-soft);
}
.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--wheat-line);
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-card { display: none; }
}

/* ====================================================
   BUTTONS
   ==================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--rye);
  color: var(--cream);
}
.btn-primary:hover { background: var(--rye-soft); color: var(--cream); }
.btn-outline {
  background: transparent;
  color: var(--crust);
  border: 1.5px solid var(--wheat-line-strong);
}
.btn-outline:hover { background: var(--sage-light); color: var(--crust); border-color: var(--sage); }

/* ====================================================
   CARDS
   ==================================================== */
.card {
  background: var(--paper);
  border: 1px solid var(--wheat-line);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}
.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(168,66,15,0.08);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 22px;
}
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { font-size: 14px; }

/* ====================================================
   ABOUT / BÄCKERMEISTER
   ==================================================== */
.portrait {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--wheat-line);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 80px;
  color: var(--wheat-line-strong);
}
.about-meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
}
.meta-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--cream);
  border-radius: var(--radius-sm);
  border: 1px solid var(--wheat-line);
}
.meta-item .icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.meta-item strong { font-size: 14px; font-weight: 600; color: var(--crust); display: block; }
.meta-item span { font-size: 13px; color: var(--crust-soft); }

/* ====================================================
   PROCESS / TIMELINE
   ==================================================== */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  position: relative;
}
@media (max-width: 760px) { .process-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .process-steps { grid-template-columns: 1fr; } }
.process-step {
  background: var(--paper);
  border: 1px solid var(--wheat-line);
  padding: 28px 24px;
}
.process-step:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.process-step:last-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.process-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--rye);
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}
.process-step h4 { font-size: 16px; margin-bottom: 6px; }
.process-step p { font-size: 13.5px; }

/* ====================================================
   CTA BLOCK
   ==================================================== */
.cta-block {
  background: var(--crust);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  flex-wrap: wrap;
}
.cta-block h2 { color: var(--cream); margin-bottom: 8px; font-size: clamp(22px, 3vw, 32px); }
.cta-block p { color: #D8CBB4; max-width: 44ch; }
@media (max-width: 680px) {
  .cta-block { padding: 36px 28px; }
  .cta-block .btn { width: 100%; justify-content: center; }
}

/* ====================================================
   DIVIDER
   ==================================================== */
.divider {
  border: none;
  border-top: 1px solid var(--wheat-line);
  margin: 0;
}
.grain-divider {
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--wheat-line-strong) 0px,
    var(--wheat-line-strong) 4px,
    transparent 4px,
    transparent 10px
  );
  opacity: 0.5;
}

/* ====================================================
   FOOTER
   ==================================================== */
.site-footer {
  background: var(--crust);
  color: #D8CBB4;
  padding: 56px 0 32px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; gap: 32px; } }
.footer-brand .logo-text { color: var(--cream); }
.footer-brand p { font-size: 14px; color: #B8A89A; margin-top: 12px; max-width: 32ch; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wheat-line-strong);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: #B8A89A;
  text-decoration: none;
  font-size: 14px;
  transition: color .15s;
}
.footer-col a:hover { color: var(--cream); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 13px; color: #7A6A5E; margin: 0; }

/* ====================================================
   WORDPRESS CORE
   ==================================================== */
.entry-content { max-width: 72ch; margin: 0 auto; padding: var(--section-gap) 24px; }
.entry-content h2,
.entry-content h3 { margin-top: 1.8em; }
.entry-content ul,
.entry-content ol { padding-left: 1.5em; color: var(--crust-soft); }
.entry-content li { margin-bottom: .5em; }
.entry-content blockquote {
  border-left: 3px solid var(--rye);
  padding: 12px 20px;
  margin: 28px 0;
  background: var(--paper);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--crust);
}

/* Gutenberg alignment */
.alignwide { margin-left: -60px; margin-right: -60px; }
.alignfull { margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); width: 100vw; }
@media (max-width: 720px) {
  .alignwide { margin-left: 0; margin-right: 0; }
}

/* Page template: full width */
.page-template-fullwidth .entry-content { max-width: 100%; padding: 0; }

/* ====================================================
   UTILITY
   ==================================================== */
.text-center { text-align: center; }
.text-rye { color: var(--rye); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-48 { margin-bottom: 48px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
