/* gemelo.de — Entwurf 2026. Ein Stylesheet, kein Framework.

   Gestaltung nach dem Vorbild der OPF-Seite (opf-preview.gemelo.de): dunkle Flächen aus dem
   gemelo-Grau, Orange als einzige Akzentfarbe, Rot nur für den Punkt. Neu dazu kommen die
   Pixel des gemelo-Logos – als Marke, als Hintergrundraster im Kopf der Startseite und als
   Ordnungsprinzip für die vier Produkte. */

/* ------------------------------------------------------------------ Tokens */

:root {
    /* Hausfarben (HKS 93K, HKS 8K, HKS 16K), wie auf der OPF-Seite */
    --brand-grey: #444f50;
    --brand-orange: #ee7203;
    --brand-red: #b61f29;
    --logo-red: #9f2030;

    /* Flächen, aus dem Hausgrau abgeleitet */
    --surface-deep: #141a1b;
    --surface: #1b2223;
    --surface-raised: #232c2d;
    --surface-high: #2c3637;
    --surface-light: #f4f6f7;
    --surface-paper: #ffffff;

    --text: #edf1f1;
    --text-dim: #a4b0b1;
    --text-faint: #8a9698;
    --text-on-light: #2b3334;
    --text-on-light-dim: #56615f;

    --line: rgba(237, 241, 241, 0.12);
    --line-strong: rgba(237, 241, 241, 0.24);

    --accent: var(--brand-orange);
    --accent-hover: #ff8317;
    --accent-soft: rgba(238, 114, 3, 0.16);
    --accent-line: rgba(238, 114, 3, 0.45);
    --on-accent: #1b1206;

    --font-sans: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system,
                 "Helvetica Neue", Arial, sans-serif;

    --page-width: 1180px;
    --wide-width: 1320px;
    --header-height: 68px;
    --subnav-height: 50px;
    --gutter: clamp(20px, 5vw, 64px);
    --section-gap: clamp(88px, 13vh, 160px);
    --radius: 14px;
    --radius-small: 8px;

    --ease-out: cubic-bezier(0.22, 0.75, 0.3, 1);

    /* Scrollbalken wie im ProjectsExplorer: schmal, Orange mit halber Deckkraft */
    --scrollbar-thumb: rgba(238, 114, 3, 0.5);
    --scrollbar-thumb-hover: var(--brand-orange);
}

/* ------------------------------------------------------------------ Grundlagen */

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 24px);
    -webkit-text-size-adjust: 100%;
}

html.has-subnav { scroll-padding-top: calc(var(--header-height) + var(--subnav-height) + 24px); }

body {
    margin: 0;
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: clamp(16px, 0.5vw + 15px, 18px);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scrollbalken. Chromium und Safari: 10 px breite Spur, darin durch den durchsichtigen Rand ein
   6 px schmaler, runder Griff ohne Pfeiltasten. Firefox kennt diese Pseudo-Elemente nicht und
   bekommt die Standard-Eigenschaften – nur dort, denn Chromium ignoriert die Pseudo-Elemente,
   sobald scrollbar-width oder scrollbar-color gesetzt ist. */
::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
::-webkit-scrollbar-track,
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; }

::-webkit-scrollbar-thumb {
    min-height: 48px;
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--scrollbar-thumb) padding-box;
}

::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:active { background-color: var(--scrollbar-thumb-hover); }

@supports not selector(::-webkit-scrollbar) {
    * {
        scrollbar-width: thin;
        scrollbar-color: var(--scrollbar-thumb) transparent;
    }
}

h1, h2, h3, h4, p, ul, ol, dl, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; color: var(--accent); }
/* height: auto, weil die width/height-Attribute im HTML sonst als feste Höhe wirken und jedes
   aspect-ratio aushebeln. Bilder, die eine Fläche füllen sollen, setzen height: 100% selbst. */
img { display: block; max-width: 100%; height: auto; }
svg { display: block; }
button { font: inherit; color: inherit; }

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: var(--gutter);
    z-index: 100;
    padding: 12px 18px;
    border-radius: 0 0 var(--radius-small) var(--radius-small);
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
}

.skip-link:focus { top: 0; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Die dünne Linie oben sagt, wie weit man auf der Seite ist. */
.progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 70;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-red), var(--accent));
    transform: scaleX(var(--progress, 0));
    transform-origin: 0 50%;
    pointer-events: none;
}

html:not(.js) .progress { display: none; }

/* Fremde Marken tragen im sichtbaren Text ein ® – klein und hochgestellt (wie auf t2ex.de). */
.tm {
    font-size: 0.55em;
    font-weight: 400;
    vertical-align: super;
    line-height: 0;
    margin-left: 0.05em;
}

/* ------------------------------------------------------------------ Gemeinsame Bausteine */

.container {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.container-wide { max-width: var(--wide-width); }

.section { padding: var(--section-gap) 0; }
.section-tight { padding: calc(var(--section-gap) * 0.6) 0; }
.section-deep { background: var(--surface-deep); }

.section-band {
    background: linear-gradient(180deg, transparent, rgba(20, 26, 27, 0.7) 30%, rgba(20, 26, 27, 0.7) 70%, transparent);
}

.eyebrow {
    margin-bottom: 14px;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-head {
    max-width: var(--page-width);
    margin: 0 auto clamp(40px, 6vh, 72px);
    padding: 0 var(--gutter);
}

.section-head-wide { max-width: var(--wide-width); }

.section-head h2,
.h2 {
    font-size: clamp(2rem, 4.4vw, 3.4rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.section-lead {
    max-width: 62ch;
    margin-top: 18px;
    color: var(--text-dim);
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    text-wrap: pretty;
}

.section-head-center { text-align: center; }
.section-head-center .section-lead { margin-inline: auto; }

/* Überschrift links, Einleitung rechts – ab Tabletbreite nebeneinander */
@media (min-width: 900px) {
    .section-head-split {
        display: grid;
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
        column-gap: clamp(32px, 5vw, 80px);
        align-items: end;
    }

    .section-head-split .eyebrow { grid-column: 1 / -1; }
    .section-head-split .section-lead { margin-top: 0; }
}

.pill {
    display: inline-block;
    padding: 3px 12px;
    border: 1px solid var(--accent-line);
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    vertical-align: 2px;
}

.pill-quiet {
    border-color: var(--line-strong);
    background: transparent;
    color: var(--text-dim);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out),
                transform 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.button:hover { transform: translateY(-2px); }
.button-icon { width: 20px; height: 20px; flex: none; }
.button-small .button-icon { width: 17px; height: 17px; }

.button-primary {
    background: var(--accent);
    color: var(--on-accent);
}

.button-primary:hover { background: var(--accent-hover); }

.button-ghost {
    border-color: var(--line-strong);
    color: var(--text);
}

.button-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.button-small { padding: 9px 18px; font-size: 0.88rem; }

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: clamp(28px, 4vh, 44px);
}

.actions-center { justify-content: center; }

/* Ein Textlink mit Pfeil – der Pfeil rückt beim Überfahren nach. */
.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 600;
    transition: color 0.2s var(--ease-out);
}

.text-link svg {
    width: 18px;
    height: 18px;
    flex: none;
    transition: transform 0.25s var(--ease-out);
}

.text-link:hover { color: var(--accent-hover); }
.text-link:hover svg { transform: translateX(3px); }
.text-link:hover svg.is-external { transform: translate(2px, -2px); }

.text-link-quiet { color: var(--text-dim); }
.text-link-quiet:hover { color: var(--text); }

.prose p + p { margin-top: 1em; }
.prose a { color: var(--accent); border-bottom: 1px solid var(--accent-line); }
.prose a:hover { border-bottom-color: var(--accent); }

.checklist { display: grid; gap: 12px; }

/* Kein Flex am Listenpunkt: sonst würden Textstücke, <sup>® und Links darin zu eigenen Spalten.
   Das Häkchen steht absolut links, der Text fließt normal. */
.checklist li {
    position: relative;
    padding-left: 33px;
}

.checklist svg {
    width: 21px;
    height: 21px;
    color: var(--accent);
    flex: none;
}

.checklist li > svg:first-child {
    position: absolute;
    top: 3px;
    left: 0;
}

/* ------------------------------------------------------------------ Kopf */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: clamp(16px, 3vw, 40px);
    width: 100%;
    height: var(--header-height);
    padding: 0 var(--gutter);
    border-bottom: 1px solid transparent;
    transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.site-header.is-stuck,
.site-header.is-solid { border-bottom-color: var(--line); }

/* Glaseffekt in einer eigenen Ebene statt am Kopf selbst: backdrop-filter am Kopf machte ihn zum
   Bezugsrahmen für das fixierte Mobilmenü (.mobile-panel), das dann nur so hoch wie der Kopf war. */
.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    transition: background-color 0.3s var(--ease-out);
}

.site-header.is-stuck::before,
.site-header.is-solid::before {
    background: rgba(20, 26, 27, 0.84);
    -webkit-backdrop-filter: blur(14px);
            backdrop-filter: blur(14px);
}

.brand {
    display: flex;
    align-items: center;
    margin-right: auto;
    padding: 6px 0;
}

.brand-logo {
    width: 124px;
    height: 39px;
    color: var(--text);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2.2vw, 34px);
    color: var(--text-dim);
    font-size: 0.95rem;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 0;
    transition: color 0.2s var(--ease-out);
}

