/* ===== Rahmen, Header, Rail, Bottom-Bar, Sektionen ===== */

/* --- Seiten-Rahmen (Optik) --- */

.page-frame {
  display: none;
}

/* --- Header: Links · Logo mittig · Links · CTA --- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.65rem clamp(1rem, 3vw, 2.2rem);
  border-radius: 0;
  background: linear-gradient(rgb(11 11 13 / 0.85), rgb(11 11 13 / 0.55) 75%, transparent);
}

.header-links ul {
  display: flex;
  gap: clamp(1rem, 2.6vw, 2.4rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.header-links--left ul { justify-content: flex-end; padding-right: clamp(1.5rem, 4vw, 4rem); }
.header-links--right ul { justify-content: flex-start; padding-left: clamp(1.5rem, 4vw, 4rem); }

.header-links a {
  display: inline-block;
  padding: 0.7rem 0.2rem;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.3s ease;
}
.header-links a:hover, .header-links a:focus-visible, .header-links a.is-active { color: var(--text); }

.brand-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  text-decoration: none;
  padding: 0.3rem 0.8rem;
}
.brand-logo { width: 30px; height: 30px; color: var(--text); }
.brand-name {
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--muted);
  white-space: nowrap;
}

.header-cta {
  position: absolute;
  right: clamp(1rem, 2.5vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.55rem 1.3rem;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.header-cta:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 1380px) { .header-cta { display: none; } }

/* --- Mobile-Nav --- */

.nav-toggle {
  display: none;
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  /* MUSS über dem offenen Menü liegen (site-nav z-index 59), sonst verdeckt das
     Menü den Button und man kann nicht mehr zuklappen. */
  z-index: 70;
}
.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

.site-nav {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: auto;    /* schmales Panel rechts (kein Vollbild) */
  width: min(66vw, 230px);
  z-index: -1;
  padding: 1rem 1.35rem 2rem;                 /* Items direkt oben, kein großer Abstand */
  background: linear-gradient(200deg, #171717 0%, #0c0c0e 65%, #000 100%);
  border-left: 1px solid rgb(255 255 255 / 0.08);
  transform: translateX(105%);                /* schiebt von rechts herein */
  transition: transform 0.4s ease;
  visibility: hidden;
}
/* Panel über den Header heben (z 60), aber unter den Schließen-Toggle (z 70),
   damit die Items wirklich oben stehen und nicht vom Header-Verlauf gedimmt werden. */
.site-nav.is-open { transform: translateX(0); visibility: visible; z-index: 65; }
.site-nav ul { flex-direction: column; align-items: flex-start; gap: 0.1rem; list-style: none; margin: 0; padding: 0; display: flex; }
.site-nav a { padding: 0.72rem 0.25rem; font-size: 1.05rem; color: var(--muted); text-decoration: none; display: inline-block; }
.site-nav a:hover { color: var(--text); }
.site-nav .nav-cta { margin-top: 0.75rem; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 0.6rem 1.3rem; }

@media (max-width: 900px) {
  .header-links { display: none; }
  .nav-toggle { display: flex; }
  .site-header { grid-template-columns: auto 1fr; }
  .brand-mark { flex-direction: row; gap: 0.5rem; justify-self: start; min-height: 44px; }
  .brand-logo { width: 24px; height: 24px; }
}

/* --- Linke Sektions-Rail --- */

.side-rail {
  display: none;
  position: fixed;
  left: clamp(1.4rem, 3vw, 2.6rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 55;
}
body.fp-active .side-rail { display: block; }

.rail-track {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  padding: 0.4rem 0;
}
.rail-track::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 1px;
  background-image: repeating-linear-gradient(to bottom, rgb(255 255 255 / 0.22) 0 5px, transparent 5px 11px);
}

.rail-dot {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg);
}
.rail-dot::after {
  content: '';
  position: absolute;
  inset: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px;
  border-radius: 50%;
  background: rgb(244 243 239 / 0.25);
  transition: background-color 0.35s ease, transform 0.35s ease;
}
.rail-dot:hover::after { background: rgb(244 243 239 / 0.6); }
.rail-dot.is-active::after { background: var(--accent); transform: scale(1.5); }

