/* ==========================================================================
   Rabe Gruppe GmbH — Brand Guide konform
   Farben:  Gable Green #1A3637 · Warm Golden Orange #A8894F · #000 · #FFF
   Schrift: Plus Jakarta Sans (300/500/600/700/800), lokal als variable Schrift
   ========================================================================== */

/* Schrift lokal (kein Abruf bei Google Fonts, LG München I 3 O 17493/20).
   Variable Schrift 200–800, Dateien aus dem Google-Fonts-CDN, OFL-Lizenz. */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../assets/fonts/PlusJakartaSans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../assets/fonts/PlusJakartaSans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Brandfarben */
  --green: #1A3637;
  --green-90: #314A4B;   /* 90 % Tint lt. Guide */
  --green-80: #485E5F;   /* 80 % */
  --green-65: #6A7C7D;   /* 65 % */
  --gold: #A8894F;
  --gold-90: #B19561;
  --gold-80: #B9A172;
  --gold-65: #C6B28D;
  --black: #000000;
  --white: #FFFFFF;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;

  --pad-x: clamp(1.25rem, 5vw, 6rem);
  --section-y: clamp(4.5rem, 10vw, 9rem);
  --header-h: 4.5rem;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-weight: 500;
  color: var(--green);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3 { line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; }

h1 em, h2 em { font-style: normal; color: var(--gold); }

::selection { background: var(--gold); color: var(--white); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--green);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 var(--pad-x);
}

.brand { display: flex; align-items: center; min-height: 44px; }

/* Logo nie unter 150 px Breite (Brand Guide, Minimum Size Screen) */
.brand-logo { width: clamp(150px, 16vw, 186px); height: auto; }

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
}

.main-nav a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.main-nav a:hover { border-bottom-color: var(--gold); }

.main-nav a.is-active { color: var(--gold-65); border-bottom-color: var(--gold); }

.main-nav .nav-cta {
  border: 1px solid var(--gold);
  padding: 0.55rem 1.25rem;
  color: var(--gold-65);
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav .nav-cta:hover { background: var(--gold); color: var(--white); border-bottom-color: var(--gold); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 48px;
  height: 48px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--white);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  background: var(--green);
  color: var(--white);
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

/* Architekturfoto mit Gable-Green-Überlagerung (wie Intro-Seite des Guides) */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("../assets/hero.jpg?v=6") 70% 42% / cover no-repeat;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(26, 54, 55, 0.55) 0%, rgba(26, 54, 55, 0) 30%),
    linear-gradient(90deg,
      var(--green) 0%,
      rgba(26, 54, 55, 0.88) 30%,
      rgba(26, 54, 55, 0.38) 56%,
      rgba(26, 54, 55, 0) 100%);
}

.hero-inner {
  padding: clamp(4rem, 10vw, 7rem) var(--pad-x) clamp(3rem, 6vw, 5rem);
  max-width: 62rem;
}

.hero h1 {
  font-size: clamp(2.375rem, 7vw, 4.75rem);
  margin-bottom: 1.75rem;
}

.hero-sub {
  font-weight: 300;
  font-size: clamp(1.0625rem, 1.8vw, 1.3125rem);
  max-width: 34em;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 2.75rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.75rem 1.9rem;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: var(--gold-90); }

.btn-line { border: 1px solid rgba(255, 255, 255, 0.45); color: var(--white); }
.btn-line:hover { border-color: var(--gold); color: var(--gold-65); }

/* Linien-Knopf auf heller Fläche */
.btn-line-dark { border: 1px solid rgba(26, 54, 55, 0.35); color: var(--green); }
.btn-line-dark:hover { border-color: var(--gold); color: var(--gold); }

/* ==========================================================================
   Sektionen — Grundgerüst
   ========================================================================== */

.section { padding: var(--section-y) var(--pad-x); }

.section-light { background: var(--white); color: var(--green); }

/* Kapitelkopf: Nummer — Linie — Label (wie im Guide) */
.section-head {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.section-no {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.06em;
}

.section-rule { flex: 1; height: 1px; background: currentColor; opacity: 0.18; }

.section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--green-65);
}

.section-head-dark .section-label { color: var(--gold-65); }
.section-head-dark .section-rule { background: var(--white); opacity: 0.25; }

/* ==========================================================================
   01 — Über uns
   ========================================================================== */

.about-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  margin-bottom: clamp(3rem, 7vw, 6rem);
}

.about-grid h2 { font-size: clamp(1.9rem, 4.4vw, 3.25rem); }

