/* ==========================================================================
   Portfolio Alexander Gebhard — Gestaltungssystem

   Haltung: ein Schaufenster, kein Papier. Weisser Grund, viel Luft, wenige
   grosse Flaechen mit weich gerundeten Ecken und eine einzige geometrische
   Grotesk in allen Groessen. Vorbild ist die Ladenseite eines
   Geraeteherstellers: eine schwebende Kopfzeile in Pillenform, eine grosse
   Bildkachel als Auftakt, Produktkacheln auf hellem Grau, Pillenknoepfe und
   Ueberschriften in normaler Staerke, die wie Saetze enden -- mit Punkt.

   Was daraus folgt:
     - Flaechen ordnen, nicht Linien. Karten tragen einen hellen Grauton und
       keinen Rand; Trennlinien gibt es nur in der Fusszeile.
     - Drei Radien: 28px fuer grosse Kacheln, 20px fuer Bilder und kleine
       Kacheln, die Pille fuer alles, was man drueckt.
     - Schatten nur fuer das, was schwebt: Kopfzeile, Pfeilknoepfe und die
       Bildschirmfotos, die aus einer Kachel herausragen.
     - Ein Blau fuer Wege (Verweise, Hauptknopf), ein Schwarz fuer den
       Knopf auf der Kachel, ein Grau fuer Text.

   Aufbau: 1 Grundlagen  2 Bausteine  3 Kopf und Fuss  4 Startseite
           5 Projekte    6 Detailseite  7 Statusseiten  8 Bewegung und Medien
   ========================================================================== */

/* 1 ── Grundlagen ───────────────────────────────────────────────────────── */

:root {
    /* ---- Flaechen ---------------------------------------------------- */
    --surface: #ffffff;
    --tile: #f4f5f7;          /* Produkt- und Merkmalkachel */
    --tile-strong: #eaecef;   /* dieselbe Kachel beim Zeigen */
    --line: #e3e5e8;          /* Trenner in der Fusszeile, Rand der Chips */
    --line-strong: #c4c7c5;   /* Umriss von Rahmenknoepfen und Filtern */

    /* ---- Schrift ----------------------------------------------------- */
    --ink: #1f1f1f;
    --text: #444746;
    --text-muted: #5f6368;

    /* ---- Akzente ----------------------------------------------------- */
    --primary: #0b57d0;
    --primary-strong: #0842a0;
    --primary-soft: #d3e3fd;
    --on-primary-soft: #041e49;
    --primary-tint: #e8f0fe;
    --dark: #1f1f1f;
    --dark-hover: #303030;

    /* ---- Zustandsmarken ---------------------------------------------- */
    --ok-soft: #c4eed0;
    --ok-ink: #0d652d;
    --info-soft: #d3e3fd;
    --info-ink: #0842a0;
    --warn-soft: #feefc3;
    --warn-ink: #6f4a00;
    --neutral-soft: #e8eaed;
    --neutral-ink: #3c4043;

    /* ---- Formen ------------------------------------------------------ */
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --radius-pill: 999px;

    /* ---- Erhebung ---------------------------------------------------- */
    --shadow-header: 0 1px 2px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-header-strong: 0 1px 3px rgba(0, 0, 0, 0.12), 0 6px 20px rgba(0, 0, 0, 0.10);
    --shadow-float: 0 1px 3px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.10);
    --shadow-media: 0 18px 44px rgba(0, 0, 0, 0.16);
    --shadow-media-strong: 0 28px 64px rgba(0, 0, 0, 0.22);

    /* ---- Raster ------------------------------------------------------ */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;

    --shell: 1160px;
    --gutter: clamp(1rem, 4vw, 2rem);
    /* Abstand der grossen Kacheln zum Bildschirmrand. */
    --bleed: clamp(0.75rem, 1.7vw, 1.5rem);
    --section-space: clamp(3.5rem, 8vw, 6rem);
    --header-height: 3.75rem;
    --header-offset: 0.75rem;

    /* ---- Schrift ----------------------------------------------------- */
    --font-sans: "Google Sans Flex", "Google Sans", Roboto, "Segoe UI", Arial, sans-serif;

    --type-display: clamp(2.25rem, 4.8vw, 3.75rem);
    --type-headline: clamp(2rem, 4vw, 3rem);
    --type-title-lg: clamp(1.75rem, 2.6vw, 2.25rem);
    --type-title: 1.5rem;
    --type-title-sm: 1.125rem;
    --type-body-lg: 1.125rem;
    --type-body: 1rem;
    --type-body-sm: 0.9375rem;
    --type-label: 0.875rem;
    --type-label-sm: 0.8125rem;

    /* ---- Bewegung ---------------------------------------------------- */
    --ease: cubic-bezier(0.2, 0, 0, 1);
    --duration-short: 0.15s;
    --duration-medium: 0.3s;
    --duration-long: 0.5s;

    /* ---- Stapelordnung ----------------------------------------------- */
    --layer-header: 50;
    --layer-skip: 100;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Sprungziele landen nicht unter der schwebenden Kopfzeile. */
    scroll-padding-top: calc(var(--header-height) + var(--header-offset) + var(--space-4));
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--type-body);
    font-optical-sizing: auto;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    margin: 0;
    color: var(--ink);
    font-weight: 400;
    line-height: 1.15;
}

p {
    margin: 0;
}

ul, ol, dl, dd {
    margin: 0;
    padding: 0;
}