.rail-label {
  position: absolute;
  left: 2.4rem;
  top: 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  white-space: nowrap;
  transition: top 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 900px) { body.fp-active .side-rail { display: none; } }

/* --- Bottom-Bar --- */

.bottom-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 56;
  align-items: center;
  gap: 1.5rem;
  padding: 0.55rem clamp(1.2rem, 3vw, 2.4rem);
  border-radius: 0;
  background: linear-gradient(transparent, rgb(11 11 13 / 0.7));
  font-size: 0.78rem;
  color: var(--muted);
}
body.fp-active .bottom-bar { display: flex; }

.bb-hint {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.bb-hint:hover { color: var(--text); border-color: rgb(255 255 255 / 0.3); }

.bb-copy { margin: 0; flex: 1; }
.bb-right { margin: 0; }

@media (max-width: 760px) {
  .bb-right { display: none; }
  .bottom-bar { font-size: 0.7rem; }
  /* Mobile: die fixe Bottom-Bar ganz ausblenden — sie überdeckte sonst die
     unteren Inhalte (Tabs, Karten, Prozess-Text, Footer). Navigation per Swipe;
     der Disclaimer/Footer wird stattdessen in der Kontakt-Sektion gezeigt
     (die display:none-Basisregel ist via min-width:761px auf Desktop begrenzt). */
  body.fp-active .bottom-bar { display: none; }
}

/* --- Sektionen (normaler Fluss: no-js / reduced-motion) --- */

.fp-section {
  position: relative;
  padding: clamp(5rem, 12vh, 8rem) 0;
}
/* Anker-Sprung (#leistungen, #prozess, #kontakt) ohne Fullpage: der Header ist fixed (80 px), sonst
   landet die Ueberschrift des angesprungenen Blocks darunter (gemessen 21.09.: Titel bei y 0). */
body:not(.fp-active) .fp-section,
body:not(.fp-active) .flow-block { scroll-margin-top: 5.2rem; }

.section--hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

/* --- Hero (zentriert wie Original) --- */

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 1.4vw, 1.15rem);
  letter-spacing: 0.34em;
  color: #c89a3e;                  /* satter Goldton */
  font-weight: 600;
  /* dunkler Halo: der Wordmark sitzt über dem hellsten Hero-Punkt (Zentral-Glühen) →
     Gold allein hat dort zu wenig Kontrast. Der Schatten hebt die Buchstaben ab. */
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.6), 0 0 16px rgb(0 0 0 / 0.72);
  margin-bottom: 0.4rem;
}

.hero-title {
  max-width: 18ch;
  margin-bottom: 0.4em;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-wrap: balance;
  /* hebt die Headline klar vom hellen Monument-Glühen dahinter ab
     (besonders auf Mobile, wo der Würfel groß hinter dem Text steht) */
  text-shadow: 0 2px 18px rgb(0 0 0 / 0.55), 0 1px 3px rgb(0 0 0 / 0.5);
}

.hero-lead {
  max-width: 52ch;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  margin-bottom: 2rem;
}

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

