/*
Theme Name: Nachhaltigkeitsindex
Theme URI: https://sustainability-index.de
Author: Nachhaltigkeitsindex
Description: Schlankes Theme für sustainability-index.de. Startseite 1:1 aus dem bestehenden Design, Blog, Seiten und Archive im selben Look.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: nachhaltigkeitsindex
*/

:root {
  --green-darkest: #032A20;
  --green-dark:    #063328;
  --green-mid:     #085041;
  --green-base:    #0F6E56;
  --green-vivid:   #1D9E75;
  --green-light:   #5DCAA5;
  --green-pale:    #9FE1CB;
  --green-wash:    #E1F5EE;
  --sand:          #F5F4F0;
  --sand-dark:     #ECEAE3;
  --charcoal:      #2C2C2A;
  --muted:         #5F5E5A;
  --border:        #D3D1C7;
  --white:         #FFFFFF;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans:  'DM Sans', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--sand); color: var(--charcoal); -webkit-font-smoothing: antialiased; }

/* NAV */
.nav { position: sticky; top: 0; z-index: 100; background: var(--green-darkest); border-bottom: 1px solid rgba(255,255,255,0.06); padding: 0 2rem; height: 60px; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-icon { background: var(--green-vivid); border-radius: 7px; width: 30px; height: 30px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 6px 5px; }
.nav-icon span { display: block; background: var(--green-wash); border-radius: 1px; width: 5px; }
.nav-wordmark { color: var(--green-wash); font-family: var(--serif); font-size: 16px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--green-pale); font-size: 13.5px; text-decoration: none; opacity: 0.8; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; }
.nav-cta { background: var(--green-vivid); color: var(--green-wash); font-family: var(--sans); font-size: 13px; font-weight: 500; padding: 8px 18px; border-radius: 7px; border: none; cursor: pointer; transition: background .2s; }
.nav-cta:hover { background: var(--green-light); }

/* HERO */
.hero { background: var(--green-darkest); padding: 5rem 2rem 4rem; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(29,158,117,0.18) 0%, transparent 70%); pointer-events: none; }
.hero-badge { display: inline-flex; align-items: center; gap: 7px; background: rgba(29,158,117,0.15); border: 1px solid rgba(29,158,117,0.3); color: var(--green-pale); font-size: 11.5px; font-weight: 500; letter-spacing: 0.5px; padding: 5px 14px; border-radius: 20px; margin-bottom: 2rem; }
.hero-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green-vivid); animation: blink 2s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }
.hero h1 { font-family: var(--serif); font-size: clamp(28px, 5vw, 46px); font-weight: 400; color: var(--green-wash); line-height: 1.18; max-width: 620px; margin: 0 auto 1.25rem; }
.hero h1 em { font-style: italic; color: var(--green-light); }
.hero p { font-size: 16px; color: var(--green-pale); max-width: 460px; margin: 0 auto 2.5rem; line-height: 1.65; font-weight: 300; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-primary { background: var(--green-vivid); color: var(--green-wash); font-family: var(--sans); font-size: 14px; font-weight: 500; padding: 12px 26px; border-radius: 8px; border: none; cursor: pointer; transition: background .2s, transform .15s; }
.btn-primary:hover { background: var(--green-light); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--green-pale); font-family: var(--sans); font-size: 14px; padding: 12px 26px; border-radius: 8px; border: 1px solid rgba(159,225,203,0.25); cursor: pointer; transition: border-color .2s, color .2s; }
.btn-secondary:hover { border-color: var(--green-pale); color: var(--green-wash); }

/* STATS BAR */
.stats-bar { background: var(--green-dark); border-top: 1px solid rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.05); padding: 1.25rem 2rem; display: flex; justify-content: center; flex-wrap: wrap; }
.stat { text-align: center; padding: 0.5rem 2.5rem; border-right: 1px solid rgba(255,255,255,0.08); }
.stat:last-child { border-right: none; }
.stat-num { font-family: var(--serif); font-size: 24px; color: var(--green-light); }
.stat-label { font-size: 11px; color: var(--green-pale); opacity: 0.65; margin-top: 2px; }

