:root {
    --accent: #3b82f6;
    --bg: #080808;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, .font-outfit {
    font-family: 'Outfit', sans-serif;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ------------------------------------------------------ Hintergrund-Raster */

.grid-overlay {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
}

/* Enge Zeilenhöhe + bg-clip-text schneidet sonst Unterlängen ab (g, p, y) */
.hero-line {
    padding-bottom: 0.12em;
    margin-bottom: -0.06em;
}

/* ------------------------------------------------------------- Navigation */

.nav-scrolled {
    background: rgba(8, 8, 8, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.nav-link-active {
    color: #ffffff;
}

/* --------------------------------------------------------- Wort-Enthüllung */

.word-mask {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    /* Oberlängen/Unterlängen dürfen nicht abgeschnitten werden */
    padding-bottom: 0.12em;
    margin-bottom: -0.12em;
}

.word-inner {
    display: inline-block;
    will-change: transform;
}

/* ----------------------------------------------------------------- Laufband */

/* Weiche Kanten statt hartem Abschnitt am Viewport-Rand */
.marquee {
    mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}

.marquee-item {
    display: inline-block;
    padding: 0 2rem;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.32);
    white-space: nowrap;
}

/* Feine Haarlinie als Trenner — ruhiger als ein Punkt */
.marquee-rule {
    display: block;
    width: 1px;
    height: 10px;
    background: rgba(255, 255, 255, 0.14);
    flex-shrink: 0;
}

.marquee-track {
    animation: marquee 60s linear infinite;
}

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

/* --------------------------------------------------------------- Leistungen */

/* Punktmatrix-Ziffer — gleiche Bildsprache wie die Wortmarke */
.numeral-dot {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.22);
    will-change: transform;
    backface-visibility: hidden;
}

.service-point-line {
    display: block;
    width: 22px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
    transform-origin: left center;
    flex-shrink: 0;
}


.service-panel {
    position: absolute;
    inset: 0;
    visibility: hidden;
    pointer-events: none;
}

.service-panel.is-active {
    visibility: visible;
    pointer-events: auto;
}

/* Fallback ohne Bewegung: Panels stehen untereinander statt gestapelt */
.service-panel-static {
    position: static;
    visibility: visible;
}

.service-rail-track {
    width: 2px;
    height: 56px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.service-rail-fill {
    width: 100%;
    height: 100%;
    background: #ffffff;
    transform: scaleY(0);
    transform-origin: top;
}

/* ---------------------------------------------------------------- Vorsprung */

.vorteil {
    transition: background-color 0.5s ease;
}

.vorteil:hover {
    background-color: #0d0d0d;
}

/* Geisterziffer in der Ecke */
.vorteil-index {
    position: absolute;
    top: 1.5rem;
    right: 1.75rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 3.5rem;
    line-height: 1;
    letter-spacing: -0.05em;
    color: rgba(255, 255, 255, 0.04);
    transition: color 0.5s ease;
    pointer-events: none;
    user-select: none;
}

.vorteil:hover .vorteil-index {
    color: rgba(255, 255, 255, 0.09);
}

.vorteil-svg {
    width: 120px;
    height: 48px;
    margin-bottom: 2.5rem;
    overflow: visible;
}

.vorteil-svg path {
    stroke-width: 1.25;
    stroke-linecap: square;
    vector-effect: non-scaling-stroke;
}

.vorteil-svg .stroke-dim {
    stroke: rgba(255, 255, 255, 0.18);
}

.vorteil-svg .stroke-bright {
    stroke: rgba(255, 255, 255, 0.85);
    transition: stroke 0.5s ease;
}

.vorteil:hover .stroke-bright {
    stroke: #ffffff;
}

.vorteil-svg .node-dim {
    fill: rgba(255, 255, 255, 0.25);
}

.vorteil-svg .node-bright {
    fill: #ffffff;
}

/* ------------------------------------------------ Technologie-Bühne (GPU) */

#stage {
    transform: translateZ(0);
}

.aspect-block,
#wordmark span {
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* ------------------------------------------------------------------ Hinweis */

.scroll-hint {
    animation: scrollHint 2.4s ease-in-out infinite;
}

@keyframes scrollHint {
    0%, 100% { opacity: 0.35; transform: translate(-50%, 0); }
    50%      { opacity: 1;    transform: translate(-50%, 6px); }
}

/* --------------------------------------------------------------- Bedienung */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* Der weiße Abschnitt braucht einen dunklen Fokusring */
#philosophie a:focus-visible {
    outline-color: #111111;
}

/* -------------------------------------------------- Reduzierte Bewegung */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .marquee-track,
    .scroll-hint {
        animation: none;
    }

    .scroll-hint {
        opacity: 0.5;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