.nav-link:hover,
.nav-item:focus-within > .nav-link { color: var(--text); }

.nav-link[aria-current="page"] { color: var(--text); }

.nav-link[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 5px;
    height: 5px;
    border-radius: 1px;
    background: var(--brand-red);
    transform: translateX(-50%);
}

.nav-caret {
    width: 14px;
    height: 14px;
    transition: transform 0.2s var(--ease-out);
}

.nav-item { position: relative; }

/* Das Produktmenü klappt ohne Skript auf: beim Überfahren und sobald der Fokus darin ist. */
.nav-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    width: 420px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(27, 34, 35, 0.97);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(14px);
            backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px);
    transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out), visibility 0.2s;
}

.nav-item:hover > .nav-menu,
.nav-item:focus-within > .nav-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.nav-item:hover .nav-caret,
.nav-item:focus-within .nav-caret { transform: rotate(180deg); }

/* Unsichtbare Brücke, damit das Menü beim Weg dorthin nicht zuklappt */
.nav-menu::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
}

.nav-menu-item {
    display: grid;
    grid-template-columns: 40px 1fr;
    column-gap: 14px;
    align-items: center;
    padding: 11px 12px;
    border-radius: 10px;
    transition: background-color 0.2s var(--ease-out);
}

.nav-menu-item:hover { background: var(--surface-high); }

.nav-menu-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    grid-row: span 2;
    border: 1px solid var(--accent-line);
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
}

.nav-menu-icon svg { width: 22px; height: 22px; }
.nav-menu-name { color: var(--text); font-weight: 600; line-height: 1.3; }
.nav-menu-note { color: var(--text-faint); font-size: 0.84rem; line-height: 1.35; }

/* IT-Service: im Produktmenü, aber leicht abgesetzt – eigene Zwischenzeile, ruhigeres Symbol */
.nav-menu-sep {
    margin: 6px 12px 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--text-faint);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nav-menu-item-apart .nav-menu-icon {
    border-color: var(--line);
    background: transparent;
    color: var(--text-dim);
}

.nav-menu-item-apart:hover .nav-menu-icon { color: var(--accent); }

.nav-menu-all {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    padding: 12px 12px 6px;
    border-top: 1px solid var(--line);
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
}

.nav-menu-all svg { width: 18px; height: 18px; }

/* Mobiles Menü: ein <details>, damit es auch ohne Skript aufgeht. */
.mobile-nav { display: none; }

.mobile-nav > summary {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    cursor: pointer;
    list-style: none;
}

.mobile-nav > summary::-webkit-details-marker { display: none; }
.mobile-nav > summary svg { width: 22px; height: 22px; }
.mobile-nav .icon-close { display: none; }
.mobile-nav[open] .icon-close { display: block; }
.mobile-nav[open] .icon-menu { display: none; }

.mobile-panel {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 49;
    overflow-y: auto;
    padding: 20px var(--gutter) 40px;
    background: var(--surface-deep);
    border-top: 1px solid var(--line);
}

.mobile-panel a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.25rem;
    font-weight: 600;
}

.mobile-panel a[aria-current="page"] { color: var(--accent); }

.mobile-panel .mobile-sub a {
    padding: 10px 0 10px 18px;
    color: var(--text-dim);
    font-size: 1.02rem;
    font-weight: 500;
}

.mobile-panel .mobile-sub a[aria-current="page"] { color: var(--accent); }

.mobile-panel .mobile-sub .mobile-sub-apart {
    justify-content: flex-start;
    gap: 8px;
    margin-top: 10px;
    border-top: 1px dashed var(--line);
}

.mobile-panel .mobile-note {
    color: var(--text-faint);
    font-size: 0.86rem;
    font-weight: 400;
}

.mobile-panel .button {
    display: flex;
    justify-content: center;
    margin-top: 28px;
    border-bottom: 0;
    font-size: 1rem;
}

@media (max-width: 960px) {
    .site-nav,
    .header-cta { display: none; }
    .mobile-nav { display: block; }
}

/* ------------------------------------------------------------------ Unternavigation (Produkte, Exponate) */

.subnav {
    position: sticky;
    top: var(--header-height);
    z-index: 40;
    margin-top: var(--header-height);
    border-bottom: 1px solid var(--line);
    background: rgba(27, 34, 35, 0.9);
    -webkit-backdrop-filter: blur(14px);
            backdrop-filter: blur(14px);
}

.subnav-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: var(--wide-width);
    height: var(--subnav-height);
    margin: 0 auto;
    padding: 0 var(--gutter);
    overflow-x: auto;
    scrollbar-width: none;
}

.subnav-inner::-webkit-scrollbar { display: none; }

.subnav-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 14px;
    padding-right: 20px;
    border-right: 1px solid var(--line);
    color: var(--text);
    font-weight: 700;
    white-space: nowrap;
}

.subnav-title svg { width: 18px; height: 18px; color: var(--accent); }

.subnav a:not(.subnav-title) {
    padding: 6px 14px;
    border-radius: 999px;
    color: var(--text-dim);
    font-size: 0.9rem;
    white-space: nowrap;
    transition: color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}

.subnav a:not(.subnav-title):hover { color: var(--text); background: var(--surface-high); }

.subnav a[aria-current="page"],
.subnav a.is-active {
    color: var(--on-accent);
    background: var(--accent);
}

.subnav a[aria-current="page"]:hover,
.subnav a.is-active:hover { color: var(--on-accent); background: var(--accent-hover); }

.subnav-external {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.subnav-external svg { width: 15px; height: 15px; }

/* ------------------------------------------------------------------ Startseite: Kopfbereich */

.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100svh;
    padding: 120px var(--gutter) 100px;
    overflow: hidden;
    text-align: center;
}

/* Wichtig: der Kopfbereich der Startseite darf KEINEN eigenen Stapelkontext bilden (kein
   isolation, kein z-index an .hero oder .hero-inner). Sonst bliebe das reisende Logo mit seinem
   z-index darin gefangen und läge am Ende unter dem Seitenkopf statt darin. Glühen und Raster
   liegen deshalb mit z-index 0 in Dokumentreihenfolge vor dem Inhalt. */
