/* FormanceGroup – Holding-Website. Farben und Schriften wie formance-group-os/docs/DESIGN.md */
@font-face { font-family: "Wix Madefor Display"; src: url("schriften/wix-madefor-display.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("schriften/JetBrainsMono-Variable.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  color-scheme: dark;
  --grund: #0C0C0D;
  --flaeche: #151516;
  --linie: rgba(237, 237, 237, 0.08);
  --linie-stark: rgba(237, 237, 237, 0.15);
  --gleis: rgba(237, 237, 237, 0.28);
  --text: #F2F2EF;
  --text-2: #ABABB0;
  --text-3: #7C7C83;
  --group: #E8E8E4;
  --social: #F8CF4B;
  --sales: #C5F03C;
  --scale: #FF8A2B;
  --schrift: "Wix Madefor Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--grund); }
body {
  min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--schrift); font-size: 16px; line-height: 24px; color: var(--text);
  background: radial-gradient(900px 480px at 50% 0%, rgba(232, 232, 228, 0.07), transparent 70%), var(--grund);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(rgba(237, 237, 237, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(237, 237, 237, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(var(--raster) calc(var(--raster) * 0.64) at 50% 40%, #000 10%, transparent 75%);
          mask-image: radial-gradient(var(--raster) calc(var(--raster) * 0.64) at 50% 40%, #000 10%, transparent 75%);
  animation: raster 2.2s var(--ease) both;
}
body > * { position: relative; z-index: 1; }
a { color: inherit; }
:focus-visible { outline: 2px solid rgba(232, 232, 228, 0.5); outline-offset: 4px; border-radius: 4px; }
img { display: block; }

main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 96px 32px 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* ---- Dachmarke ---- */
@property --raster { syntax: "<length>"; inherits: true; initial-value: 1000px; }
.lockup { --hz: 60px; --hw: 42px; display: flex; align-items: center; gap: 14px; }
.zeichen-box { position: relative; display: block; height: var(--hz); aspect-ratio: 452 / 343; }
.zeichen-box .band { position: absolute; inset: 0; width: 100%; height: 100%; }
.lockup .wort { display: flex; align-items: center; gap: 8px; }
.wort-bild { position: relative; display: block; height: var(--hw); aspect-ratio: 564 / 114; }
.wort-bild img { width: 100%; height: 100%; }
.lockup .group { font-family: var(--mono); font-size: 15px; font-weight: 600; letter-spacing: 0.32em; margin-right: -0.32em; color: var(--text-2); transform: translateY(2px); transform-origin: left center; }
.glanz { position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.95) 50%, transparent 62%) no-repeat;
  background-size: 300% 100%; background-position: 150% 0;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
.glanz-zeichen { -webkit-mask-image: url("marke/formance-group-zeichen.png"); mask-image: url("marke/formance-group-zeichen.png"); }
.glanz-wort { -webkit-mask-image: url("marke/formance-group-wortmarke.png"); mask-image: url("marke/formance-group-wortmarke.png"); }
h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.satz { margin-top: 20px; max-width: 560px; text-align: center; font-size: 15px; line-height: 24px; color: var(--text-2); }

/* ---- Gleisplan ---- */
.gleis { position: relative; z-index: 2; width: 100%; max-width: 1080px; margin-top: 36px; }
.gleis svg { display: block; width: 100%; height: auto; overflow: visible; }

/* ---- Marken ---- */
.marken { position: relative; z-index: 1; width: 100%; max-width: 1080px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; list-style: none; }
.marke {
  --mk: var(--group);
  position: relative; overflow: hidden; height: 100%;
  display: flex; flex-direction: column; padding: 22px 24px 18px;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 18px;
  text-decoration: none; color: var(--text);
}
.marke::after {
  content: ""; position: absolute; right: -110px; bottom: -150px; width: 280px; height: 280px; border-radius: 50%;
  background: var(--mk); opacity: 0.085; filter: blur(32px); pointer-events: none; transition: opacity 200ms var(--ease);
}
.marke > * { position: relative; z-index: 1; }
.marke::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 250ms var(--ease);
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--mk) 16%, transparent), transparent 70%);
}
.marke:hover::before { opacity: 1; }
.marken > li { perspective: 1100px; }
.marke { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; transition: border-color 150ms var(--ease), transform 400ms var(--ease); }
.marke.zieht { transition: border-color 150ms var(--ease), transform 80ms linear; }
.marke:hover { border-color: color-mix(in srgb, var(--mk) 45%, transparent); }
.marke:hover::after { opacity: 0.13; }
.marke.social { --mk: var(--social); }
.marke.sales { --mk: var(--sales); }
.marke.scale { --mk: var(--scale); }

.ueber { font-family: var(--mono); font-size: 10.5px; line-height: 16px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.ueber .nr { color: var(--mk); margin-right: 10px; }
.marken-lockup { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.marken-lockup .zeichen-box { height: 34px; flex: none; }
.marken-lockup .wort-bild { height: 22px; aspect-ratio: auto; min-width: 0; }
.marken-lockup .wort-bild img { width: auto; height: 100%; }
.marke.social .zeichen-box .glanz { -webkit-mask-image: url("marke/socialformance-zeichen.png"); mask-image: url("marke/socialformance-zeichen.png"); }
.marke.sales .zeichen-box .glanz { -webkit-mask-image: url("marke/salesformance-zeichen.png"); mask-image: url("marke/salesformance-zeichen.png"); }
.marke.scale .zeichen-box .glanz { -webkit-mask-image: url("marke/scaleformance-zeichen.png"); mask-image: url("marke/scaleformance-zeichen.png"); }
.marke.social .wort-bild .glanz { -webkit-mask-image: url("marke/socialformance-wortmarke.png"); mask-image: url("marke/socialformance-wortmarke.png"); }
.marke.sales .wort-bild .glanz { -webkit-mask-image: url("marke/salesformance-wortmarke.png"); mask-image: url("marke/salesformance-wortmarke.png"); }
.marke.scale .wort-bild .glanz { -webkit-mask-image: url("marke/scaleformance-wortmarke.png"); mask-image: url("marke/scaleformance-wortmarke.png"); }
.leistungen { list-style: none; margin-top: 18px; display: grid; gap: 6px; }
.leistungen li { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 22px; color: var(--text-2); }
.leistungen li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--mk); flex: none; }
.ziel {
  margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--linie);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-family: var(--mono); font-size: 12px; line-height: 20px; color: var(--text-2);
}
.ziel svg { width: 15px; height: 15px; fill: none; stroke: var(--mk); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 150ms var(--ease); }
.marke:hover .ziel { color: var(--text); }
.marke:hover .ziel svg { transform: translate(2px, -2px); }

