/* Alex Solaranlagen | Design-System */

@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-latin.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Work Sans';
  src: url('../fonts/worksans-latin.woff2') format('woff2-variations');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #16375a;
  --navy-dark: #0f2740;
  --gold: #e3ad30;
  --gold-dark: #c4901d;
  --sand: #faf6ef;
  --sand-deep: #f0e9dd;
  --ink: #1d232c;
  --muted: #5d6976;
  --line: #e2dbcd;
  --white: #ffffff;

  --font-head: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Work Sans', 'Helvetica Neue', Arial, sans-serif;

  --wrap: 1140px;
  --radius: 4px;
  --shadow: 0 2px 14px rgba(22, 55, 90, .08);
  --shadow-lift: 0 10px 30px rgba(22, 55, 90, .14);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy); text-decoration-color: rgba(227, 173, 48, .6); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--gold); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-variation-settings: 'SOFT' 0, 'WONK' 0, 'opsz' 60;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.22rem; font-weight: 600; }

p { margin: 0 0 1.1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

.section { padding: 84px 0; }
.section--sand { background: var(--sand); }
.section--navy { background: var(--navy); color: #dfe7ef; }
.section--navy h2, .section--navy h3 { color: var(--white); }

.eyebrow {
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold-dark);
  margin: 0 0 .7em;
}
.section--navy .eyebrow { color: var(--gold); }

.lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.section--navy .lead { color: #c3d1de; }

.head-block { max-width: 60ch; margin-bottom: 46px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 16px 28px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.btn--primary { background: var(--gold); color: var(--navy-dark); box-shadow: 0 2px 0 var(--gold-dark); }
.btn--primary:hover { background: #eeba43; transform: translateY(-2px); box-shadow: 0 4px 0 var(--gold-dark); }

.btn--ghost { border-color: rgba(255,255,255,.55); color: #fff; background: transparent; }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.12); transform: translateY(-2px); }

.btn--outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--outline:hover { background: var(--navy); color: #fff; transform: translateY(-2px); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
}

.brand { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand img { height: 42px; width: auto; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
  cursor: pointer;
  color: var(--navy);
}
.nav-toggle svg { display: block; }

.main-nav { display: flex; align-items: center; gap: 30px; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-size: .97rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 6px 0;
  position: relative;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.main-nav a[aria-current="page"] { color: var(--navy); font-weight: 600; }

.main-nav a.nav-cta { padding: 13px 30px; font-size: .95rem; white-space: nowrap; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  color: #fff;
  background: var(--navy-dark);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(9, 26, 45, .92) 0%, rgba(9, 26, 45, .78) 42%, rgba(9, 26, 45, .3) 100%);
}
.hero__inner { position: relative; padding: 108px 0 104px; max-width: 40rem; }
.hero h1 { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.28); }
.hero__sub { font-size: 1.16rem; color: #dbe5ef; max-width: 36rem; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero__note { margin: 26px 0 0; font-size: .92rem; color: #b6c6d6; }

.page-hero { background: var(--navy); color: #fff; padding: 74px 0 66px; }
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero p { color: #c3d1de; font-size: 1.1rem; max-width: 58ch; margin: 0; }

.crumbs { font-size: .86rem; color: #9db1c5; margin: 0 0 18px; }
.crumbs a { color: #9db1c5; text-decoration: none; }
.crumbs a:hover { color: var(--gold); }

/* ---------- Facts strip ---------- */

.facts {
  background: var(--sand-deep);
  border-bottom: 1px solid var(--line);
}
.facts ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  margin: 0;
  padding: 26px 0;
  gap: 20px;
  text-align: center;
}
.facts li { font-size: .97rem; color: var(--muted); }
.facts strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--navy);
  line-height: 1.2;
}

/* ---------- Cards ---------- */

.grid { display: grid; gap: 26px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: #cfc4ae; }
.card p:last-child { margin-bottom: 0; }
.card__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: var(--sand);
  border-radius: 50%;
  margin-bottom: 18px;
  color: var(--gold-dark);
}
.card__link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  color: var(--navy);
}
.card__link::after { content: ' \203A'; }
.card__link:hover { color: var(--gold-dark); }

/* ---------- Split (Text + Bild) ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split--flip .split__media { order: -1; }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }

.checklist { list-style: none; margin: 0 0 28px; padding: 0; }
.checklist li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 14px;
  color: var(--muted);
}
.checklist li strong { color: var(--ink); display: block; font-weight: 600; }
.checklist li::before {
  content: '';
  position: absolute;
  left: 0; top: 7px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f2740' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}
.section--navy .checklist li { color: #c3d1de; }
.section--navy .checklist li strong { color: #fff; }

/* ---------- Ablauf ---------- */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; }
.steps--3 { grid-template-columns: repeat(3, 1fr); }
.step { counter-increment: step; }
.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-dark);
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.step h3 { margin-bottom: .35em; }
.step p { color: var(--muted); font-size: .97rem; margin: 0; }
.section--navy .step p { color: #b8c8d8; }

/* ---------- Platzhalter-Flächen ---------- */

.ph {
  position: relative;
  display: grid;
  place-items: center;
  background: var(--navy);
  background-image: linear-gradient(140deg, #1b4067 0%, #0f2740 100%);
  border-radius: var(--radius);
  overflow: hidden;
}
.ph::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 34px 34px;
}
.ph svg { position: relative; z-index: 1; width: 54px; height: 54px; color: var(--gold); opacity: .9; }
.ph--43 { aspect-ratio: 4 / 3; }
.ph--169 { aspect-ratio: 16 / 9; }
.ph--11 { aspect-ratio: 1 / 1; }

/* ---------- Referenzen ---------- */

.ref { text-decoration: none; color: inherit; display: block; }
.ref__media { margin-bottom: 16px; transition: transform .25s ease; }
.ref:hover .ref__media { transform: translateY(-4px); }
.ref h3 { margin-bottom: .25em; }
.ref__meta { font-size: .92rem; color: var(--muted); margin: 0; }

/* ---------- Zitat ---------- */

.quote {
  border-left: 3px solid var(--gold);
  padding-left: 26px;
  font-family: var(--font-head);
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--navy);
  margin: 0;
}
.quote footer { font-family: var(--font-body); font-size: .95rem; color: var(--muted); margin-top: 14px; }
.section--navy .quote { color: #fff; }
.section--navy .quote footer { color: #b8c8d8; }

/* ---------- CTA-Band ---------- */

.cta-band { background: var(--navy); color: #fff; padding: 72px 0; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c3d1de; max-width: 52ch; margin: 0 auto 30px; }

/* ---------- Formular ---------- */

.form-layout { display: grid; grid-template-columns: 1.25fr .9fr; gap: 56px; align-items: start; }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .93rem; font-weight: 600; color: var(--navy); }
.field .hint { font-weight: 400; color: var(--muted); }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #cfc7b6;
  border-radius: var(--radius);
  padding: 13px 14px;
  width: 100%;
  transition: border-color .18s ease, box-shadow .18s ease;
}
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(227, 173, 48, .25);
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; color: var(--muted); }
.consent input { margin-top: 5px; flex-shrink: 0; width: 18px; height: 18px; accent-color: var(--gold-dark); }

.form-note { font-size: .88rem; color: var(--muted); margin: 0; }

.aside-box {
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
}
.aside-box h3 { margin-bottom: .6em; }
.aside-box dl { margin: 0; }
.aside-box dt { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-dark); font-weight: 600; margin-top: 16px; }
.aside-box dt:first-child { margin-top: 0; }
.aside-box dd { margin: 3px 0 0; }
.aside-box a { font-weight: 600; }

.alert {
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 26px;
  font-size: .97rem;
}
.alert--ok { background: #edf7ee; border: 1px solid #b9dcbd; color: #245c2b; }
.alert--err { background: #fdf0ee; border: 1px solid #edbfb8; color: #8c2f22; }

/* ---------- Prosa (Recht) ---------- */

.prose { max-width: 72ch; }
.prose h2 { font-size: 1.5rem; margin-top: 2em; }
.prose h3 { font-size: 1.1rem; margin-top: 1.6em; }
.prose ul { padding-left: 20px; color: var(--muted); }
.prose li { margin-bottom: .45em; }
.prose address { font-style: normal; color: var(--muted); }

.notice {
  background: var(--sand);
  border-left: 3px solid var(--gold);
  padding: 18px 22px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .95rem;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.site-footer { background: var(--navy-dark); color: #a8bccf; padding: 62px 0 26px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h3 { color: #fff; font-size: 1rem; font-family: var(--font-body); font-weight: 600; letter-spacing: .04em; margin-bottom: 1em; }
.site-footer a { color: #a8bccf; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .6em; }
.footer-brand img { height: 40px; width: auto; margin-bottom: 18px; filter: brightness(0) invert(1); opacity: .92; }
.footer-brand p { max-width: 34ch; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 44px;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .89rem;
}
.footer-bottom ul { display: flex; gap: 22px; }
.footer-bottom li { margin: 0; }

/* ---------- Bewegung ---------- */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--navy-dark);
  padding: 12px 18px;
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Tablet ---------- */

@media (max-width: 960px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .steps, .steps--3 { grid-template-columns: repeat(2, 1fr); gap: 32px 26px; }
  .split { gap: 38px; }
  .form-layout { grid-template-columns: 1fr; gap: 38px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .main-nav ul { gap: 20px; }
}

/* ---------- Handy ---------- */

@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 56px 0; }
  .wrap { padding: 0 18px; }

  /* Lange deutsche Woerter duerfen auf schmalen Displays trennen */
  h1, h2, h3 { hyphens: auto; -webkit-hyphens: auto; }
  h1 { font-size: clamp(1.75rem, 7.6vw, 2.5rem); }
  h2 { font-size: clamp(1.4rem, 6vw, 1.85rem); }

  .header-inner { min-height: 64px; }
  .brand img { height: 34px; }

  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lift);
    padding: 10px 18px 22px;
  }
  .main-nav.is-open { display: flex; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav li { border-bottom: 1px solid var(--line); }
  .main-nav a { display: block; padding: 14px 2px; font-size: 1.05rem; }
  .main-nav a::after { display: none; }
  .nav-cta { margin-top: 18px; justify-content: center; }

  /* Auf dem Handy tritt das Hero-Bild zurueck, Text und Button haben Vorrang */
  .hero__inner { padding: 66px 0 60px; }
  .hero__sub { font-size: 1.03rem; margin-bottom: 26px; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { justify-content: center; width: 100%; }
  .hero__note { display: none; }
  .hero__media::after { background: linear-gradient(180deg, rgba(9,26,45,.9) 0%, rgba(9,26,45,.82) 60%, rgba(9,26,45,.9) 100%); }

  .page-hero { padding: 48px 0 44px; }

  /* Zahlenleiste wird zweizeilig statt gequetscht */
  .facts ul { grid-template-columns: repeat(2, 1fr); padding: 22px 0; gap: 18px; }
  .facts li:last-child { grid-column: 1 / -1; }

  .grid--3, .grid--2 { grid-template-columns: 1fr; gap: 18px; }
  .card { padding: 24px 22px; }
  .card:hover { transform: none; }

  .steps, .steps--3 { grid-template-columns: 1fr; gap: 26px; }
  .step::before { width: 38px; height: 38px; font-size: 1.1rem; margin-bottom: 12px; }

  .split { grid-template-columns: 1fr; gap: 28px; }
  .split--flip .split__media { order: 0; }

  .head-block { margin-bottom: 32px; }
  .quote { font-size: 1.14rem; padding-left: 18px; }

  .cta-band { padding: 54px 0; }
  .cta-band .btn { width: 100%; justify-content: center; }

  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
  .footer-bottom ul { flex-wrap: wrap; gap: 16px; }
}