.hero-glow {
    position: absolute;
    top: -30%;
    left: 50%;
    z-index: 0;
    width: min(1300px, 130vw);
    aspect-ratio: 1;
    transform: translateX(-50%);
    background: radial-gradient(circle at 50% 50%,
                rgba(238, 114, 3, 0.24) 0%,
                rgba(238, 114, 3, 0.14) 20%,
                rgba(182, 31, 41, 0.14) 40%,
                transparent 70%);
    pointer-events: none;
}

/* Das Pixelraster des Logos als Grund, zur Mitte hin sichtbar, nach außen verlaufend. Einzelne
   Felder leuchten auf (site.js) – ein ruhiges Flackern, kein Feuerwerk. */
.hero-field {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Crect x='3' y='3' width='38' height='38' rx='4' fill='%23edf1f1' fill-opacity='0.035'/%3E%3C/svg%3E");
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 46%, #000 30%, transparent 78%);
            mask-image: radial-gradient(ellipse 62% 58% at 50% 46%, #000 30%, transparent 78%);
    pointer-events: none;
}

.field-px {
    position: absolute;
    width: 38px;
    height: 38px;
    border-radius: 4px;
    background: var(--px-color, var(--accent));
    opacity: 0;
    transition: opacity 1.8s ease;
}

.field-px.is-on { opacity: var(--px-alpha, 0.3); }

.hero-inner {
    position: relative;
    max-width: 980px;
}

.hero .eyebrow {
    margin-bottom: clamp(26px, 3.6vh, 44px);
    font-size: clamp(0.84rem, 1.05vw, 1rem);
    letter-spacing: 0.2em;
}

.hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(24px, 3.6vh, 40px);
    font-size: clamp(2rem, 4.8vw, 3.9rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.03em;
}

/* Das Logo reist beim Scrollen von hier in den Kopf. Der Platzhalter hält seinen Platz im
   Layout, das Logo im Kopf bleibt unsichtbar – es ist nur der Messpunkt, wo die Reise endet. */
.hero-logo-slot {
    display: block;
    width: min(520px, 80vw);
    aspect-ratio: 266 / 84;
}

.hero-logo {
    display: block;
    width: min(520px, 80vw);
    height: auto;
    aspect-ratio: 266 / 84;
    color: var(--text);
    overflow: visible;
}

.js .hero-logo {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 60;
    transform-origin: 0 0;
    will-change: transform;
    pointer-events: none;
}

.js .brand-logo[data-brand-target] { opacity: 0; }

.motion-off .hero-logo { position: static; transform: none !important; }
.motion-off .brand-logo[data-brand-target] { opacity: 1; }

/* Offenes Mobilmenü: Das reisende Logo liegt (z-index 60) über dem Menü (49). Solange es offen ist,
   übernimmt das Logo im Kopf, das reisende ist ausgeblendet. */
.js.nav-open .hero-logo { visibility: hidden; }
.js.nav-open .brand-logo[data-brand-target] { opacity: 1; }

/* Die neun Pixel fliegen beim Laden zusammen, danach kommt die Wortmarke. */
.hero-logo .px {
    transform-box: fill-box;
    transform-origin: center;
    animation: px-in 1.2s var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 60ms + 120ms);
}

.hero-logo .px-mid { fill-opacity: 0.8; }
.hero-logo .px-light { fill-opacity: 0.58; }
.hero-logo .px-pale { fill-opacity: 0.26; }

@keyframes px-in {
    from {
        opacity: 0;
        transform: translate(var(--dx, 0), var(--dy, 0)) scale(0.3) rotate(var(--r, 0deg));
    }
}

.hero-logo .logo-word-use { animation: word-in 1s var(--ease-out) 0.62s both; }

@keyframes word-in {
    from { opacity: 0; transform: translateX(-14px); }
}

.hero-claim { display: block; text-wrap: balance; }

.hero-lead {
    max-width: 60ch;
    margin: clamp(24px, 3.5vh, 38px) auto 0;
    color: var(--text-dim);
    font-size: clamp(1.05rem, 1.5vw, 1.28rem);
    text-wrap: pretty;
}

.hero .actions { justify-content: center; }

