/* Case Studys zum Projektmagazin: jede Seite ist die ausführliche Fassung einer Ausgabe.
   Baut auf css/styles.css, css/service-variants/shared/service-base.css und den Kiosk-Bausteinen (projects-base.css, projects-kiosk.css) auf.
   Der Einstieg trägt die Farbe der Marke (--stage); Text und Knöpfe richten sich nach pj-tone-dark
   oder pj-tone-light, damit der Kontrast stimmt. */

.cx-page main p a:not(.button, .cx-button, .cx-link, .pj-visit) {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
}

/* ------------------------------------------------------------------ */
/* Einstieg                                                             */
/* ------------------------------------------------------------------ */
.cx-hero {
    position: relative;
    overflow: clip;
    padding-block: clamp(130px, 13vw, 170px) clamp(3.5rem, 7vw, 6rem);
    background: var(--stage);
    color: var(--tone-ink);
    isolation: isolate;
}

/* Ein weiches Licht, damit die Markenfläche Tiefe bekommt */
.cx-hero::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        radial-gradient(55% 70% at 82% 28%, color-mix(in srgb, var(--stage) 72%, #ffffff), transparent 72%),
        radial-gradient(60% 60% at 6% 108%, color-mix(in srgb, var(--stage) 76%, #000000), transparent 70%);
    content: "";
    opacity: 0.7;
}

.cx-hero__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center; gap: clamp(2.5rem, 6vw, 6rem); }
/* Kleine Texte in voller Deckkraft: Halbtransparenz reicht auf mittleren Markenfarben nicht für 4,5 : 1 */
.cx-crumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; color: var(--tone-ink); font-size: 0.84rem; }
.cx-crumbs a { color: inherit; text-decoration: underline; text-underline-offset: 0.2em; }
.cx-crumbs [aria-current] { color: var(--tone-ink); }
.cx-hero__issue { margin-top: 2.2rem; color: var(--tone-ink); font-size: 0.92rem; font-weight: 600; }
.cx-hero h1 { margin-top: 0.7rem; font-size: clamp(3.2rem, 7.6vw, 7.4rem); font-stretch: 76%; font-weight: 640; letter-spacing: -0.055em; line-height: 0.88; }
.cx-hero__headline { max-width: 26ch; margin-top: 1.5rem; font-size: clamp(1.4rem, 2.3vw, 2rem); font-weight: 560; letter-spacing: -0.02em; line-height: 1.18; hyphens: manual; }
.cx-hero__intro { max-width: 58ch; margin-top: 1.3rem; color: var(--tone-ink); font-size: 1.06rem; line-height: 1.7; }

.cx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.8rem; margin-top: 2.1rem; }

.cx-button {
    display: inline-flex;
    min-height: 54px;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.5rem 0.9rem 1.35rem;
    background: var(--tone-ink);
    color: var(--stage);
    font-size: 0.98rem;
    font-weight: 640;
    text-decoration: none;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 13px), calc(100% - 7.5px) 100%, 0 100%);
    transition: transform 200ms ease, opacity 200ms ease;
}

