/* RoWa Energietechnik GmbH – Stylesheet
   Hell und reduziert: Weiß, dunkles Navy, Haarlinien. Logofarben nur als kleine Akzente.
   Schrift: Instrument Sans (SIL OFL), lokal eingebunden. */

@font-face {
  font-family: "Instrument Sans";
  src: url("instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0e2433;      /* dunkles Navy, abgeleitet vom Logo-Navy */
  --navy: #225470;     /* Logo „RoWa“ */
  --green: #2c8c31;    /* Logo „Energietechnik GmbH“ */
  --sun: #ffc701;      /* Sonne im Logo */
  --muted: #5d6d77;
  --line: #e3e7ea;
  --bg: #fff;
  --wrap: 90rem;
  --pad: clamp(1.25rem, 4.5vw, 4rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 2px; }

h1, h2, h3, p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -999px;
  top: .75rem;
  z-index: 10;
  background: var(--ink);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: 999px;
  text-decoration: none;
}
.skip:focus { left: .75rem; }

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

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.5rem;
}
.brand img { height: 52px; width: auto; }

.site-nav {
  display: flex;
  gap: 2rem;
  font-size: .9375rem;
}
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--ink); }
.site-nav a.strong { color: var(--ink); font-weight: 600; }

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

.hero { padding-top: clamp(3.5rem, 11vw, 9rem); }

.hero h1 {
  font-size: clamp(2.9rem, 14.6vw, 10.5rem);
  font-weight: 600;
  line-height: .9;
  letter-spacing: -0.048em;
  margin-left: -0.04em; /* optischer Randausgleich */
}
.hero h1 .ln { display: block; }
.dot-sun   { color: var(--sun); }
.dot-house { color: var(--navy); }
.dot-plug  { color: var(--green); }

/* ---------- Logo-Animation ----------
   Zwei Ebenen auf identischer Leinwand: Logo ohne Sonne (vorne) und Sonne (dahinter).
   Das Bild wird von links aufgedeckt, die Sonne steigt von rechts unten auf ihre Position.
   Der Ausschnitt der Sonne ist auf ihren Endbereich begrenzt, damit ihre verdeckten Kanten
   hinter Modul und Wallbox bleiben. */

.hero-head { position: relative; }

.logo-anim {
  position: relative;
  width: min(100%, 26rem);
  aspect-ratio: 1200 / 699;
  margin-top: 2.25rem;
}
.logo-anim img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.la-reveal, .la-sunclip, .la-sunx { position: absolute; inset: 0; }
.la-sunclip { clip-path: inset(0 62.5% 56.8% 0); }