.btn--explore {
  background: #f4f3ef;
  color: #131312;
  border-radius: 14px;
  gap: 0.5rem;
  font-weight: 500;
}
.btn--explore:hover { background: #fff; transform: translateY(-2px); }

/* --- Section-Heads --- */

.section-head--center { text-align: center; }
.section-head h2 { margin-bottom: 0; }

.showcase-inner { display: flex; flex-direction: column; gap: 1.4rem; }

/* --- Kontakt & Footer --- */

.section--kontakt { text-align: center; }
.kontakt-inner h2 { max-width: 22ch; margin-inline: auto; }
.kontakt-lead { color: var(--muted); max-width: 46ch; margin: 0 auto 2.4rem; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.2rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand { font-family: var(--font-display); letter-spacing: 0.14em; margin: 0; }
.footer-note { color: var(--muted); font-size: 0.85rem; margin: 0; }
.footer-links { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; font-size: 0.85rem; }
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.footer-links a:hover { color: var(--text); }
.footer-muted { color: rgb(154 151 143 / 0.55); }
.footer-links .footer-muted { display: inline-flex; align-items: center; min-height: 44px; }

/* =====================================================================
   FULLPAGE-MODUS (body.fp-active, von js/fullpage.js gesetzt)
   ===================================================================== */

body.fp-active {
  height: 100dvh;
  overflow: hidden;
}

body.fp-active .fp-stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--bg);
}

body.fp-active .fp-section {
  position: absolute;
  inset: 0;
  height: 100dvh;
  min-height: 0;
  padding: 0;
  overflow: visible;
}

/* Inhalts-Wrapper = interner Scroller (scrollableParent-Prinzip) */
body.fp-active .fp-clip {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  background: var(--bg);
}
body.fp-active .fp-clip::-webkit-scrollbar { display: none; }

body.fp-active .fp-content {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  /* safe center: passt der Inhalt, wird zentriert; ist er höher als der Slide,
     ankert er am oberen Padding statt nach oben unter den Header zu rutschen
     (verhindert den „Sprung" + das Anschneiden des Logos). */
  justify-content: safe center;
  padding: 5.2rem 0 3.4rem;
}

/* Rail-Safe-Zone: in Sektionen mit breitem Inhalt darf die zentrierte
   .container den fixen Rail-Streifen (links) nie erreichen. Symmetrischer
   Seitenabstand → bleibt mittig, beide Seiten frei. Nur wo die Rail sichtbar
   ist (>900px). */
@media (min-width: 901px) {
  body.fp-active .section--leistungen .container,
  body.fp-active .section--prozess .container,
  body.fp-active .section--kontakt .container {
    width: min(var(--container), 100% - 24rem);
  }
}

/* Leistungen: Fahrt in den Laptop (css/laptop.css). Der Block verankert oben; die klebende Bühne
   trägt die Höhe, der Abstand oben kommt aus .laptop__title. Seit 05.10.2026 auf jeder Breite (die
   Fahrt läuft auch am Handy, js/laptop.js); die statische Fassung trägt ihren Abstand selbst. */
body.fp-active .section--leistungen.flow-block { justify-content: flex-start; padding: 0; }

/* =====================================================================
   FLOW-GRUPPE (#weiter): Leistungen → Prozess → Kontakt als EIN nativer Scroll
   - Der gemeinsame .fp-content--flow ist KEIN zentrierter Slide-Inhalt mehr,
     sondern eine normale Fluss-Spalte; jeder .flow-block füllt eine Höhe und
     zentriert seinen eigenen Inhalt (Prozess/Kontakt weichen ab).
   ===================================================================== */
body.fp-active .fp-content--flow {
  display: block;
  padding: 0;
}
body.fp-active .flow-block {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  padding: 5.2rem 0 3.4rem;
}

/* Prozess-Block: Inhalt oben verankert + großzügig hohe Schritte → man
   scrollt wie auf einer normalen Website durch: Überschrift fährt oben raus,
   die Schritte kommen nacheinander hoch, die Gold-Linie füllt mit. */
body.fp-active .section--prozess.flow-block {
  justify-content: flex-start;
  padding-bottom: clamp(2.5rem, 6vh, 4.5rem);
}
/* Die Schritthoehen setzt jetzt css/pathline.css (.pathline__step), weil
   sie zugleich den Scrollweg der Fahrt vorgeben. */

/* Kontakt-Block: Inhalt mittig, Footer am unteren Rand */
body.fp-active .section--kontakt.flow-block { justify-content: flex-end; }

