/* ==========================================================================
   Packshot Factory – ergänzt landingpages.css (Theme light-red) um das
   Packshot-Factory-Erscheinungsbild, Portfolio-Galerie und Lightbox.
   ========================================================================== */

/* ---------- Farben ---------- */
.psf.lp-theme-light-red {
    --bg: #f6f5f3;
    --bg-soft: #efedea;
    --surface: #ffffff;
    --surface-solid: #ffffff;
    --border: #e6e2dd;
    --text: #2a2a2c;
    --muted: #5a5b60;
    --heading: #151516;
    --primary: #d63b2f;          /* 4.6:1 auf Weiß */
    --primary-hover: #b52f24;
    --accent: #d63b2f;
    --icon: #d63b2f;
    --header-bg: #ffffff;
    --header-text: #151516;
    --hero-bg: #efedea;
    --hero-text: #151516;
    --footer-bg: #1c1b1b;
    --step-num-bg: #d63b2f;
    --tag-bg: #fbe4e1;
    --tag-text: #a5281e;
    --shadow: 0 8px 26px rgba(30, 24, 20, .07);
    --highlight-shadow: 0 0 0 2px #d63b2f, 0 18px 40px rgba(214, 59, 47, .14);
    --radius: 12px;
}

/* ---------- Infozeile & Kopf ---------- */
.psf-topbar { background: #2a2a2b; color: #f1f1f1; font-size: 14px; }
.psf-topbar__inner { display: flex; align-items: center; justify-content: center; gap: 24px; min-height: 36px; position: relative; }
.psf-topbar__text { margin: 0; text-align: center; }
.psf-topbar__link { position: absolute; right: 0; display: inline-flex; align-items: center; gap: 6px; color: #ff8a7f !important; text-decoration: none; font-weight: 600; }
.psf-topbar__link:hover { text-decoration: underline; }
.psf-topbar__link .lp-icon { width: 1em; height: 1em; }
@media (max-width: 760px) {
    .psf-topbar__inner { justify-content: space-between; gap: 12px; }
    .psf-topbar__text { text-align: left; font-size: 13px; }
    .psf-topbar__link { position: static; flex: none; }
}
@media (max-width: 480px) { .psf-topbar__text { display: none; } .psf-topbar__inner { justify-content: center; } }

.psf .lp-header { padding-top: 0; background: var(--header-bg); border-bottom: 1px solid var(--border); }
.psf .lp-header__inner { background: transparent; box-shadow: none; border-radius: 0; padding-inline: 0; min-height: 78px; }
.psf .lp-logo__img { width: 46px; height: 46px; }
.psf .lp-logo__name {
    white-space: normal; width: min-content; text-transform: uppercase;
    font-size: 21px; font-weight: 800; letter-spacing: .07em; line-height: 1.02;
}
.psf .lp-nav { flex: 1; justify-content: flex-end; gap: 22px; }
.psf .lp-nav__list { margin-right: auto; margin-left: auto; gap: 34px; }
.psf .lp-nav__link { font-size: 15.5px; opacity: 1; }
.psf-nav__contact { margin-right: 6px; }
@media (max-width: 1100px) { .psf .lp-nav__list { gap: 22px; } }
@media (max-width: 980px) {
    .psf .lp-nav { flex: none; }
    .psf .lp-nav__list { margin: 0; gap: 4px; }
    .psf-nav__contact { padding-inline: 4px !important; }
}

/* ---------- Typo-Bausteine ---------- */
.psf-kicker { color: var(--primary); text-transform: uppercase; letter-spacing: .08em; font-size: 14px; font-weight: 600; margin: 0 0 12px; }
.psf-head--center { text-align: center; }
.psf-head--center .lp-head__sub { margin-inline: auto; }
.psf .lp-head__title { font-weight: 700; }

.psf-checks { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 32px; }
.psf-checks li { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text); }
.psf-checks .lp-icon { color: var(--primary); width: 20px; height: 20px; }
.psf-checks--list { flex-direction: column; gap: 10px; margin: 20px 0 26px; }
.psf-checks--list li { align-items: flex-start; }
.psf-checks--list .lp-icon { margin-top: 2px; }

/* ---------- Hero „split“ ---------- */
.lp-v-split { padding-top: 28px; }
.psf-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(24px, 4vw, 56px); }
.psf-hero .lp-hero__title { font-size: clamp(40px, 5.6vw, 72px); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; }
.psf-hero__accent { color: var(--primary); }
.psf-hero .lp-hero__text { max-width: 52ch; font-size: clamp(16.5px, 1.5vw, 19px); }
.psf-hero__media { margin: 0; position: relative; }
.psf-hero__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; box-shadow: var(--shadow); }
.psf-hero__badge {
    position: absolute; top: 18px; right: 18px; background: var(--primary); color: #fff;
    font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 6px 12px; border-radius: 6px;
}
.psf-status {
    position: absolute; left: 22px; bottom: 22px; display: flex; gap: 14px; align-items: center;
    background: rgba(255,255,255,.96); color: var(--heading); padding: 14px 20px; border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12); font-size: 15px; line-height: 1.35; max-width: calc(100% - 44px);
}
.psf-status strong { font-size: 16.5px; }
.psf-status__text { font-size: 14px; color: var(--muted); }
.psf-status__icon { color: var(--primary); width: 30px !important; height: 30px !important; }
@media (max-width: 900px) {
    .psf-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "content" "media"; }
    .psf-hero__img { aspect-ratio: 16 / 10; }
    .psf-status { left: 12px; bottom: 12px; padding: 10px 14px; }
}