.lead {
  font-size: clamp(1.125rem, 1.9vw, 1.375rem);
  font-weight: 300;
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.lead strong { font-weight: 700; }

.about-copy p:not(.lead) { color: var(--green-80); max-width: 38em; }

.about-facts {
  display: grid;
  border-top: 1px solid rgba(26, 54, 55, 0.15);
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid rgba(26, 54, 55, 0.15);
}

.fact-value {
  font-size: clamp(1.25rem, 2.4vw, 1.625rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.fact-label { font-size: 0.9375rem; color: var(--green-65); font-weight: 500; }

/* Breites Bild unter den Fakten, läuft bis an die dunkle Fläche des Ankaufsprofils */
.about-band {
  margin: clamp(3rem, 6vw, 5rem) calc(-1 * var(--pad-x)) calc(-1 * var(--section-y));
}

.about-band img {
  width: 100%;
  height: clamp(220px, 34vw, 440px);
  object-fit: cover;
  object-position: center 30%;
}

/* ==========================================================================
   02 — Ankaufsprofil (dunkle Fläche, der Datenblock für den Käuferordner)
   ========================================================================== */

.profile-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 6rem);
}

.profile-grid h2 { font-size: clamp(1.9rem, 4.4vw, 3.25rem); margin-bottom: 1.25rem; }

.profile-intro {
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  max-width: 30em;
  margin-bottom: 2rem;
}

.profile-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.profile-rows { border-top: 1px solid rgba(255, 255, 255, 0.18); }

.profile-row {
  display: grid;
  gap: 0.3rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.profile-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-65);
  padding-top: 0.3rem;
}

.profile-value { font-weight: 600; line-height: 1.5; }

.profile-not {
  margin-top: 1.4rem;
  font-size: 0.9375rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.6);
}

.profile-not strong { font-weight: 600; color: rgba(255, 255, 255, 0.82); }

@media (min-width: 480px) {
  .profile-row { grid-template-columns: 9.5rem 1fr; gap: 1rem; }
}

/* ==========================================================================
   03 — Tippgeber (heller Goldton, damit sich die Fläche von den weißen Nachbarn abhebt)
   ========================================================================== */

.section-tip { background: rgba(168, 137, 79, 0.08); }

.tip-grid { display: grid; gap: clamp(2.5rem, 6vw, 6rem); }

.tip-grid h2 { font-size: clamp(1.9rem, 4.4vw, 3.25rem); margin-bottom: 1.25rem; }

.tip-copy .lead { max-width: 30em; }

.tip-amount {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.5rem 0 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border-left: 3px solid var(--gold);
  max-width: 30em;
}

.tip-amount-value {
  font-size: clamp(2.25rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--gold);
}

.tip-amount-label { font-size: 0.9375rem; color: var(--green-80); }

.tip-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.tip-steps { border-top: 1px solid rgba(26, 54, 55, 0.15); }

.tip-step {
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 1rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid rgba(26, 54, 55, 0.15);
}

.tip-step-no {
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
  color: var(--gold);
  padding-top: 0.1rem;
}

.tip-step h3 { font-size: 1.125rem; margin-bottom: 0.35rem; }

.tip-step p { font-size: 0.9375rem; color: var(--green-80); }

.tip-terms {
  margin-top: 1.4rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--green-65);
}

.tip-terms a { color: inherit; text-decoration-color: var(--gold); }

/* ==========================================================================
   04 — Geschäftsbereiche
   ========================================================================== */

.field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding: clamp(2.25rem, 5vw, 3.5rem) 0;
  border-top: 1px solid rgba(26, 54, 55, 0.15);
  position: relative;
}

.field:last-child { border-bottom: 1px solid rgba(26, 54, 55, 0.15); }

.field-no {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 300;
  line-height: 1;
  color: var(--gold);
}

.field-body h3 { font-size: clamp(1.5rem, 3vw, 2.125rem); margin-bottom: 0.9rem; }

.field-body p { color: var(--green-80); max-width: 44em; }

.field-side { display: flex; flex-direction: column; gap: 0.9rem; }

.field-media { margin: 0; }

.field-media img {
  width: 100%;
  height: clamp(180px, 22vw, 240px);
  object-fit: cover;
}

.field-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-65);
}

/* ==========================================================================
   03 — Ansatz (dunkle Fläche)
   ========================================================================== */

.section-dark {
  background: var(--green);
  color: var(--white);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.dark-geometry {
  position: absolute;
  inset: -20% -10%;
  z-index: -1;
  background: rgba(0, 0, 0, 0.18);
  clip-path: polygon(88% 0, 108% 0, 58% 100%, 38% 100%);
  pointer-events: none;
}

.values {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}

.value { max-width: 30em; }

.value-index {
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.1em;
  border: 1px solid rgba(168, 137, 79, 0.5);
  padding: 0.35rem 0.8rem;
  margin-bottom: 1.25rem;
}

.value h3 { font-size: clamp(1.375rem, 2.6vw, 1.75rem); margin-bottom: 0.8rem; }

.value p { color: rgba(255, 255, 255, 0.75); font-weight: 300; }

/* ==========================================================================
   04 — Der Gründer
   ========================================================================== */

.founder-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.founder-media { margin: 0; }

.founder-media img {
  width: 100%;
  max-width: 26rem;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

.founder-media figcaption {
  margin-top: 0.9rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-65);
}

.founder-body h2 { font-size: clamp(1.9rem, 4.4vw, 3.25rem); margin-bottom: 1.5rem; }

.founder-body p:not(.lead) { color: var(--green-80); max-width: 38em; }

@media (min-width: 768px) {
  .founder-grid { grid-template-columns: 5fr 7fr; }
}

/* Kontakt kompensiert den hellen Vorgänger mit einer Trennlinie */
.section-contact { border-top: 1px solid rgba(26, 54, 55, 0.15); }

/* ==========================================================================
   05 — Kontakt
   ========================================================================== */

.contact-grid { display: grid; gap: clamp(2.5rem, 6vw, 6rem); }

.contact-grid h2 { font-size: clamp(1.9rem, 4.4vw, 3.25rem); margin-bottom: 1.25rem; }

.contact-grid p { color: var(--green-80); max-width: 30em; }

.contact-details { border-top: 1px solid rgba(26, 54, 55, 0.15); }

.contact-row {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid rgba(26, 54, 55, 0.15);
}

.contact-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  padding-top: 0.3rem;
}