ul, ol {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

img, svg {
    display: block;
    max-width: 100%;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

button:disabled {
    cursor: default;
}

code {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.875em;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

::selection {
    background: var(--primary-soft);
    color: var(--on-primary-soft);
}

/* Hilfsklassen */

.shell {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* Breite Spalte fuer die grossen Kacheln: nur der schmale Rand bleibt. */
.bleed {
    padding-inline: var(--bleed);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    z-index: var(--layer-skip);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-pill);
    background: var(--dark);
    color: #fff;
    font-weight: 500;
    transform: translateY(-160%);
    transition: transform var(--duration-medium) var(--ease);
}

.skip-link:focus-visible {
    transform: translateY(0);
}

.icon {
    width: 1.25rem;
    height: 1.25rem;
    flex: none;
}

.icon--sm {
    width: 1rem;
    height: 1rem;
}

/* 2 ── Bausteine ────────────────────────────────────────────────────────── */

.section {
    padding-block: var(--section-space);
}

.section--tight {
    padding-block: clamp(2rem, 5vw, 3rem) var(--section-space);
}

/* Kleine Marke ueber einer Ueberschrift -- schlicht, ohne Versalien. */
.eyebrow {
    display: block;
    margin-bottom: var(--space-3);
    color: var(--text-muted);
    font-size: var(--type-label);
    font-weight: 500;
}

/* Abschnittskopf: mittig, mit Luft nach unten. */
.section__head {
    max-width: 46rem;
    margin: 0 auto clamp(2rem, 4vw, 3rem);
    text-align: center;
}

.section__head--row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-5);
    max-width: none;
    flex-wrap: wrap;
    text-align: left;
}

.section__title {
    font-size: var(--type-headline);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -0.01em;
}

.section__lead {
    margin-top: var(--space-4);
    color: var(--text);
    font-size: var(--type-body-lg);
    line-height: 1.5;
}

.section__head--row .section__lead {
    max-width: 44rem;
}

.block-title {
    margin: var(--space-7) 0 var(--space-4);
    font-size: var(--type-title-lg);
    font-weight: 500;
}

.block-title:first-child {
    margin-top: 0;
}

/* Knoepfe --------------------------------------------------------------
   Immer eine Pille, 48px hoch. Vier Fuellungen: Blau fuer den Hauptweg,
   Schwarz fuer den Knopf auf einer Kachel, Weiss auf dunklem Grund,
   Umriss fuer den Nebenweg. */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 3rem;
    padding: 0 var(--space-5);
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-size: var(--type-body);
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transition: background var(--duration-short) var(--ease),
                color var(--duration-short) var(--ease),
                border-color var(--duration-short) var(--ease),
                box-shadow var(--duration-short) var(--ease);
}

.button--primary {
    background: var(--primary);
    color: #fff;
}

.button--primary:hover {
    background: var(--primary-strong);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.button--dark {
    background: var(--dark);
    color: #fff;
}

.button--dark:hover {
    background: var(--dark-hover);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.button--light {
    background: #fff;
    color: var(--ink);
}

.button--light:hover {
    background: #f1f3f4;
}

.button--outline {
    border-color: var(--line-strong);
    color: var(--primary);
}

.button--outline:hover {
    background: rgba(11, 87, 208, 0.08);
}

.button--small {
    min-height: 2.5rem;
    padding: 0 var(--space-4);
    font-size: var(--type-body-sm);
}

/* Verweis mit Winkel dahinter: "Kaufen >" -- hier "Details ansehen >". */
.text-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    color: var(--primary);
    font-weight: 500;
    transition: color var(--duration-short) var(--ease);
}

.text-link:hover {
    color: var(--primary-strong);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.text-link .icon {
    transition: transform var(--duration-short) var(--ease);
}

.text-link:hover .icon {
    transform: translateX(2px);
}

/* Runder Symbolknopf: Pfeile der Kachelreihen, "Nach oben". */
.icon-button {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-float);
    transition: background var(--duration-short) var(--ease),
                opacity var(--duration-short) var(--ease);
}

.icon-button:hover {
    background: #f1f3f4;
}

.icon-button:disabled {
    opacity: 0.35;
    box-shadow: none;
    background: var(--tile);
}

/* Marken und Chips -----------------------------------------------------
   Die Marke ist die kleine blaue Pille "Neu" auf der Produktkachel; sie
   traegt hier Status und Kategorie. Der Chip ist die weisse Pille fuer
   Technologien. */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 1.625rem;
    padding: 0 var(--space-3);
    border-radius: var(--radius-pill);
    background: var(--neutral-soft);
    color: var(--neutral-ink);
    font-size: var(--type-label-sm);
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

.badge--released { background: var(--ok-soft); color: var(--ok-ink); }
.badge--closedbeta { background: var(--ok-soft); color: var(--ok-ink); }
.badge--indevelopment { background: var(--info-soft); color: var(--info-ink); }
.badge--prototype { background: var(--warn-soft); color: var(--warn-ink); }
.badge--archived { background: var(--neutral-soft); color: var(--neutral-ink); }
.badge--warning { background: var(--warn-soft); color: var(--warn-ink); }

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.chip {
    padding: 0.375rem var(--space-3);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--text);
    font-size: var(--type-label);
    font-weight: 500;
    line-height: 1.25;
    white-space: nowrap;
}

.chip--core {
    border-color: transparent;
    background: var(--primary-soft);
    color: var(--on-primary-soft);
}

.chip--muted {
    border-color: transparent;
    background: transparent;
    color: var(--text-muted);
}

.chips--small .chip {
    padding: var(--space-1) 0.625rem;
    font-size: var(--type-label-sm);
}

.notice {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin-top: var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: var(--warn-soft);
    color: var(--warn-ink);
    font-size: var(--type-body-sm);
    text-align: left;
}

.notice .icon {
    margin-top: 0.15rem;
}

.section__head .notice {
    max-width: 36rem;
    margin-inline: auto;
}

.empty-state {
    padding: var(--space-8) var(--space-4);
    text-align: center;
    color: var(--text-muted);
}

/* Kachelreihe ----------------------------------------------------------
   Eine Reihe gleich breiter Kacheln, die sich waagerecht schieben laesst.
   Sie laeuft bis an den Bildschirmrand, damit die naechste Kachel sichtbar
   anschneidet -- so weiss man, dass da noch etwas kommt. */
.rail__track {
    display: flex;
    gap: var(--space-5);
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    padding-bottom: var(--space-2);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
}

.rail__track::-webkit-scrollbar {
    display: none;
}

.rail__track > * {
    flex: 0 0 min(100%, 22rem);
    scroll-snap-align: start;
}

.rail__nav {
    display: none;
    gap: var(--space-3);
}

.js .rail__nav {
    display: flex;
}

/* Blaue Leiste mit Einladung -- wie der Hinweis auf ein neues Geraet. */
.banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-5);
    padding: var(--space-6) clamp(1.5rem, 4vw, 3rem);
    border-radius: var(--radius-xl);
    background: var(--primary-tint);
}

.banner__text {
    flex: 1 1 24rem;
}

.banner__title {
    font-size: var(--type-title);
    font-weight: 500;
}

.banner__lead {
    margin-top: var(--space-2);
    color: var(--text);
}

/* 3 ── Kopf und Fuss ────────────────────────────────────────────────────── */

/* Die Kopfzeile schwebt als weisse Pille mit etwas Abstand zum Rand ueber
   dem Inhalt. Die Huelle selbst laesst Zeiger durch, nur die Pille faengt. */
.site-header {
    position: sticky;
    top: 0;
    z-index: var(--layer-header);
    padding: var(--header-offset) var(--bleed) 0;
    pointer-events: none;
}