/* ---------- Leistungen ---------- */
.psf-services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.psf-service {
    position: relative; display: flex; gap: 18px; align-items: flex-start; padding: 24px 22px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.psf-service:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.psf-service__icon { color: var(--primary); flex: none; }
.psf-service__icon .lp-icon { width: 46px; height: 46px; stroke-width: 1.4; }
.psf-service__title { font-size: 21px; font-weight: 700; margin-bottom: 6px !important; }
.psf-service__text { color: var(--muted); font-size: 14.5px; margin-bottom: 14px !important; }
.psf-service__more { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--heading) !important; text-decoration: none; font-size: 15px; }
.psf-service__more::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* ganze Karte klickbar */
.psf-service__more .lp-icon { width: 1.1em; height: 1.1em; transition: transform .2s; }
.psf-service:hover .psf-service__more .lp-icon { transform: translateX(4px); }
.psf-service__more:focus-visible { outline: none; }
.psf-service:has(.psf-service__more:focus-visible) { outline: 3px solid var(--primary); outline-offset: 3px; }

/* ---------- Referenzen / Branchen ---------- */
.psf .lp-refs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .psf .lp-refs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .psf .lp-refs { grid-template-columns: 1fr; } }
.psf .lp-ref { aspect-ratio: 4 / 3; }
.psf .lp-ref__caption strong { font-size: 18px; }

