/* ========================================================================
   DECAY — 3er-Raster, klickbare Panels
   ======================================================================== */

:root {
    --ink: #0F1216;
    --paper: #FFFFFF;
    --line: rgba(255, 255, 255, 0.22);
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-body);
}

a {
    color: inherit;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--paper);
    color: var(--ink);
    padding: 10px 16px;
    z-index: 100;
}
.skip-link:focus {
    left: 0;
}

/* ------------------------------------------------------------------------
   GRID
   ------------------------------------------------------------------------ */

main {
    position: relative;
    height: 100vh;
}

.grid {
    list-style: none;
    display: flex;
    height: 100%;
}

.panel {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    z-index: 1;
    border-right: 1px solid var(--line);
    transform: scale(1);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.panel:last-child {
    border-right: none;
}

.panel-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

/* Die Aufteilung bleibt fix (immer 50/50) — das gehoverte Panel wächst
   stattdessen über seine eigene Box hinaus nach links UND rechts und
   legt sich über die Nachbarn. */
.panel:hover,
.panel:focus-within {
    transform: scale(1.18);
    z-index: 5;
}

.panel-link {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    outline-offset: -3px;
}

.panel-link:focus-visible {
    outline: 2px solid var(--paper);
}

.panel-scrim {
    position: absolute;
    inset: 0;
    background: rgba(10, 12, 15, 0.38);
    transition: background 0.4s ease;
}

.panel:hover .panel-scrim,
.panel:focus-within .panel-scrim {
    background: rgba(10, 12, 15, 0.2);
}

.panel-title {
    position: relative;
    font-weight: 700;
    font-size: clamp(1.05rem, 1.7vw, 1.6rem);
    letter-spacing: -0.01em;
    text-align: center;
    padding: 0 12px;
    transition: font-size 0.4s ease;
}

.panel:hover .panel-title,
.panel:focus-within .panel-title {
    font-size: clamp(1.3rem, 2.2vw, 2rem);
}

/* ------------------------------------------------------------------------
   MOBILE — Spalten werden zu Zeilen
   ------------------------------------------------------------------------ */

@media (max-width: 760px) {
    html, body {
        overflow-y: auto;
    }
    main {
        height: auto;
        min-height: 100vh;
    }
    .grid {
        flex-direction: column;
        height: auto;
    }
    .panel {
        min-height: 130px;
        border-right: none;
        border-bottom: 1px solid var(--line);
    }
    .panel:last-child {
        border-bottom: none;
    }
}