/* Leichter fester Verlauf statt einer Vollflächen-Maske auf dem Scroller.
   Das sieht identisch weich aus, erzeugt aber keinen dauerhaft maskierten
   Compositor-Layer über die komplette lange Flow-Sektion. */
body.fp-active .section--flow::after {
  content: '';
  position: absolute;
  z-index: 5;
  inset: 0 0 auto;
  height: 96px;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--bg), transparent);
}

/* Während Arbeiten ↔ Unterseiten gleitet kein eigener dunkler Verlauf an der
   bewegten Sektionskante mit. Genau dieser Verlauf wirkte rückwärts wie ein
   schwarzer Schlagschatten über dem Würfelboden. */
body.fp-active.fp-clean-showcase-transition .section--flow::after {
  opacity: 0;
}

/* Mobile: die hohen Prozess-Schritte (für den Desktop-Scroll-Reveal gedacht)
   erzeugen auf kleinen Screens riesige Leerflächen → deutlich kompakter. */
@media (max-width: 760px) {
  body.fp-active .flow-block { padding: 4.5rem 0 3rem; }
}

/* Atmosphärischer Licht-Schein hinter jedem Sektionsinhalt */
.fp-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 75% at 50% 108%, rgb(79 79 79 / 0.30), transparent 65%);
}
.section--hero .fp-glow {
  /* dezent — das Haupt-Licht kommt jetzt von .room-light am Horizont */
  background:
    radial-gradient(ellipse 80% 50% at 50% -16%, rgb(120 120 124 / 0.18), transparent 60%);
}
/* Flow-Gruppe: Glow am Viewport festheften, damit er auf jedem Screen der
   Gruppe sichtbar bleibt (statt mit dem internen Scroll wegzulaufen). */
body.fp-active .section--flow .fp-glow {
  position: sticky;
  top: 0;
  height: 100dvh;
  margin-bottom: -100dvh;
}

body.fp-active .section--kontakt .kontakt-inner { margin: auto 0; width: 100%; }
body.fp-active .site-footer { border-top: 1px solid var(--line); background: transparent; padding: 1.2rem 0 1rem; }
/* Desktop: die Bottom-Bar zeigt Copyright/Disclaimer → Footer-Texte aus.
   Mobile (<761px): Bottom-Bar ist ausgeblendet → Footer zeigt den Disclaimer. */
@media (min-width: 761px) {
  body.fp-active .footer-note, body.fp-active .footer-links { display: none; }
}
body.fp-active .footer-inner { justify-content: center; }

/* --- Hero: Video-Slots --- */

.hero-video-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.section--hero .fp-content { z-index: 2; }

/* --- Kompaktierung für 100dvh-Slides --- */

body.fp-active .section-head { margin-bottom: clamp(0.8rem, 2.5vh, 2rem); }
body.fp-active .section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }

@media (max-width: 900px) {
  body.fp-active .fp-content { padding: 4rem 0 2.6rem; }
  body.fp-active .project-panel__desc { display: none; }
  body.fp-active .showcase-inner { gap: 0.8rem; }
  body.fp-active .hero-lead { margin-bottom: 1.4rem; font-size: 0.92rem; }
  body.fp-active .hero-title { font-size: clamp(2rem, 9vw, 2.8rem); }
  /* Hero-Text leicht oberhalb der Mitte (unter dem Monument-Peak, ÜBER den
     Vordergrund-Würfeln) — nicht ganz nach oben, sonst liegt er auf dem Monument. */
  body.fp-active .section--hero .fp-content {
    justify-content: flex-start;
    padding-top: clamp(7rem, 30vh, 15rem);
  }
}

@media (max-height: 820px) {
  body.fp-active .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
  body.fp-active .card { padding: 1.2rem 1.3rem; }
  body.fp-active .card p { font-size: 0.88rem; }
  body.fp-active .hero-title { font-size: clamp(2.2rem, 5.6vw, 4rem); }
  body.fp-active .showcase-inner { gap: 0.8rem; }
}