/* LAYOUT */
.section { padding: 4rem 2rem; max-width: 820px; margin: 0 auto; }
.section-label { font-size: 11px; font-weight: 500; color: var(--green-vivid); letter-spacing: 0.8px; text-transform: uppercase; margin-bottom: 8px; }
.section h2 { font-family: var(--serif); font-size: clamp(22px, 3.5vw, 32px); font-weight: 400; color: var(--green-dark); margin-bottom: 0.5rem; line-height: 1.25; }
.section-sub { font-size: 15px; color: var(--muted); max-width: 520px; line-height: 1.6; margin-bottom: 2rem; }

/* HOW IT WORKS */
.how-bg { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.step { padding: 2rem 1.75rem; border-right: 1px solid var(--border); }
.step:last-child { border-right: none; }
.step-num { font-family: var(--serif); font-size: 36px; color: var(--green-wash); line-height: 1; margin-bottom: 0.75rem; }
.step-title { font-size: 14px; font-weight: 500; color: var(--green-dark); margin-bottom: 6px; }
.step-desc { font-size: 13px; color: var(--muted); line-height: 1.55; }

/* BRANCHES */
.branch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 1.5rem; }
.branch-card { background: var(--white); border: 1px solid var(--border); border-radius: 11px; padding: 1.1rem 1rem; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .15s; }
.branch-card:hover { border-color: var(--green-vivid); box-shadow: 0 4px 16px rgba(29,158,117,0.1); transform: translateY(-2px); }
.branch-card.soon { opacity: 0.5; cursor: default; }
.branch-card.soon:hover { border-color: var(--border); box-shadow: none; transform: none; }
.branch-tag { font-size: 10.5px; font-weight: 500; padding: 3px 9px; border-radius: 20px; display: inline-block; margin-bottom: 9px; }
.branch-tag.avail { color: var(--green-base); background: var(--green-wash); }
.branch-tag.soon-tag { color: var(--muted); background: var(--sand-dark); }
.branch-name { font-size: 14px; font-weight: 500; color: var(--charcoal); margin-bottom: 3px; }
.branch-meta { font-size: 12px; color: var(--muted); }

/* PREVIEW */
.preview-wrap { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 1.5rem; margin-top: 1.5rem; }
.preview-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; flex-wrap: wrap; gap: 8px; }
.preview-label { font-size: 11px; font-weight: 500; color: var(--green-base); letter-spacing: 0.5px; text-transform: uppercase; }
.preview-tag { font-size: 11px; color: var(--muted); background: var(--sand); padding: 3px 10px; border-radius: 20px; border: 1px solid var(--border); }
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 1.25rem; }
.kpi { background: var(--sand); border-radius: 9px; padding: 11px 13px; }
.kpi-label { font-size: 10.5px; color: var(--muted); margin-bottom: 5px; }
.kpi-val { font-family: var(--serif); font-size: 20px; color: var(--green-dark); }
.kpi-bench { font-size: 10.5px; color: var(--green-vivid); margin-top: 2px; }
.divider-label { font-size: 11px; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.divider-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bar-name { font-size: 11px; color: var(--muted); width: 40px; flex-shrink: 0; }
.bar-track { flex: 1; background: var(--green-wash); border-radius: 3px; height: 9px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; }
.bar-val { font-size: 11px; color: var(--charcoal); font-weight: 500; width: 38px; text-align: right; flex-shrink: 0; }
.source-note { font-size: 11px; color: var(--muted); margin-top: 8px; }

/* COMPANIES */
.companies-bg { background: var(--green-darkest); }
.companies-bg .section-label { color: rgba(159,225,203,0.7); }
.companies-bg .section h2 { color: var(--green-wash); }
.companies-bg .section-sub { color: rgba(159,225,203,0.7); }
.company-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 1.5rem; }
.company-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 1.25rem; transition: background .2s; }
.company-card:hover { background: rgba(255,255,255,0.07); }
.company-name { font-size: 15px; font-weight: 500; color: var(--green-wash); margin-bottom: 3px; }
.company-sub { font-size: 12px; color: rgba(159,225,203,0.6); margin-bottom: 1rem; }
.company-kpis { display: flex; flex-direction: column; gap: 8px; }
.company-kpi { display: flex; justify-content: space-between; }
.company-kpi-label { font-size: 12px; color: rgba(159,225,203,0.6); }
.company-kpi-val { font-size: 13px; font-weight: 500; color: var(--green-light); }
.trend-down { color: #1D9E75; }
.trend-up { color: #E24B4A; }

/* PRICING */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 1.75rem; }
.price-card { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 1.5rem; position: relative; transition: box-shadow .2s; }
.price-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.07); }
.price-card.featured { border: 2px solid var(--green-vivid); }
.featured-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--green-vivid); color: var(--green-wash); font-size: 11px; font-weight: 500; padding: 3px 14px; border-radius: 20px; white-space: nowrap; }
.price-name { font-size: 14px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.price-val { font-family: var(--serif); font-size: 36px; color: var(--green-dark); line-height: 1; }
.price-val span { font-family: var(--sans); font-size: 14px; color: var(--muted); font-weight: 300; }
.price-period { font-size: 12px; color: var(--muted); margin: 4px 0 1.25rem; }
.price-divider { height: 1px; background: var(--border); margin-bottom: 1.25rem; }
.price-features { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 1.5rem; }
.price-features li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--charcoal); line-height: 1.4; }
.check-icon { width: 16px; height: 16px; border-radius: 50%; background: var(--green-wash); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.check-icon svg { width: 8px; height: 8px; }
.price-btn { width: 100%; padding: 10px; border-radius: 8px; font-family: var(--sans); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: all .2s; }
.price-btn-outline { background: transparent; color: var(--green-dark); border: 1px solid var(--border); }
.price-btn-outline:hover { border-color: var(--green-vivid); color: var(--green-vivid); }
.price-btn-filled { background: var(--green-dark); color: var(--green-wash); border: none; }
.price-btn-filled:hover { background: var(--green-mid); }
.price-btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.price-btn-ghost:hover { color: var(--charcoal); border-color: var(--charcoal); }

/* TRUST */
.trust-bg { background: var(--white); border-top: 1px solid var(--border); }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 2rem; margin-top: 2rem; }
.trust-item { display: flex; flex-direction: column; gap: 8px; }
.trust-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--green-wash); display: flex; align-items: center; justify-content: center; }
.trust-icon svg { width: 18px; height: 18px; }
.trust-title { font-size: 14px; font-weight: 500; color: var(--charcoal); }
.trust-desc { font-size: 13px; color: var(--muted); line-height: 1.55; }