@media (prefers-reduced-motion: no-preference) {
  .la-reveal { animation: la-wipe 1.9s cubic-bezier(.45, 0, .25, 1) both; }
  .la-sunx   { animation: la-sun-x 2.1s .3s cubic-bezier(.35, .3, .3, 1) both; }
  .la-suny   { animation: la-sun-y 2.1s .3s cubic-bezier(.2, .6, .3, 1) both; }
}
@keyframes la-wipe  { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes la-sun-x { from { transform: translateX(9%); } to { transform: none; } }
@keyframes la-sun-y { from { transform: translateY(48%); } to { transform: none; } }

.hero-foot {
  display: grid;
  gap: 2rem;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  align-items: end;
}
.hero-foot p {
  max-width: 30rem;
  font-size: clamp(1.125rem, 1.5vw, 1.3125rem);
  line-height: 1.45;
  color: var(--muted);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  justify-self: start;
  padding: .95rem 1.6rem .95rem 1.35rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s;
}
.cta::before {
  content: "";
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: #3fb645;
  box-shadow: 0 0 0 4px rgba(63, 182, 69, .22);
}
.cta:hover { background: var(--navy); }

/* ---------- Leistungen ---------- */

.services { margin-top: clamp(3.5rem, 8vw, 6rem); }
.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
}
.service-list li {
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: .35rem 1rem;
  align-content: start;
}
.service-list .no {
  grid-row: span 2;
  color: var(--muted);
  font-size: .9375rem;
  font-variant-numeric: tabular-nums;
  padding-top: .3rem;
}
.service-list h3 {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.service-list p { color: var(--muted); max-width: 24rem; }

/* ---------- Aussage ---------- */

.statement {
  padding-block: clamp(5rem, 12vw, 10rem);
}
.statement p {
  max-width: 22ch;
  font-size: clamp(1.75rem, 4.2vw, 3.5rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.035em;
}
.statement p span { display: block; color: var(--muted); }

/* ---------- Kontakt ---------- */

.contact {
  border-top: 1px solid var(--line);
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(4rem, 9vw, 7rem);
  display: grid;
  gap: 2rem;
}
.contact h2 {
  font-size: .9375rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}
.contact-body { max-width: 52rem; }
.contact-intro {
  font-size: clamp(1.6rem, 3.6vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.12;
  max-width: 20ch;
}
.contact address {
  margin-top: 3rem;
  font-style: normal;
  color: var(--muted);
}

/* Formular */
.form { margin-top: clamp(2rem, 5vw, 3.5rem); display: grid; gap: 1.75rem; }

.topics { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.topics legend { font-size: .9375rem; color: var(--muted); padding: 0; margin-bottom: .9rem; }
.topics label { position: relative; cursor: pointer; }
.topics input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.topics span {
  display: inline-block;
  padding: .55rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .9375rem;
  transition: background-color .15s, border-color .15s, color .15s;
}
.topics label:hover span { border-color: var(--ink); }
.topics input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.topics input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }

.row { display: grid; gap: 1.75rem; }
.field { display: grid; gap: .35rem; }
.field .lbl { font-size: .9375rem; color: var(--muted); }
.field .lbl em { font-style: normal; color: #93a1a9; margin-left: .35rem; }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 1.125rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid #c9d1d6;
  border-radius: 0;
  padding: .45rem 0 .6rem;
  transition: border-color .15s;
}
.field textarea { resize: vertical; min-height: 8rem; line-height: 1.5; }
.field textarea::placeholder { color: #9aa7af; }
.field input:focus, .field textarea:focus { outline: none; border-bottom: 1px solid var(--ink); box-shadow: 0 1px 0 var(--ink); }
.field input:user-invalid, .field textarea:user-invalid { border-bottom-color: #b3261e; box-shadow: 0 1px 0 #b3261e; }

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

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: .5rem; }
.form-foot .note { font-size: .875rem; color: var(--muted); max-width: 26rem; }
.form-foot .note a { color: var(--ink); }
button.cta { border: 0; font: inherit; font-weight: 600; cursor: pointer; }
button.cta[disabled] { opacity: .6; cursor: progress; }

.form-status:empty { display: none; }
.form-status { font-size: 1rem; }
.form-status.error { color: #b3261e; }
.form-status a { color: inherit; }

.form-done h3 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}
.form-done p { margin-top: .5rem; color: var(--muted); }

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

.site-footer .foot {
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem 2rem;
  padding-block: 1.5rem 2rem;
  font-size: .875rem;
  color: var(--muted);
}
.site-footer nav { display: flex; gap: 1.5rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover, .site-footer a[aria-current] { color: var(--ink); }

/* ---------- Rechtstexte ---------- */

.legal { padding-block: clamp(3rem, 8vw, 6rem); }
.legal .wrap > * { max-width: 46rem; }
.legal h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  margin-bottom: 1rem;
}
.legal h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-top: 2.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.legal p, .legal ul, .legal address { margin-top: .75rem; }
.legal address { font-style: normal; }
.legal ul { padding-left: 1.2rem; }
.legal a { color: var(--ink); }
.legal .stand { margin-top: 3rem; color: var(--muted); font-size: .9375rem; }

/* Gut sichtbare Platzhalter – vor Veröffentlichung ersetzen */
mark.ph { background: #fff1b8; color: #5c4400; padding: 0 .25em; border-radius: 3px; }

/* ---------- Breakpoints ---------- */

@media (min-width: 44rem) {
  .logo-anim {
    position: absolute;
    right: 0;
    bottom: 0;
    width: min(34%, 30rem);
    margin: 0;
  }
}

@media (min-width: 48rem) {
  .hero-foot { grid-template-columns: 1fr auto; }
  .hero-foot .cta { justify-self: end; }
  .row { grid-template-columns: 1fr 1fr; }
  .service-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem; }
  .contact { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); }
}

@media (min-width: 72rem) {
  .service-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .service-list li { grid-template-columns: 1fr; border-bottom: 0; padding-block: 1.75rem 0; }
  .service-list .no { grid-row: auto; padding-top: 0; margin-bottom: 2.5rem; }
}

@media (max-width: 40rem) {
  .brand img { height: 44px; }
  .service-list li { grid-template-columns: 2.25rem 1fr; }
  .site-nav .opt { display: none; }
}
