/* Brand Portal · Rahmen im neuen HOCHDREI-Stil (wie Dieter): Weiß, Schwarz, HOCHDREI Diatype, ruhige Flächen, feine Linien.
   Die Brandguide-Seiten der Kunden bringen ihr eigenes Design mit. */
@font-face { font-family: 'HOCHDREI Diatype'; src: url('/fonts/HOCHDREIDiatype-Regular.otf') format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'HOCHDREI Diatype'; src: url('/fonts/HOCHDREIDiatype-Bold.otf') format('opentype'); font-weight: 700; font-display: swap; }
:root {
  --schwarz: #000; --weiss: #fff; --text-2: #606060; --text-3: #999;
  --flaeche-warm: #f2f1ee; --flaeche-hell: #f8f8f8; --linie: #d9d9d9;
  --r: 8px; --rand: 40px; --kopf-h: 56px;
  --schrift: 'HOCHDREI Diatype', 'Helvetica Neue', Arial, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--weiss); color: var(--schwarz); font: 400 14px/1.5 var(--schrift); -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--schwarz); outline-offset: 2px; }

.kopf { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--kopf-h); padding: 0 var(--rand); font-size: 12px; }
.marke { grid-column: 2; display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; }
.marke b { font-weight: 700; font-size: 14px; letter-spacing: .02em; text-transform: uppercase; }
.marke span { font-size: 11px; color: var(--text-3); }
.nutzer { grid-column: 3; justify-self: end; display: flex; gap: 20px; align-items: center; color: var(--text-2); }
.nutzer button { background: none; border: 0; padding: 0; min-height: 44px; font-size: 12px; color: var(--schwarz); cursor: pointer; }
.nutzer button:hover { color: var(--text-2); }

main { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 16px 96px; }
.login { max-width: 420px; margin: 16vh auto 0; text-align: center; }
h1 { font-size: 32px; line-height: 1.15; letter-spacing: -.01em; font-weight: 400; margin: 0 0 6px; }
.unter { color: var(--text-2); margin: 0 auto 28px; }
.login-zeile { display: flex; gap: 8px; }
input[type=email], input[type=password], input[type=text] { flex: 1; min-width: 0; border: 1px solid var(--linie); border-radius: var(--r); padding: 8px 12px; font-size: 13px; background: var(--weiss); }
input[type=email]:focus, input[type=password]:focus, input[type=text]:focus { outline: none; border-color: var(--schwarz); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px; border-radius: var(--r); border: 0; background: var(--schwarz); color: var(--weiss); font-size: 13px; line-height: 1.4; white-space: nowrap; cursor: pointer; transition: background .15s; text-decoration: none; }
.btn:hover { background: #2b2b2b; }
.btn.hell { background: var(--flaeche-warm); color: var(--schwarz); } .btn.hell:hover { background: #e8e6e1; }
.hinweis { text-align: left; margin: 16px 0 0; padding: 14px 16px; background: var(--flaeche-hell); border-radius: var(--r); color: var(--schwarz); font-size: 13px; }
.fehler { text-align: left; color: var(--schwarz); font-size: 12px; margin: 8px 0 0; }
.leise { font-size: 11px; color: var(--text-3); margin-top: 24px; }

.uebersicht { margin-top: 12vh; }
.uebersicht h1 { margin-bottom: 6px; }
.kacheln { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 8px; }
.kacheln a { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; background: var(--flaeche-hell); border-radius: var(--r); text-decoration: none; font-size: 16px; transition: background .15s; }
.kacheln a:hover { background: var(--flaeche-warm); }
.kacheln small { color: var(--text-3); font-size: 12px; }

.fuss { display: flex; justify-content: center; gap: 24px; padding: 24px 16px; font-size: 11px; color: var(--text-3); }
.fuss a { text-decoration: none; } .fuss a:hover { color: var(--schwarz); }
@media (max-width: 600px) { :root { --rand: 16px; } .login-zeile { flex-direction: column; } h1 { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.formular { display: flex; flex-direction: column; text-align: left; }
.formular label { font-size: 12px; color: var(--text-2); margin: 14px 0 6px; }
.formular label:first-of-type { margin-top: 0; }
.formular input { width: 100%; padding: 10px 12px; }
.formular .btn { margin-top: 20px; padding: 10px 14px; }

/* Downloads (wie Dieter) */
main:has(.dl) { max-width: 1200px; padding: 0 var(--rand) 96px; }
.dl .zurueck { display: inline-block; margin-top: 28px; font-size: 13px; color: var(--text-2); text-decoration: none; }
.dl .zurueck:hover { color: var(--schwarz); }
.dl h1 { margin-top: 20px; }
.dl .unter { margin: 0 0 28px; }
.meta { font-size: 12px; color: var(--text-2); }
.dl-gr { opacity: .6; }
.dl-zaehler, .dl-alle { display: flex; align-items: center; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; padding: 20px 24px; border-radius: var(--r); margin-bottom: 12px; }
.dl-zaehler { border: 1px solid var(--linie); }
.dl-alle { background: var(--flaeche-hell); }
.dl-zaehler > div:first-child, .dl-alle > div { display: flex; flex-direction: column; gap: 2px; }
.dl-zaehler b, .dl-alle b { font-weight: 400; font-size: 18px; }
.dl-balken { flex: 1 1 240px; max-width: 420px; height: 6px; border-radius: 3px; background: #ececec; overflow: hidden; }
.dl-balken i { display: block; height: 100%; background: var(--schwarz); }
.dl-sprung { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0 0; }
.dl-sprung a { text-decoration: none; background: var(--flaeche-warm); border-radius: var(--r); padding: 6px 12px; font-size: 13px; }
.dl-sprung a:hover { background: #e8e6e1; }
.dl-kat, .dl-eintrag { scroll-margin-top: 24px; }
.dl-kat-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin: 48px 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--linie); }
.dl-kat-kopf h2 { margin: 0; font-size: 22px; font-weight: 400; letter-spacing: -.01em; }
.dl-gruppe { font-size: 13px; font-weight: 400; color: var(--text-2); margin: 28px 0 12px; }
.dl-eintrag.ziel .dl-gruppe { color: var(--schwarz); }
.dl-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 32px 24px; }
.dl-kachel { display: flex; flex-direction: column; min-width: 0; }
.dl-vorschau { aspect-ratio: 4 / 3; background: #f3f3f3; border-radius: var(--r); display: grid; place-items: center; padding: 32px; overflow: hidden; }
.dl-vorschau.dunkel { background: #071D33; }
.dl-vorschau img { width: 100%; height: 100%; object-fit: contain; display: block; }
.dl-format { font-size: 12px; color: var(--text-3); }
.dl-name { font-size: 15px; line-height: 1.3; margin: 12px 0 6px; }
.dl-formate { list-style: none; margin: 0; padding: 0; }
.dl-formate li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--linie); font-size: 13px; }
.dl-knopf { padding: 5px 10px; font-size: 12px; }
.dl-kachel.fehlt .dl-vorschau { background: #ebeae7; aspect-ratio: 4 / 2; }
.dl-kachel.fehlt .dl-name, .dl-kachel.fehlt .meta { color: var(--text-3); margin-top: 8px; }
.dl-status { font-size: 12px; color: var(--text-2); background: var(--weiss); border-radius: 99px; padding: 4px 10px; }
@media (max-width: 600px) { .dl-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; } .dl-alle .btn { width: 100%; } }

/* Einstiegsseiten dunkel (Login, Einladung) – Look von hochdrei.com: Schwarz, Wortmarke, ruhige weiße Typo */
body.dunkel { background: #000; color: #fff; --text-2: #a6a6a6; --text-3: #6e6e6e; --linie: #3a3a3a; }
body.dunkel :focus-visible { outline-color: #fff; }
body.dunkel .login { max-width: 400px; margin: 14vh auto 0; }
body.dunkel .wortmarke { display: block; width: 220px; height: auto; margin: 0 auto 14px; color: #fff; }
body.dunkel .portal-label { margin: 0 0 56px; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--text-2); }
body.dunkel h1 { font-size: 22px; font-weight: 400; letter-spacing: .01em; margin-bottom: 8px; }
body.dunkel .unter { font-size: 13px; margin-bottom: 36px; }
body.dunkel .formular label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); margin-top: 22px; }
body.dunkel .formular label:first-of-type { margin-top: 0; }
body.dunkel .formular input { background: transparent; border: 0; border-bottom: 1px solid var(--linie); border-radius: 0; padding: 10px 0; color: #fff; font-size: 15px; }
body.dunkel .formular input:focus { outline: none; border-bottom-color: #fff; }
body.dunkel .formular input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 40px #000 inset; caret-color: #fff; }
body.dunkel .btn { background: #fff; color: #000; border-radius: 999px; font-weight: 700; letter-spacing: .02em; }
body.dunkel .btn:hover { background: #d9d9d9; }
body.dunkel .formular .btn { margin-top: 36px; padding: 12px 18px; }
body.dunkel .fehler { color: #ff8a73; }
body.dunkel .leise { color: var(--text-3); }
body.dunkel .fuss { color: var(--text-3); }
body.dunkel .fuss a:hover { color: #fff; }
@media (max-width: 600px) { body.dunkel .login { margin-top: 9vh; } body.dunkel .wortmarke { width: 180px; } }
body.dunkel .hinweis { background: #141414; color: #fff; }
body.dunkel .login h1 { margin-bottom: 40px; } body.dunkel .wortmarke { margin-bottom: 64px; }
/* Feinschliff nach Figma „HOCHDREI | WEBSITE“ (Dilara): Diatype Regular, Flächen wie die Navigation, Button wie „Reach out“ */
body.dunkel h1 { font-size: 24px; }
body.dunkel .formular label { font-size: 13px; letter-spacing: 0; text-transform: none; color: #9a9a9a; margin-top: 18px; margin-bottom: 8px; }
body.dunkel .formular input { background: rgba(255,255,255,.1); border: 1px solid transparent; border-radius: 8px; padding: 12px 14px; font-size: 15px; }
body.dunkel .formular input:focus { border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.14); }
body.dunkel .formular input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #1a1a1a inset; }
body.dunkel .btn { border-radius: 6px; font-weight: 400; letter-spacing: 0; font-size: 14px; }
body.dunkel .formular .btn { margin-top: 28px; padding: 12px 18px; }
body.dunkel .wortmarke { margin-bottom: 16px; } body.dunkel .portal-label { margin: 0 0 64px; font-size: 12px; letter-spacing: .32em; color: #9a9a9a; }
/* Kopf: BRAND PORTAL, darunter „by“ + Wortmarke */
body.dunkel .kopfmarke { margin: 0 0 56px; }
body.dunkel .portal-titel { margin: 0; font-size: 34px; line-height: 1; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
body.dunkel .portal-by { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 13px; color: #9a9a9a; }
body.dunkel .portal-by img { width: 92px; height: auto; display: block; }
body.dunkel .kopfmarke + h1 { font-size: 18px; color: #cfcfcf; margin-bottom: 28px; }
@media (max-width: 600px) { body.dunkel .portal-titel { font-size: 26px; } }
/* Schriften wie hochdrei.com (Lizenz HOCHDREI): Sequel 100 Wide für den Titel, Resolve Sans für Texte */
@font-face { font-family: 'Sequel 100 Wide'; src: url('/fonts/Sequel100Wide-85.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Resolve Sans'; src: url('/fonts/ResolveSans-Light.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Resolve Sans'; src: url('/fonts/ResolveSans-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
body.dunkel { font-family: 'Resolve Sans', var(--schrift); font-weight: 300; }
body.dunkel button, body.dunkel input { font-family: inherit; }
body.dunkel .portal-titel { font-family: 'Sequel 100 Wide', var(--schrift); font-weight: 700; font-size: 30px; letter-spacing: .02em; }
body.dunkel .portal-by { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
body.dunkel h1, body.dunkel .kopfmarke + h1 { font-weight: 300; }
body.dunkel .formular input { font-weight: 300; }
body.dunkel .btn { font-weight: 600; letter-spacing: .02em; }
@media (max-width: 600px) { body.dunkel .portal-titel { font-size: 22px; } }

/* Nur für Screenreader sichtbar */
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Kopf in einer Zeile: BRANDGUIDE by HOCHDREI */
body.dunkel .kopfmarke { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px; }
body.dunkel .portal-by { margin: 0; gap: 14px; text-transform: none; letter-spacing: .02em; font-size: 15px; }
body.dunkel .portal-by img { width: auto; height: 17px; }
@media (max-width: 600px) { body.dunkel .kopfmarke { gap: 10px; } body.dunkel .portal-by { gap: 10px; font-size: 13px; } body.dunkel .portal-by img { height: 13px; } }

/* Kopfzeile wie auf hochdrei.com („DESIGNED BY HOCHDREI, GERMANY“) */
body.dunkel .kopfmarke { display: block; margin: 0 0 48px; text-align: center; font-family: "Resolve Sans", var(--schrift); font-weight: 300; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; color: #fff; white-space: nowrap; }
body.dunkel .kopfmarke b { font-family: "Sequel 100 Wide", var(--schrift); font-weight: 700; letter-spacing: .01em; }
@media (max-width: 600px) { body.dunkel .kopfmarke { font-size: 15px; } }

/* Login: alles in Versalien, Beschriftung im Feld, Button schwarz mit Rand + Hover */
body.dunkel .login, body.dunkel .login .btn, body.dunkel .fuss { text-transform: uppercase; letter-spacing: .06em; }
body.dunkel .formular input::placeholder { color: #8a8a8a; text-transform: uppercase; letter-spacing: .06em; opacity: 1; }
body.dunkel .formular input { margin-top: 12px; }
body.dunkel .formular input:first-of-type { margin-top: 0; }
body.dunkel .btn { background: #000; color: #fff; border: 1px solid #fff; transition: background .2s ease, color .2s ease; }
body.dunkel .btn:hover, body.dunkel .btn:focus-visible { background: #fff; color: #000; }
body.dunkel .kopfmarke + h1 { text-transform: uppercase; }

/* Login-Button kompakt wie die Buttons auf hochdrei.com (Figma Button_small: Radius 5, Innenabstand 10/20) */
body.dunkel .formular .btn { width: auto; align-self: center; display: block; margin: 28px auto 0; padding: 10px 28px; border-radius: 5px; font-size: 13px; line-height: 1; }