/* --- Hero-Lead auf Touch-Geräten und schmalen Fenstern (Mobil-Check 04.10.2026) ---
   Die Zeilenenden lagen auf dem hellen Horizontband: gemessen 1,2–2,1 : 1 Kontrast in der
   schlechtesten 32-px-Spalte, „Steuerberatungen“ und „Auftritt,“ waren auf dem iPhone kaum zu
   lesen, die Bodenlinien liefen wie Durchstreichungen durch die Wörter. Dunkler Hof hinter
   dem Absatz, hellere Schrift, Zeile höchstens 84vw: schlechteste Spalte ≥ 5,0 : 1 bei
   320–1133 px (WebKit). Der Hof liegt hinter dem ganzen Textblock (.hero-inner), nicht am
   Absatz: GSAP setzt beim Einblenden ein transform auf den Absatz, das macht ihn zum eigenen
   Stapelkontext, und ein Hof darin lag über der unteren Titelzeile (gemessen 320 px:
   „gewinnen.“ mit 195 statt 236 Helligkeit). Desktop mit Maus bleibt wie abgenommen. */
@media (hover: none), (max-width: 900px) {
  .hero-inner { isolation: isolate; }
  .hero-inner::before {
    content: '';
    position: absolute;
    z-index: -1;
    left: 50%;
    top: 50%;
    width: min(150%, 860px);
    height: 135%;
    transform: translate(-50%, -50%);
    background: radial-gradient(closest-side, rgb(11 11 13 / 0.84), rgb(11 11 13 / 0.7) 60%, transparent);
    pointer-events: none;
  }
  .hero-lead {
    max-width: min(52ch, 84vw);
    color: rgb(236 233 226 / 0.86);
    text-shadow: 0 1px 2px rgb(0 0 0 / 0.6), 0 0 12px rgb(0 0 0 / 0.5);
  }
}

/* --- Niedrige Fenster: Handy quer, Fold quer (Höhe ≤ 500 px, Mobil-Check 04.10.2026) ---
   Ab 761 px Breite lief hier die Desktop-Fassung mit 342 px Höhe: Bottom-Bar über dem Hero-
   Text und dem Absenden-Knopf, „Arbeiten entdecken“ 46 px unter dem Bildrand, Laptop-Fahrt
   mit abgeschnittenen Texten. Jetzt: Kopfzeile wie am Handy, keine Bottom-Bar und keine
   Rail (der Footer zeigt Hinweis, Impressum und Datenschutz), Hero passt in die Höhe. Die
   Laptop-Fahrt lief hier bis 05.10. statisch, seitdem mit dem Panel neben dem Laptop (js/laptop.js). */
@media (max-height: 500px) {
  .site-header { grid-template-columns: auto 1fr; padding-block: 0.3rem; }
  .header-links, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .brand-mark { flex-direction: row; gap: 0.5rem; justify-self: start; min-height: 44px; }
  .brand-logo { width: 24px; height: 24px; }

  body.fp-active .side-rail,
  body.fp-active .bottom-bar { display: none; }
  body.fp-active .footer-note { display: block; }
  body.fp-active .footer-links { display: flex; }

  body.fp-active .fp-content { padding: 3.9rem 0 1rem; }
  body.fp-active .section--hero .fp-content { justify-content: safe center; padding-top: 3.9rem; }
  body.fp-active .hero-brand { margin-bottom: 0.2rem; font-size: 0.78rem; }
  body.fp-active .hero-title { font-size: clamp(1.6rem, 9dvh, 2.5rem); max-width: 30ch; margin-bottom: 0.35em; }
  body.fp-active .hero-lead { font-size: 0.88rem; line-height: 1.55; margin-bottom: 0.9rem; }
  body.fp-active .flow-block { padding: 3.9rem 0 1.5rem; }
}
