/* Geothermie System Consulting: eckig, flach, Rot nur als Akzent */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #c63b3b;
  --ink: #2b2b2b;
  --charcoal: #3b373a;
  --mid: #6a6a6a;
  --line: #d8d8d8;
  --light: #f3f3f3;
  --container: min(1120px, calc(100vw - 48px));
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: var(--container);
  margin: 0 auto;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand img {
  width: 190px;
  height: auto;
}

.main-nav {
  display: flex;
  align-items: stretch;
  gap: 36px;
  height: 84px;
}

.main-nav > a,
.nav-item > a {
  display: flex;
  align-items: center;
  height: 100%;
  font-size: 17px;
  font-weight: 600;
  color: var(--charcoal);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}

.main-nav > a:hover,
.nav-item:hover > a,
.nav-item:focus-within > a,
.main-nav a[aria-current="page"] {
  color: var(--red);
}

.main-nav a[aria-current="page"] {
  border-bottom-color: var(--red);
}

.nav-item {
  position: relative;
}

.nav-item > a::after {
  content: "";
  width: 6px;
  height: 6px;
  margin: 0 0 3px 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.nav-item:not(:has(.nav-dropdown)) > a::after {
  display: none;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: -20px;
  min-width: 280px;
  padding: 8px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  display: block;
}

.nav-dropdown a {
  display: block;
  padding: 10px 22px;
  font-size: 16px;
  font-weight: 500;
  color: var(--charcoal);
  text-decoration: none;
}

.nav-dropdown a:hover {
  background: var(--light);
  color: var(--red);
}

.nav-toggle,
.nav-burger {
  display: none;
}

/* ---------- Buttons, Labels ---------- */

.button {
  display: inline-block;
  padding: 14px 30px;
  background: var(--red);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border: 0;
}

.button:hover {
  background: var(--charcoal);
}

h1,
h2,
h3 {
  color: var(--charcoal);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  margin-bottom: 36px;
}

h3 {
  font-size: 19px;
  font-weight: 700;
}

.section {
  padding: 72px 0;
}

.section--grey {
  background: var(--light);
}

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

.hero {
  display: flex;
  align-items: flex-end;
  min-height: 580px;
  padding: 0 0 64px;
  color: #fff;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, rgba(43, 40, 42, 0.9) 0%, rgba(43, 40, 42, 0.72) 40%, rgba(43, 40, 42, 0) 78%),
    url("../media/hero_frankfurt.jpg") left top / cover no-repeat;
  transform-origin: left top;
}

.hero h1 {
  max-width: 800px;
  margin-bottom: 22px;
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.08;
  color: #fff;
}

.hero p {
  max-width: 600px;
  margin-bottom: 36px;
  font-size: 19px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

/* ---------- Seitenkopf Unterseite ---------- */

.page-head {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  font-size: clamp(34px, 4.4vw, 52px);
  font-weight: 800;
}

.page-head h1::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  margin-top: 22px;
  background: var(--red);
}

/* ---------- Text in Spalten ---------- */

.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}

.lead-text {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 88px;
  align-items: center;
}

.lead-text p + p {
  margin-top: 1.1em;
}

.image-card img {
  width: 100%;
  height: auto;
}

/* ---------- Warum Geothermie ---------- */

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

.fact {
  padding-top: 22px;
  border-top: 2px solid var(--charcoal);
}

.fact span {
  display: block;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
}

.fact h3 {
  margin-bottom: 12px;
}

.fact p {
  font-size: 16px;
  color: var(--mid);
}

.closing {
  max-width: 820px;
  margin-top: 64px;
  font-size: 19px;
  color: var(--charcoal);
}

/* ---------- Leistungen (Liste) ---------- */

.rows {
  border-top: 1px solid var(--line);
}