.scroll-hint {
    position: absolute;
    bottom: 26px;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    transform: translateX(-50%);
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.scroll-hint-line {
    width: 2px;
    height: 54px;
    border-radius: 2px;
    background: linear-gradient(to bottom, transparent, var(--accent));
    animation: scroll-hint 2.4s var(--ease-out) infinite;
    transform-origin: top;
}

@keyframes scroll-hint {
    0%   { transform: scaleY(0); opacity: 0; }
    35%  { transform: scaleY(1); opacity: 1; }
    100% { transform: scaleY(1) translateY(54px); opacity: 0; }
}

@media (max-height: 700px) {
    .scroll-hint { display: none; }
}

/* ------------------------------------------------------------------ Unterseiten: Kopfbereich */

.page-hero {
    position: relative;
    padding: clamp(64px, 11vh, 132px) 0 clamp(56px, 9vh, 104px);
    overflow: hidden;
    isolation: isolate;
}

.page-hero-plain { padding-top: calc(var(--header-height) + clamp(56px, 10vh, 120px)); }

/* Hier gibt es kein reisendes Logo – der Kopf isoliert sich, Glühen und Raster liegen dahinter. */
.page-hero .hero-glow,
.page-hero .hero-field,
.closing .hero-glow { z-index: -1; }

.page-hero .hero-glow {
    top: -60%;
    left: 70%;
    width: min(1100px, 120vw);
}

.page-hero .hero-field {
    -webkit-mask-image: radial-gradient(ellipse 55% 70% at 78% 30%, #000 10%, transparent 70%);
            mask-image: radial-gradient(ellipse 55% 70% at 78% 30%, #000 10%, transparent 70%);
}

.page-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(36px, 5vw, 80px);
    align-items: center;
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.page-hero-single {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.page-title {
    font-size: clamp(2.3rem, 5.4vw, 4.4rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.page-lead {
    max-width: 58ch;
    margin-top: clamp(20px, 3vh, 30px);
    color: var(--text-dim);
    font-size: clamp(1.05rem, 1.45vw, 1.26rem);
    text-wrap: pretty;
}

.page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 28px;
    color: var(--text-faint);
    font-size: 0.9rem;
}

.page-meta li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-meta svg { width: 18px; height: 18px; color: var(--accent); }

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--text-faint);
    font-size: 0.85rem;
}

.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
.breadcrumb a:hover { color: var(--accent); }

/* Produkt-Schriftzug: klein die gemelo-Wortmarke, groß der Produktname */
.lockup {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: clamp(22px, 3.5vh, 34px);
}

.lockup-gemelo {
    width: 104px;
    height: 29px;
    color: var(--text-dim);
}

.lockup-name {
    font-size: clamp(2.6rem, 5.6vw, 4.8rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.045em;
}

/* Unter dem Produktnamen ist die Überschrift der Claim – eine Stufe kleiner als sonst. */
.lockup + .page-title { font-size: clamp(1.9rem, 3.8vw, 3.1rem); }

.lockup-opf {
    width: min(460px, 86vw);
    height: auto;
    aspect-ratio: 691.9 / 127.1;
    color: var(--text);
}

/* Der rote Punkt nach dem Namen – wie bei gemelo. und t2ex. */
.dot {
    display: inline-block;
    width: 0.17em;
    height: 0.17em;
    margin-left: 0.05em;
    border-radius: 0.035em;
    background: var(--brand-red);
    vertical-align: baseline;
}

/* ------------------------------------------------------------------ Aussage (Startseite, Exponate) */

.statement {
    max-width: 1040px;
    margin: 0 auto;
    padding: var(--section-gap) var(--gutter) calc(var(--section-gap) * 0.7);
    text-align: center;
}

.statement-line {
    font-size: clamp(1.45rem, 3.5vw, 2.7rem);
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -0.02em;
    text-wrap: balance;
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.statement-line + .statement-line { margin-top: clamp(28px, 5vh, 56px); }
.statement-problem { color: #e0646c; }

.statement-answer {
    color: var(--accent);
    font-size: clamp(1.9rem, 5vw, 3.8rem);
    font-weight: 700;
}

.js .statement-line { opacity: 0; transform: translateY(60px); }
.js .statement-line.is-in { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ Zwei Säulen (Startseite) */

.pillars {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 28px);
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.pillar {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 14px;
    min-height: clamp(440px, 64vh, 640px);
    padding: clamp(28px, 3.6vw, 52px);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-raised);
    isolation: isolate;
    transition: border-color 0.3s var(--ease-out);
}

.pillar:hover { border-color: var(--accent-line); }

.pillar-media {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.pillar-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 1.4s var(--ease-out);
}

.pillar:hover .pillar-media img { transform: scale(1.07); }

.pillar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(20, 26, 27, 0.05) 0%, rgba(20, 26, 27, 0.5) 42%, rgba(20, 26, 27, 0.95) 100%);
}

.pillar-kicker {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.pillar h3 {
    font-size: clamp(1.8rem, 3.2vw, 2.7rem);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.02em;
}

.pillar p { max-width: 46ch; color: var(--text-dim); }
.pillar .text-link { margin-top: 6px; }

/* Stretched link: die ganze Karte ist klickbar, der Link bleibt das eine Ziel für Screenreader. */
.stretched::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Die Produktsäule hat kein Foto, sondern die vier Produkte als Pixel – wie im Logo. */
.pillar-products {
    background:
        radial-gradient(circle at 70% 20%, rgba(238, 114, 3, 0.2), transparent 55%),
        radial-gradient(circle at 20% 90%, rgba(182, 31, 41, 0.16), transparent 50%),
        var(--surface-raised);
}

/* Im Fluss statt absolut: oben rechts, der Text bleibt unten – so überlappen sie sich nie. */
.pixel-products {
    display: grid;
    align-self: flex-end;
    grid-template-columns: repeat(3, clamp(52px, 6vw, 84px));
    grid-auto-rows: clamp(52px, 6vw, 84px);
    gap: clamp(8px, 1vw, 12px);
    margin-bottom: auto;
    padding-bottom: 24px;
}

.pixel-products span {
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 700;
    font-size: clamp(0.72rem, 1vw, 0.9rem);
    letter-spacing: -0.01em;
    transition: transform 0.6s var(--ease-out);
}

.pixel-products span svg { width: 42%; height: 42%; }
.pixel-products .pp-pale { background: rgba(238, 114, 3, 0.18); }
.pixel-products .pp-light { background: rgba(238, 114, 3, 0.55); }
.pixel-products .pp-red { background: var(--brand-red); color: var(--text); }
.pixel-products .pp-empty { background: transparent; }
.pixel-products .pp-a { grid-column: 2; grid-row: 1; }
.pixel-products .pp-b { grid-column: 1; grid-row: 2; }
.pixel-products .pp-c { grid-column: 3; grid-row: 2; }
.pixel-products .pp-d { grid-column: 2; grid-row: 3; }
.pixel-products .pp-e { grid-column: 3; grid-row: 1; }
.pixel-products .pp-f { grid-column: 1; grid-row: 3; }
.pixel-products-hero {
    justify-self: center;
    align-self: center;
    grid-template-columns: repeat(3, clamp(64px, 9vw, 124px));
    grid-auto-rows: clamp(64px, 9vw, 124px);
    gap: clamp(10px, 1.2vw, 16px);
    margin: 0;
    padding: 0;
}

.pixel-products-hero span { border-radius: 16px; }

.pillar:hover .pixel-products .pp-a { transform: translate(-4px, -4px); }
.pillar:hover .pixel-products .pp-d { transform: translate(4px, 4px); }

/* ------------------------------------------------------------------ Karten mit Bild */

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 1.8vw, 24px);
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-raised);
    transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out),
                opacity 0.6s var(--ease-out);
}

.card:hover { border-color: var(--accent-line); transform: translateY(-3px); }

.card-media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--surface-high);
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s var(--ease-out);
}

.card:hover .card-media img { transform: scale(1.05); }

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 22px 24px 24px;
}

.card h3 {
    font-size: 1.22rem;
    font-weight: 600;
    line-height: 1.25;
}

.card p { color: var(--text-dim); font-size: 0.96rem; }
.card .text-link { margin-top: auto; padding-top: 6px; font-size: 0.95rem; }

/* ------------------------------------------------------------------ Produktkarten */

/* Fünf Produkte: breit in einer Reihe, schmaler drei oben und zwei darunter (siehe @media 1100px) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(14px, 1.6vw, 22px);
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 26px 22px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--surface-raised), rgba(35, 44, 45, 0.4));
    transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out),
                opacity 0.6s var(--ease-out);
}

.product-card::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 26px;
    right: 26px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--brand-red), var(--accent));
    opacity: 0;
    transition: opacity 0.25s var(--ease-out);
}

.product-card:hover { border-color: var(--accent-line); transform: translateY(-4px); }
.product-card:hover::before { opacity: 1; }

.product-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.product-icon {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border: 1px solid var(--accent-line);
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    flex: none;
}

.product-icon svg { width: 26px; height: 26px; }

.product-kind {
    color: var(--text-faint);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-align: right;
    text-transform: uppercase;
}

.product-name {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.product-tagline { color: var(--text-dim); font-size: 0.96rem; }

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.product-tags li {
    padding: 3px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text-faint);
    font-size: 0.78rem;
}

/* Kein position hier: der Stretched Link darin muss sich auf die ganze Karte beziehen. */
.product-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
}

/* ------------------------------------------------------------------ Produktbühne: Bild und Text im Wechsel */

.showcase {
    display: grid;
    gap: clamp(72px, 12vh, 140px);
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* Abgesetzter Hinweis auf etwas, das kein Produkt ist (Systemhaus auf /produkte/): gestrichelter
   Rahmen und graues Symbol statt der orangen Produktbausteine */
.aside-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px 28px;
    margin-top: clamp(72px, 12vh, 140px);
    padding: clamp(22px, 3vw, 34px);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
}

.aside-card-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text-dim);
}

.aside-card-icon svg { width: 28px; height: 28px; }
.aside-card .eyebrow { margin-bottom: 6px; color: var(--text-dim); }
.aside-card h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.2; }
.aside-card h2 + p { max-width: 62ch; margin-top: 8px; color: var(--text-dim); }

@media (max-width: 760px) {
    .aside-card { grid-template-columns: minmax(0, 1fr); }
    .aside-card-icon { width: 48px; height: 48px; }
    .aside-card .button { justify-self: start; }
}

.showcase-row {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 84px);
    align-items: center;
    scroll-margin-top: calc(var(--header-height) + var(--subnav-height) + 30px);
}

.showcase-row:nth-child(even) .showcase-media { order: 2; }