.site-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    min-height: var(--header-height);
    padding-inline: var(--space-5) var(--space-3);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow-header);
    pointer-events: auto;
    transition: box-shadow var(--duration-medium) var(--ease);
}

.site-header.is-scrolled .site-header__bar {
    box-shadow: var(--shadow-header-strong);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--ink);
    font-size: var(--type-title-sm);
    font-weight: 500;
    white-space: nowrap;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 2.125rem;
    height: 2.125rem;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: var(--type-label-sm);
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background var(--duration-short) var(--ease);
}

.brand:hover .brand__mark {
    background: var(--primary-strong);
}

.site-nav {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    min-width: 0;
}

.site-nav__list {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.site-nav__list a {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0 var(--space-3);
    border-radius: var(--radius-pill);
    color: var(--ink);
    font-size: var(--type-body-sm);
    font-weight: 500;
    white-space: nowrap;
    transition: background var(--duration-short) var(--ease),
                color var(--duration-short) var(--ease);
}

.site-nav__list a:hover {
    background: var(--tile);
}

.site-nav__list a.is-active {
    color: var(--primary);
}

.site-nav__tools {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Sprachwahl als umrandete Pille mit Weltkugel. */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    min-height: 2.5rem;
    padding-inline: var(--space-3) var(--space-1);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
}

.lang-switch__item {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0 var(--space-2);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: var(--type-label);
    font-weight: 500;
    transition: background var(--duration-short) var(--ease),
                color var(--duration-short) var(--ease);
}

.lang-switch__item:hover {
    background: var(--tile);
    color: var(--ink);
}

.lang-switch__item.is-active {
    background: var(--primary-soft);
    color: var(--on-primary-soft);
}

/* Zwei Balken, die sich zum Kreuz drehen. Halber Achsabstand 4px. */
.nav-toggle {
    display: none;
    flex: none;
    flex-direction: column;
    justify-content: center;
    gap: 0.375rem;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    transition: background var(--duration-short) var(--ease);
}

.nav-toggle:hover {
    background: var(--tile);
}

.nav-toggle__bar {
    display: block;
    width: 1.125rem;
    height: 2px;
    margin-inline: auto;
    border-radius: 1px;
    background: var(--ink);
    transition: transform var(--duration-medium) var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:first-child {
    transform: translateY(0.25rem) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar + .nav-toggle__bar {
    transform: translateY(-0.25rem) rotate(-45deg);
}

.site-footer {
    margin-top: var(--section-space);
    border-top: 1px solid var(--line);
}

.site-footer__inner {
    padding-block: var(--space-7) var(--space-6);
}

.site-footer__top {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: var(--space-6);
}

.site-footer__name {
    color: var(--ink);
    font-size: var(--type-title);
    font-weight: 500;
}

.site-footer__tagline {
    margin-top: var(--space-2);
    max-width: 30ch;
    color: var(--text);
    font-size: var(--type-body-sm);
}

.site-footer__heading {
    margin-bottom: var(--space-4);
    font-size: var(--type-body);
    font-weight: 600;
}

.site-footer__list {
    display: grid;
    gap: var(--space-3);
}

.site-footer__list a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text);
    font-size: var(--type-body-sm);
    transition: color var(--duration-short) var(--ease);
}

.site-footer__list a:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-footer__list .icon {
    color: var(--text-muted);
}

.site-footer__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-top: var(--space-7);
    padding-top: var(--space-5);
    border-top: 1px solid var(--line);
    color: var(--text-muted);
    font-size: var(--type-label-sm);
}

.site-footer__meta-text {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-5);
}

.to-top {
    width: 2.5rem;
    height: 2.5rem;
    box-shadow: none;
    border: 1px solid var(--line-strong);
}

/* 4 ── Startseite ───────────────────────────────────────────────────────── */

/* Auftakt: eine grosse Kachel wie ein Produktfoto. Dunkler, weich
   ausgeleuchteter Grund, zwei gezeichnete Smartphones und eine Uhr rechts,
   die unten aus der Kachel ragen, und der Text unten links -- kleine Zeile, grosse
   Ueberschrift, ein weisser Knopf. Mehr steht nicht im Bild. */
.hero {
    position: relative;
    display: grid;
    min-height: min(46rem, 88vh);
    margin-top: var(--space-3);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(55% 60% at 70% 40%, rgba(96, 165, 250, 0.50) 0%, rgba(96, 165, 250, 0) 70%),
        radial-gradient(40% 45% at 92% 90%, rgba(244, 114, 182, 0.32) 0%, rgba(244, 114, 182, 0) 70%),
        radial-gradient(50% 45% at 10% 10%, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0) 70%),
        linear-gradient(160deg, #090f1f 0%, #0e1e48 55%, #143684 100%);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}

/* Ein schraeger Lichtstreifen, wie ihn ein Studio-Foto haette. */
.hero::before {
    content: "";
    position: absolute;
    inset: -20% -10%;
    background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.07) 50%, transparent 58%);
    pointer-events: none;
}

.hero__inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-6);
    align-items: end;
    min-height: inherit;
    padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 3.5rem);
}

.hero__text {
    position: relative;
    z-index: 3;
    align-self: end;
    padding-bottom: var(--space-2);
}

.hero__eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--type-body-lg);
    font-weight: 500;
    opacity: 0.92;
}

.hero__roles {
    position: relative;
    height: 1.5rem;
    min-width: 12rem;
}

.hero__role {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(0.4rem);
    transition: opacity var(--duration-medium) var(--ease),
                transform var(--duration-medium) var(--ease);
}

.hero__role.is-active {
    opacity: 1;
    transform: translateY(0);
    transition-delay: var(--duration-medium);
}

.hero__title {
    margin-top: var(--space-3);
    max-width: 14ch;
    color: #fff;
    font-size: clamp(2.75rem, 6.2vw, 4.75rem);
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: -0.025em;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-6);
}

/* Die Buehne fuer die Smartphones: rechte Haelfte der Kachel. Die Telefone
   sind absolut gesetzt und ragen unten heraus; die Kachel schneidet sie ab. */
.hero__stage {
    position: relative;
    align-self: stretch;
    min-height: 30rem;
}

/* Gezeichnetes Smartphone ------------------------------------------------
   Ein neutraler Rahmen ohne Marke: dunkles Gehaeuse mit heller Kante,
   Bildschirm mit grossem Radius, eine Aussparung oben, Tasten an den
   Seiten. Der Bildschirm zeigt ein Bild oder einen Platzhalter in der
   Farbe der Anwendung. */
