/* A-TRON BHKW-Rechner - Styles (aus dem A-TRON Design-System extrahiert) */

/* ---------- Custom Properties ---------- */
:root {
  /* Farben */
  --navy-950: #07111d;
  --navy-900: #0b1d2e;
  --navy-800: #11293f;
  --navy-700: #1a3a57;

  --blue-600: #1572ae;
  --blue-500: #29abe2;
  --blue-400: #62c3ec;
  --blue-100: #e4f4fc;

  --amber-600: #c01b13;
  --amber-500: #e2231a;
  --amber-400: #ec5b50;
  --amber-100: #fdeae9;

  --green-600: #15803d;
  --green-500: #22a35a;
  --green-100: #e4f6ec;

  --surface: #f5f8fb;
  --card: #ffffff;
  --line: #e2e9f1;

  --text-900: #13283a;
  --text-700: #2e4a63;
  --text-600: #51687e;
  --text-400: #8aa0b4;
  --text-inverse: #eef4fa;
  --text-inverse-dim: #a8bccf;

  --grad-energy: linear-gradient(90deg, var(--blue-500), var(--amber-500));
  --grad-hero: linear-gradient(152deg, #0b1d2e 0%, #11293f 55%, #14344e 100%);

  /* Typografie */
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --fs-h2: clamp(1.75rem, 1.4rem + 1.6vw, 2.625rem);
  --fs-h1: clamp(2.25rem, 1.7rem + 2.8vw, 3.75rem);

  /* Layout */
  --container: 1200px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(11, 29, 46, 0.08);
  --shadow: 0 8px 28px rgba(11, 29, 46, 0.1);
  --shadow-lg: 0 18px 50px rgba(11, 29, 46, 0.16);

  --header-h: 76px;
  --topbar-h: 38px;
}


/* ---------- Hilfsklassen ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 0.9rem;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--grad-energy);
}

.section--dark .eyebrow { color: var(--blue-400); }

.lead {
  font-size: var(--fs-lg);
  color: var(--text-600);
  max-width: 62ch;
}

.section--dark .lead { color: var(--text-inverse-dim); }

.section-head {
  max-width: 760px;
  margin-bottom: clamp(2rem, 5vw, 3.2rem);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center .lead { margin-inline: auto; }

.text-grad {
  background: var(--grad-energy);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}


/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.85em 1.7em;
  border-radius: 999px;
  font-weight: 700;
  font-size: var(--fs-sm);
  line-height: 1.2;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  text-decoration: none;
}

.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn--primary {
  background: var(--amber-500);
  color: #fff;
  box-shadow: 0 6px 18px rgba(226, 35, 26, 0.35);
}

.btn--primary:hover { background: var(--amber-600); color: #fff; }

.btn--secondary {
  background: var(--blue-600);
  color: #fff;
  box-shadow: 0 6px 18px rgba(41, 171, 226, 0.3);
}

.btn--secondary:hover { background: #115d8f; color: #fff; }

.btn--ghost {
  border-color: var(--line);
  color: var(--text-900);
  background: var(--card);
}

.btn--ghost:hover { border-color: var(--blue-500); color: var(--blue-600); }

.btn--ghost-light {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  background: transparent;
}

.btn--ghost-light:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.08); }

.btn--lg { padding: 1em 2.2em; font-size: var(--fs-base); }


/* ---------- Formulare ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 0.35rem; }

.field--full { grid-column: 1 / -1; }

.field label {
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--text-900);
}

.field .hint { font-size: var(--fs-xs); color: var(--text-400); }

.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: var(--fs-base);
  color: var(--text-900);
  padding: 0.75em 1em;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(41, 171, 226, 0.14);
}

.field input[aria-invalid="true"] { border-color: #d33; }

.checkbox-row {
  display: flex;
  gap: 0.7em;
  align-items: flex-start;
  font-size: var(--fs-sm);
}

.checkbox-row input { width: 19px; height: 19px; margin-top: 3px; flex-shrink: 0; }


/* ---------- Rechner ---------- */
.calc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.calc__progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.calc__progress li {
  list-style: none;
  text-align: center;
  padding: 1rem 0.5rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-400);
  position: relative;
}

.calc__progress li .num {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--line);
  color: var(--text-600);
  margin-right: 0.5em;
}

