/* ============================================================
   EnEfG-Schnellcheck · Stefan Persch · Zukunftskompass Mittelstand
   Anlehnung an Live-Page mobilitaet/spedition.html
   ============================================================ */

:root {
  /* Farben — Live-Page-Tokens */
  --color-green-btn: #027707;
  --color-green-btn-hover: #015a05;
  --color-green-highlight: #EDFBE2;
  --color-green-soft: #f5fdee;
  --color-dark: #0C1406;
  --color-text: #1a2014;
  --color-muted: #5a6651;
  --color-line: #e6ebe0;
  --color-bg: #ffffff;
  --color-bg-soft: #fafbf7;
  --color-alert: #b91c1c;
  --color-alert-bg: #fef2f2;
  --color-amber: #b45309;
  --color-amber-bg: #fffbeb;

  /* Type */
  --font-display: "Lexend", system-ui, -apple-system, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;

  /* Spacing */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 1px 2px rgba(12, 20, 6, 0.04), 0 8px 24px rgba(12, 20, 6, 0.06);
  --shadow-card-hover: 0 2px 4px rgba(12, 20, 6, 0.06), 0 16px 40px rgba(12, 20, 6, 0.10);
}

/* ============= RESET / BASE ============= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-dark);
  margin: 0 0 0.6em 0;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em 0; }
a { color: var(--color-green-btn); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.15s; }
a:hover { border-bottom-color: var(--color-green-btn); }

strong { font-weight: 700; color: var(--color-dark); }

.muted { color: var(--color-muted); }
.small { font-size: 0.875rem; }
.hidden { display: none !important; }

.highlight {
  background: var(--color-green-highlight);
  padding: 0 0.25em;
  border-radius: 4px;
}

/* ============= LAYOUT ============= */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============= HEADER ============= */
.site-header {
  border-bottom: 1px solid var(--color-line);
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.92);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-dark);
  border-bottom: none;
}
.brand:hover { border-bottom: none; }
.brand span { font-size: 1rem; }
.back-link {
  font-size: 0.9rem;
  color: var(--color-muted);
}
@media (max-width: 540px) {
  .brand span { display: none; }
}

/* ============= INTRO ============= */
.intro {
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-soft) 100%);
}
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-green-btn);
  background: var(--color-green-highlight);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--color-text);
  max-width: 720px;
  margin-bottom: 32px;
}

.threshold-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 32px 0;
  max-width: 720px;
}
.threshold-card {
  background: var(--color-green-soft);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.threshold-card--alert {
  background: var(--color-alert-bg);
  border-color: #fecaca;
}
.threshold-card__pill {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-green-btn);
  margin-bottom: 8px;
}
.threshold-card--alert .threshold-card__pill {
  color: var(--color-alert);
}
.threshold-card p { margin: 0 0 4px 0; font-size: 1.05rem; }
.threshold-card__sub { color: var(--color-muted); font-size: 0.9rem; }

/* ============= BUTTONS ============= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  line-height: 1;
}
.btn:focus-visible { outline: 3px solid rgba(2, 119, 7, 0.3); outline-offset: 2px; }

.btn-primary {
  background: var(--color-green-btn);
  color: white;
}
.btn-primary:hover {
  background: var(--color-green-btn-hover);
  border-bottom: 1px solid transparent;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 119, 7, 0.25);
}
.btn-primary:disabled {
  background: #cbd2c4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  color: var(--color-dark);
  border-color: var(--color-line);
}
.btn-ghost:hover {
  background: var(--color-bg-soft);
  border-color: var(--color-dark);
  border-bottom: 1px solid var(--color-dark);
}

.btn-large {
  padding: 16px 28px;
  font-size: 1.05rem;
}

/* ============= CHECK SECTION ============= */
.check {
  padding: clamp(40px, 6vw, 72px) 0;
  background: var(--color-bg-soft);
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.progress {
  margin-bottom: 40px;
}
.progress__bar {
  height: 6px;
  background: var(--color-line);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress__bar span {
  display: block;
  height: 100%;
  width: 16.66%;
  background: var(--color-green-btn);
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress__label {
  font-size: 0.85rem;
  color: var(--color-muted);
  font-family: var(--font-display);
}

.question {
  display: none;
  animation: fadeIn 0.35s ease;
}
.question.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.question h2 { margin-bottom: 8px; }
.q-hint {
  color: var(--color-muted);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.input-row {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 380px;
  margin-bottom: 32px;
  transition: border-color 0.18s;
  background: white;
}
.input-row:focus-within {
  border-color: var(--color-green-btn);
  box-shadow: 0 0 0 3px rgba(2, 119, 7, 0.12);
}
.input-row input {
  flex: 1;
  padding: 16px 18px;
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-dark);
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
}
.input-suffix {
  display: flex;
  align-items: center;
  padding: 0 18px;
  background: var(--color-bg-soft);
  color: var(--color-muted);
  font-size: 0.92rem;
  font-family: var(--font-display);
  border-left: 1px solid var(--color-line);
}

.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
  max-width: 540px;
}
.choice {
  padding: 16px 18px;
  background: white;
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-dark);
  cursor: pointer;
  transition: all 0.18s;
}
.choice:hover {
  border-color: var(--color-green-btn);
  background: var(--color-green-soft);
}
.choice.selected {
  border-color: var(--color-green-btn);
  background: var(--color-green-highlight);
  color: var(--color-green-btn);
  font-weight: 600;
}

.email-block {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
  max-width: 480px;
}
.email-block input[type="text"],
.email-block input[type="email"] {
  padding: 14px 16px;
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: white;
  transition: border-color 0.18s;
}
.email-block input:focus {
  outline: none;
  border-color: var(--color-green-btn);
  box-shadow: 0 0 0 3px rgba(2, 119, 7, 0.12);
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--color-muted);
  cursor: pointer;
  padding: 6px 0;
}
.consent input { margin-top: 3px; flex-shrink: 0; }