.phone {
    --tone: var(--primary);
    position: absolute;
    aspect-ratio: 9 / 19.5;
    padding: 0.7rem;
    border-radius: 3rem;
    background: linear-gradient(160deg, #2a2d35 0%, #0d0f14 45%, #1a1d24 100%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.18),
        inset 0 0 0 3px #05060a,
        0 50px 90px rgba(0, 0, 0, 0.55),
        0 12px 30px rgba(0, 0, 0, 0.35);
}

/* Einschalttaste rechts, Lautstaerke links -- als schmale Stege. */
.phone::before,
.phone::after {
    content: "";
    position: absolute;
    width: 3px;
    border-radius: 2px;
    background: #2a2d35;
}

.phone::before {
    right: -3px;
    top: 22%;
    height: 11%;
}

.phone::after {
    left: -3px;
    top: 18%;
    height: 7%;
    box-shadow: 0 5rem 0 #2a2d35;
}

.phone__screen {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 2.3rem;
    background: var(--tone);
    overflow: hidden;
}

.phone__screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.phone__cutout {
    position: absolute;
    top: 0.8rem;
    left: 50%;
    z-index: 2;
    width: 26%;
    height: 1.4rem;
    border-radius: var(--radius-pill);
    background: #05060a;
    transform: translateX(-50%);
}

/* Platzhalter-Bildschirm: die Farbe der Anwendung, darauf angedeutete
   Flaechen einer Oberflaeche und der Name der Anwendung. Sobald ein Bild
   eingetragen ist, verschwindet er. */
.phone__mock {
    position: absolute;
    inset: 0;
    padding: 4rem 1.1rem 1.5rem;
    background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 78%, #fff) 0%, var(--tone) 60%, color-mix(in srgb, var(--tone) 80%, #000) 100%);
}

.phone__label {
    display: block;
    color: #fff;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Angedeutete Karten: weisse Flaechen mit wenig Deckkraft. */
.phone__mock::before {
    content: "";
    position: absolute;
    left: 1.1rem;
    right: 1.1rem;
    top: 7rem;
    bottom: 1.5rem;
    background:
        linear-gradient(rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.28)) 0 0 / 100% 26% no-repeat,
        linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.55)) 0 34% / 58% 4% no-repeat,
        linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22)) 0 46% / 47% 20% no-repeat,
        linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22)) 100% 46% / 47% 20% no-repeat,
        linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22)) 0 82% / 100% 20% no-repeat,
        linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)) 50% 100% / 44% 5% no-repeat;
}

/* Zwei Geraete: eines vorn rechts, leicht nach links geneigt; eines dahinter,
   kleiner und nach rechts geneigt -- wie zwei Telefone auf einem Tisch. */
.phone--front {
    right: 2%;
    bottom: -22%;
    z-index: 2;
    width: clamp(15rem, 21vw, 19rem);
    transform: rotate(-7deg);
}

.phone--back {
    right: 40%;
    bottom: -10%;
    z-index: 1;
    width: clamp(12.5rem, 17.5vw, 16rem);
    transform: rotate(9deg);
    filter: brightness(0.82);
}

/* Die Uhr steht vorn links vor dem hinteren Telefon, leicht geneigt; ihr
   Armband laeuft unten aus der Kachel. Gezeichnet ist sie wie auf den
   Projektseiten (.device--watch), nur mit dem tieferen Schatten der Telefone. */
.hero__stage .hero__watch {
    --device-shadow: 0 34px 60px rgba(0, 0, 0, 0.5), 0 10px 24px rgba(0, 0, 0, 0.35);
    position: absolute;
    left: 3%;
    bottom: 7%;
    z-index: 3;
    width: clamp(8.5rem, 12vw, 11rem);
    transform: rotate(-6deg);
}

/* Der Vorstellungstext steht unter dem Auftakt, mittig und ruhig. */
.intro {
    max-width: 46rem;
    margin: clamp(2.5rem, 5vw, 4rem) auto 0;
    color: var(--text);
    font-size: clamp(1.125rem, 1.6vw, 1.375rem);
    line-height: 1.5;
    text-align: center;
}

/* Kennzahlen: drei grosse Zahlen in einer ruhigen Reihe. */
.stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(2rem, 7vw, 6rem);
    padding-block: clamp(2rem, 4vw, 3rem) 0;
    text-align: center;
}

/* Der Verfuegbarkeitshinweis steht im Kontaktabschnitt als gruene Pille. */
.availability {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-4);
    padding: 0.375rem var(--space-3);
    border-radius: var(--radius-pill);
    background: var(--ok-soft);
    color: var(--ok-ink);
    font-size: var(--type-label);
    font-weight: 500;
}

.status-mark {
    width: 0.5rem;
    height: 0.5rem;
    flex: none;
    border-radius: 50%;
    background: currentColor;
}

.stat__value {
    color: var(--ink);
    font-size: clamp(2.5rem, 4.5vw, 3.5rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat__label {
    margin-top: var(--space-2);
    color: var(--text-muted);
    font-size: var(--type-body);
}

/* Schaufenster-Kacheln --------------------------------------------------
   Grosse Kacheln fuer die hervorgehobenen Projekte: Titel oben mittig,
   Knopf, und unten das Bildschirmfoto, das aus der Kachel ragt. Der Grund
   verlaeuft von Weiss in einen zarten Ton der Projektfarbe. */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    gap: var(--space-5);
}

.showcase {
    --project-accent: var(--primary);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 34rem;
    padding: clamp(2rem, 4vw, 3rem) var(--space-5) 0;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, #fbfbfc 0%, color-mix(in srgb, var(--project-accent) 16%, #fff) 100%);
    text-align: center;
    overflow: hidden;
    transition: box-shadow var(--duration-medium) var(--ease);
}

.showcase:hover {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--project-accent) 25%, transparent);
}

.showcase__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.showcase__title {
    max-width: 14ch;
    font-size: var(--type-title-lg);
    font-weight: 400;
    line-height: 1.12;
}

.showcase__tagline {
    max-width: 32ch;
    margin-top: var(--space-3);
    color: var(--text);
    font-size: var(--type-body);
}

.showcase__cta {
    margin-top: var(--space-5);
}

.showcase__media {
    display: flex;
    flex: 1;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    margin-top: var(--space-6);
}

.showcase__media > img {
    width: 88%;
    max-height: 18rem;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    box-shadow: var(--shadow-media);
    transition: transform var(--duration-long) var(--ease);
}

