/* Black & Gold Plattform – die Pyramide der Startseite, Meine Post und die Firmen der Holding (bg/001, bg/007, bg/008). Janik 26.10.2026:
   „stell dir eine dreieck vor Oben BG …“, 04.11.2026: dazu Nexus und Marketing – oben Black & Gold, darunter GMS, Members, Nexus und
   Marketing, verbunden durch feine goldene Linien (js/views/start.js zeichnet sie nach dem Layout). Jedes Logo steht in seinen
   Firmenfarben auf einer Fläche der Firma (bg/006: GMS Weiß, Members Elfenbein, die Holding und Marketing Creme; bg/007: Nexus mit YOSAI
   auf dem Schwarz der Nexus-Webseite), auch im Dunkelmodus. Farben und Schriften aus app.css und bg.css; keine Inline-Stile. */

:root {
  --firma-gold: var(--gold, #b19045);
  --firma-creme: #f4eedf;
}

/* Pyramide: die Hauptsache der Startseite (bg/007, Janik 04.11.2026: „Darunter wie jetzt auch Bereich GMS Plattform Members Plattform dann
   kommt Nexus Plattform und Marketing Plattform dazu“) – oben Black & Gold, darunter eine Reihe; ab 1100 px vier nebeneinander, darunter
   zwei, ganz schmal eine ------------------------------------------------------------------------------------------------------------- */
.dreieck {
  --spalt: clamp(16px, 2.2vw, 30px);
  position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--spalt); row-gap: clamp(26px, 3vw, 40px); max-width: 1180px; margin: 10px auto 40px;
}
.dreieck.reihe-1 { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
@media (min-width: 1100px) {
  .dreieck.reihe-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dreieck.reihe-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.dreieck-linien { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 2; }
.dreieck-linien line { stroke: var(--firma-gold); stroke-width: 1.75; stroke-linecap: round; }
.dreieck-linien circle { fill: var(--firma-gold); }
/* Auf eine Firma zeigen: ihre Linie zur Holding tritt hervor, die anderen zurück (js/views/start.js) */
.dreieck-linien > * { transition: opacity 0.22s ease, stroke-width 0.22s ease; }
.dreieck.hat-hervor .dreieck-linien > :not(.hervor) { opacity: 0.25; }
.dreieck.hat-hervor .dreieck-linien line.hervor { stroke-width: 2.4; }
/* Goldschimmer auf dem Schild der Holding (css/bewegung.css, nur auf der Form des Schilds): warmes Licht wie Blattgold. Die Fläche
   bleibt in hell und dunkel creme, darum eine Farbe für beide */
.dreieck .platz-oben .firma-logo { --bw-schimmer: rgba(255, 224, 150, 0.78); }
.dreieck > .dreieck-kachel { margin: 0; }            /* „.karte + .karte“ (app.css) gäbe sonst Abstand nach oben */
.dreieck-kachel { position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 12px 12px 18px; }
/* oben die Holding über der ganzen Reihe, breiter als eine Kachel darunter; ein feiner Goldrand zeichnet sie aus. Der Abstand nach
   unten gibt den Linien Platz */
.dreieck-kachel.platz-oben {
  grid-column: 1 / -1; justify-self: center; width: min(470px, 100%); margin-bottom: clamp(18px, 3vw, 40px);
  outline: 1px solid rgba(177, 144, 69, 0.55); outline-offset: -1px;
}
.dreieck-text { display: flex; flex-direction: column; gap: 6px; padding: 0 8px; flex: 1; }
.dreieck-fuss { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 0 8px; }
.dreieck .firma-name { font-size: 25px; }
.dreieck .platz-oben .firma-name { font-size: 29px; }
.dreieck .firma-beschreibung { font-size: 13.5px; }

/* Meine Post (bg/008): über der Pyramide, nur die eigenen Adressen ------------------------------------------------------------------- */
.meine-post { max-width: 1180px; margin: 6px auto 26px; display: flex; flex-direction: column; gap: 14px; }
.meine-post .mp-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.meine-post .mp-kopf h3 { margin: 0; font-family: var(--schrift-titel, "Cormorant Garamond", Georgia, serif); font-size: 26px; font-weight: 600; }
.meine-post .mp-kopf h3 a { color: inherit; text-decoration: none; }
.mp-schloss { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.mp-text { margin: 0; font-size: 14px; color: var(--text-2); line-height: 1.45; }
.mp-adressen { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-adresse {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--linie); color: inherit; text-decoration: none; background: var(--hg-2);
}
.mp-adresse:hover { border-color: var(--firma-gold); }
.mp-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.mp-name b { font-size: 13.5px; }
.mp-mail { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-liste { margin: 0; }
.mp-liste .zeile.ungelesen .haupt b { font-weight: 700; }
.mp-zeit { flex: none; font-size: 12.5px; color: var(--text-2); }
.mp-fuss { display: flex; justify-content: flex-end; }
.meine-post.mp-ohne { gap: 10px; }
.meine-post-leer .mitte { justify-content: center; }

/* Firma: Logo auf der Fläche der Firma, Name, Beschreibung (Dreieck und Holding) ------------------------------------------------------ */
.firma-logo {
  position: relative; flex: none; aspect-ratio: 7 / 2; overflow: hidden; border-radius: max(6px, calc(var(--radius) - 6px));
  background: var(--firma-flaeche, var(--firma-creme)); box-shadow: inset 0 0 0 1px rgba(26, 23, 20, 0.06);
}
/* Seitenverhältnis fest; das Bild passt sich ein. Hoch (Schild) füllt die Höhe, breit (GMS, Members) bleibt niedriger – wirkt gleich groß */
.firma-logo img { position: absolute; left: 12%; top: 12%; width: 76%; height: 76%; object-fit: contain; opacity: 0; transition: opacity 0.25s; }
.firma-logo.hoch img, .firma-logo.breit img { opacity: 1; }
.firma-logo.breit img { top: 19%; height: 62%; }
.firma-name {
  margin: 0; font-family: var(--schrift-titel, "Cormorant Garamond", Georgia, serif); font-size: 26px; font-weight: 600; line-height: 1.1;
  letter-spacing: -0.01em; color: var(--text); overflow-wrap: anywhere;
}
.firma-beschreibung { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--text-2); }
.firma-hinweis { font-size: 12.5px; line-height: 1.35; color: var(--orange-text); }

/* Holding: die Firmen im Einzelnen ---------------------------------------------------------------------------------------------------- */
.firmen-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: stretch; }
.firmen-raster > .karte { margin: 0; }
.firma-karte { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 12px 12px 16px; }
.firma-karte > .firma-text, .firma-karte > .daten-liste, .firma-karte > .firma-aktionen { padding: 0 8px; }
.firma-karte .firma-text { display: flex; flex-direction: column; gap: 6px; }
.firma-karte .firma-name { font-size: 24px; }
.firma-karte .daten-liste { font-size: 13px; gap: 6px 14px; }
.firma-karte .daten-liste .pille { vertical-align: middle; }
.firma-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; }
.firma-karte.aus .firma-logo { filter: grayscale(1); opacity: 0.6; }

/* Handy: Black & Gold oben, darunter je zwei nebeneinander; ganz schmal untereinander -------------------------------------------------- */
@media (max-width: 760px) {
  .dreieck { --spalt: 14px; row-gap: 22px; margin: 4px 0 26px; }
  .dreieck-kachel { gap: 10px; padding: 8px 8px 12px; }
  .dreieck-kachel.platz-oben { width: 76%; margin-bottom: 14px; }
  .dreieck-text, .dreieck-fuss { padding: 0 4px; }
  .dreieck .firma-logo { aspect-ratio: 2 / 1; }
  .dreieck .firma-logo img { left: 8%; width: 84%; }
  .dreieck .firma-name, .dreieck .platz-oben .firma-name { font-size: 20px; }
  .dreieck .firma-beschreibung { font-size: 13px; }
  .dreieck-fuss .knopf { width: 100%; }
  .firma-karte .daten-liste { font-size: 14px; }
  .meine-post { margin: 2px 0 20px; }
  .meine-post .mp-kopf h3 { font-size: 22px; }
  .mp-adresse { border-radius: 14px; }
  .mp-liste .zeile .mp-zeit { font-size: 11.5px; }
}
@media (max-width: 359px) {
  .dreieck { grid-template-columns: minmax(0, 1fr); row-gap: 22px; }
  .dreieck-kachel.platz-oben { width: 100%; }
}

/* Schloss für Meine Post (bg/009): Code eingeben, QR-Code, Wiederherstellungscodes */
.schloss-karte { display: grid; gap: 14px; justify-items: center; text-align: center; padding-top: 32px; }
.schloss-karte .feld-gruppe { display: grid; gap: 6px; width: min(100%, 280px); text-align: left; }
.schloss-karte .feld-label { font-size: 13px; color: var(--text-2); }
/* Eingabe mit Animation (css/code_eingabe.css): Überschrift und Text stehen zwischen Siegel und Kästchen */
.schloss-karte .code-eingabe { gap: 10px; }
.schloss-karte .schloss-titel { color: var(--text); font-size: 15px; font-weight: 600; margin-top: 4px; }
.schloss-karte .schloss-unter { color: var(--text-2); font-size: 13.5px; max-width: 360px; margin-bottom: 6px; }
.schloss-karte .schloss-wieder { width: min(100%, 280px); font-variant-numeric: tabular-nums; letter-spacing: .08em; text-align: center; font-size: 18px; min-height: 48px; }
.blatt .feld-gruppe .code-eingabe { align-items: flex-start; }
.blatt .feld-gruppe .code-kaesten { justify-content: flex-start; }
.link-knopf { background: none; border: 0; padding: 10px 4px; min-height: 44px; color: var(--akzent); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-knopf:focus-visible { outline: none; box-shadow: var(--fokus); border-radius: 8px; }
img.qr { display: block; margin: 0 auto; border-radius: 12px; background: #fff; padding: 6px; }
.schloss-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; margin: 0; padding-left: 22px; font-size: 16px; }
.schloss-codes code { font-variant-numeric: tabular-nums; letter-spacing: .06em; }

/* Notfall-Zugang (bg/011): PIN groß und gut abschreibbar, Karten für die Vertrauensperson, Druckblatt für den Tresor */
.notfall-pin { font-family: var(--mono); font-size: clamp(17px, 4.6vw, 24px); font-weight: 600; letter-spacing: .08em; text-align: center;
  padding: 18px 12px; border-radius: var(--radius); border: 1px dashed var(--akzent); background: var(--akzent-hg); color: var(--text);
  overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; }
.notfall-schritte { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 14px; color: var(--text-2); }
.notfall-schritte b { color: var(--text); }
.notfall-eingabe { font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; text-align: center; min-height: 48px; }
.notfall-karten { display: grid; gap: 10px; margin-top: 16px; }
.notfall-karte { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.notfall-karte > .ic { color: var(--akzent); flex: none; }
.notfall-karte .nk-text { display: grid; gap: 2px; flex: 1 1 220px; min-width: 0; }
.notfall-karte .nk-text span { font-size: 13px; color: var(--text-2); }
.notfall-druck { display: none; }
.mp-kopf:has(.mp-notfall) { flex-wrap: wrap; }
.mp-notfall { flex-basis: 100%; margin: 8px 0 0; color: inherit; text-decoration: none; }
@media print {
  body > *:not(.notfall-druck) { display: none !important; }
  .notfall-druck { display: block; color: #000; background: #fff; font: 12pt/1.45 Georgia, "Times New Roman", serif; padding: 0; }
  .notfall-druck .nd-kopf { display: flex; justify-content: space-between; border-bottom: 1.5pt solid #000; padding-bottom: 6pt; font-size: 14pt; }
  .notfall-druck .nd-vertraulich { font-weight: 700; letter-spacing: .04em; margin: 12pt 0; }
  .notfall-druck table { border-collapse: collapse; margin: 6pt 0 16pt; }
  .notfall-druck th { text-align: left; font-weight: 400; padding: 3pt 18pt 3pt 0; color: #444; }
  .notfall-druck .nd-pin { font: 700 22pt/1.3 "Courier New", monospace; letter-spacing: .1em; text-align: center; border: 2pt solid #000;
    padding: 16pt 8pt; margin: 8pt 0 20pt; }
  .notfall-druck h2 { font-size: 13pt; margin: 0 0 6pt; }
  .notfall-druck ol { margin: 0 0 16pt; padding-left: 18pt; }
  .notfall-druck .nd-fuss { font-size: 10pt; color: #444; border-top: 0.75pt solid #999; padding-top: 6pt; }
}
/* Desktop-App (js/desktop_app.js, wie die GMS Plattform 04.11.2026): im Hinweis der Startseite stehen beide Knöpfe zusammen rechts */
.desktop-knoepfe { margin-left: auto; flex: none; }
.hinweis .desktop-knoepfe .knopf { margin-left: 0; }
@media (max-width: 1100px) { .desktop-hinweis .hinweis { flex-wrap: wrap; } }