/* ---- Fuß ---- */
footer { width: 100%; max-width: 1240px; margin: 0 auto; padding: 20px 32px 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); border-top: 1px solid var(--linie); }
footer nav { display: flex; gap: 24px; }
footer a { color: var(--text-2); text-decoration: none; }
footer a:hover { color: var(--text); }

/* ---- Rechtstexte ---- */
.recht { width: 100%; max-width: 720px; align-items: stretch; padding-top: 72px; }
.recht .zurueck, .karriere .zurueck { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; margin-bottom: 56px; }
.recht .zurueck img.zeichen, .karriere .zurueck img.zeichen { height: 30px; }
.recht .zurueck img.wort, .karriere .zurueck img.wort { height: 22px; }
.recht .zurueck span, .karriere .zurueck span { font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: 0.32em; color: var(--text-2); }
.recht h1 { position: static; width: auto; height: auto; overflow: visible; clip: auto; font-size: 32px; line-height: 40px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 32px; }
.recht h2 { font-size: 18px; line-height: 26px; font-weight: 700; margin: 32px 0 8px; }
.recht p, .recht li { color: var(--text-2); margin-bottom: 12px; }
.recht ul { padding-left: 20px; }
.offen { color: var(--scale); font-family: var(--mono); font-size: 14px; }