/* CTA */
.cta-band { background: var(--green-dark); padding: 3.5rem 2rem; text-align: center; }
.cta-band h2 { font-family: var(--serif); font-size: clamp(22px,4vw,34px); color: var(--green-wash); margin-bottom: 0.75rem; }
.cta-band p { font-size: 15px; color: rgba(159,225,203,0.75); max-width: 400px; margin: 0 auto 2rem; }
.cta-form { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.cta-input { font-family: var(--sans); font-size: 14px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: var(--green-wash); padding: 11px 18px; border-radius: 8px; width: 260px; outline: none; transition: border-color .2s; }
.cta-input::placeholder { color: rgba(255,255,255,0.35); }
.cta-input:focus { border-color: var(--green-vivid); }
.cta-btn { background: var(--green-vivid); color: var(--green-wash); font-family: var(--sans); font-size: 14px; font-weight: 500; padding: 11px 24px; border-radius: 8px; border: none; cursor: pointer; transition: background .2s; }
.cta-btn:hover { background: var(--green-light); }

/* FOOTER */
footer { background: var(--green-darkest); border-top: 1px solid rgba(255,255,255,0.06); padding: 2.5rem 2rem; }
.footer-inner { max-width: 820px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 12.5px; color: var(--green-pale); opacity: 0.5; text-decoration: none; transition: opacity .2s; }
.footer-links a:hover { opacity: 1; }
.footer-copy { font-size: 12px; color: var(--green-pale); opacity: 0.4; }

/* ANIMATIONS */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .stat { padding: 0.5rem 1rem; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: none; border-bottom: 1px solid var(--border); }
  .step:last-child { border-bottom: none; }
}

/* ===== WordPress-Ergänzungen ===== */

/* Admin-Leiste: Sticky-Navigation darunter */
.admin-bar .nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .nav { top: 46px; } }
@media (max-width: 600px) { .admin-bar .nav { top: 0; } }

/* Nav-CTA als Link */
a.nav-cta { text-decoration: none; display: inline-block; }