/* Bei dunklem Text ist der Knopf dunkel mit weißer Schrift, damit er auf jeder hellen Markenfläche lesbar bleibt */
.pj-tone-dark .cx-button { background: #07110f; color: #ffffff; }
.pj-tone-light .cx-button { background: #ffffff; color: #07110f; }
.cx-button:hover { transform: translateY(-2px); }
.cx-button:focus-visible { clip-path: none; outline: 2px solid var(--tone-ink); outline-offset: 3px; }
.cx-button .icon-arrow { width: 1rem; height: 1rem; }
.cx-link { color: var(--tone-ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.cx-link:focus-visible { outline: 2px solid var(--tone-ink); outline-offset: 3px; }

/* Das Heft liegt schräg auf der Website */
.cx-hero__visual { position: relative; display: grid; min-height: 0; padding: 4% 0 10%; }
.cx-hero__browser { width: 100%; transform: rotate(1.6deg); }
.cx-hero__cover { position: absolute; bottom: -2%; left: -8%; width: min(46%, 300px); filter: drop-shadow(0 40px 46px rgba(0, 0, 0, 0.42)); transform: rotate(-5deg); }
.cx-hero__cover .pj-cover { box-shadow: 0 2px 5px rgba(7, 17, 15, 0.16); }

/* ------------------------------------------------------------------ */
/* Screenshots im Browserrahmen                                         */
/* ------------------------------------------------------------------ */
.cx-shot {
    margin: 0;
    overflow: hidden;
    background: var(--pj-frame, #0c1715);
    box-shadow: 0 40px 70px -40px rgba(7, 17, 15, 0.6), 0 0 0 1px rgba(7, 17, 15, 0.08);
    clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}

.cx-shot .pj-bar { --pj-frame: #0c1715; --pj-mint: #22e6bd; --pj-hex: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.cx-shot img { display: block; width: 100%; height: auto; }

.cx-logo-plate {
    display: grid;
    margin: 0;
    aspect-ratio: 16 / 10;
    place-items: center;
    padding: 12%;
    background: #fbfaf6;
    box-shadow: inset 0 0 0 1px rgba(7, 17, 15, 0.1);
    clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}

.cx-logo-plate img { width: auto; max-width: 100%; height: auto; max-height: 100%; }

/* ------------------------------------------------------------------ */
/* Steckbrief                                                           */
/* ------------------------------------------------------------------ */
.cx-facts {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 3fr) minmax(0, 1.8fr) minmax(0, 1.3fr) auto;
    gap: 2rem clamp(1.5rem, 3vw, 3rem);
    margin: 0;
    padding-block: clamp(2.4rem, 4vw, 3.2rem);
    border-bottom: 1px solid var(--line);
}

.cx-facts--no-tags { grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 1.4fr) auto; }
.cx-facts dt { color: var(--muted); font-size: 0.82rem; font-weight: 650; }
.cx-facts dd { margin: 0.7rem 0 0; font-size: 1rem; line-height: 1.45; }
.cx-facts__logo { display: block; width: auto; max-width: 100%; height: auto; max-height: 58px; }
.cx-facts__visit { color: var(--ink); white-space: nowrap; }

.cx-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.cx-tags li { padding: 0.32rem 0.7rem 0.38rem; border: 1px solid var(--line); background: var(--white); font-size: 0.84rem; font-weight: 560; line-height: 1.2; }
.cx-tags--small { margin-top: 1rem; }
.cx-tags--small li { padding: 0.24rem 0.6rem 0.3rem; font-size: 0.78rem; }

.cx-swatches { display: grid; gap: 0.6rem; }
.cx-swatches li { gap: 0.7rem; }
.cx-swatches .pj-swatch { width: 1.6rem; }
.cx-swatch__text { display: grid; gap: 0.1rem; }
.cx-swatch__text span { font-size: 0.9rem; font-weight: 560; }
.cx-swatch__text code { color: var(--muted); font: 600 0.74rem/1 var(--font); letter-spacing: 0.03em; }

/* ------------------------------------------------------------------ */
/* Die Geschichte                                                       */
/* ------------------------------------------------------------------ */
.cx-story { padding-block: clamp(4.5rem, 9vw, 8rem); }
.cx-story > h2 { font-size: clamp(2.4rem, 5vw, 4.6rem); font-stretch: 80%; font-weight: 560; letter-spacing: -0.055em; line-height: 0.95; }
.cx-chapters { display: grid; gap: clamp(4rem, 8vw, 7rem); margin: clamp(3rem, 6vw, 5rem) 0 0; padding: 0; list-style: none; }
.cx-chapter { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: clamp(2rem, 5vw, 5.5rem); }
.cx-chapter:nth-child(even) .cx-chapter__media { order: -1; }
.cx-chapter--text { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.cx-chapter--text .cx-chapter__text { padding-left: clamp(0rem, 4vw, 4rem); border-left: 2px solid var(--cx-accent); }

.cx-chapter__no { display: flex; align-items: center; gap: 0.7rem; color: var(--muted); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.02em; }
.cx-chapter__no::before { width: 1.15rem; aspect-ratio: 2 / 1.732; background: var(--cx-accent); clip-path: var(--hex); content: ""; }
.cx-chapter h3 { margin-top: 0.9rem; font-size: clamp(1.7rem, 2.8vw, 2.5rem); font-stretch: 84%; font-weight: 600; letter-spacing: -0.04em; line-height: 1.04; }
.cx-chapter__text > p:not(.cx-chapter__no) { max-width: 60ch; margin-top: 1.1rem; color: var(--text); font-size: 1.04rem; }

/* ------------------------------------------------------------------ */
/* Ergebnis, Weiterblättern, Anfrage                                    */
/* ------------------------------------------------------------------ */
.cx-result { padding-block: clamp(4rem, 8vw, 6.5rem); background: var(--stage); color: var(--tone-ink); }
.cx-result p { max-width: 32ch; font-size: clamp(1.6rem, 3.2vw, 2.7rem); font-stretch: 86%; font-weight: 560; letter-spacing: -0.035em; line-height: 1.16; }

.cx-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding-block: clamp(3rem, 6vw, 4.5rem); }
.cx-pager__item { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 1.4rem; padding: 1.1rem 1.3rem; border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color 200ms ease, background-color 200ms ease; }
.cx-pager__item:hover { border-color: var(--ink); background: var(--mist); }
.cx-pager__item--next { grid-template-columns: minmax(0, 1fr) 96px; text-align: right; }
.cx-pager__item--next .cx-pager__cover { order: 2; }
.cx-pager__cover { display: block; transform: rotate(-3deg); }
.cx-pager__item--next .cx-pager__cover { transform: rotate(3deg); }
.cx-pager__text { display: grid; gap: 0.25rem; }
.cx-pager__label { color: var(--muted); font-size: 0.8rem; font-weight: 650; }
.cx-pager__text strong { font-size: 1.3rem; font-stretch: 86%; font-weight: 620; letter-spacing: -0.03em; }
.cx-pager__text span:last-child { color: var(--muted); font-size: 0.9rem; }

.cx-cta { padding-block: clamp(4rem, 8vw, 6rem); background: var(--space); color: var(--white); }
.cx-cta__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.6rem 3rem; }
.cx-cta h2 { max-width: 18ch; font-size: clamp(2.2rem, 4.4vw, 4rem); font-stretch: 80%; font-weight: 560; letter-spacing: -0.05em; line-height: 0.98; }

/* ------------------------------------------------------------------ */
/* Kleinere Bildschirme                                                 */
/* ------------------------------------------------------------------ */
@media (max-width: 1100px) {
    .cx-facts,
    .cx-facts--no-tags { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cx-facts__tags { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
    .cx-hero__grid,
    .cx-chapter,
    .cx-chapter--text { grid-template-columns: minmax(0, 1fr); }
    .cx-hero__visual { padding: 2% 0 18%; }
    .cx-hero__cover { left: auto; right: 2%; width: min(42%, 220px); }
    .cx-chapter:nth-child(even) .cx-chapter__media { order: 0; }
    .cx-chapter--text .cx-chapter__text { padding-left: 1.2rem; }
}

@media (max-width: 560px) {
    /* Der präzisere Rücklink bleibt auf üblichen Mobilbreiten neben dem CTA. */
    .cx-page .cx-actions { column-gap: 1.2rem; }
    .cx-facts,
    .cx-facts--no-tags { grid-template-columns: minmax(0, 1fr); }
    .cx-pager { grid-template-columns: minmax(0, 1fr); }
    .cx-pager__item,
    .cx-pager__item--next { grid-template-columns: 72px minmax(0, 1fr); text-align: left; }
    .cx-pager__item--next .cx-pager__cover { order: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .cx-button,
    .cx-pager__item { transition: none; }
}

/* Phone-only project pager 20261016. */
.cx-pager { --cx-pager-phone: clamp(96px, 9vw, 136px); }
.cx-pager__item { grid-template-columns: var(--cx-pager-phone) minmax(0, 1fr); gap: clamp(1rem, 2vw, 1.8rem); padding: clamp(1.2rem, 2.5vw, 2rem); }
.cx-pager__item--next { grid-template-columns: minmax(0, 1fr) var(--cx-pager-phone); }
.cx-pager__cover { min-width: 0; container-type: inline-size; }
.cx-pager__cover .pj-cover__phone { position: relative; display: block; top: auto; right: auto; width: 100%; padding: 3.2cqi; border-radius: 14cqi; box-shadow: 0 16px 28px -16px rgba(7, 17, 15, .5); transform: none; }
.cx-pager__cover .pj-cover__phone img { border-radius: 10.8cqi; }
.cx-pager__text { min-width: 0; overflow-wrap: anywhere; }
.cx-pager__item:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
@media (max-width: 560px) {
    .cx-pager { --cx-pager-phone: clamp(96px, 28vw, 120px); }
    .cx-pager__item, .cx-pager__item--next { grid-template-columns: var(--cx-pager-phone) minmax(0, 1fr); }
}
/* End phone-only project pager 20261016. */