.showcase:hover .showcase__media > img {
    transform: translateY(-8px);
}

/* Ohne Bildschirmfoto steht das Symbol des Projekts wie ein Geraet auf
   einer grossen runden Flaeche, die unten aus der Kachel ragt. */
.orb {
    display: grid;
    place-items: center;
    width: 11rem;
    height: 11rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--project-accent) 22%, #fff);
    color: var(--project-accent);
    transition: transform var(--duration-long) var(--ease);
}

.orb .icon {
    width: 4.5rem;
    height: 4.5rem;
}

.showcase__media .orb {
    margin-bottom: -3.5rem;
}

.showcase:hover .orb {
    transform: translateY(-8px);
}

.section__actions {
    display: flex;
    justify-content: center;
    margin-top: clamp(2rem, 4vw, 3rem);
}

/* Ueber mich: Text links, grosse Kachel rechts. */
.split {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.split__title {
    font-size: var(--type-title-lg);
    font-weight: 400;
    line-height: 1.15;
}

.split__text p {
    margin-top: var(--space-4);
    color: var(--text);
    font-size: var(--type-body-lg);
    line-height: 1.6;
}

.split__title + p {
    margin-top: var(--space-5);
    color: var(--ink);
}

.split__facts {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-5);
}

.fact-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 2.25rem;
    padding: 0 var(--space-4) 0 var(--space-3);
    border-radius: var(--radius-pill);
    background: var(--tile);
    color: var(--ink);
    font-size: var(--type-label);
    font-weight: 500;
}

.fact-pill .icon {
    color: var(--text-muted);
}

.split__media {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border-radius: var(--radius-xl);
    background: var(--tile);
    overflow: hidden;
}

.portrait__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portrait__monogram {
    color: var(--ink);
    font-size: clamp(6rem, 16vw, 12rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.05em;
}

/* Technikfelder: eine Kachel je Bereich, wie die Kategorien im Laden. */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: var(--space-5);
}

.category {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-6) var(--space-5);
    border-radius: var(--radius-xl);
    background: var(--tile);
    transition: background var(--duration-medium) var(--ease);
}

.category:hover {
    background: var(--tile-strong);
}

.round-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
}

.round-icon .icon {
    width: 1.5rem;
    height: 1.5rem;
}

.category__title {
    font-size: var(--type-title);
    font-weight: 500;
    line-height: 1.2;
}

.category__description {
    margin-top: var(--space-1);
    color: var(--text);
    font-size: var(--type-body-sm);
}

.category .chips {
    margin-top: auto;
    padding-top: var(--space-2);
}

/* Werdegang: eine Reihe von Merkmalkarten. */
.feature {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-6) var(--space-5);
    border-radius: var(--radius-xl);
    background: var(--tile);
}

.feature.is-placeholder {
    background: transparent;
    outline: 1px dashed var(--line-strong);
    outline-offset: -1px;
}

.feature .round-icon {
    margin-bottom: var(--space-2);
}

.feature.is-placeholder .round-icon {
    background: var(--tile);
    color: var(--text-muted);
}

.feature__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
}

.feature__period {
    color: var(--text-muted);
    font-size: var(--type-label);
    font-weight: 500;
}

.feature__title {
    font-size: var(--type-title);
    font-weight: 500;
    line-height: 1.2;
}

.feature__organization {
    color: var(--ink);
    font-size: var(--type-body-sm);
    font-weight: 500;
}

.feature__description {
    color: var(--text);
    font-size: var(--type-body-sm);
    line-height: 1.55;
}

.feature .chips {
    margin-top: auto;
    padding-top: var(--space-2);
}

/* Kontakt */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    gap: var(--space-4);
    max-width: 54rem;
    margin-inline: auto;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    background: var(--tile);
    text-align: left;
    transition: background var(--duration-medium) var(--ease);
}

a.contact-card:hover {
    background: var(--tile-strong);
}

.contact-card__text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.contact-card__label {
    color: var(--text-muted);
    font-size: var(--type-label-sm);
    font-weight: 500;
}

.contact-card__value {
    color: var(--ink);
    font-weight: 500;
    overflow-wrap: anywhere;
}

.contact-card__arrow {
    margin-left: auto;
    color: var(--text-muted);
    transition: transform var(--duration-short) var(--ease);
}

a.contact-card:hover .contact-card__arrow {
    transform: translateX(2px);
}

.contact-card.is-placeholder {
    background: transparent;
    outline: 1px dashed var(--line-strong);
    outline-offset: -1px;
}

.contact-card.is-placeholder .round-icon {
    background: var(--tile);
    color: var(--text-muted);
}

.contact-card.is-placeholder .contact-card__value {
    color: var(--text-muted);
    font-weight: 400;
}

/* 5 ── Projekte ─────────────────────────────────────────────────────────── */

.page-head {
    padding-block: clamp(2.5rem, 6vw, 4rem) 0;
    text-align: center;
}

.page-head__title {
    font-size: var(--type-headline);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -0.01em;
}

.page-head__lead {
    max-width: 40rem;
    margin: var(--space-4) auto 0;
    color: var(--text);
    font-size: var(--type-body-lg);
}

/* Filter als Auswahlpillen: Umriss in Ruhe, hellblau in der Auswahl. */
.filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-6);
}

.filter {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 2.5rem;
    padding: 0 var(--space-4);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    color: var(--ink);
    font-size: var(--type-body-sm);
    font-weight: 500;
    transition: background var(--duration-short) var(--ease),
                border-color var(--duration-short) var(--ease),
                color var(--duration-short) var(--ease);
}

.filter:hover {
    background: var(--tile);
}

.filter.is-active {
    border-color: transparent;
    background: var(--primary-soft);
    color: var(--on-primary-soft);
}

.filter__check {
    display: none;
}

.filter.is-active .filter__check {
    display: block;
}

.filter__count {
    color: var(--text-muted);
    font-weight: 400;
}

.filter.is-active .filter__count {
    color: inherit;
    opacity: 0.8;
}

/* Technikfelder gliedern die Uebersicht. */
.tech-group + .tech-group {
    margin-top: clamp(3rem, 6vw, 4.5rem);
}