.row {
  display: grid;
  grid-template-columns: 56px 300px 1fr 40px;
  gap: 24px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.row .no {
  font-size: 14px;
  font-weight: 700;
  color: var(--mid);
}

.row h3 {
  transition: color 0.15s;
}

.row p {
  font-size: 16px;
  color: var(--mid);
}

.row .arrow {
  text-align: right;
  font-size: 22px;
  color: var(--charcoal);
}

.row:hover h3,
.row:hover .arrow {
  color: var(--red);
}

/* ---------- Leistungsarten ---------- */

.types {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.type {
  padding-top: 18px;
  border-top: 2px solid var(--charcoal);
}

.type h3 {
  margin-bottom: 10px;
}

.type p {
  font-size: 16px;
  color: var(--mid);
}

/* ---------- Standorte ---------- */

.places {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  margin-bottom: 40px;
  font-size: 15px;
  line-height: 1.6;
}

.places h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.contact-line {
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.contact-line a {
  color: var(--charcoal);
  font-weight: 600;
}

.contact-line a:hover {
  color: var(--red);
}

/* ---------- Leistungsspektrum (Unterseite) ---------- */

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

.spectrum--two {
  grid-template-columns: 1fr 1fr;
  gap: 48px 56px;
}

.spectrum > div {
  padding-top: 22px;
  border-top: 2px solid var(--charcoal);
}

.spectrum h3 {
  margin-bottom: 16px;
}

.spectrum ul {
  list-style: none;
}

.spectrum li {
  padding: 9px 0 9px 20px;
  position: relative;
  font-size: 16px;
  border-bottom: 1px solid var(--line);
}

.spectrum li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  width: 8px;
  height: 2px;
  background: var(--red);
}

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

.site-footer {
  background: var(--light);
  border-top: 1px solid var(--line);
}

.footer-inner {
  width: var(--container);
  margin: 0 auto;
  min-height: 96px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--mid);
}

.footer-inner img {
  width: 170px;
  height: auto;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  gap: 28px;
}

.footer-links a {
  font-weight: 600;
  color: var(--charcoal);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--red);
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .nav-burger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px;
    cursor: pointer;
  }

  .nav-burger span {
    width: 24px;
    height: 2px;
    background: var(--charcoal);
  }

  .nav-burger {
    margin-left: auto;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    height: auto;
    padding: 8px 24px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }

  .nav-toggle:checked ~ .main-nav {
    display: flex;
  }

  .main-nav > a,
  .nav-item > a {
    height: auto;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    margin: 0;
  }

  .nav-dropdown {
    display: block;
    position: static;
    min-width: 0;
    padding: 0 0 6px 16px;
    border: 0;
  }

  .nav-item > a::after {
    display: none;
  }

  .header-inner {
    position: relative;
  }

  .cols-2,
  .lead-text,
  .facts,
  .spectrum {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .image-card img {
    max-width: 260px;
  }

  .types {
    grid-template-columns: 1fr 1fr;
  }

  .places {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .row {
    grid-template-columns: 40px 1fr 30px;
    row-gap: 4px;
  }

  .row p {
    grid-column: 2 / 3;
    grid-row: 2;
  }

  .row .arrow {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 640px) {
  .header-inner {
    gap: 12px;
  }

  .brand img {
    width: 150px;
  }

  .section {
    padding: 56px 0;
  }

  .hero {
    min-height: 640px;
    padding-bottom: 40px;
  }

  .types,
  .places {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 24px 0;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

/* ---------- Referenzen, Kontakt, Über uns, Rechtliches ---------- */

.anchor {
  scroll-margin-top: 100px;
}

.text-narrow {
  max-width: 820px;
}

.text-narrow p + p {
  margin-top: 1.1em;
}

.people {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}

.person {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 28px;
  align-items: start;
}

.person img {
  width: 170px;
  height: auto;
  background: var(--light);
}

.person h3 {
  margin-bottom: 4px;
}

.person .role {
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--red);
}

.person ul {
  list-style: none;
}

.person li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.5;
}

.placeholder {
  max-width: 640px;
  padding: 32px 36px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  color: var(--mid);
}

.facts-list {
  border-top: 2px solid var(--charcoal);
}

.facts-list > div {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}

.facts-list dt {
  font-weight: 700;
  color: var(--charcoal);
}

.doc h2 {
  margin: 44px 0 14px;
  font-size: 20px;
}

.doc h2:first-child {
  margin-top: 0;
}

.doc p,
.doc ul {
  font-size: 16px;
  margin-bottom: 1em;
}

.doc ul {
  padding-left: 22px;
}

.doc a,
.contact-line a {
  color: var(--charcoal);
  font-weight: 600;
}

.doc a:hover {
  color: var(--red);
}

@media (max-width: 980px) {
  .people {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .facts-list > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (max-width: 640px) {
  .person {
    grid-template-columns: 120px 1fr;
    gap: 18px;
  }

  .person img {
    width: 120px;
  }
}

/* ---------- Dezente Bewegung und Rückmeldung ---------- */

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* Menü: Farbwechsel weich, Untermenü blendet ein */
.main-nav > a,
.nav-item > a {
  transition: color 0.18s, border-color 0.18s;
}

.nav-dropdown {
  display: block;
  visibility: hidden;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  visibility: visible;
  opacity: 1;
  transform: none;
}

.nav-dropdown a {
  transition: background-color 0.15s, color 0.15s;
}

.button {
  transition: background-color 0.2s;
}

/* Leistungsliste: Zeile wird hinterlegt, Pfeil rückt vor */
.row {
  padding-inline: 0;
  transition: background-color 0.2s, padding 0.2s;
}

.row:hover {
  padding-inline: 16px;
  background: var(--light);
}

.row .no,
.row .arrow {
  transition: color 0.2s, transform 0.2s;
}

.row:hover .no {
  color: var(--red);
}

.row:hover .arrow {
  transform: translateX(4px);
}

/* Blöcke: obere Linie wird rot, Aufzählungsstrich wächst */
.spectrum > div,
.fact,
.type {
  transition: border-color 0.25s;
}

.spectrum > div:hover,
.fact:hover,
.type:hover {
  border-top-color: var(--red);
}

.spectrum li::before {
  transition: width 0.2s;
}

.spectrum li:hover::before {
  width: 14px;
}

.footer-links a,
.contact-line a,
.doc a {
  transition: color 0.15s;
}

/* Beim Laden: Hero-Text steigt leicht auf, roter Strich unter dem Titel wächst */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes grow {
  from {
    width: 0;
  }
}

.hero h1,
.hero p,
.hero .button {
  animation: rise 0.7s ease-out both;
}

.hero p {
  animation-delay: 0.1s;
}

.hero .button {
  animation-delay: 0.2s;
}

.page-head h1::after {
  animation: grow 0.6s ease-out 0.15s both;
}

/* Beim Scrollen: Inhalte blenden leicht ein (nur in Browsern mit Scroll-Animationen) */
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@supports (animation-timeline: view()) {
  .section .container > * {
    animation: reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }
}

@media (max-width: 980px) {
  .nav-dropdown {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Noch etwas mehr Bewegung ---------- */

/* Menü: roter Unterstrich wächst von links */
.main-nav > a,
.nav-item > a {
  background: linear-gradient(var(--red), var(--red)) no-repeat left bottom / 0 3px;
  transition: color 0.18s, background-size 0.25s ease-out;
}

.main-nav > a:hover,
.nav-item:hover > a,
.nav-item:focus-within > a {
  background-size: 100% 3px;
}

/* Hero-Bild zoomt beim Laden sanft heran */
@keyframes settle {
  from {
    scale: 1.06;
  }
}

.hero::before {
  animation: settle 1.8s ease-out both;
}

/* Bilder: leichtes Heranzoomen unter der Maus */
.image-card img {
  transition: scale 0.4s ease-out;
}

.image-card:hover img {
  scale: 1.03;
}

/* Kopfzeile bekommt beim Scrollen einen zarten Schatten (Browser mit Scroll-Animationen) */
@keyframes lift {
  from {
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  }

  to {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  }
}

@supports (animation-timeline: scroll()) {
  .site-header {
    animation: lift linear both;
    animation-timeline: scroll(root);
    animation-range: 0 90px;
  }
}

/* ---------- Referenzprojekte: Karten ---------- */

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

.card {
  background: #fff;
  border: 1px solid transparent;
  box-shadow: 0 3px 8px rgba(43, 40, 42, 0.14);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.card:hover {
  border-color: var(--red);
  box-shadow: 0 6px 18px rgba(43, 40, 42, 0.2);
}

.card .thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  background: #e9e9e9;
  color: var(--mid);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card .body {
  padding: 22px 24px 26px;
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  font-size: 16px;
  color: var(--mid);
}

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

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

/* ---------- Sprachschalter (DE | EN) ---------- */

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.lang-switcher a {
  padding: 6px 8px;
  color: var(--mid);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.lang-switcher a + a::before {
  content: "";
}

.lang-switcher a:hover {
  color: var(--red);
}

.lang-switcher a[aria-current="true"] {
  color: var(--charcoal);
  border-bottom-color: var(--red);
}

@media (max-width: 980px) {
  .lang-switcher {
    margin-left: auto;
    order: 2;
  }

  .nav-burger {
    margin-left: 0;
    order: 3;
  }
}