.contact-value { font-weight: 600; line-height: 1.5; }

.contact-value a {
  text-decoration: none;
  border-bottom: 1px solid rgba(168, 137, 79, 0.5);
  transition: color 0.2s ease, border-color 0.2s ease;
  padding: 0.15rem 0;
}

.contact-value a:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { background: var(--green); color: var(--white); }

.footer-inner {
  display: grid;
  gap: 2.75rem;
  padding: clamp(3.5rem, 7vw, 5.5rem) var(--pad-x);
}

.footer-logo { width: clamp(150px, 15vw, 176px); height: auto; margin-bottom: 1.4rem; }

.footer-brand p {
  font-weight: 300;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.footer-nav, .footer-legal-nav { display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-start; }

.footer-nav a, .footer-legal-nav a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.45rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.footer-nav a:hover, .footer-legal-nav a:hover { color: var(--gold-65); }

/* Gesellschaften der Gruppe: kleine weiße Logos über der Meta-Zeile */
.footer-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2.5rem;
  padding: 1.6rem var(--pad-x);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.footer-group-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.footer-group-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.5rem; }

.footer-group-logos a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.footer-group-logos a:hover { opacity: 1; }

.footer-group-logos img { height: 22px; width: auto; }

.footer-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.2rem var(--pad-x);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Rechtsseiten (Impressum / Datenschutz)
   ========================================================================== */

.legal-main { padding: clamp(3.5rem, 8vw, 6rem) var(--pad-x); max-width: 52rem; }

.legal-main h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 2.5rem; }

.legal-main h2 { font-size: clamp(1.25rem, 2.6vw, 1.625rem); margin: 2.5rem 0 0.9rem; }

.legal-main p, .legal-main address { color: var(--green-80); font-style: normal; margin-bottom: 1rem; }

.legal-main a { color: var(--gold); }

.legal-note {
  border-left: 3px solid var(--gold);
  padding: 0.9rem 1.25rem;
  background: rgba(168, 137, 79, 0.08);
  color: var(--green) !important;
  font-weight: 600;
  margin: 0 0 2rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--gold);
  margin-bottom: 2rem;
}

/* ==========================================================================
   Scroll-Reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.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; }
}

/* ==========================================================================
   Responsive ≥ 768 px
   ========================================================================== */

@media (min-width: 768px) {
  .about-grid { grid-template-columns: 5fr 6fr; align-items: start; }
  .about-facts { grid-template-columns: repeat(3, 1fr); border-top: none; }
  .fact { border-top: 1px solid rgba(26, 54, 55, 0.15); padding-right: 2rem; }

  .field { grid-template-columns: 8rem 1fr 17rem; align-items: start; gap: 2.5rem; }
  .field-side { justify-self: stretch; }
  .field-tag { text-align: right; }

  .values { grid-template-columns: repeat(3, 1fr); }

  .profile-grid { grid-template-columns: 5fr 7fr; align-items: start; }

  .tip-grid { grid-template-columns: 6fr 6fr; align-items: start; }

  .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; }

  .footer-inner { grid-template-columns: 2fr 1fr 1fr; }
}

/* ==========================================================================
   Mobile Navigation < 900 px (fünf Menüpunkte passen erst ab 900 px in eine Zeile)
   ========================================================================== */

@media (max-width: 899px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--green);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    padding: 2rem var(--pad-x);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 99;
  }

  .main-nav.is-open { transform: translateX(0); }

  .main-nav a {
    width: 100%;
    font-size: 1.375rem;
    font-weight: 700;
    padding: 1.1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .main-nav a:hover { border-bottom-color: rgba(255, 255, 255, 0.14); }

  .main-nav .nav-cta {
    border: none;
    padding: 1.1rem 0;
    color: var(--gold-65);
  }

  body.nav-locked { overflow: hidden; }
}

@media (max-width: 767px) {
  /* Mobile: Text läuft über die volle Breite → gleichmäßigere Abdunklung */
  .hero-media { background-position: 62% 30%; }

  .hero-media::after {
    background:
      linear-gradient(to top, rgba(26, 54, 55, 0.7) 0%, rgba(26, 54, 55, 0.15) 45%),
      linear-gradient(180deg, rgba(26, 54, 55, 0.88) 0%, rgba(26, 54, 55, 0.55) 100%);
  }
}