.showcase-text h2,
.showcase-text h3 {
    font-size: clamp(1.8rem, 3.4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.showcase-text .product-name { font-size: clamp(2.4rem, 4.4vw, 3.6rem); letter-spacing: -0.04em; }
.showcase-claim { margin-top: 10px; font-size: clamp(1.2rem, 1.8vw, 1.5rem); font-weight: 600; line-height: 1.3; }
.showcase-text > p:not(.eyebrow):not(.showcase-claim) { margin-top: 18px; color: var(--text-dim); }
.showcase-text .checklist { margin-top: 24px; }
.showcase-text .actions { margin-top: 30px; }

.showcase-media { position: relative; }

.frame {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface-raised);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.frame-photo { aspect-ratio: 4 / 3; }
.frame-wide { aspect-ratio: 16 / 10; }
.frame-screen { background: #dfe4e6; }

.frame-caption {
    margin-top: 12px;
    color: var(--text-faint);
    font-size: 0.82rem;
}

.credit {
    position: absolute;
    right: 10px;
    bottom: 8px;
    z-index: 2;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(20, 26, 27, 0.6);
    color: rgba(237, 241, 241, 0.78);
    font-size: 0.68rem;
    letter-spacing: 0.02em;
}

/* Pixel als Schmuck neben einem Bild – dieselbe Form wie das Logo */
.frame-pixels {
    position: absolute;
    width: 130px;
    height: 74px;
    color: var(--accent);
    pointer-events: none;
    z-index: 3;
}

.frame-pixels-tl { top: -34px; left: -30px; }
.frame-pixels-br { right: -30px; bottom: -34px; transform: rotate(180deg); }

/* Plattformleiste für OPF */
.platforms {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.platform {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 6px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-raised);
    color: var(--text-dim);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.platform svg { width: 26px; height: 26px; color: var(--accent); }

/* ------------------------------------------------------------------ Merkmale im Haarlinienraster */

.features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    max-width: var(--page-width);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--line);
}

.features-wrap { padding: 0 var(--gutter); }

.feature {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: clamp(24px, 2.6vw, 36px);
    background: var(--surface);
    transition: background-color 0.3s var(--ease-out), opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.feature:hover { background: var(--surface-raised); }

.feature-icon {
    width: 30px;
    height: 30px;
    color: var(--accent);
}

.feature h3 {
    font-size: 1.12rem;
    font-weight: 600;
    line-height: 1.3;
}

.feature p { color: var(--text-dim); font-size: 0.95rem; }

.feature-link {
    margin-top: auto;
    padding-top: 6px;
    font-size: 0.9rem;
}

.features-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.features-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ------------------------------------------------------------------ Schritte */

.steps {
    display: grid;
    grid-template-columns: repeat(var(--steps, 3), minmax(0, 1fr));
    gap: clamp(20px, 3vw, 40px);
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
    counter-reset: step;
}

.step {
    position: relative;
    padding-top: 74px;
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
    transition-delay: calc(var(--reveal-index, 0) * 110ms);
}

.step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 1.05rem;
    font-weight: 700;
}

/* Die Linie zwischen den Schritten wächst mit, wenn sie ins Bild kommen. */
.step::after {
    content: "";
    position: absolute;
    top: 26px;
    left: 68px;
    right: calc(-1 * clamp(20px, 3vw, 40px) + 16px);
    height: 1px;
    background: linear-gradient(90deg, var(--accent-line), var(--line));
    transform-origin: left;
    transition: transform 0.9s var(--ease-out) 0.2s;
}

.step:last-child::after { display: none; }
.js .step::after { transform: scaleX(0); }
.js .step.is-in::after { transform: scaleX(1); }

.step h3 {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
}

.step p {
    margin-top: 10px;
    color: var(--text-dim);
    font-size: 0.96rem;
}

.step-icon {
    position: absolute;
    top: 13px;
    left: 13px;
    z-index: 1;
    display: none;
}

/* ------------------------------------------------------------------ Zahlen */

.facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 40px);
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.fact {
    padding-top: 22px;
    border-top: 1px solid var(--line-strong);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
    transition-delay: calc(var(--reveal-index, 0) * 90ms);
}

.fact-value {
    display: block;
    background: linear-gradient(95deg, #f7af6f, var(--accent) 55%);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
    font-size: clamp(2.2rem, 4.2vw, 3.7rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    white-space: nowrap;
}

.fact-label {
    display: block;
    margin-top: 12px;
    color: var(--text-dim);
    font-size: 0.95rem;
}

/* ------------------------------------------------------------------ Vergleich (OPF-Stil) */

.compare {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.compare-head,
.compare-row {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.15fr) minmax(220px, 1.85fr);
    gap: clamp(16px, 3vw, 40px);
    align-items: start;
}

.compare-head {
    padding-bottom: 14px;
    color: var(--text-faint);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.compare-row {
    position: relative;
    padding: clamp(20px, 2.8vw, 32px) 0;
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.compare-row::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--line-strong);
    transform-origin: left;
    transition: transform 0.7s var(--ease-out);
}

.js .compare-row { opacity: 0; transform: translateY(22px); }
.js .compare-row::before { transform: scaleX(0); }
.compare-row.is-in { opacity: 1; transform: none; }
.compare-row.is-in::before { transform: scaleX(1); }

.compare-topic { font-size: clamp(1.02rem, 1.5vw, 1.25rem); font-weight: 600; }

.compare-was {
    color: var(--text-faint);
    transition: color 1.1s var(--ease-out) 0.6s;
}

.js .compare-was { color: var(--text); }
.js .compare-row.is-in .compare-was { color: var(--text-faint); }

.compare-now {
    display: flex;
    gap: 12px;
    align-items: start;
    color: var(--text);
    font-weight: 500;
}

.compare-now a { color: var(--accent); font-weight: 600; }
.compare-now a:hover { color: var(--accent-hover); }

.compare-tick {
    width: 22px;
    height: 22px;
    margin-top: 3px;
    color: var(--accent);
    flex: none;
}

.compare-hint {
    display: block;
    margin-top: 3px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Zweispaltige Variante ("Sie möchten ..." -> Produkt) */
.compare-2 .compare-head,
.compare-2 .compare-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }

/* ------------------------------------------------------------------ Laufband mit Chips (OPF-Stil) */

.marquee {
    position: relative;
    overflow: hidden;
    padding: 8px 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee + .marquee { margin-top: 6px; }

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-run var(--marquee-duration, 70s) linear infinite;
    will-change: transform;
}

.marquee-reverse .marquee-track { animation-direction: reverse; }

.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track { animation-play-state: paused; }

@keyframes marquee-run {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.marquee-row {
    display: flex;
    gap: 14px;
    padding-right: 14px;
}

.chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-raised);
    white-space: nowrap;
    transition: border-color 0.25s var(--ease-out);
}

.chip:hover { border-color: var(--accent-line); }

.chip-icon {
    width: 24px;
    height: 24px;
    color: var(--accent);
    flex: none;
}

.chip-title { font-weight: 600; }
.chip-note { color: var(--text-faint); font-size: 0.86rem; }

/* Statische Chip-Liste (umbrechend) */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chips .chip { padding: 11px 18px; white-space: normal; }

/* Längere Einträge (Kundenliste IT-Service): auf dem Handy Name über den Angaben statt runder Pillen */
@media (max-width: 640px) {
    .chips-stacked .chip {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        width: 100%;
        border-radius: var(--radius-small);
    }
}

/* ------------------------------------------------------------------ Galerie der Referenzen */

.gallery {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: clamp(200px, 22vw, 300px);
    gap: clamp(12px, 1.4vw, 18px);
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface-raised);
    isolation: isolate;
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    transition-delay: calc(var(--reveal-index, 0) * 80ms);
}

.gallery-item:nth-child(1) { grid-column: span 7; grid-row: span 2; }
.gallery-item:nth-child(2) { grid-column: span 5; }
.gallery-item:nth-child(3) { grid-column: span 5; }
.gallery-item:nth-child(4),
.gallery-item:nth-child(5),
.gallery-item:nth-child(6) { grid-column: span 4; }

.gallery-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    transition: transform 1.2s var(--ease-out);
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-item::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, transparent 45%, rgba(20, 26, 27, 0.9));
}