/* ---- Karriere ---- */
.karriere { width: 100%; max-width: 880px; align-items: stretch; justify-content: flex-start; padding-top: 72px; }
.karriere-kopf { position: relative; opacity: 0; animation: hoch 0.9s var(--ease) 0.1s both; }
.karriere h1 { position: static; width: auto; height: auto; overflow: visible; clip: auto; margin-top: 12px; font-size: 40px; line-height: 46px; font-weight: 700; letter-spacing: -0.025em; }
.satz-links { margin-top: 14px; max-width: 520px; font-size: 16px; line-height: 25px; color: var(--text-2); }
.marken-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.marken-chips li { --mk: var(--group); display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px 0 12px; border: 1px solid var(--linie-stark); border-radius: 999px; font-size: 13px; color: var(--text-2); }
.marken-chips li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--mk); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mk) 18%, transparent); }
.marken-chips .social { --mk: var(--social); } .marken-chips .sales { --mk: var(--sales); } .marken-chips .scale { --mk: var(--scale); }

.stellen { position: relative; overflow: hidden; margin-top: 48px; border: 1px solid var(--linie); border-radius: 20px; background: var(--flaeche);
  opacity: 0; animation: karte 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both; }
.stellen::after { content: ""; position: absolute; right: -140px; top: -180px; width: 360px; height: 360px; border-radius: 50%; background: var(--group); opacity: 0.06; filter: blur(36px); pointer-events: none; }
.stellen-kopf { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--linie); }
.stellen .ueber { color: var(--text-3); }
.zaehler { font-family: var(--mono); font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.leer { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 20px; padding: 36px 24px 40px; }
.halt-leer { position: relative; display: flex; flex-direction: column; align-items: center; padding-top: 4px; }
.halt-leer .ring { position: relative; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--text-2); }
.halt-leer .ring::after { content: ""; position: absolute; inset: -1.5px; border-radius: 50%; border: 1.5px solid var(--text-2); animation: sonar 3s ease-out 1.2s 2; opacity: 0; }
.halt-leer .gleis-punkte { flex: 1; width: 0; min-height: 64px; margin-top: 8px; border-left: 1.5px dotted rgba(237, 237, 237, 0.22); }
.leer h2 { font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -0.01em; }
.leer p { margin-top: 8px; max-width: 460px; color: var(--text-2); }
.knopf { display: inline-flex; align-items: center; height: 40px; margin-top: 22px; padding: 0 20px; border-radius: 999px; background: var(--group); color: var(--grund); font-weight: 600; font-size: 14px; text-decoration: none; transition: background-color 150ms var(--ease); }
.knopf:hover { background: #FFFFFF; }
@keyframes sonar { 0% { opacity: 0.8; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }
@media (max-width: 640px) {
  .karriere { padding-top: 48px; }
  .karriere h1 { font-size: 30px; line-height: 36px; }
  .stellen { margin-top: 36px; }
  .leer { gap: 14px; padding: 28px 18px 32px; }
  .stellen-kopf { padding: 14px 18px; }
}

/* ---- Tablet und Handy ---- */
@media (max-width: 1180px) {
  main { padding: 88px 24px 72px; }
  .marken { grid-template-columns: 1fr; max-width: 420px; gap: 16px; }
  .gleis { display: none; }
  .satz { margin-bottom: 48px; }
}
@media (max-width: 640px) {
  main { padding: 64px 16px 56px; }
  .lockup { --hz: 44px; --hw: 31px; gap: 10px; }
  .lockup .wort { gap: 6px; }
  .lockup .group { font-size: 11px; }
  .satz { margin-top: 16px; margin-bottom: 36px; }
  footer { padding: 20px 16px 28px; }
}

/* ---- Aufbau beim Öffnen (Zeitachse in Sekunden) ----
   0,0 Raster öffnet sich · 0,15 S-Bänder rasten ein · 0,7 „formance“ zieht auf · 1,0 GROUP
   1,35 Lichtreflex · 1,5 Satz · 1,7 Stamm · 2,0 Äste · 2,4 Haltepunkte + Karten · 3,0 Signal-Schleife */
.lockup .band.weiss { animation: band-weiss 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both; }
.lockup .band.grau { animation: band-grau 1s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both; }
.lockup .wort-bild img { animation: aufziehen 0.9s cubic-bezier(0.65, 0, 0.35, 1) 0.7s both; }
.lockup .group { animation: sperren 1.1s var(--ease) 1s both; }
.lockup .glanz { animation: glanz 1.1s cubic-bezier(0.4, 0, 0.2, 1) 1.35s both; }
.lockup .glanz-wort { animation-delay: 1.5s; }
.satz { animation: hoch 0.9s var(--ease) 1.5s both; }

.gleis .bahn { stroke-dasharray: 1; stroke-dashoffset: 1; animation: zeichnen 0.45s cubic-bezier(0.5, 0, 0.75, 0) 1.7s forwards; }
.gleis .bahn.mitte { animation: zeichnen 0.5s cubic-bezier(0.25, 1, 0.5, 1) 2.1s forwards; }
.gleis .bahn.seite { animation: zeichnen 0.75s cubic-bezier(0.25, 1, 0.5, 1) 2.05s forwards; }
.gleis .weiche, .gleis .halt { opacity: 0; transform-box: fill-box; transform-origin: center; animation: auftauchen 0.6s cubic-bezier(0.34, 1.7, 0.64, 1) forwards; }
.gleis .weiche { animation-delay: 2.05s; }
.gleis .halt { animation-delay: 2.65s; }
.gleis .hof { opacity: 0; transform-box: fill-box; transform-origin: center; }

.marken > li { opacity: 0; animation: karte 1.1s cubic-bezier(0.16, 1, 0.3, 1) 2.45s both; }
.marken > li:nth-child(2) { animation-delay: 2.35s; }

@keyframes raster { from { --raster: 0px; opacity: 0; } to { --raster: 1000px; opacity: 1; } }
@keyframes band-weiss { from { opacity: 0; transform: translate(-46%, -38%); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes band-grau { from { opacity: 0; transform: translate(46%, 38%); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes aufziehen { from { clip-path: inset(0 100% 0 0); opacity: 0.2; transform: translateX(-10px); } to { clip-path: inset(0 0 0 0); opacity: 1; transform: none; } }
@keyframes sperren { from { opacity: 0; transform: translate(14px, 2px) scaleX(1.7); filter: blur(6px); } to { opacity: 1; transform: translateY(2px); filter: blur(0); } }
@keyframes glanz { 0% { opacity: 1; background-position: 150% 0; } 85% { opacity: 1; } 100% { opacity: 0; background-position: -50% 0; } }
@keyframes zeichnen { to { stroke-dashoffset: 0; } }
@keyframes auftauchen { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes hoch { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes karte { from { opacity: 0; transform: translateY(40px) rotateX(24deg) scale(0.94); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }
/* Signale: weiß bis zur Weiche (12 %), farbig bis zur Marke (50 %) */
@keyframes ankunft { 0% { opacity: 0; transform: scale(0.6); } 10% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(3); } }
@keyframes kartenpuls { 0% { opacity: 0.085; } 25% { opacity: 0.2; } 100% { opacity: 0.085; } }


/* Karten-Logos bauen sich auf wie das Hauptlogo (nach dem Einfliegen der Karte) */
.marken-lockup .band.weiss { animation: band-weiss 0.9s cubic-bezier(0.16, 1, 0.3, 1) var(--t) both; }
.marken-lockup .band.farbe { animation: band-grau 0.9s cubic-bezier(0.16, 1, 0.3, 1) calc(var(--t) + 0.1s) both; }
.marken-lockup .wort-bild img { animation: aufziehen 0.8s cubic-bezier(0.65, 0, 0.35, 1) calc(var(--t) + 0.45s) both; }
.marken-lockup .zeichen-box .glanz { animation: glanz 1s cubic-bezier(0.4, 0, 0.2, 1) calc(var(--t) + 0.95s) both; }
.marken-lockup .wort-bild .glanz { animation: glanz 1.1s cubic-bezier(0.4, 0, 0.2, 1) calc(var(--t) + 1.1s) both; }
.marken > li { --t: 2.9s; }
.marken > li:nth-child(2) { --t: 2.75s; }

/* Lichtstrom: nur auf Abruf aus signale.js (Klasse .an), keine Dauerschleife */
.strom .licht { vector-effect: non-scaling-stroke; stroke-dasharray: 0.25 2; stroke-dashoffset: 0.25; }
.strom .licht.stamm { stroke-dasharray: 0.4 2; stroke-dashoffset: 0.4; }
.strom.glut .licht { stroke-width: 8; opacity: 0.75; }
.strom.kern .licht { stroke-width: 2.25; }
.strom .licht.stamm.an { animation: strom-stamm 0.6s cubic-bezier(0.5, 0, 0.9, 0.6) both; }
.strom .licht.ast.an { animation: strom-ast 1.5s cubic-bezier(0.3, 0.1, 0.5, 1) 0.45s both; }
.gleis .hof.an { animation: ankunft 1.6s ease-out 1.75s both; }
.gleis .hof-weiche.an { animation: ankunft 1.2s ease-out 0.5s both; }
.marke.puls::after { animation: kartenpuls 2.4s ease-in-out 1.7s both; }
.glanz.an { animation: glanz-wieder 1.2s cubic-bezier(0.4, 0, 0.2, 1) both !important; }
@keyframes strom-stamm { from { stroke-dashoffset: 0.4; } to { stroke-dashoffset: -1; } }
@keyframes strom-ast { 0% { stroke-dashoffset: 0.25; } 85% { stroke-dashoffset: -0.75; } 100% { stroke-dashoffset: -1; } }
@keyframes glanz-wieder { 0% { opacity: 1; background-position: 150% 0; } 85% { opacity: 1; } 100% { opacity: 0; background-position: -50% 0; } }

/* Marke im Aufbau (DESIGN.md 7.4): gestrichelte Kante, kein Link, Hinweis in Markenfarbe */
.marke.aufbau { border-style: dashed; border-color: color-mix(in srgb, var(--mk) 32%, var(--linie-stark)); cursor: default; }
.marke.aufbau:hover { border-color: color-mix(in srgb, var(--mk) 32%, var(--linie-stark)); }
.marke.aufbau:hover::before { opacity: 0; }
.aufbau-hinweis { justify-content: flex-start; gap: 10px; color: var(--mk); text-transform: uppercase; letter-spacing: 0.12em; font-size: 11px; font-weight: 500; }
.aufbau-punkt { position: relative; width: 6px; height: 6px; border-radius: 50%; background: var(--mk); flex: none; }
.aufbau-punkt::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--mk); animation: aufbau-atmen 8s ease-in-out 4s infinite; }
@keyframes aufbau-atmen { 0%, 40%, 100% { opacity: 0; transform: scale(1); } 20% { opacity: 0.4; transform: scale(2.6); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .gleis .bahn { stroke-dashoffset: 0; }
  .gleis .weiche, .gleis .halt, .marken > li, .karriere-kopf, .stellen { opacity: 1; }
  .gleis .strom, .gleis .hof, .glanz { display: none; }
}
