/* ==========================================================================
   Fribas Holding GmbH — Stylesheet
   Nuechtern, ohne Marketing-Gestus: Weiss/Grau mit dunkelblauem Akzent.
   Keine externen Fonts (System-Stack mit Inter-Fallback), kein Framework.

   Aufgebaut aus dem Stylesheet von doestat-website, aber deutlich kuerzer:
   Preistabellen, Vergleichstabelle, Formular und Screenshot-Raster gibt es
   auf einer Unternehmensseite nicht. Was hier steht, wird auch benutzt —
   ungenutzte Regeln waeren beim naechsten Umbau nur Rateaufwand.
   ========================================================================== */

:root {
  /* Eigene Farbe, nicht das Petrol von DoEStat: Holding und Produkt sollen
     verwandt aussehen, aber unterscheidbar bleiben. Kontrastwerte auf Weiss
     nachgerechnet — WCAG 2.1 AA verlangt 4,5:1 fuer Fliesstext.
       --accent        #23384a  12,1:1
       --accent-light  #3f6b85   5,7:1  (Eyebrow, Akzentkanten) */
  --accent: #23384a;
  --accent-hover: #1a2b39;
  --accent-light: #3f6b85;
  --accent-pale: #eaeff3;
  --text: #1f2933;
  --text-muted: #5b6770;
  --bg: #ffffff;
  --bg-alt: #f5f7f8;
  --border: #dfe4e8;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 35, 45, 0.08), 0 6px 20px rgba(15, 35, 45, 0.06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Fixe Header-Hoehe beim Anker-Sprung beruecksichtigen */
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; font-weight: 600; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

/* Impressum / Datenschutz: viele kurze Abschnitte, die h2-Groesse der
   Startseite wuerde den Text dominieren, den sie einleitet. */
.legal { max-width: 820px; }
.legal h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: 0; margin-top: 2em; }
.legal p { margin: 0 0 1em; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-ghost { color: var(--accent); border-color: var(--border); background: #fff; }
.btn-ghost:hover { border-color: var(--accent); }

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

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

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

/* Wortmarke statt Bildmarke: ein Logo gibt es noch nicht, und ein
   Platzhalter-Quadrat sieht schlechter aus als der gesetzte Name.
   Der Kasten mit dem F traegt die Rolle des Signets, bis eines da ist. */
.brand-mark {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
}

.brand-name { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand-suffix { font-weight: 400; color: var(--text-muted); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  /* Nav + Sprachumschalter rechtsbuendig gruppieren */
  margin-left: auto;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
/* Bewusst .bar und nicht `.nav-toggle span`: im Knopf steht auch die
   sr-only-Beschriftung, und die duerfen die Balkenregeln nicht treffen. */
.nav-toggle .bar {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

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

.hero {
  padding: 84px 0 72px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.hero-inner { max-width: 42em; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-light);
  margin: 0 0 14px;
}

.hero-sub {
  font-size: 1.12rem;
  color: var(--text-muted);
  margin: 18px 0 28px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ------------------------------- Sections -------------------------------- */

.section { padding: 76px 0; }
.section-alt { background: var(--bg-alt); }

.section-lead {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 44em;
  margin: 0 0 40px;
}

.prose { max-width: 44em; }
.prose p { color: var(--text-muted); margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }

/* --------------------------- Taetigkeitsfelder ---------------------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
}

.feature-card h3 { margin-bottom: 10px; }
.feature-card p { color: var(--text-muted); font-size: 0.94rem; margin: 0; }

/* --------------------------- Geschaeftsfuehrung ---------------------------- */
/* Foto links, Text rechts. Der Abschnitt bleibt weiss und bekommt nur eine
   Haarlinie nach oben: mit `section-alt` haetten „Unternehmen" und
   „Beteiligungen" ihre Hintergruende tauschen muessen, und die Kontaktkarte
   weiter unten lebt davon, dass ihr Abschnitt weiss ist. */

#geschaeftsfuehrung { border-top: 1px solid var(--border); }

.leadership-grid {
  display: grid;
  /* Feste Spaltenbreite, kein Bruchteil: dieselbe 380px stehen als `sizes`
     am <img>. Wird hier etwas geaendert, gehoert das dort nachgezogen,
     sonst laedt der Browser die falsche Aufloesung. */
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.leadership-figure { margin: 0; }

.leadership-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.leadership-figure figcaption {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-top: 14px;
}

/* Die Namen sollen aus dem grauen Fliesstext heraustreten — sonst liest man
   ueber die einzige Angabe hinweg, wegen der der Abschnitt existiert. */
.leadership-figure figcaption strong,
.leadership-grid .prose strong { color: var(--text); font-weight: 600; }

/* ------------------------- Beteiligungen / Gruppe -------------------------- */
/* Eine Liste, kein Raster: Beteiligungen kommen einzeln dazu, und eine
   halbleere Kartenreihe sieht nach fehlendem Inhalt aus. */

.holding-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 60em;
}

.holding-list li {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-light);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 14px;
}

.holding-list h3 { margin: 0 0 6px; }
.holding-list p { color: var(--text-muted); font-size: 0.95rem; margin: 0 0 10px; }
.holding-list p:last-child { margin-bottom: 0; }

.holding-role {
  display: inline-block;
  background: var(--accent-pale);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 12px;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.contact-grid p { color: var(--text-muted); }

.contact-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.contact-card p { margin: 0 0 12px; }
.contact-card p:last-child { margin-bottom: 0; }
.contact-note { font-size: 0.88rem; color: var(--text-muted); }

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

.site-footer {
  background: #16242c;
  color: #b8c4cc;
  padding: 48px 0 28px;
  font-size: 0.92rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-brand .brand-name { color: #fff; }
.footer-brand p { margin: 8px 0 0; max-width: 30em; }

.footer-brand-head {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-nav {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.footer-nav a { color: #b8c4cc; text-decoration: none; }
.footer-nav a:hover { color: #fff; }

.footer-legal {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  color: #8a99a3;
}

.footer-legal a { color: #b8c4cc; }

/* ---------------------------- Sprache (DE/EN) ------------------------------ */
/* Jede Sprache hat eine eigene URL (/ und /en/), erzeugt von tools/build.py —
   es gibt nichts umzuschalten. Die beiden Regeln bleiben als Fangnetz: sollte
   der Generator einen fremdsprachigen Block uebersehen, faellt er nicht in den
   Text, sondern verschwindet. Sichtbar wird der Fehler trotzdem, weil
   build.py in diesem Fall abbricht. */

/* Die eine erlaubte Ausnahme ist der Hinweis auf die andere Sprachfassung:
   sein Text IST fremdsprachig und soll es sein (siehe lang_hint() in
   tools/build.py). Er meldet sich mit [data-lang-hint] ab; alles andere
   faengt die Regel weiter. */
html[lang="de"] [lang="en"]:not([data-lang-hint]) { display: none !important; }
html[lang="en"] [lang="de"]:not([data-lang-hint]) { display: none !important; }

/* ------------------- Hinweis auf die andere Sprachfassung ------------------ */
/* Ersetzt die fruehere automatische Weiterleitung. Steht zwischen Kopf und
   Inhalt und ist per `hidden` aus — main.js blendet ihn nur beim Erstbesuch
   ein, wenn der Browser die andere Sprache bevorzugt. */

.lang-hint {
  background: var(--accent-pale);
  border-bottom: 1px solid var(--border);
}

/* `hidden` ist nur eine Autoren-Voreinstellung und verliert gegen jede
   display-Regel — hier steht zwar keine auf .lang-hint selbst, aber die
   Zeile kostet nichts und haelt den Streifen aus dem Weg, falls spaeter
   eine dazukommt. */
.lang-hint[hidden] { display: none; }

.lang-hint-inner {
  display: flex;
  align-items: center;
  gap: 8px 18px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}

.lang-hint p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--accent);
}

.lang-hint-btn { font-size: 0.92rem; font-weight: 600; }

.lang-hint-close {
  margin-left: auto;
  padding: 4px 8px;
  background: none;
  border: 0;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.lang-hint-close:hover { color: var(--text); }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.lang-btn {
  border: 0;
  background: transparent;
  padding: 6px 11px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  line-height: normal;
  cursor: pointer;
}

.lang-btn:hover { color: var(--accent); }

/* Die aktive Sprache ist ein Link auf die eigene Seite; aria-current sagt
   das den Screenreadern, die Einfaerbung dem Auge. */
.lang-btn[aria-current="page"] {
  background: var(--accent);
  color: #fff;
  cursor: default;
}

/* ------------------------- Tastaturbedienung ------------------------------- */

:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.15s ease-in;
}

.skip-link:focus { top: 0; color: #fff; }

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

@media (max-width: 960px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }

  /* Gestapelt bleibt das Bild bei denselben 380px — sonst waere die Angabe
     in `sizes` falsch, und ein Hochformat ueber die volle Breite schoebe
     den Text unter die Falz. */
  .leadership-grid { grid-template-columns: 1fr; gap: 30px; }
  .leadership-figure { max-width: 380px; }
}

/* Bewusst auf #site-nav gemuenzt: Impressum und Datenschutz haben nur den
   Zurueck-Link und keinen Toggle-Button, ihre Navigation darf nie einklappen. */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  #site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px;
    box-shadow: var(--shadow);
  }

  #site-nav.open { display: flex; }

  #site-nav a { padding: 12px 4px; font-size: 1.05rem; }

  .feature-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .hero { padding: 56px 0 48px; }
}