.gallery-caption {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
}

.gallery-caption strong {
    display: block;
    font-size: clamp(1.05rem, 1.5vw, 1.3rem);
    font-weight: 600;
    line-height: 1.25;
}

.gallery-caption span {
    display: block;
    margin-top: 2px;
    color: var(--text-dim);
    font-size: 0.88rem;
}

.gallery-item .credit {
    top: 10px;
    bottom: auto;
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
}

.gallery-item:hover .credit,
.gallery-item:focus-within .credit { opacity: 1; }

/* ------------------------------------------------------------------ Referenzliste mit Filter */

.ref-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.ref-filter button {
    padding: 8px 16px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: transparent;
    color: var(--text-dim);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s var(--ease-out), background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.ref-filter button:hover { border-color: var(--accent); color: var(--text); }

.ref-filter button[aria-pressed="true"] {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--on-accent);
}

.ref-count {
    margin-bottom: 18px;
    color: var(--text-faint);
    font-size: 0.9rem;
}

.ref-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(20px, 3vw, 40px);
}

.ref-list li {
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    border-top: 1px solid var(--line);
}

.ref-list li[hidden] { display: none; }

.ref-name { font-weight: 600; line-height: 1.3; }

.ref-place {
    margin-top: 3px;
    color: var(--text-faint);
    font-size: 0.88rem;
}

.ref-what {
    margin-top: 4px;
    color: var(--text-dim);
    font-size: 0.88rem;
    line-height: 1.45;
}

.ref-list li:target { border-top-color: var(--accent); }
.ref-list li:target .ref-name { color: var(--accent); }
.ref-list li { scroll-margin-top: calc(var(--header-height) + 40px); }

.ref-more {
    margin-top: 26px;
    color: var(--text-dim);
}

/* ------------------------------------------------------------------ Helle Fläche (Kontakt) */

.section-light {
    background: var(--surface-light);
    color: var(--text-on-light);
    --line: rgba(43, 51, 52, 0.14);
    --line-strong: rgba(43, 51, 52, 0.26);
    --text-dim: var(--text-on-light-dim);
    --text-faint: #6c7775;
    --px-a1: 0.22;
}

.section-light .section-lead { color: var(--text-on-light-dim); }

.section-light .button-ghost {
    border-color: rgba(43, 51, 52, 0.3);
    color: var(--text-on-light);
}

.section-light .button-ghost:hover { border-color: var(--accent); color: #b85600; }
.section-light .eyebrow { color: #c25e02; }
.section-light em { color: #c25e02; }
.section-light .text-link { color: #a84f00; }
.section-light .text-link:hover { color: #8f4300; }
.section-light .note-small { color: var(--text-dim); }

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(36px, 6vw, 96px);
    align-items: center;
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.contact-grid h2 {
    font-size: clamp(2.1rem, 4.6vw, 3.6rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.025em;
}

.contact-list {
    display: grid;
    gap: 18px;
    margin-top: 34px;
    font-size: 1.08rem;
}

.contact-list li {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 16px;
    align-items: center;
}

.contact-list .contact-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(238, 114, 3, 0.12);
    color: #c25e02;
}

.contact-list svg { width: 22px; height: 22px; }
.contact-list a { font-weight: 600; }
.contact-list a:hover { color: #b85600; }

.contact-photo {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    box-shadow: 0 30px 70px rgba(43, 51, 52, 0.22);
}

.contact-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 70%;
}

.contact-coffee {
    position: absolute;
    left: 18px;
    bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--text-on-light);
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

.contact-coffee svg { width: 34px; height: 20px; }

/* ------------------------------------------------------------------ Abschluss */

.closing {
    position: relative;
    padding: var(--section-gap) var(--gutter);
    overflow: hidden;
    text-align: center;
    isolation: isolate;
}

.closing .hero-glow {
    top: auto;
    bottom: -70%;
    width: min(1000px, 120vw);
}

.closing-title {
    font-size: clamp(1.9rem, 4.4vw, 3.3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-wrap: balance;
}

.closing-lead {
    max-width: 56ch;
    margin: 18px auto 0;
    color: var(--text-dim);
    text-wrap: pretty;
}

.closing .actions { justify-content: center; }

/* ------------------------------------------------------------------ Fragen (Details-Akkordeon) */

.faq {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.faq details {
    border-top: 1px solid var(--line);
}

.faq details:last-child { border-bottom: 1px solid var(--line); }

.faq summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 22px 0;
    font-size: clamp(1.02rem, 1.4vw, 1.18rem);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary svg {
    width: 22px;
    height: 22px;
    color: var(--accent);
    flex: none;
    transition: transform 0.3s var(--ease-out);
}

.faq details[open] summary svg { transform: rotate(180deg); }

.faq-answer {
    max-width: 70ch;
    padding: 0 0 24px;
    color: var(--text-dim);
}

/* ------------------------------------------------------------------ Fuß */

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--surface-deep);
    color: var(--text-faint);
    font-size: 0.92rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr));
    gap: clamp(28px, 4vw, 56px);
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: clamp(56px, 8vh, 88px) var(--gutter) clamp(40px, 6vh, 64px);
}

.footer-logo {
    width: 150px;
    height: 47px;
    color: var(--text);
}

.footer-claim {
    max-width: 30ch;
    margin-top: 18px;
    color: var(--text-dim);
}

.footer-address {
    margin-top: 18px;
    font-style: normal;
    line-height: 1.7;
}

.footer-address a:hover { color: var(--accent); }

.footer-col h2 {
    margin-bottom: 14px;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.footer-col ul { display: grid; gap: 9px; }
.footer-col ul + h2 { margin-top: 26px; }

.footer-col a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s var(--ease-out);
}

.footer-col a:hover { color: var(--accent); }
.footer-col a svg { width: 14px; height: 14px; }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 28px;
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 22px var(--gutter) 30px;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
}

.footer-bottom a:hover { color: var(--accent); }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ------------------------------------------------------------------ Rechtstexte */

.legal {
    max-width: 780px;
    margin: 0 auto;
    padding: calc(var(--header-height) + clamp(40px, 7vh, 80px)) var(--gutter) clamp(60px, 10vh, 120px);
}

.legal-title {
    font-size: clamp(2rem, 4.4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.legal-lead {
    margin-top: 10px;
    color: var(--text-dim);
}

.legal-block {
    margin-top: clamp(30px, 4.5vh, 48px);
    padding-top: clamp(24px, 3.5vh, 36px);
    border-top: 1px solid var(--line);
}

.legal-block h2 {
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.legal-block p { line-height: 1.7; }
.legal-block p + p { margin-top: 0.9em; }
.legal-block a { border-bottom: 1px solid var(--line-strong); }
.legal-block a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.legal-list {
    display: grid;
    grid-template-columns: minmax(150px, auto) 1fr;
    gap: 8px 28px;
    margin: 0;
}

.legal-list dt { color: var(--text-dim); }
.legal-list dd { margin: 0; }

.legal-note {
    margin-top: 26px;
    padding: 18px 22px;
    border: 1px solid var(--accent-line);
    border-radius: var(--radius-small);
    background: var(--accent-soft);
}

.legal-back { margin-top: clamp(40px, 6vh, 64px); }

/* ------------------------------------------------------------------ Seiten-Split: Text neben Liste */

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(36px, 6vw, 96px);
    align-items: start;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.split-sticky { position: sticky; top: calc(var(--header-height) + var(--subnav-height) + 40px); }

.op-list { display: grid; gap: 14px; }

.op-item {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 18px;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-raised);
    transition: border-color 0.25s var(--ease-out), opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
    transition-delay: calc(var(--reveal-index, 0) * 70ms);
}

.op-item:hover { border-color: var(--accent-line); }

.op-item .product-icon { width: 48px; height: 48px; }
.op-item h3 { font-size: 1.1rem; font-weight: 600; line-height: 1.3; }
.op-item p { margin-top: 6px; color: var(--text-dim); font-size: 0.95rem; }
.op-item .text-link { margin-top: 10px; font-size: 0.9rem; }

/* ------------------------------------------------------------------ Exponat-Typen im Überblick */

.type-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(12px, 1.4vw, 18px);
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.type-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px 22px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-raised);
    transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out),
                opacity 0.6s var(--ease-out);
    transition-delay: calc(var(--reveal-index, 0) * 50ms);
}

.type-card:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.type-card svg { width: 30px; height: 30px; color: var(--accent); }
.type-card h3 { font-size: 1.06rem; font-weight: 600; line-height: 1.3; }
.type-card p { color: var(--text-dim); font-size: 0.9rem; }

/* Mosaik aus drei Fotos im Kopf der Exponate-Seite */
.mosaic {
    position: relative;
    aspect-ratio: 1 / 0.92;
}

.mosaic figure {
    position: absolute;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic .m1 { top: 0; left: 0; width: 72%; aspect-ratio: 3 / 2; }
.mosaic .m2 { top: 30%; right: 0; width: 52%; aspect-ratio: 16 / 9; z-index: 2; }
.mosaic .m3 { bottom: 0; left: 12%; width: 50%; aspect-ratio: 3 / 2; z-index: 1; }

.js .mosaic figure { animation: rise 1.1s var(--ease-out) both; }
.js .mosaic .m2 { animation-delay: 0.15s; }
.js .mosaic .m3 { animation-delay: 0.3s; }

@keyframes rise {
    from { opacity: 0; transform: translateY(40px); }
}

/* Sensorik ohne Foto: die Bausteine als Pixelraster */
.sensor-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: clamp(20px, 3vw, 34px);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 80% 10%, rgba(238, 114, 3, 0.16), transparent 55%),
        var(--surface-raised);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.sensor-board li {
    display: flex;
    flex-direction: column;
    gap: 10px;
    aspect-ratio: 1;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.25;
}

.sensor-board li:nth-child(3n+1) { background: rgba(238, 114, 3, 0.12); border-color: var(--accent-line); }
.sensor-board li:nth-child(5) { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.sensor-board li:nth-child(5) svg { color: var(--on-accent); }
.sensor-board li:nth-child(9) { background: var(--brand-red); border-color: transparent; }
.sensor-board li:nth-child(9) svg { color: var(--text); }
.sensor-board svg { width: 30px; height: 30px; color: var(--accent); }

/* ------------------------------------------------------------------ Projektkarten (Exponate, Referenzen) */

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 1.8vw, 24px);
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-raised);
    scroll-margin-top: calc(var(--header-height) + 30px);
}