.tech-group__head {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.tech-group__head .round-icon {
    background: var(--tile);
}

.tech-group__text {
    flex: 1;
    min-width: 0;
}

.tech-group__title {
    font-size: var(--type-title-lg);
    font-weight: 400;
    line-height: 1.15;
}

.tech-group__description {
    margin-top: var(--space-1);
    max-width: 60ch;
    color: var(--text);
    font-size: var(--type-body-sm);
}

.tech-group__count {
    flex: none;
    align-self: flex-start;
}

/* Produktkachel ---------------------------------------------------------
   Grauer Kasten mit dem Bild darin und der Marke oben links; Name, Satz
   und Verweis stehen darunter auf Weiss -- genau wie eine Ware im Laden. */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr));
    gap: var(--space-6) var(--space-5);
}

.product {
    --project-accent: var(--primary);
}

.product__link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product__tile {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-lg);
    background: var(--tile);
    overflow: hidden;
    transition: background var(--duration-medium) var(--ease);
}

.product:hover .product__tile {
    background: var(--tile-strong);
}

.product__badge {
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
    z-index: 2;
}

.product__media {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.product__media > img {
    width: 84%;
    height: 78%;
    object-fit: cover;
    object-position: top;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    box-shadow: var(--shadow-media);
    transition: transform var(--duration-long) var(--ease);
}

.product:hover .product__media > img {
    transform: translateY(-6px);
}

.product__media--icon {
    align-items: center;
}

.product__media--icon .orb {
    width: 7.5rem;
    height: 7.5rem;
}

.product__media--icon .orb .icon {
    width: 3rem;
    height: 3rem;
}

.product:hover .orb {
    transform: translateY(-6px);
}

.product__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: var(--space-4) var(--space-1) 0;
}

.product__title {
    color: var(--ink);
    font-size: var(--type-title-sm);
    font-weight: 600;
    line-height: 1.3;
}

.product__tagline {
    margin-top: var(--space-1);
    color: var(--text);
    font-size: var(--type-body-sm);
    line-height: 1.5;
}

.product__cta {
    margin-top: auto;
    padding-top: var(--space-3);
}

/* 6 ── Detailseite ──────────────────────────────────────────────────────── */

.project-detail {
    --project-accent: var(--primary);
}

/* Der Kopf ist eine Schaufenster-Kachel in voller Breite: alles mittig,
   das Bildschirmfoto ragt unten heraus. */
.project-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: var(--space-3);
    padding: clamp(1.5rem, 3vw, 2rem) clamp(1.25rem, 4vw, 3rem) 0;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, #fbfbfc 0%, color-mix(in srgb, var(--project-accent) 18%, #fff) 100%);
    text-align: center;
    overflow: hidden;
}

.project-hero__top {
    display: flex;
    width: 100%;
    justify-content: flex-start;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    min-height: 2.5rem;
    padding: 0 var(--space-3) 0 var(--space-2);
    border-radius: var(--radius-pill);
    color: var(--ink);
    font-size: var(--type-body-sm);
    font-weight: 500;
    transition: background var(--duration-short) var(--ease);
}

.back-link:hover {
    background: rgba(31, 31, 31, 0.06);
}

.project-hero__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
    margin-top: clamp(1.5rem, 4vw, 3rem);
}

.project-hero__title {
    margin-top: var(--space-4);
    max-width: 16ch;
    font-size: var(--type-display);
    font-weight: 400;
    line-height: 1.06;
    letter-spacing: -0.02em;
}

.project-hero__tagline {
    max-width: 40rem;
    margin-top: var(--space-4);
    color: var(--text);
    font-size: var(--type-body-lg);
}

.project-hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-6);
}

.project-hero__media {
    width: min(100%, 60rem);
    margin-top: clamp(2rem, 5vw, 3.5rem);
}

.project-hero__media > img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-media-strong);
}

.project-hero__media .orb {
    width: 13rem;
    height: 13rem;
    margin: 0 auto -4rem;
}

.project-hero__media .orb .icon {
    width: 5.5rem;
    height: 5.5rem;
}

.project-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20rem;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.project-body__paragraph {
    margin-top: var(--space-4);
    color: var(--text);
    font-size: var(--type-body-lg);
    line-height: 1.6;
}

.project-body__paragraph:first-of-type {
    color: var(--ink);
    font-size: clamp(1.25rem, 1.8vw, 1.375rem);
}

.highlight-list {
    display: grid;
    gap: var(--space-3);
}

.highlight-list__item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-md);
    background: var(--tile);
    color: var(--ink);
}

.highlight-list__item .icon {
    margin-top: 0.2rem;
    color: var(--primary);
}

.beta {
    margin-top: var(--space-7);
}

.beta__intro {
    margin-bottom: var(--space-4);
    color: var(--text);
    font-size: var(--type-body-lg);
    line-height: 1.6;
}

.beta-steps {
    display: grid;
    gap: var(--space-3);
    counter-reset: beta-step;
}

.beta-steps__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-md);
    background: var(--tile);
    color: var(--ink);
}

.beta-steps__body {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    min-width: 0;
}

.beta-steps__body::before {
    content: counter(beta-step);
    margin-top: 0.1rem;
    counter-increment: beta-step;
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: var(--type-body-sm);
}

.beta-steps__title {
    font-size: var(--type-title-sm);
    font-weight: 600;
    line-height: 1.3;
}

.beta-steps__text {
    margin-top: var(--space-1);
    color: var(--text-muted);
    font-size: var(--type-body-sm);
}

@media (max-width: 40rem) {
    .beta-steps__item {
        flex-direction: column;
        align-items: stretch;
    }

    .beta-steps__item .button {
        width: 100%;
    }
}

.shot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: var(--space-5);
}

.shot {
    margin: 0;
}

.shot > img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top;
    border-radius: var(--radius-lg);
    background: var(--tile);
}

.shot--device {
    max-width: 18rem;
}

/* Geraete-Bildschirmfotos ------------------------------------------------
   Handy- und Uhrenaufnahmen stecken in einem gezeichneten Geraet. Rand,
   Radien und Anbauteile stehen in Prozent und wachsen mit dem Geraet -- in
   der kleinen Kachel sieht es genauso aus wie im Kopf. */
.device {
    --device-shadow: var(--shadow-media);
    position: relative;
    display: block;
    flex: none;
    transition: transform var(--duration-long) var(--ease);
}

/* Der schwarze Displayrand ist das padding des Bildes, nicht des Geraets:
   Prozent-padding bezieht sich auf die Breite des umgebenden Blocks, und das
   ist fuer das Bild das Geraet selbst. Am Geraet gemessen waere der Rand im
   breiten Kopf der Detailseite dick und in der schmalen Galerie duenn. Den
   Inhalt schneidet der Browser an der inneren Rundung ab. */
.device img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