/* ---------- Text & Bild ---------- */
.psf-tm { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.psf-tm--left .psf-tm__media { order: -1; }
.psf-tm__text { margin-top: 16px; color: var(--muted); font-size: 16.5px; }
.psf-tm__text p + p { margin-top: 12px; }
.psf-tm__text a { color: var(--primary); }
.psf-tm__media { margin: 0; }
.psf-tm__media img { width: 100%; border-radius: 14px; box-shadow: var(--shadow); aspect-ratio: 3 / 2; object-fit: cover; }
.psf-tm__media figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
@media (max-width: 860px) { .psf-tm { grid-template-columns: 1fr; } .psf-tm--left .psf-tm__media { order: 0; } }

/* ---------- Portfolio: Filter ---------- */
.psf-page-title { font-size: clamp(34px, 4.6vw, 54px) !important; }
.psf-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 26px; }
.psf-filter__btn {
    display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px;
    font: inherit; font-size: 15px; font-weight: 600; color: var(--heading); cursor: pointer;
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
    transition: background-color .2s, color .2s, border-color .2s;
}
.psf-filter__btn:hover { border-color: var(--primary); }
.psf-filter__btn.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.psf-filter__count { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); }
.psf-filter__btn.is-active .psf-filter__count { background: rgba(255,255,255,.22); color: #fff; }

/* ---------- Portfolio: Raster ----------
   Ohne JavaScript: einfaches Raster. Mit JavaScript (.is-masonry): verschachteltes
   Masonry mit animiertem Filtern (Positionen per transform, Höhen aus dem Seitenverhältnis
   – kein Springen beim Nachladen der Bilder). */
.psf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.psf-item { margin: 0; position: relative; border-radius: 10px; overflow: hidden; background: var(--bg-soft); }
.psf-item__link { display: block; position: relative; color: #fff; }
.psf-item__img { width: 100%; height: auto; aspect-ratio: var(--ratio, 1.5); object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.psf-item__link:hover .psf-item__img, .psf-item__link:focus-visible .psf-item__img { transform: scale(1.04); }
.psf-item__zoom {
    position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .2s;
}
.psf-item__zoom .lp-icon { width: 18px; height: 18px; }
.psf-item__link:hover .psf-item__zoom, .psf-item__link:focus-visible .psf-item__zoom { opacity: 1; }
.psf-item__link:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.psf-item__cap {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 12px 10px; pointer-events: none;
    color: #fff; font-size: 13.5px; font-weight: 600; line-height: 1.3;
    background: linear-gradient(0deg, rgba(0,0,0,.65), transparent);
    opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s;
}
.psf-item:hover .psf-item__cap, .psf-item:focus-within .psf-item__cap { opacity: 1; transform: none; }
@media (hover: none) { .psf-item__cap { opacity: 1; transform: none; } }

.psf-grid.is-masonry { display: block; position: relative; transition: height .45s cubic-bezier(.2,.7,.2,1); }
.psf-grid.is-masonry .psf-item {
    position: absolute; top: 0; left: 0;
    transition: transform .5s cubic-bezier(.2,.7,.2,1), opacity .35s, width .5s, visibility 0s;
}
.psf-grid.is-masonry .psf-item__img { height: 100%; aspect-ratio: auto; }
.psf-grid.is-masonry .psf-item__link { height: 100%; }
.psf-grid.is-masonry .psf-item.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; transition: transform .5s, opacity .3s, visibility 0s .35s; }
.psf-grid.is-instant .psf-item { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
    .psf-grid.is-masonry, .psf-grid.is-masonry .psf-item, .psf-item__img { transition: none !important; }
}

/* ---------- Lightbox ---------- */
.psf-lb {
    width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
    background: rgba(12, 12, 13, .96); color: #fff; overflow: hidden;
}
.psf-lb::backdrop { background: rgba(0,0,0,.6); }
.psf-lb[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.psf-lb__bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-size: 14px; color: rgba(255,255,255,.8); }
.psf-lb__stage { position: relative; display: grid; place-items: center; padding: 0 64px; min-height: 0; touch-action: pan-y; }
.psf-lb__img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; transition: opacity .25s; user-select: none; }
.psf-lb__img.is-loading { opacity: .25; }
.psf-lb__caption { padding: 12px 16px 18px; text-align: center; font-size: 15px; min-height: 52px; }
.psf-lb__caption strong { display: block; }
.psf-lb__caption span { color: rgba(255,255,255,.75); font-size: 14px; }
.psf-lb__btn {
    display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
    background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2);
}
.psf-lb__btn:hover { background: rgba(255,255,255,.2); }
.psf-lb__btn:focus-visible { outline: 3px solid #ff8a7f; outline-offset: 2px; }
.psf-lb__btn .lp-icon { width: 22px; height: 22px; }
.psf-lb__prev, .psf-lb__next { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.psf-lb__prev { left: 10px; }
.psf-lb__prev .lp-icon { transform: rotate(180deg); }
.psf-lb__next { right: 10px; }
@media (max-width: 640px) {
    .psf-lb__stage { padding: 0 8px; }
    .psf-lb__prev, .psf-lb__next { top: auto; bottom: 8px; transform: none; }
}
html.psf-lb-open { overflow: hidden; }