.project-card:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.project-media {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--surface-high);
}

.project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s var(--ease-out);
}

.project-card:hover .project-media img { transform: scale(1.04); }

.project-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 20px 22px 22px;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.project-meta span + span::before {
    content: "·";
    margin-right: 12px;
    color: var(--text-faint);
}

.project-card h3 {
    font-size: 1.18rem;
    font-weight: 600;
    line-height: 1.28;
}

.project-card p { color: var(--text-dim); font-size: 0.94rem; }

.project-card .product-tags { margin-top: auto; padding-top: 8px; }

.project-wide { grid-column: span 2; }
.project-wide .project-media { aspect-ratio: 16 / 8.2; }

/* Beispiele unter einem Exponat-Typ */
.examples {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.examples-title {
    margin-bottom: 10px;
    color: var(--text-faint);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.examples ul { display: flex; flex-wrap: wrap; gap: 8px; }

.examples a,
.examples span {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--text-dim);
    font-size: 0.84rem;
    transition: border-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.examples a:hover { border-color: var(--accent); color: var(--text); }

/* Zweites, kleineres Bild, das über dem ersten liegt */
.frame-inset {
    position: absolute;
    right: -18px;
    bottom: -40px;
    z-index: 3;
    width: 44%;
    overflow: hidden;
    border: 4px solid var(--surface);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.frame-inset img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.showcase-row:nth-child(even) .frame-inset { right: auto; left: -18px; }

.frame-portrait { aspect-ratio: 3 / 4; max-width: 420px; margin-inline: auto; }

/* ------------------------------------------------------------------ Bildschirmfotos (gemControl) */

.shot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 28px);
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.shot {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.shot .frame { aspect-ratio: 16 / 9; background: #000; }
.shot h3 { font-size: 1.1rem; font-weight: 600; }
.shot p { color: var(--text-dim); font-size: 0.94rem; }

/* Vier Bauformen */
.variants {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(14px, 1.6vw, 22px);
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.variant {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 26px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-raised);
    transition: border-color 0.25s var(--ease-out), opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.variant:hover { border-color: var(--accent-line); }
.variant svg { width: 34px; height: 34px; color: var(--accent); }
.variant h3 { font-size: 1.15rem; font-weight: 600; }
.variant p { color: var(--text-dim); font-size: 0.93rem; }

/* Kleine Helfer */
.credit-top { top: 10px; bottom: auto; }
.raised { position: relative; z-index: 2; }
.footer-note { margin-top: 12px; font-size: 0.82rem; }
.note-small { margin-top: 18px; color: var(--text-faint); font-size: 0.85rem; }

/* ------------------------------------------------------------------ Referenzen: Karten und Dialog */

.ref-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 1.6vw, 22px);
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.ref-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-raised);
    overflow: hidden;
    scroll-margin-top: calc(var(--header-height) + 30px);
    transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.ref-card[hidden] { display: none; }
.ref-card:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.ref-card-wide { grid-column: span 2; }
.ref-card-wide .project-media { aspect-ratio: 16 / 8.2; }

.ref-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ref-card .project-media img { height: 100%; }
.ref-card:hover .project-media img { transform: scale(1.04); }
.ref-card h3 { font-size: 1.16rem; font-weight: 600; line-height: 1.28; }

.ref-card-sub {
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 500;
}

.ref-card-teaser {
    color: var(--text-dim);
    font-size: 0.92rem;
}

.ref-card .text-link {
    margin-top: auto;
    padding-top: 8px;
    font-size: 0.9rem;
}

.ref-card .project-body { flex: 1; }

html.dialog-open { overflow: hidden; }

.ref-dialog {
    width: min(1180px, calc(100vw - 32px));
    max-width: none;
    height: min(860px, calc(100dvh - 32px));
    max-height: none;
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}

.ref-dialog[open] {
    display: flex;
    flex-direction: column;
    animation: dialog-in 0.35s var(--ease-out);
}

.ref-dialog::backdrop {
    background: rgba(10, 13, 14, 0.78);
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
}

@keyframes dialog-in {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
}

.ref-dialog-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-deep);
}

.ref-nav,
.ref-close {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.ref-nav:hover,
.ref-close:hover { border-color: var(--accent); color: var(--accent); }
.ref-nav svg,
.ref-close svg { width: 20px; height: 20px; }
.ref-nav-prev svg { transform: rotate(180deg); }
.ref-close { margin-left: auto; }

.ref-position {
    min-width: 64px;
    color: var(--text-faint);
    font-size: 0.85rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.ref-dialog-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Abstand oben und unten, damit der Griff nicht in die runde Ecke des Dialogs läuft */
.ref-dialog-body::-webkit-scrollbar-track { margin: 6px 0 10px; }

.ref-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    min-height: 100%;
}

.ref-gallery {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    background: var(--surface-deep);
}

.ref-stage {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-small);
    background: #0d1112;
    aspect-ratio: 4 / 3;
}

.ref-stage img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ref-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 8px;
}

