/* RheinhessenSolar – Probewebsite
   Gestaltung nach dem Banner „Sonne aus Rheinhessen“: Himmelblau, Navy, Logo-Rot, Sonnengelb
   und die grünen Weinberg-Hügel. Schrift: Inter (selbst gehostet). */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --sky: #e9f2f8;
  --sky-2: #f5f9fc;
  --navy: #14314f;
  --navy-2: #1f4a73;
  --red: #c8322b;
  --sun: #f4b942;
  --cream: #f6e59e;
  --green-1: #a9c98b;
  --green-1-dark: #93b874;
  --green-2: #6f9c55;
  --green-3: #2e5b3c;
  --green-4: #244a30;
  --text: #14314f;
  --muted: #4a5d70;
  --line: #d6e3ee;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(20, 49, 79, .08);
  --container: 1140px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-2); }
h1, h2, h3 { line-height: 1.15; color: var(--navy); margin: 0 0 .6em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; text-align: center; }
h2.left { text-align: left; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 820px; }
.center { text-align: center; }

.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 12px; top: 12px; z-index: 1000; background: #fff; padding: 8px 14px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

.eyebrow { color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .82rem; margin-bottom: .9em; }

.test-banner { background: #f59e0b; color: #111; text-align: center; font-weight: 700; font-size: .85rem; padding: 6px 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--navy); color: #fff; border: 2px solid var(--navy);
  padding: 14px 26px; border-radius: 999px; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer; transition: background .2s, transform .2s, box-shadow .2s;
}
.btn:hover { background: var(--navy-2); border-color: var(--navy-2); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-sun { background: var(--sun); border-color: var(--sun); color: var(--navy); }
.btn-sun:hover { background: #f7c766; border-color: #f7c766; }
.btn-small { padding: 9px 18px; font-size: .95rem; white-space: nowrap; }
.btn-block { width: 100%; }

/* ---------- Kopfzeile ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(233, 242, 248, .94); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(20, 49, 79, .08); }
/* Kopfzeile etwas breiter als der Inhalt, damit großes Logo, Navigation und Telefon nebeneinander passen */
.header-inner { display: flex; align-items: center; gap: 22px; min-height: 104px; max-width: 1320px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; flex-shrink: 0; }
.brand img { width: 136px; height: auto; }
.brand-name { color: var(--red); font-weight: 800; font-size: 1.6rem; letter-spacing: -.02em; white-space: nowrap; }
.brand-name span { opacity: .85; }
.main-nav { display: flex; gap: 16px; }
.main-nav a { color: var(--navy); text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.main-nav a:hover { color: var(--red); }
.header-cta { display: flex; align-items: center; gap: 14px; }
.phone { font-weight: 800; color: var(--navy); text-decoration: none; white-space: nowrap; }
.phone:hover { color: var(--red); }

/* ---------- Hero im Banner-Stil ---------- */
.hero { position: relative; background: var(--sky); overflow: hidden; padding-top: 64px; }
.hero-inner { position: relative; z-index: 5; }
.hero h1 { max-width: 11ch; margin-bottom: .25em; }
.h1-sub { display: block; font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 600; letter-spacing: 0; color: var(--muted); margin-top: .7em; max-width: 34ch; line-height: 1.4; }
.hero-claim { font-size: clamp(1.15rem, 2.2vw, 1.5rem); font-weight: 700; color: var(--navy); margin: 1.2em 0 .9em; }
.check-list { list-style: none; padding: 0; margin: 0 0 1.8em; display: grid; gap: 8px; }
.check-list li { padding-left: 30px; position: relative; font-size: 1.08rem; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3.5 10.5l4 4 9-9' fill='none' stroke='%2314314f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-sun { position: absolute; z-index: 1; width: clamp(240px, 30vw, 390px); right: max(2vw, calc((100vw - var(--container)) / 2 - 20px)); top: 70px; animation: sun-turn 120s linear infinite; }
@keyframes sun-turn { to { transform: rotate(360deg); } }
.hero-land { position: relative; z-index: 3; margin-top: -40px; height: clamp(170px, 24vw, 300px); }
.hills { position: absolute; inset: auto 0 0 0; width: 100%; height: 100%; display: block; }
.hill-1 { fill: var(--green-1); }
.hill-2 { fill: var(--green-2); }
.hill-3 { fill: var(--green-3); }
.vines path { fill: none; stroke: var(--green-1-dark); stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.hero-house { position: absolute; z-index: 4; width: clamp(150px, 20vw, 270px); left: max(4vw, calc((100vw - var(--container)) / 2 + 40px)); bottom: 6%; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .12)); }

/* ---------- Kennzahlen (schließen an die dunklen Hügel an) ---------- */
.facts { background: var(--green-3); color: #fff; padding: 20px 0 44px; }
.facts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.fact .num, .fact .suffix { font-size: 2.4rem; font-weight: 800; color: var(--sun); line-height: 1.1; letter-spacing: -.02em; }
.fact p { margin: 6px 0 0; color: #e3eedb; font-size: .95rem; }

/* ---------- Sektionen ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--sky); }
.lead { color: var(--muted); font-size: 1.12rem; max-width: 62ch; margin: 0 auto 44px; text-align: center; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cards-services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.section-alt .card { border-color: transparent; }
#leistungen .card { border-top: 4px solid var(--sun); }
.card p { color: var(--muted); margin: 0; }
.card p + p { margin-top: .8em; }
.card-highlight { background: var(--sky); border: 0; box-shadow: none; border-left: 5px solid var(--green-2); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.photo { margin: 28px 0 0; }
.photo img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* Schematische Grafik „Smarter Speicher“ */
.chart-card { margin: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 22px 16px; }
.chart-card figcaption { font-weight: 700; margin-bottom: 10px; }
.chart-card figcaption span { font-weight: 400; color: var(--muted); }
.chart-card svg { width: 100%; height: auto; display: block; }
.ch-grid line { stroke: #c9d6e2; stroke-width: 1.5; }
.ch-charge { fill: var(--green-1); opacity: .45; }
.ch-solar { fill: var(--sun); opacity: .75; }
.ch-price { fill: none; stroke: var(--navy); stroke-width: 3.5; stroke-linecap: round; }
.ch-label text { font: 700 11px "Inter", sans-serif; fill: var(--green-3); text-anchor: middle; }
.ch-axis text { font: 600 12px "Inter", sans-serif; fill: var(--muted); }
.chart-legend { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; color: var(--muted); }
.lg { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; }
.lg-price { background: var(--navy); height: 4px; vertical-align: 3px; }
.lg-solar { background: var(--sun); }
.lg-charge { background: var(--green-1); }
.chart-note { margin: 12px 0 0; font-weight: 600; font-size: .92rem; color: var(--navy); }
.sub-lead { font-size: 1.15rem; font-weight: 600; color: var(--navy-2); }

/* Solarplaner (Densys) */
.eyebrow.center { text-align: center; }
.planner { max-width: 960px; margin: 0 auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.planner-consent { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 48px 24px; background: var(--sky); }
.planner-consent img { width: 96px; }
.planner-consent p { max-width: 56ch; margin: 0; color: var(--muted); font-size: .95rem; }
.planner-consent .planner-hint { color: var(--navy); font-weight: 600; }

/* Ablauf */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; position: relative; }
.steps li { position: relative; text-align: center; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 26px; left: calc(50% + 34px); right: calc(-50% + 34px); border-top: 2px dashed var(--green-1-dark); }
.step-no { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--sun); color: var(--navy); font-weight: 800; font-size: 1.15rem; margin-bottom: 12px; }
.steps p { color: var(--muted); font-size: .95rem; }

/* Kundenstimmen */
.reviews { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.review { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.stars { color: var(--sun); font-size: 1.35rem; letter-spacing: .08em; line-height: 1; }
.review blockquote { margin: 0; flex: 1; }
.review figcaption { color: var(--muted); font-size: .95rem; }
.review figcaption strong { color: var(--navy); }
.reviews-note { margin: 20px 0 0; }
.reviews-link { margin: 28px 0 0; }

/* Partner */
.partners { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }
.partners li { background: #fff; border-radius: 12px; padding: 12px 18px; display: grid; place-items: center; height: 88px; width: 180px; box-shadow: var(--shadow); }
.partners img { max-height: 60px; width: auto; object-fit: contain; }
.fineprint { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 18px; }

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; }
.faq summary { cursor: pointer; padding: 18px 52px 18px 20px; font-weight: 700; color: var(--navy); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 400; color: var(--red); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 20px 18px; margin: 0; color: var(--muted); }
.faq .placeholder-block { background: #fff7db; border: 2px dashed #f59e0b; }
.tag-inline { display: inline-block; margin-left: 8px; background: #f59e0b; color: #111; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; vertical-align: 2px; }

.photo-top { margin: 0 0 24px; }

/* Aktionsradius */
.region-towns { margin: 12px 0 0; font-weight: 600; color: var(--navy); }
.region-logo { width: min(300px, 70%); height: auto; margin: 0 auto 28px; }

/* ---------- Kontakt: dunkelgrüner Abschluss wie auf dem Banner ---------- */
.section-contact { position: relative; background: var(--green-3); color: #fff; padding: 0 0 88px; }
.contact-land { position: relative; height: clamp(80px, 10vw, 140px); background: var(--sky); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: start; padding-top: 24px; }
.contact-intro h2, .contact-intro .eyebrow { color: #fff; }
.contact-intro .eyebrow { color: var(--sun); }
.contact-intro p { color: #e3eedb; }
.contact-big { margin: 28px 0; display: grid; gap: 4px; }
.contact-big a { color: #fff; text-decoration: none; font-weight: 800; font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -.01em; overflow-wrap: anywhere; }
.contact-big a:hover { color: var(--sun); }
.contact-list { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 18px; margin: 0; color: #e3eedb; }
.contact-list dt { font-weight: 700; color: #fff; }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }
.contact-form { background: #fff; color: var(--text); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0, 0, 0, .18); padding: 30px; display: grid; gap: 16px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; padding: 12px 14px; border: 1px solid #c3d3e0; border-radius: 10px; background: var(--sky-2); color: var(--text);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--navy-2); background: #fff; box-shadow: 0 0 0 3px rgba(31, 74, 115, .15); }
.has-error input, .has-error textarea { border-color: var(--red); }
.field-error { color: var(--red); font-size: .9rem; margin: 6px 0 0; }
.form-note { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--sky); font-size: .92rem; }
.form-error { background: #fdf0ef; color: var(--red); border: 1px solid #f3c4c1; padding: 12px 14px; border-radius: 10px; margin: 0; }
.interests, .details { border: 0; padding: 0; margin: 0; min-width: 0; }
.interests legend, .details legend { font-weight: 600; font-size: .95rem; margin-bottom: 8px; }
.details summary { font-weight: 600; font-size: .95rem; cursor: pointer; }
.details[open] summary { margin-bottom: 12px; }
.details .optional { font-weight: 400; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #c3d3e0; border-radius: 999px; padding: 6px 12px; margin: 0 6px 8px 0; font-size: .92rem; cursor: pointer; }
.chip:has(input:checked) { background: #fdf3d9; border-color: var(--sun); }
.consent label { font-weight: 400; font-size: .92rem; display: flex; gap: 10px; align-items: flex-start; }
.consent input { width: auto; margin-top: 4px; }
.contact-form .fineprint { text-align: left; margin: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-grid > *, .split > *, .row-2 > *, .contact-form > * { min-width: 0; }

/* ---------- Textseiten ---------- */
.text-page h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 1em; }
.text-page h2 { text-align: left; font-size: 1.25rem; margin-top: 1.8em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-4); color: #e3eedb; padding: 44px 0; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: flex-end; }
.footer-brand img { width: 90px; background: var(--sky); border-radius: 14px; padding: 8px; }
.footer-brand p { margin: 10px 0 0; max-width: 24ch; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.mobile-bar { display: none; }

/* ---------- Einblenden beim Scrollen – nur wenn JavaScript läuft ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-sun { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1275px) {
  .main-nav { display: none; }
}
@media (max-width: 820px) {
  .brand img { width: 96px; }
  .brand-name { font-size: 1.35rem; }
  .header-cta { gap: 10px; }
  .header-cta .btn { display: none; }
}
@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  .steps li::after { display: none; }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .facts-grid { grid-template-columns: 1fr; }
  .cards-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reviews { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero-sun { opacity: .9; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
    .header-inner { min-height: 62px; gap: 12px; }
  .brand img { width: 72px; }
  .brand-name { font-size: 1.15rem; }
  .header-cta { display: none; }
  .hero { padding-top: 36px; }
  .hero-sun { width: 190px; right: -50px; top: 10px; opacity: .55; }
  .hero-land { margin-top: 0; }
  .hero-house { width: 140px; left: 16px; }
  .row-2 { grid-template-columns: 1fr; }
  .cards-services { grid-template-columns: 1fr; }
  .cta-row .btn { width: 100%; }
  .contact-form { padding: 20px; }
  body { padding-bottom: 64px; }
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr; position: fixed; inset: auto 0 0 0; z-index: 200;
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0, 0, 0, .06);
  }
  .mobile-bar a { text-align: center; padding: 16px 8px; font-weight: 800; text-decoration: none; color: var(--navy); }
  .mobile-bar a.primary { background: var(--navy); color: #fff; }
}
