/* =====================================================================
   naegler.hamburg – Präsentations-Gallery (Startseite + Login)
   ---------------------------------------------------------------------
   Eigenständiges Stylesheet für die Nicht-Deck-Seiten der Presentation-
   Site (Gallery-Startseite, Login). Übernimmt das Designsystem des
   reveal.js-Themes ("Designsystem Frank Nägler", Variante 1a): Papier und
   Tinte, Petrol als Akzent, Archivo/Instrument Sans, flach, keine Schatten
   und keine Verläufe — für einen konsistenten Auftritt.
   ===================================================================== */

/* ---------- Fonts (self-hosted, GDPR-freundlich) ---------- */
@font-face {
    font-family: "Archivo";
    font-style: normal; font-weight: 400 700; font-display: swap;
    src: url("../Fonts/archivo-var.woff2") format("woff2-variations");
}
@font-face {
    font-family: "Instrument Sans";
    font-style: normal; font-weight: 400 700; font-display: swap;
    src: url("../Fonts/instrument-sans-var.woff2") format("woff2-variations");
}
@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal; font-weight: 400; font-display: swap;
    src: url("../Fonts/ibm-plex-mono-400.woff2") format("woff2");
}

:root {
    --nh-navy:        #16202b;   /* Tinte 900 */
    --nh-navy-hover:  #2c3846;   /* Tinte 700 */
    --nh-teal:        #2c7a75;   /* Petrol */
    --nh-teal-strong: #226460;   /* Petrol tief */
    --nh-teal-tint:   #deebe9;   /* Petrol leise */
    --nh-ink:         #5c6570;   /* Tinte 500 – Lauftext */
    --nh-muted:       #5c6570;   /* Tinte 400 verfehlt AA auf Papier */
    --nh-line:        #dfd9d0;   /* Linie */
    --nh-bg:          #f7f4ef;   /* Papier */
    --nh-card:        #ffffff;   /* Weiß */
    --nh-teal-soft:   #4fa9a2;   /* Petrol aufgehellt – auf Tinte */
    --nh-radius:      6px;       /* Karten */
    --nh-radius-sm:   4px;       /* Bedienbares */
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.pg-body {
    margin: 0;
    background: var(--nh-bg);
    color: var(--nh-ink);
    font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.pg-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: clamp(24px, 5vw, 64px) clamp(16px, 4vw, 40px) 80px;
}

/* ---------- Kopf ---------- */
.pg-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 24px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--nh-line);
}
.pg-eyebrow {
    margin: 0 0 4px;
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--nh-muted);
}
.pg-title {
    margin: 0;
    font-family: "Archivo", sans-serif;
    font-weight: 600;
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    line-height: 1.1;
    color: var(--nh-navy);
}
.pg-lede {
    margin: 10px 0 0;
    font-size: .95rem;
    color: var(--nh-muted);
}
.pg-lede__link {
    color: var(--nh-teal-strong);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .15s ease;
}
.pg-lede__link:hover { border-bottom-color: var(--nh-teal-strong); }

.pg-head__auth { flex-shrink: 0; }

.pg-auth {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--nh-navy);
    border-radius: var(--nh-radius-sm);
    background: var(--nh-navy);
    color: #fff;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease;
}
.pg-auth:hover { background: var(--nh-navy-hover); border-color: var(--nh-navy-hover); }
.pg-auth--out {
    background: transparent;
    color: var(--nh-navy);
}
.pg-auth--out:hover { background: var(--nh-teal-tint); border-color: var(--nh-navy); }

/* ---------- Gruppen & Deck-Grid ---------- */
.pg-groups { display: block; }

/* Sysfolder = Gruppen-Sektion mit Überschrift */
.pg-section { margin-top: 56px; }
.pg-section__title {
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--nh-line);
    font-family: "Archivo", sans-serif;
    font-weight: 600;
    font-size: clamp(1.3rem, 2.4vw, 1.65rem);
    line-height: 1.15;
    color: var(--nh-navy);
}
/* verschachtelte Sektionen (Sysfolder in Sysfolder) etwas zurückhaltender */
.pg-section .pg-section { margin-top: 36px; }
.pg-section .pg-section .pg-section__title {
    font-size: 1.15rem;
    border-bottom-color: transparent;
    padding-bottom: 4px;
}

.pg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
/* Ebenen ohne direkte Decks erzeugen ein leeres Grid – keine Höhe/Abstand */
.pg-grid:empty { display: none; }

.pg-card {
    display: flex;
    flex-direction: column;
    background: var(--nh-card);
    border: 1px solid var(--nh-line);
    border-radius: var(--nh-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease, transform .15s ease;
}
.pg-card:hover {
    border-color: var(--nh-teal);
    transform: translateY(-2px);
}

.pg-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--nh-navy);
    overflow: hidden;
}
.pg-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pg-card__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Archivo", sans-serif;
    font-weight: 600;
    font-size: 3.2rem;
    color: var(--nh-teal-soft, #4fa9a2);
    background: var(--nh-navy);
}
.pg-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(11, 29, 52, .82);
    color: #fff;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.pg-card__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px 22px;
}
.pg-card__title {
    font-family: "Archivo", sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.25;
    color: var(--nh-navy);
}
.pg-card__abstract {
    font-size: .9rem;
    color: var(--nh-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Inhalt / Login-Formular (felogin) ---------- */
.pg-shell .frame,
.pg-shell #login {
    max-width: 420px;
}
.pg-shell form label {
    display: block;
    margin: 14px 0 6px;
    font-weight: 600;
    font-size: .9rem;
    color: var(--nh-navy);
}
.pg-shell form input[type="text"],
.pg-shell form input[type="password"],
.pg-shell form input[type="email"] {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--nh-line);
    border-radius: var(--nh-radius-sm);
    font: inherit;
    background: #fff;
}
.pg-shell form input:focus {
    outline: none;
    border-color: var(--nh-teal);
    box-shadow: 0 0 0 3px var(--nh-teal-tint);
}
.pg-shell form input[type="submit"],
.pg-shell form button {
    margin-top: 20px;
    padding: 11px 22px;
    border: 0;
    border-radius: var(--nh-radius-sm);
    background: var(--nh-navy);
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    transition: background .15s ease;
}
.pg-shell form input[type="submit"]:hover,
.pg-shell form button:hover { background: var(--nh-navy-hover); }
.pg-shell .alert,
.pg-shell .typo3-messages li {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--nh-radius-sm);
    background: var(--nh-teal-tint);
    color: var(--nh-teal-strong);
    list-style: none;
}

@media (max-width: 560px) {
    .pg-head { flex-direction: column; align-items: flex-start; }
    .pg-grid { grid-template-columns: 1fr; }
}