.ref-thumbs button {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 6px;
    background: var(--surface-high);
    cursor: pointer;
    aspect-ratio: 4 / 3;
    opacity: 0.7;
    transition: opacity 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.ref-thumbs button:hover { opacity: 1; }
.ref-thumbs button[aria-current] { border-color: var(--accent); opacity: 1; }
.ref-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.ref-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: clamp(22px, 3vw, 38px);
}

.ref-title {
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.ref-subtitle {
    margin-top: -6px;
    color: var(--text-dim);
    font-size: 1.05rem;
}

.ref-facts {
    display: grid;
    gap: 0;
    margin: 6px 0 0;
    border-top: 1px solid var(--line);
}

.ref-facts > div {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.93rem;
}

.ref-facts dt { color: var(--text-faint); }
.ref-facts dd { margin: 0; }
.ref-text { color: var(--text-dim); }
.ref-text p + p { margin-top: 0.8em; }
.ref-info .examples { margin-top: 4px; }

@media (max-width: 900px) {
    .ref-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ref-detail { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .ref-grid { grid-template-columns: minmax(0, 1fr); }
    .ref-card-wide { grid-column: span 1; }
    .ref-card-wide .project-media { aspect-ratio: 3 / 2; }
    .ref-dialog { width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
    .ref-facts > div { grid-template-columns: 100px 1fr; }
}

/* ------------------------------------------------------------------ Team: Karten und Dialog
   Der Dialog ist derselbe wie bei den Referenzen (site.js, data-ref-*); hier nur, was anders aussieht. */

/* Bewusst kleine Karten: sechs je Reihe, das Porträt ist Wiedererkennung, nicht Blickfang. */
.team-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(12px, 1.2vw, 18px);
}

.team-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-raised);
    overflow: hidden;
    scroll-margin-top: calc(var(--header-height) + 30px);
    transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.team-card:hover { border-color: var(--accent-line); transform: translateY(-3px); }

.team-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.team-media,
.team-portrait {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background:
        radial-gradient(circle at 30% 20%, var(--accent-soft), transparent 60%),
        var(--surface-high);
}

.team-media img,
.team-portrait img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}

.team-card:hover .team-media img { transform: scale(1.04); }

.team-initials {
    color: var(--accent);
    font-size: clamp(1.6rem, 2.6vw, 2.3rem);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.team-body { padding: 12px 14px 14px; }
.team-body h3 { font-size: 0.98rem; font-weight: 600; line-height: 1.28; }

.team-role {
    margin-top: 3px;
    color: var(--text-dim);
    font-size: 0.84rem;
}

.team-empty {
    padding: 40px 0;
    color: var(--text-dim);
    text-align: center;
}

/* Kurze Viten: kleinerer Dialog als bei den Referenzen */
.team-dialog {
    width: min(940px, calc(100vw - 32px));
    height: min(700px, calc(100dvh - 32px));
}

.team-detail { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); }
.team-gallery { justify-content: flex-start; }
.team-portrait { border-radius: var(--radius-small); }
.team-portrait-empty .team-initials { font-size: clamp(2.4rem, 4vw, 3.2rem); }

.team-since {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
}

@media (max-width: 1100px) {
    .team-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .team-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .team-detail { grid-template-columns: minmax(0, 1fr); }
    .team-gallery .team-portrait { width: min(200px, 60%); margin: 0 auto; }
}

/* Handy: Liste statt Raster – kleines Porträt links, Name und Funktion daneben */
@media (max-width: 640px) {
    .team-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
    .team-card-link { flex-direction: row; align-items: center; }
    .team-media { flex: none; width: 64px; }
    .team-initials { font-size: 1.15rem; }
    .team-body { padding: 10px 14px; }
}

/* ------------------------------------------------------------------ Auftauchen beim Scrollen */

.js [data-reveal] {
    opacity: 0;
    transform: translateY(26px);
}

.js [data-reveal].is-in {
    opacity: 1;
    transform: none;
}

/* Bewegte Hover-Transformationen dürfen den Auftauch-Zustand nicht überschreiben */
.js .card[data-reveal].is-in:hover,
.js .product-card[data-reveal].is-in:hover,
.js .type-card[data-reveal].is-in:hover { transform: translateY(-3px); }

[data-reveal] {
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out),
                border-color 0.25s var(--ease-out), background-color 0.3s var(--ease-out);
    transition-delay: calc(var(--reveal-index, 0) * 80ms), calc(var(--reveal-index, 0) * 80ms), 0s, 0s;
}

/* ------------------------------------------------------------------ Bewegung aus */

.motion-off { scroll-behavior: auto; }

.motion-off *,
.motion-off *::before,
.motion-off *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
}

.motion-off .marquee { -webkit-mask-image: none; mask-image: none; }
.motion-off .marquee-track { width: auto; }

.motion-off .marquee-row {
    flex-wrap: wrap;
    justify-content: center;
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.motion-off .marquee-row[aria-hidden="true"] { display: none; }
.motion-off .scroll-hint { display: none; }

/* ------------------------------------------------------------------ Schmalere Bildschirme */

@media (max-width: 1100px) {
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .variants { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .type-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .footer-brand { grid-column: 1 / -1; }
    .features-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .pillars,
    .page-hero-grid,
    .contact-grid,
    .split,
    .showcase-row { grid-template-columns: minmax(0, 1fr); }

    .showcase-row:nth-child(even) .showcase-media { order: 0; }
    .split-sticky { position: static; }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .features,
    .features-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ref-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps { grid-template-columns: minmax(0, 1fr); }
    .step::after { display: none; }
    .mosaic { max-width: 560px; }

    .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 240px; }
    .gallery-item:nth-child(n) { grid-column: span 1; grid-row: span 1; }
    .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 1; }

    .pixel-products { opacity: 0.5; }
}

@media (max-width: 760px) {
    .compare-head { display: none; }
    .compare-row,
    .compare-2 .compare-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .compare-was::before { content: attr(data-label) ": "; color: var(--text-faint); }
    .platforms { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .cards,
    .product-grid,
    .type-grid,
    .features,
    .features-2,
    .features-4,
    .ref-list { grid-template-columns: minmax(0, 1fr); }

    .gallery { grid-template-columns: minmax(0, 1fr); }
    .gallery-item:nth-child(1) { grid-column: span 1; }
    .project-grid,
    .shot-grid,
    .variants { grid-template-columns: minmax(0, 1fr); }
    .project-wide { grid-column: span 1; }
    .frame-inset { position: relative; right: auto; bottom: auto; width: 60%; margin: -40px 0 0 auto; }
    .showcase-row:nth-child(even) .frame-inset { left: auto; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sensor-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .legal-list { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .legal-list dd { margin-bottom: 12px; }
    .contact-coffee { position: static; margin-top: 14px; box-shadow: none; }
    .frame-pixels { display: none; }
}

.checklist a { color: var(--accent); border-bottom: 1px solid var(--accent-line); }
.checklist a:hover { border-bottom-color: var(--accent); }

/* Verlinkte Projektkarten und Galeriebilder: Hover wie bei den übrigen Karten */
.project-card:has(.stretched):hover { border-color: var(--accent-line); }
.project-card:has(.stretched):hover .project-media img { transform: scale(1.04); }
.project-card h3 a:focus-visible { outline: none; }
.project-card:has(.stretched:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.gallery-item:has(.stretched:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