/* Telefon: schmaler schwarzer Rand, grosse Eckradien, ein duenner
   Metallrahmen als Lichtkante, die Kamera als Loch mitten im Bildschirm und
   zwei Tasten an der Seite. */
.device--phone {
    /* Etwas kuerzer als das Bild: Der Rand liegt innerhalb der Box, das Bild
       behaelt seine volle Breite und wird hoechstens unten gekuerzt. */
    aspect-ratio: 9 / 18.75;
    border-radius: 15% / 7.2%;
    background: #050608;
    box-shadow:
        0 0 0 1.5px #4a4e57,
        var(--device-shadow);
}

.device--phone img {
    padding: 1.6%;
    border-radius: 15% / 7.2%;
    background: linear-gradient(160deg, #22252b 0%, #050608 55%, #16181d 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

/* Kamera: ein Loch im Bildschirm, auf Hoehe der Statusleiste. */
.device--phone::after {
    content: "";
    position: absolute;
    top: 2.3%;
    left: 50%;
    width: 4.4%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #313849 0%, #07080b 60%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
    transform: translateX(-50%);
}

/* Lautstaerke und Einschalttaste als schmale Stege an der rechten Kante. */
.device--phone::before {
    content: "";
    position: absolute;
    top: 20%;
    right: -3px;
    width: 2px;
    height: 20%;
    border-radius: 0 2px 2px 0;
    background: linear-gradient(to bottom, #4a4e57 0 42%, transparent 42% 56%, #4a4e57 56% 100%);
}

/* Uhr: rundes Glas mit schwarzem Rand in einem Gehaeuse mit gewoelbter
   Lichtkante, rechts die Krone, oben und unten das Armband, das nach aussen
   hin ausblendet. Glasrand und Gehaeuse sind beide das padding des Bildes,
   als Ringe eines Verlaufs gemalt. Krone und Armband liegen hinter dem
   Gehaeuse; damit sie dabei nicht hinter der Kachel verschwinden, bildet die
   Uhr eine eigene Stapelebene. */
.device--watch {
    /* Wie weit das Armband ueber das Gehaeuse hinausreicht. */
    --band: 34%;
    isolation: isolate;
    aspect-ratio: 1;
    border-radius: 50%;
    box-shadow: var(--device-shadow);
}

.device--watch img {
    padding: 8%;
    border-radius: 50%;
    background: radial-gradient(circle closest-side,
        #050608 89%,
        #2b2e34 90.5%,
        #a2a7b0 94.5%,
        #3d4149 98%,
        #1d1f23 100%);
}

/* Krone: ein Zylinder an der rechten Seite, in der Mitte glaenzend. */
.device--watch::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 41%;
    right: -3.5%;
    width: 8%;
    height: 18%;
    border-radius: 0 30% 30% 0 / 0 15% 15% 0;
    background: linear-gradient(to bottom, #25282d, #a2a7b0 45%, #4a4e57 70%, #1d1f23);
}

.device--watch::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: calc(-1 * var(--band)) 27%;
    background: linear-gradient(90deg, #1f2226, #3a3e45 50%, #1f2226);
    mask-image: linear-gradient(
        transparent,
        rgba(0, 0, 0, 0.25) 5%,
        rgba(0, 0, 0, 0.7) 11%,
        #000 17%,
        #000 83%,
        rgba(0, 0, 0, 0.7) 89%,
        rgba(0, 0, 0, 0.25) 95%,
        transparent);
}

.showcase:hover .device {
    transform: translateY(-8px);
}

.product:hover .device {
    transform: translateY(-6px);
}

.showcase__media--devices,
.product__media--devices,
.project-hero__media--devices {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.showcase__media--devices {
    gap: 3%;
    margin-bottom: -2.5rem;
}

.showcase__media--devices .device {
    width: 30%;
    max-width: 10rem;
}

/* Das erste Bild ist das Hauptmotiv: Es steht in der Mitte und ragt am
   hoechsten, das zweite links, das dritte rechts. Gilt auch fuer den Kopf
   der Detailseite. */
.showcase__media--devices .device:nth-child(2),
.project-hero__media--devices .device:nth-child(2) {
    order: -1;
}

.showcase__media--devices .device:first-child {
    margin-bottom: 2rem;
}

.product__media--devices {
    gap: 5%;
}

.product__media--devices .device--phone {
    width: 31%;
    margin-bottom: -34%;
}

.product__media--devices .device--phone:first-child {
    margin-bottom: -26%;
}

.project-hero__media--devices {
    gap: clamp(0.75rem, 3vw, 2.5rem);
    margin-bottom: clamp(-9rem, -12vw, -4rem);
}

.project-hero__media--devices .device {
    --device-shadow: var(--shadow-media-strong);
    width: min(30%, 15rem);
}

.project-hero__media--devices .device:first-child {
    margin-bottom: clamp(1.5rem, 4vw, 3.5rem);
}

/* Telefone ragen unten aus Kachel und Kopf, Uhren stehen ganz darin: Nur
   das Armband laeuft unten hinaus. Oben braucht es Platz, damit das Armband
   ausblenden kann, bevor es die Schrift erreicht. */
.product__media--devices .device--watch {
    width: 36%;
    margin-bottom: 12%;
}

.product__media--devices .device--watch:first-child {
    margin-bottom: 18%;
}

.showcase__media--devices:has(.device--watch) {
    margin-bottom: 1.5rem;
    padding-top: 3rem;
}

.project-hero__media--devices:has(.device--watch) {
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
    padding-top: clamp(2rem, 6vw, 4rem);
}

.project-hero__media--devices .device--watch {
    width: min(28%, 15rem);
}

/* In der Galerie steht jedes Geraet ganz, mit Beschriftung darunter. Das
   Armband der Uhr bleibt dort ein kurzer Ansatz. */
.shot-grid--devices {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr));
}

.shot-grid--devices .device {
    width: 100%;
}

.shot--device .device--watch {
    --band: 20%;
    margin-block: 18%;
}

.shot figcaption {
    padding: var(--space-3) var(--space-1) 0;
    color: var(--text-muted);
    font-size: var(--type-label);
}

.shot-empty {
    display: grid;
    gap: var(--space-5);
    justify-items: center;
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    background: var(--tile);
    color: var(--text-muted);
    font-size: var(--type-body-sm);
    text-align: center;
}

.project-body__aside {
    position: sticky;
    top: calc(var(--header-height) + var(--header-offset) + var(--space-5));
    display: grid;
    gap: var(--space-4);
}

.fact-card {
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    background: var(--tile);
}

.fact-card__title {
    margin-bottom: var(--space-4);
    font-size: var(--type-title-sm);
    font-weight: 600;
}

.fact-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-3) var(--space-4);
    font-size: var(--type-body-sm);
}

.fact-list dt {
    color: var(--text-muted);
}

.fact-list dd {
    color: var(--ink);
    font-weight: 500;
    text-align: right;
}

.fact-link {
    color: var(--primary);
    font-weight: 500;
}

.fact-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.project-pager {
    padding-block: var(--space-6) 0;
}

.project-pager__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.project-pager__link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    background: var(--tile);
    transition: background var(--duration-medium) var(--ease);
}

