/* Elektro Brandes — the palette is the cable: neutral blue, phase brown, and the green-yellow earth wire as the rule line. */
@font-face { font-family: "Overpass"; src: url("fonts/overpass-latin-vf.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --white: #FFFFFF;
  --grey: #EEF1F5;
  --ink: #14181F;
  --muted: #535B68;
  --blue: #1456C8;
  --blue-dark: #0E3F96;
  --brown: #6B3E1E;
  --earth-green: #2E9E4B;
  --earth-yellow: #F6D32D;
  --red: #B71C1C;
  --line: rgba(20, 24, 31, .16);
  --font: "Overpass", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1140px;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 1.0625rem/1.55 var(--font); }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-underline-offset: .2em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 30; }
.skip:focus { left: .5rem; }

h1, h2 { font-weight: 800; line-height: 1.06; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4.1rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.section-lede { max-width: 40em; margin-top: .9rem; color: var(--muted); }
.fineprint { font-size: .875rem; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .5rem 1.4rem; border: 2px solid transparent; border-radius: 8px; font: 700 1rem/1.2 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); }
.btn-line { border-color: var(--ink); background: none; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }

/* ---------- emergency bar ---------- */
.alarm { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .2rem 1.2rem; padding: .55rem var(--pad); background: var(--red); color: #fff; font-weight: 600; text-align: center; }
.alarm a { font-weight: 800; font-size: 1.125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.alarm-tarif { font-weight: 400; }
.alarm :focus-visible { outline-color: #fff; }
.earth { height: 8px; background: repeating-linear-gradient(135deg, var(--earth-green) 0 16px, var(--earth-yellow) 16px 32px); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1.8rem; padding: .7rem var(--pad); background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .65rem; margin-right: auto; font-weight: 800; font-size: 1.25rem; letter-spacing: -.01em; text-decoration: none; }
.top nav { display: flex; gap: 1.6rem; }
.top nav a { font-weight: 600; text-decoration: none; }
.top nav a:hover { color: var(--blue); }
.top .btn { min-height: 2.6rem; padding-inline: 1.1rem; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(20rem, .6fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; max-width: calc(var(--wrap) + 4rem); margin-inline: auto; padding: clamp(2.2rem, 6vw, 4.5rem) var(--pad) clamp(2.5rem, 6vw, 4.5rem); }
.lede { max-width: 32em; margin-top: 1.3rem; font-size: 1.1875rem; color: var(--muted); }
.check { display: grid; gap: .7rem; padding: 1.5rem; background: var(--white); border: 2px solid var(--ink); border-top: 10px solid var(--blue); border-radius: 10px; box-shadow: 10px 10px 0 var(--grey); }
.check h2 { font-size: 1.75rem; }
.check-note { font-size: .9375rem; color: var(--muted); }
.check label { font-weight: 700; font-size: .9375rem; }
.check-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; }
input, select { width: 100%; min-height: 3rem; padding: .5rem .8rem; border: 2px solid #7A8494; border-radius: 8px; background: #fff; color: var(--ink); font: 400 1.0625rem/1.3 var(--font); }
#plz-input { font-weight: 700; font-size: 1.25rem; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
input:hover, select:hover { border-color: var(--ink); }
[aria-invalid="true"] { border-color: var(--red); background: #FDF1F1; }
.check-result:empty { display: none; }
.check-result { display: grid; gap: .5rem; justify-items: start; padding: .9rem 1rem; border-radius: 8px; border-left: 6px solid var(--muted); background: var(--grey); }
.check-result.is-yes { border-left-color: var(--earth-green); background: #EAF6ED; }
.check-result.is-no { border-left-color: var(--brown); background: #F6EFEA; }
.check-result.is-error { border-left-color: var(--red); background: #FDF1F1; color: var(--red); font-weight: 600; }
.check-result strong { font-size: 1.0625rem; }
.check-result .btn { min-height: 2.6rem; margin-top: .2rem; }

/* A labelled distribution board with one breaker tripped: the picture of the problem this page solves. Decoration only. */
.breakers { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(.25rem, .8vw, .6rem); margin-top: clamp(.5rem, 2vw, 1.5rem); padding: clamp(.6rem, 1.6vw, 1.1rem) clamp(.6rem, 1.6vw, 1.1rem) clamp(1.7rem, 3vw, 2.1rem); background: var(--grey); border: 2px solid var(--ink); border-radius: 12px; }
.breakers span { position: relative; height: clamp(3.4rem, 8vw, 5.6rem); background: var(--white); border: 2px solid var(--ink); border-radius: 5px; }
.breakers span::before { content: ""; position: absolute; left: 22%; right: 22%; top: 14%; height: 38%; border-radius: 3px; background: var(--blue); }
.breakers span::after { content: attr(data-label); position: absolute; left: -20%; right: -20%; top: calc(100% + .35rem); font-size: .8125rem; font-weight: 600; line-height: 1; text-align: center; color: var(--muted); }
.breakers .tripped::before { top: 46%; background: var(--red); }
.breakers .tripped::after { color: var(--red); font-weight: 800; }

/* ---------- sections ---------- */
.help, .area, .prices, .callback { padding-block: clamp(3.2rem, 7vw, 5.5rem); }
.help { background: var(--ink); color: #fff; }
.help .section-lede { color: #B9C1CE; }
.help-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(1.25rem, 4vw, 3rem); margin-top: 2.2rem; align-items: start; }
.symptoms { display: grid; gap: .5rem; }
.symptoms button { padding: .9rem 1rem; border: 2px solid rgba(255, 255, 255, .28); border-radius: 8px; background: none; color: #fff; font: 600 1.0625rem/1.3 var(--font); text-align: left; cursor: pointer; }
.symptoms button:hover { border-color: #fff; }
.symptoms button[aria-selected="true"] { background: var(--earth-yellow); border-color: var(--earth-yellow); color: var(--ink); }
.help :focus-visible { outline-color: var(--earth-yellow); }
.advice { display: grid; gap: 1rem; padding: clamp(1.2rem, 3vw, 1.8rem); background: var(--white); color: var(--ink); border-radius: 10px; }
.urgency { justify-self: start; padding: .25rem .8rem; border-radius: 999px; font-weight: 800; font-size: .9375rem; }
.urgency.is-fire, .urgency.is-now { background: var(--red); color: #fff; }
.urgency.is-soon { background: var(--earth-yellow); color: var(--ink); }
.urgency.is-later { background: var(--grey); color: var(--ink); }
.advice ol { display: grid; gap: .55rem; padding-left: 1.4rem; }
.advice ol li::marker { font-weight: 800; color: var(--blue); }
.stop { padding: .8rem 1rem; border-left: 6px solid var(--red); background: #FDF1F1; font-weight: 600; }
.advice dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.advice dt { font-size: .875rem; color: var(--muted); }
.advice dd { font-weight: 700; }

.area-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.zones { margin-top: 1.6rem; border-top: 2px solid var(--ink); }
.zones li { display: grid; gap: .15rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.zones span { color: var(--muted); }
.tarif { width: 100%; margin: 1rem 0; border-collapse: collapse; }
.tarif th, .tarif td { padding: .75rem .8rem; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.tarif thead th { font-weight: 700; font-size: .875rem; color: var(--muted); border-bottom: 2px solid var(--ink); }
.tarif td { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tarif thead th:last-child { text-align: right; }
.tarif tr.is-now th, .tarif tr.is-now td { background: #FFF7CC; font-weight: 700; }
.tarif tr.is-now th::after { content: " (gilt jetzt)"; color: var(--blue-dark); font-weight: 800; }

.prices { background: var(--grey); }
.price-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(2rem, 5vw, 4rem); margin-top: 2rem; border-top: 2px solid var(--ink); }
.price-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.price-list p { margin-top: .25rem; font-size: .9688rem; color: var(--muted); }
.price-list strong { flex: none; font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--blue-dark); }

.callback-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.callback-grid > div > p { margin-top: 1rem; max-width: 28em; }
#cb-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.2rem; padding: clamp(1.2rem, 3vw, 1.8rem); border: 2px solid var(--ink); border-radius: 10px; box-shadow: 10px 10px 0 var(--grey); }
.field { display: grid; gap: .3rem; align-content: start; }
.field label { font-weight: 700; font-size: .9375rem; }
.field-wide { grid-column: 1 / -1; }
.err { font-size: .875rem; font-weight: 600; color: var(--red); }
.err:empty { display: none; }
.done { display: grid; gap: .8rem; justify-items: start; padding: clamp(1.2rem, 3vw, 1.8rem); border: 2px solid var(--ink); border-left: 10px solid var(--earth-green); border-radius: 10px; }
.done:focus { outline: none; }
.done h3 { font-size: 1.5rem; font-weight: 800; }

/* ---------- footer & dialog ---------- */
.foot { padding-block: 2rem; background: var(--ink); color: #C9D0DB; font-size: .9688rem; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 2rem; }
.foot-row a { margin-left: 1.2rem; }
.foot strong { color: #fff; }
.linklike { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.linklike:hover, .foot a:hover { color: #fff; }
.foot :focus-visible { outline-color: var(--earth-yellow); }
.demo-note { margin-top: 1.4rem; font-size: .8438rem; color: #9EA7B5; }
dialog { width: min(32rem, calc(100vw - 2rem)); padding: 1.8rem; border: 2px solid var(--ink); border-radius: 10px; background: var(--white); color: var(--ink); }
dialog::backdrop { background: rgba(20, 24, 31, .65); }
dialog h2 { font-size: 1.7rem; }
dialog p { margin-top: 1rem; }
dialog .btn { margin-top: 1.5rem; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero, .help-grid, .area-grid, .callback-grid { grid-template-columns: minmax(0, 1fr); }
  .price-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .top nav { display: none; }
}
@media (max-width: 520px) {
  .breakers span::after { content: none; }
  .breakers { padding-bottom: clamp(.6rem, 1.6vw, 1.1rem); }
  .brand span { font-size: 1.0625rem; }
  .top { gap: .75rem; }
  .top .btn { padding-inline: .8rem; font-size: .9375rem; }
  .advice dl, #cb-form { grid-template-columns: minmax(0, 1fr); }
  .foot-row a { display: block; margin: .4rem 0 0; }
  .tarif td { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