.q-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* ============= RESULT SECTION ============= */
.result {
  padding: clamp(48px, 8vw, 96px) 0;
}
.result-headline {
  text-align: center;
  margin-bottom: 56px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.result-headline .lead {
  margin-left: auto;
  margin-right: auto;
}

/* Energie-Meter */
.energy-meter {
  max-width: 720px;
  margin: 0 auto 56px;
  padding: 28px;
  background: white;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.energy-meter__scale {
  position: relative;
  height: 32px;
  background: linear-gradient(90deg,
    #d4f1c5 0%, #d4f1c5 33%,
    #fde68a 33%, #fde68a 100%,
    #fecaca 100%);
  border-radius: 999px;
  overflow: visible;
  margin: 24px 0 16px;
}
.energy-meter__fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-green-btn), #047857 50%, var(--color-alert));
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.85;
}
.energy-meter__threshold {
  position: absolute;
  top: -8px; bottom: -8px;
  width: 2px;
  background: var(--color-dark);
  opacity: 0.4;
  transform: translateX(-1px);
}
.energy-meter__threshold span {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--color-dark);
}
.energy-meter__needle {
  position: absolute;
  top: -10px; bottom: -10px;
  width: 4px;
  background: var(--color-dark);
  border-radius: 2px;
  left: 0%;
  transform: translateX(-2px);
  transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.energy-meter__legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 36px;
  font-size: 0.95rem;
  color: var(--color-muted);
}
.energy-meter__legend strong {
  color: var(--color-dark);
  font-size: 1.05rem;
}

/* 3 Kacheln */
.three-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 56px;
}
.rcard {
  padding: 28px 26px;
  background: white;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.18s, box-shadow 0.18s;
}
.rcard:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}
.rcard__pill {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.rcard--status .rcard__pill { background: var(--color-alert-bg); color: var(--color-alert); }
.rcard--maut .rcard__pill { background: var(--color-amber-bg); color: var(--color-amber); }
.rcard--solution .rcard__pill { background: var(--color-green-highlight); color: var(--color-green-btn); }
.rcard h3 { margin-bottom: 10px; }
.rcard p { margin-bottom: 10px; }
.rcard__cite {
  font-size: 0.82rem;
  color: var(--color-muted);
  line-height: 1.5;
  margin-bottom: 0;
  padding-top: 14px;
  border-top: 1px solid var(--color-line);
}
.rcard__cite a { color: var(--color-muted); border-bottom: 1px solid var(--color-line); }
.rcard__cite a:hover { color: var(--color-green-btn); border-bottom-color: var(--color-green-btn); }

/* Branchen-Anker */
.branch-anchor {
  max-width: 820px;
  margin: 0 auto 56px;
  padding: 32px 36px;
  background: var(--color-dark);
  border-radius: var(--radius-lg);
  color: #e6ebe0;
}
.branch-anchor p { color: #e6ebe0; font-size: 1.05rem; line-height: 1.6; }
.branch-anchor strong { color: white; }
.branch-anchor .muted { color: #8a9a7a; }
.branch-anchor a { color: #b8e995; }
.branch-anchor a:hover { color: white; border-bottom-color: white; }

/* CTA */
.cta-block {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 36px;
  background: var(--color-green-highlight);
  border: 1px solid #c8e8b0;
  border-radius: var(--radius-lg);
  text-align: center;
}
.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 24px 0 16px;
}

/* ============= FOOTER ============= */
.site-footer {
  padding: 40px 0;
  background: var(--color-dark);
  color: #b8c2a8;
  margin-top: 0;
}
.site-footer p { color: #b8c2a8; margin-bottom: 8px; }
.site-footer strong { color: white; }
.site-footer a { color: #d4e8b8; }
.site-footer a:hover { color: white; border-bottom-color: white; }

/* ============= MOBILE TWEAKS ============= */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .intro { padding: 56px 0 40px; }
  .threshold-cards { grid-template-columns: 1fr; }
  .three-cards { grid-template-columns: 1fr; }
  .cta-row { flex-direction: column; }
  .cta-row .btn { width: 100%; }
  .energy-meter { padding: 22px 18px; }
  .branch-anchor { padding: 24px 22px; }
  .cta-block { padding: 32px 22px; }
  .q-nav { width: 100%; }
  .q-nav .btn { flex: 1; min-width: 140px; }
}

/* ============= SEND STATUS (Brevo-Versand) ============= */
.send-status {
  margin: 16px 0;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
}
.send-status:empty { display: none; }
.send-status.pending {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}
.send-status.ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}
.send-status.err {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}
.send-status a { color: inherit; text-decoration: underline; }