.project-pager__link:hover {
    background: var(--tile-strong);
}

.project-pager__link--next {
    grid-column: 2;
    justify-content: flex-end;
    text-align: right;
}

.project-pager__label {
    display: block;
    color: var(--text-muted);
    font-size: var(--type-label-sm);
    font-weight: 500;
}

.project-pager__name {
    display: block;
    color: var(--ink);
    font-weight: 500;
}

/* 7 ── Statusseiten ─────────────────────────────────────────────────────── */

.status-page {
    display: grid;
    place-items: center;
    min-height: 70vh;
    padding-block: var(--space-8);
    text-align: center;
}

.status-page__code {
    color: var(--primary);
    font-size: clamp(4rem, 16vw, 9rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.04em;
}

.status-page__title {
    margin-top: var(--space-4);
    font-size: var(--type-title-lg);
    font-weight: 400;
}

.status-page__lead {
    max-width: 34rem;
    margin: var(--space-4) auto 0;
    color: var(--text);
}

.status-page__request {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-4);
    color: var(--text-muted);
    font-size: var(--type-label);
}

.status-page .button {
    margin-top: var(--space-6);
}

/* 8 ── Bewegung und Medien ──────────────────────────────────────────────── */

/* Einblenden beim Scrollen. Ohne JavaScript bleibt alles sofort sichtbar,
   weil die Klasse "js" erst im Browser gesetzt wird. */
.js .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity var(--duration-long) var(--ease),
                transform var(--duration-long) var(--ease);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (max-width: 1080px) {
    .site-nav__list a {
        padding-inline: 0.625rem;
        font-size: var(--type-label);
    }
}

@media (max-width: 960px) {
    .hero {
        min-height: 0;
    }

    .hero__inner {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Auf schmalen Schirmen steht der Text oben, die Telefone ragen darunter
       aus der Kachel -- die Kachel schneidet sie unten ab. */
    .hero__text {
        align-self: start;
        padding-bottom: 0;
    }

    .hero__stage {
        min-height: 21rem;
        margin-top: var(--space-4);
    }

    .phone--front {
        right: 6%;
        bottom: -30%;
        width: clamp(11rem, 34vw, 15rem);
    }

    .phone--back {
        right: 46%;
        bottom: -18%;
        width: clamp(9.5rem, 29vw, 13rem);
    }

    .hero__stage .hero__watch {
        left: 2%;
        bottom: 9%;
        width: clamp(6.5rem, 20vw, 9rem);
    }

    .split {
        grid-template-columns: 1fr;
    }

    .split__media {
        max-width: 26rem;
        aspect-ratio: 4 / 3;
    }

    .project-body {
        grid-template-columns: 1fr;
    }

    .project-body__aside {
        position: static;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    }

    .site-footer__top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .nav-toggle {
        display: flex;
    }

    /* Das Navigationsblatt haengt als eigene Kachel unter der Kopfzeile. */
    .site-nav {
        position: fixed;
        top: calc(var(--header-offset) + var(--header-height) + var(--space-2));
        left: var(--bleed);
        right: var(--bleed);
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-5);
        padding: var(--space-5);
        border-radius: var(--radius-xl);
        background: var(--surface);
        box-shadow: var(--shadow-float);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        pointer-events: auto;
        transition: transform var(--duration-medium) var(--ease),
                    opacity var(--duration-medium) var(--ease),
                    visibility var(--duration-medium);
    }

    .site-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .site-nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-1);
    }

    .site-nav__list a {
        min-height: 3rem;
        padding-inline: var(--space-4);
        font-size: var(--type-body-lg);
    }

    .site-nav__tools {
        flex-wrap: wrap;
        justify-content: space-between;
        padding-top: var(--space-4);
        border-top: 1px solid var(--line);
    }

    .site-header__bar {
        padding-inline: var(--space-4) var(--space-2);
    }
}

@media (max-width: 640px) {
    .hero__inner {
        padding: var(--space-5) var(--space-4);
    }

    .hero__stage {
        min-height: 17rem;
    }

    /* Name und Rolle bleiben auf einer Zeile. */
    .hero__eyebrow {
        font-size: var(--type-body);
    }

    .hero__roles {
        min-width: 8rem;
    }

    .phone--front {
        bottom: -40%;
    }

    .phone--back {
        bottom: -26%;
    }

    .showcase {
        min-height: 0;
    }

    .project-pager__inner {
        grid-template-columns: 1fr;
    }

    .project-pager__link--next {
        grid-column: auto;
    }

    .fact-list dd {
        text-align: left;
    }

    .site-footer__top {
        grid-template-columns: 1fr;
    }

    .tech-group__head {
        flex-wrap: wrap;
    }

    .banner .button {
        width: 100%;
    }
}

/* Wer mehr Kontrast eingestellt hat, bekommt Umrisse um die Kacheln. */
@media (prefers-contrast: more) {
    :root {
        --line: #9aa0a6;
        --line-strong: #5f6368;
    }

    .category,
    .feature,
    .product__tile,
    .contact-card,
    .fact-card,
    .highlight-list__item,
    .beta-steps__item,
    .showcase,
    .banner {
        outline: 1px solid var(--line-strong);
        outline-offset: -1px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }
}

@media (forced-colors: active) {
    .site-nav__list a:hover,
    .filter:hover,
    .lang-switch__item:hover {
        background: transparent;
    }

    .category,
    .feature,
    .product__tile,
    .contact-card,
    .fact-card,
    .showcase,
    .banner,
    .site-header__bar {
        border: 1px solid CanvasText;
    }
}

@media print {
    .site-header,
    .to-top,
    .rail__nav,
    .project-pager {
        display: none;
    }

    .hero {
        color: #000;
        background: none;
        border: 1px solid #000;
    }

    .product,
    .category,
    .feature,
    .contact-card,
    .fact-card,
    .shot,
    .showcase {
        break-inside: avoid;
    }
}