.calc__progress li.is-active { color: var(--text-900); }
.calc__progress li.is-active .num { background: var(--blue-600); color: #fff; }
.calc__progress li.is-done .num {
  background: var(--green-500);
  color: #fff;
}

@media (max-width: 720px) {
  .calc__progress li span.label { display: none; }
}

.calc__body { padding: clamp(1.6rem, 4vw, 2.8rem); }

.calc__step[hidden] { display: none; }

.calc__nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

/* Objekttyp-Auswahl */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 860px) { .choice-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .choice-grid { grid-template-columns: 1fr; } }

.choice {
  position: relative;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s ease;
  background: var(--card);
}

.choice:hover { border-color: var(--blue-400); transform: translateY(-2px); }

.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.choice svg {
  width: 42px;
  height: 42px;
  margin: 0 auto 0.7rem;
  color: var(--text-600);
  transition: color 0.18s ease;
}

.choice b { display: block; color: var(--text-900); font-size: var(--fs-sm); }

.choice small { color: var(--text-400); font-size: var(--fs-xs); }

.choice:has(input:checked) {
  border-color: var(--blue-600);
  background: var(--blue-100);
  box-shadow: 0 0 0 4px rgba(41, 171, 226, 0.12);
}

.choice:has(input:checked) svg { color: var(--blue-600); }

.choice:has(input:focus-visible) { outline: 3px solid var(--blue-500); outline-offset: 2px; }

/* Slider + Zahlfeld */
.range-field { margin-bottom: 1.7rem; }

.range-field__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.range-field__top label { font-weight: 700; color: var(--text-900); }

.range-field__value {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--blue-600);
  letter-spacing: -0.01em;
}

.range-field__value input {
  width: 9ch;
  font: inherit;
  color: inherit;
  border: none;
  border-bottom: 2px solid var(--line);
  text-align: right;
  background: transparent;
  padding: 0 0.1em;
}

.range-field__value input:focus { outline: none; border-color: var(--blue-500); }

.range-field__value .unit { font-size: 0.75rem; color: var(--text-600); font-weight: 600; }

input[type="range"] {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--blue-500) var(--fill, 50%), var(--line) var(--fill, 50%));
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--blue-600);
  box-shadow: var(--shadow-sm);
  cursor: grab;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--blue-600);
  box-shadow: var(--shadow-sm);
  cursor: grab;
}

.range-field__scale {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--text-400);
  margin-top: 0.3rem;
}

.preset-note {
  background: var(--blue-100);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1.1rem;
  font-size: var(--fs-sm);
  display: flex;
  gap: 0.6em;
  align-items: flex-start;
  margin-bottom: 1.6rem;
}

/* Ergebnis */
.result-hero {
  background: var(--grad-hero);
  border-radius: var(--radius);
  color: var(--text-inverse-dim);
  padding: clamp(1.6rem, 4vw, 2.4rem);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.6rem;
  align-items: center;
  margin-bottom: 1.6rem;
}

@media (max-width: 640px) { .result-hero { grid-template-columns: 1fr; } }

.result-hero__icon {
  width: 88px;
  height: 88px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
}

.result-hero__icon svg { width: 52px; height: 52px; color: #fff; }

.result-hero__img {
  width: 120px;
  border-radius: var(--radius);
  background: #fff;
  padding: 8px;
  overflow: hidden;
}

.result-hero__img img { width: 100%; height: auto; display: block; border-radius: 8px; }

.result-hero h3 {
  color: #fff;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 0.2em;
}

.result-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.6rem;
}

@media (max-width: 860px) { .result-kpis { grid-template-columns: repeat(2, 1fr); } }

.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}

.kpi b {
  display: block;
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-900);
}

.kpi b.pos { color: var(--green-600); }

.kpi span { font-size: var(--fs-xs); color: var(--text-600); }

/* Balken-Vergleich */
.compare-bars { display: grid; gap: 1.1rem; margin: 1.4rem 0; }

.cbar__label {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-900);
  margin-bottom: 0.35rem;
}

.cbar__track {
  height: 30px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.cbar__fill {
  height: 100%;
  border-radius: 7px 0 0 7px;
  width: 0;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.cbar__fill--old { background: linear-gradient(90deg, #94a3b8, #64748b); }
.cbar__fill--new { background: var(--grad-energy); }

.disclaimer {
  font-size: var(--fs-xs);
  color: var(--text-400);
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-top: 1.6rem;
}


/* --- Ergänzungen für den Standalone-Betrieb des Rechners --- */
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.grid { display: grid; gap: clamp(1.2rem, 2.5vw, 1.8rem); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--3 { grid-template-columns: 1fr; } }