/* Ohne JavaScript bleiben Inhalte sichtbar; reduzierte Bewegung respektieren */
html:not(.js) .fade-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; transition: none; }
  .hero-badge::before { animation: none; }
}

/* Tastaturfokus */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--green-vivid); outline-offset: 2px;
}

/* Seitenkopf für Blog, Seiten, Archive */
.page-head { background: var(--green-darkest); padding: 3.5rem 2rem 3rem; text-align: center; }
.page-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 4.5vw, 40px); line-height: 1.2; color: var(--green-wash); max-width: 720px; margin: 0 auto; }
.page-head .page-meta { margin-top: 1rem; font-size: 13px; color: var(--green-pale); opacity: 0.8; }
.page-head .page-meta a { color: var(--green-pale); }
.page-head .page-intro { margin: 1rem auto 0; max-width: 560px; font-size: 15px; line-height: 1.6; color: var(--green-pale); font-weight: 300; }

/* Fließtext (Beiträge, Rechtsseiten) */
.prose-wrap { background: var(--white); border-bottom: 1px solid var(--border); }
.prose { max-width: 700px; margin: 0 auto; padding: 3.5rem 2rem 4rem; font-size: 16.5px; line-height: 1.75; color: var(--charcoal); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.25; margin-top: 2.2em; color: var(--green-darkest); }
.prose h3 { font-size: 18px; font-weight: 500; margin-top: 1.8em; color: var(--green-darkest); }
.prose h4 { font-size: 16px; font-weight: 500; margin-top: 1.5em; }
.prose a { color: var(--green-base); text-underline-offset: 3px; }
.prose a:hover { color: var(--green-vivid); }
.prose strong { font-weight: 500; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: none; padding-left: 1.6em; }
.prose ul li { position: relative; }
.prose ul li::before { content: '→'; position: absolute; left: -1.6em; color: var(--green-vivid); }
.prose li + li { margin-top: 0.4em; }
.prose blockquote { border-left: 3px solid var(--green-vivid); padding: 0.2em 0 0.2em 1.2em; color: var(--muted); }
.prose img, .prose figure { max-width: 100%; height: auto; border-radius: 8px; }
.prose figcaption { font-size: 13px; color: var(--muted); margin-top: 0.5em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--border); padding: 0.6em 0.8em; text-align: left; }
.prose th { font-weight: 500; background: var(--sand); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }
.prose code { font-size: 0.9em; background: var(--sand); padding: 0.1em 0.35em; border-radius: 4px; }
.alignwide, .alignfull { max-width: 100%; }

/* Beitragsliste */
.post-list-wrap { padding: 3rem 2rem 4rem; }
.post-list { max-width: 820px; margin: 0 auto; display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.post-item { background: var(--white); padding: 1.75rem 2rem; }
.post-item .post-cat { font-size: 12px; font-weight: 500; color: var(--green-base); text-decoration: none; }
.post-item h2 { font-family: var(--serif); font-weight: 400; font-size: 23px; line-height: 1.3; margin: 0.35rem 0 0.6rem; }
.post-item h2 a { color: var(--green-darkest); text-decoration: none; }
.post-item h2 a:hover { color: var(--green-base); }
.post-item p { font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.post-item .post-date { display: block; margin-top: 0.8rem; font-size: 12.5px; color: var(--muted); opacity: 0.8; }
.post-empty { max-width: 820px; margin: 0 auto; text-align: center; color: var(--muted); font-size: 15px; }

.pagination { max-width: 820px; margin: 2rem auto 0; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pagination .page-numbers { font-size: 14px; padding: 7px 13px; border-radius: 7px; border: 1px solid var(--border); background: var(--white); color: var(--charcoal); text-decoration: none; }
.pagination .page-numbers.current { background: var(--green-darkest); border-color: var(--green-darkest); color: var(--green-wash); }

.post-footer-nav { max-width: 700px; margin: 0 auto; padding: 0 2rem 3.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 14px; }
.post-footer-nav a { color: var(--green-base); text-decoration: none; }

/* Aktiver Nav-Link */
.nav-links a.is-current { opacity: 1; }

@media (max-width: 640px) {
  .footer-links { flex-wrap: wrap; gap: 14px; }
  .post-item { padding: 1.5rem 1.25rem; }
}
[id] { scroll-margin-top: 72px; }
