/*
Theme Name: BLACKNET
Description: Animierte Spielvorstellung für BLACKNET.
Version: 1.4.0
Requires PHP: 8.2
Text Domain: blacknet-pulse
*/

@font-face {
    font-family: Blacknet Pixel;
    src: url(assets/mister-pixel.ttf) format("truetype");
    font-display: swap;
}

:root {
    color-scheme: dark;
    --bg: #080d13;
    --panel: #0b151d;
    --ink: #f0f8f9;
    --muted: #a9bbc2;
    --pulse: #67edeb;
    --line: #243841;
    --font: Inter, "Segoe UI", system-ui, sans-serif;
    --mono: "Cascadia Mono", "Segoe UI Mono", monospace;
    scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; padding-inline: env(safe-area-inset-left) env(safe-area-inset-right); background: var(--bg); color: var(--ink); font: 16px/1.65 var(--font); }
img { max-width: 100%; display: block; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }
figure, h1, h2, h3, p { margin: 0; }
::selection { background: var(--pulse); color: var(--bg); }
:focus-visible { outline: 2px solid var(--pulse); outline-offset: 5px; }
section[id] { scroll-margin-top: 5.5rem; }
.shell { width: min(1232px, calc(100% - 112px)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 50; padding: .65rem 1rem; background: var(--pulse); color: var(--bg); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.signal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #080d13ed;
    border-bottom: 1px solid #2c45528c;
    backdrop-filter: blur(12px);
    padding-top: env(safe-area-inset-top);
}
.admin-bar .signal-header { top: 32px; }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { display: inline-flex; align-items: center; gap: .65rem; width: fit-content; font: 1.55rem/1 "Blacknet Pixel", var(--mono); letter-spacing: .11em; }
.wordmark img { object-fit: contain; }
.menu-toggle { display: none; }
.header-inner nav { display: flex; align-items: center; gap: clamp(16px, 3.3vw, 50px); }
.header-inner nav a { color: #d5e3e7; font-size: .9rem; font-weight: 600; padding-block: .5rem; transition: color .2s ease; }
.header-inner nav a:hover, .site-footer a:hover { color: var(--pulse); }
.reading-signal { position: absolute; inset: auto 0 -1px; height: 2px; pointer-events: none; background: var(--pulse); box-shadow: 0 0 9px #67edeb99; transform: scaleX(var(--reading-progress, 0)); transform-origin: left; }

.hero {
    position: relative;
    isolation: isolate;
    min-height: clamp(590px, 78svh, 860px);
    display: grid;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #070e15;
}
.hero-art, .hero-shade, .hero-scan, .campaign > img { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; }
.hero-art { object-fit: cover; object-position: 60% 49%; animation: settle 1.6s cubic-bezier(.17, .72, .2, 1) both; }
.hero-shade {
    background: linear-gradient(90deg, #050b13 1%, #050b13e6 25%, #050b13a6 45%, #050b1326 72%),
        linear-gradient(0deg, #080d13 0%, transparent 33%, transparent 76%, #080d1366 100%);
}
.hero-scan {
    pointer-events: none;
    background: repeating-linear-gradient(0deg, transparent 0 5px, #77f1ef0e 5px 6px);
    mask-image: linear-gradient(90deg, transparent 30%, #000 74%);
}
.hero-scan::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 75% 43%, #68fcea59, transparent 51%);
    opacity: 0;
    mix-blend-mode: screen;
    animation: signal-glow 4s ease-in-out infinite alternate both;
}
.hero-scan::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 40%, #62f7ee24 48%, #6ffbf793 49.6%, #c3ffffe0 50%, #67f8ef15 51%, transparent 55%);
    transform: translateY(-78%);
    animation: crt-sweep 5s linear infinite;
}
.hero-content { padding-block: clamp(5rem, 11vh, 9rem); position: relative; }
.hero-content > h1, .hero-content > .hero-copy, .hero-content > .hero-actions { animation: signal-entry .65s ease-out both; }
.hero-content > .hero-copy { animation-delay: .12s; }
.hero-content > .hero-actions { animation-delay: .24s; }
.hero h1 {
    max-width: 9.5ch;
    margin: 1.25rem 0;
    font-weight: 760;
    font-size: clamp(4rem, 9.3vw, 9.1rem);
    line-height: .9;
    letter-spacing: -.092em;
    text-wrap: balance;
    text-shadow: 0 4px 36px #0009;
}
.eyebrow {
    color: var(--pulse);
    font: 650 .86rem/1.5 var(--mono);
    text-transform: uppercase;
    letter-spacing: .12em;
}
.signal-dot { display: inline-block; width: .47rem; height: .47rem; margin-right: .47rem; border-radius: 50%; background: var(--pulse); box-shadow: 0 0 16px #67edebaf; vertical-align: .1em; }
.cursor { color: var(--pulse); font: 500 .42em/1 var(--mono); margin-inline-start: .12em; letter-spacing: 0; animation: blink 1.2s steps(1) infinite; }
.hero-copy { max-width: 36ch; color: #d2dee0; font-size: clamp(1.05rem, 1.6vw, 1.23rem); }
.hero-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.button, .image-viewer button {
    min-height: 46px;
    padding: .65rem 1.05rem;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .94rem;
    transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.button-primary { background: var(--pulse); color: #051219; box-shadow: 0 0 24px #67edeb33; }
.button-primary:hover { background: #baffff; box-shadow: 0 0 30px #67edeb66; }
.button-ghost, .image-viewer button { border-color: #567482; background: #0b171edb; color: var(--ink); }
.button-ghost:hover, .image-viewer button:hover { border-color: var(--pulse); color: var(--pulse); }
.hero-baseline { position: absolute; bottom: 0; left: 0; width: 100%; height: 1px; overflow: hidden; }
.hero-baseline::after { content: ""; display: block; width: 14%; height: 100%; background: linear-gradient(90deg, transparent, var(--pulse), transparent); animation: sweep 9s 1s linear infinite; transform: translateX(-100%); }
.motion-switch {
    position: absolute;
    bottom: 1rem;
    right: max(18px, calc((100% - 1232px) / 2));
    min-height: 34px;
    padding: .3rem .62rem;
    border: 1px solid #63838d;
    background: #09131be8;
    color: #e0edf0;
    font: 600 .81rem/1.4 var(--mono);
    cursor: pointer;
}
.motion-switch span { margin-left: .35rem; color: var(--muted); }
.motion-switch[aria-pressed="true"] span, .motion-switch:hover { color: var(--pulse); }
.motion-switch:hover { border-color: var(--pulse); }
@keyframes settle { from { transform: scale(1.04); opacity: .62; } to { transform: scale(1); opacity: 1; } }
@keyframes blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: .15; } }
@keyframes sweep { 0% { transform: translateX(-100%); } 65%, 100% { transform: translateX(725%); } }
@keyframes signal-entry { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes crt-sweep { 0% { transform: translateY(-54%); } 75%, 100% { transform: translateY(59%); } }
@keyframes signal-glow { from { opacity: .24; } to { opacity: .85; } }

.world-section { padding-block: clamp(4.5rem, 10vw, 8.5rem); display: grid; grid-template-columns: minmax(240px, .85fr) minmax(0, 1.35fr); gap: clamp(2rem, 6vw, 5.5rem); align-items: center; }
.section-intro h2, .campaign h2 { margin: .7rem 0 1.2rem; font-size: clamp(2.6rem, 5.4vw, 5.8rem); font-weight: 720; line-height: .95; letter-spacing: -.075em; text-wrap: balance; }
.section-intro p:not(.eyebrow), .feature-pair p, .campaign p:not(.eyebrow) { color: var(--muted); max-width: 51ch; font-size: 1.04rem; }
.offline-play { margin-top: 1.6rem; padding-left: 1rem; border-left: 2px solid var(--pulse); }
.offline-play h3 { color: var(--pulse); font-size: 1.03rem; margin-bottom: .35rem; }
.feature-screen { border: 1px solid #355358; background: #111c26; box-shadow: 0 22px 65px #0005; }
.feature-screen img { width: 100%; height: auto; }
.feature-screen figcaption, .shot figcaption { padding: .72rem 1rem; color: #d0dfe2; font: 500 .9rem/1.4 var(--mono); }
.feature-screen figcaption { border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; }
.feature-screen figcaption a { color: var(--pulse); font-size: .79rem; }
.feature-screen figcaption a:hover { text-decoration: underline; }
.feature-pair { grid-column: 1/-1; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.8rem, 5vw, 5rem); border-top: 1px solid var(--line); }
.feature-pair article { padding-top: 1.6rem; }
.feature-pair h3 { font-size: clamp(1.4rem, 3vw, 2.05rem); line-height: 1.1; letter-spacing: -.035em; margin-bottom: .7rem; }

.campaign {
    position: relative;
    isolation: isolate;
    display: grid;
    align-items: center;
    min-height: clamp(430px, 44vw, 600px);
    border-block: 1px solid #36465b;
    background: #101321;
    overflow: hidden;
}
.campaign > img { object-fit: cover; object-position: 60% 49%; }
.archive-scan { position: absolute; pointer-events: none; inset: 0; background: linear-gradient(110deg, transparent 43%, #dc89e016 49%, #9cfdf84d 50%, transparent 50.5%); transform: translateX(110%); }
.campaign.entered .archive-scan { animation: archive-sweep 1.15s .12s ease-in-out both; }
@keyframes archive-sweep { from { transform: translateX(-100%); } to { transform: translateX(110%); } }
.campaign::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #0a0c17 1%, #0a0c17e6 27%, #0a0c17a6 47%, #0a0c1708 75%), linear-gradient(0deg, #0a0c1766, transparent 35%); }
.campaign-content { padding-block: 5rem; }
.campaign h2 { font-size: clamp(3.7rem, 9vw, 8.65rem); }
.campaign .eyebrow { color: #ed9cdf; }
.campaign p:not(.eyebrow) { color: #e1d9e4; max-width: 39ch; }

.gallery-section { padding-block: clamp(4rem, 9vw, 8rem); }
.gallery-section .section-intro { margin-bottom: 2rem; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.shot { min-width: 0; border: 1px solid var(--line); background: var(--panel); transition: border-color .25s; }
.shot:hover, .shot:focus-within { border-color: #57bbc4; }
.shot.reveal-ready:nth-child(2) { transition-delay: 65ms; }
.shot.reveal-ready:nth-child(3) { transition-delay: 130ms; }
.shot.reveal-ready:focus-within { transition-delay: 0s; }
.shot a { display: block; overflow: hidden; }
.shot a:focus-visible { outline-offset: -4px; }
.shot img { width: 100%; aspect-ratio: 16 / 10; height: auto; object-fit: cover; transition: transform .35s ease; }
.shot a:hover img { transform: scale(1.04); }
.image-viewer { width: min(1250px, calc(100vw - 36px)); max-height: calc(100dvh - 36px); padding: 0; border: 1px solid #48717e; background: #0d171f; color: var(--ink); }
.image-viewer::backdrop { background: #02060aeb; }
.image-viewer[open] { animation: signal-entry .23s ease-out both; }
.image-viewer > img { width: 100%; max-height: min(72dvh, 740px); object-fit: contain; background: #060c12; touch-action: pan-y pinch-zoom; }
html:has(.image-viewer[open]) { overflow: hidden; }
.viewer-heading, .viewer-controls { display: flex; align-items: center; justify-content: space-between; gap: .85rem; padding: .85rem 1.2rem; }
.viewer-heading h2 { font-size: clamp(1.2rem, 2vw, 1.6rem); line-height: 1.1; }
.viewer-controls p { color: var(--muted); }
.viewer-controls > div { display: flex; gap: .5rem; }
.image-viewer button { cursor: pointer; }

.site-footer { border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); color: var(--muted); }
.footer-inner { padding-block: 2rem; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.5rem; font-size: .91rem; }
.site-footer .wordmark { color: var(--ink); font-size: 1.15rem; }
.footer-links { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .4rem 1.25rem; }
.footer-links [aria-current="page"] { color: var(--pulse); }
.standard-page { min-height: 60vh; padding-block: 4rem; }
.legal-page { max-width: 830px; }
.legal-page h1 { font-size: clamp(2.35rem, 6vw, 4.9rem); line-height: 1.05; letter-spacing: -.06em; margin-bottom: 2rem; overflow-wrap: anywhere; }
.legal-page h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); line-height: 1.18; margin-block: 2rem .7rem; }
.legal-page h3 { margin-block: 1.35rem .45rem; font-size: 1.15rem; }
.legal-page p + p, .legal-page li + li { margin-top: .65rem; }
.legal-page p, .legal-page li { color: #cbd9dd; }
.legal-page a { color: var(--pulse); text-decoration: underline; overflow-wrap: anywhere; }
.legal-page .draft-note { border-left: 3px solid #ed9cdf; background: #211a2a; padding: .85rem 1.1rem; color: #f7d7ec; }
.contact-panel { margin-top: 2rem; background: var(--panel); border: 1px solid var(--line); padding: clamp(1rem, 3vw, 2rem); }
.contact-panel .contact-feedback { margin: 0 0 1.2rem; padding: .75rem 1rem; border-left: 3px solid var(--pulse); background: #12282a; }
.contact-panel .contact-error { border-color: #ed9cdf; background: #271b28; }
.contact-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.contact-form :is(.contact-message, .contact-privacy) { grid-column: 1 / -1; }
.contact-form label { display: block; font-weight: 600; margin-bottom: .4rem; }
.contact-form :is(input, textarea) { box-sizing: border-box; width: 100%; min-height: 44px; background: #080e14; color: var(--ink); border: 1px solid #45606e; padding: .65rem .8rem; font: inherit; }
.contact-form textarea { resize: vertical; min-height: 8rem; }
.contact-form .button { justify-self: start; cursor: pointer; }
.contact-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.contact-panel .contact-direct { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
@media (max-width: 600px) {
    .contact-form { grid-template-columns: 1fr; }
    .contact-form :is(input, textarea) { min-height: 48px; font-size: 1rem; }
    .contact-form textarea { min-height: 8.6rem; height: clamp(8.6rem, 22svh, 11rem); }
    .contact-form .button { justify-self: stretch; min-height: 48px; }
}
.reveal-ready { opacity: 0; transform: translateY(18px); transition: opacity .62s ease, transform .62s cubic-bezier(.16,.72,.25,1); }
.reveal-ready.entered, .reveal-ready:focus-within { opacity: 1; transform: none; }

@media (max-width: 970px) {
    .shell { width: calc(100% - 64px); }
    .world-section { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
    .hero h1 { font-size: clamp(4rem, 11vw, 7rem); }
}
@media (max-width: 700px) {
    .shell { width: calc(100% - clamp(32px, 9.2vw, 56px)); }
    :is(section[id], main[id]) { scroll-margin-top: calc(4.6rem + env(safe-area-inset-top)); }
    .header-inner { min-height: 58px; position: relative; flex-wrap: wrap; gap: .35rem .75rem; }
    .wordmark { font-size: 1.27rem; gap: .5rem; }
    .wordmark img { width: 28px; height: 28px; }
    .header-inner > .wordmark { min-height: 44px; }
    .header-inner nav { flex-wrap: wrap; gap: 0 .9rem; }
    .header-inner nav a { display: flex; align-items: center; min-height: 44px; font-size: .95rem; }
    [data-menu-ready] .menu-toggle {
        display: inline-flex;
        align-items: center;
        gap: .57rem;
        min-height: 44px;
        padding: .45rem .75rem;
        border: 1px solid #45606e;
        background: #10212a;
        color: var(--ink);
        font-weight: 650;
        cursor: pointer;
    }
    .menu-icon { position: relative; width: 1rem; height: .68rem; border-block: 1px solid currentColor; }
    .menu-icon::after { content: ""; position: absolute; inset: 50% 0 auto; border-top: 1px solid currentColor; }
    [data-menu-open] .menu-toggle { color: var(--pulse); border-color: var(--pulse); }
    [data-menu-ready] .header-inner nav {
        display: none;
        position: absolute;
        z-index: 1;
        top: calc(100% + .5rem);
        inset-inline: 0;
        max-height: calc(100dvh - 4.5rem - env(safe-area-inset-top));
        overflow-y: auto;
        padding-inline: .9rem;
        background: #0a161e;
        border: 1px solid #45606e;
        box-shadow: 0 14px 32px #0009;
    }
    [data-menu-open] .header-inner nav { display: grid; gap: 0; }
    [data-menu-open] .header-inner nav a + a { border-top: 1px solid var(--line); }
    .admin-bar .signal-header { top: 46px; }
    .hero { min-height: 0; }
    .hero-art { object-position: 68% 45%; }
    .hero-shade { background: linear-gradient(0deg, #070e15 3%, #070e15f5 24%, #070e15be 58%, #070e1538 100%); }
    .hero-content { padding-block: clamp(5.5rem, 25vw, 10rem) 1rem; }
    .hero .eyebrow { font-size: clamp(.72rem, 2.9vw, .83rem); letter-spacing: .09em; }
    .hero h1 { font-size: clamp(3rem, 12vw, 5.6rem); line-height: .94; max-width: 11ch; margin-block: .72rem .85rem; }
    .hero-copy { max-width: 38ch; font-size: 1rem; line-height: 1.55; }
    .hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1.15rem; gap: .5rem; }
    .hero-actions .button { min-height: 48px; padding-inline: .55rem; text-align: center; line-height: 1.25; }
    .motion-switch { position: relative; inset: auto; justify-self: end; margin: 0 clamp(16px, 4.6vw, 28px) 1rem; min-height: 44px; }
    .world-section, .feature-pair { grid-template-columns: 1fr; }
    .world-section, .gallery-section { padding-block: clamp(2.8rem, 10vw, 4.75rem); }
    .section-intro h2 { font-size: clamp(2.4rem, 8vw, 4rem); margin-bottom: .95rem; }
    .feature-pair { gap: .25rem; }
    .feature-screen figcaption { padding: .6rem .75rem; }
    .feature-screen figcaption a { display: inline-flex; align-items: center; min-height: 44px; }
    .campaign { min-height: 0; align-items: end; }
    .campaign > img { object-position: 68% 48%; }
    .campaign-content { padding-block: clamp(8.5rem, 36vw, 13rem) 2.5rem; }
    .campaign::after { background: linear-gradient(0deg, #0a0c17 0%, #0a0c17ee 30%, #0a0c1758 78%); }
    .gallery-section .section-intro { margin-bottom: 1.2rem; }
    .gallery {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 88%;
        gap: .75rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: thin;
        scrollbar-color: #537984 #0b151d;
        padding-bottom: .5rem;
    }
    .gallery .shot { scroll-snap-align: start; }
    .footer-inner { grid-template-columns: 1fr; gap: .55rem; padding-block: 1.5rem; }
    .footer-links { justify-content: flex-start; gap: .2rem 1.1rem; }
    .footer-links a { display: flex; align-items: center; min-height: 44px; }
    .standard-page { padding-block: 2rem 3rem; }
    .legal-page h1 { margin-bottom: 1.35rem; }
    .contact-panel { margin-top: 1.2rem; padding: .85rem; }
    .contact-form { gap: .85rem; }
}
@media (max-width: 360px) {
    .hero-content { padding-top: 4.5rem; }
    .hero h1 { font-size: 2.85rem; }
}
@media (max-width: 600px) {
    .admin-bar .signal-header { top: 0; }
}
@media (max-width: 700px), (max-height: 500px) and (any-pointer: coarse) {
    .image-viewer {
        width: 100%;
        height: 100dvh;
        max-width: none;
        max-height: none;
        margin: 0;
        border: 0;
        padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
        overscroll-behavior: contain;
    }
    .image-viewer[open] { display: grid; grid-template-rows: auto minmax(6rem, 1fr) auto; }
    .image-viewer > img { height: 100%; max-height: none; }
    .viewer-heading, .viewer-controls { padding: .65rem 1rem; gap: .6rem; }
    .viewer-controls { display: grid; font-size: .92rem; }
    .viewer-controls > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .image-viewer button { min-height: 46px; }
}
html[data-motion="off"] { scroll-behavior: auto; }
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation: none !important; transition: none !important; }
html[data-motion="off"] .reveal-ready { opacity: 1; transform: none; }
html[data-motion="off"] :is(.reading-signal, .archive-scan) { display: none; }
html[data-motion="off"] .shot a:hover img { transform: none; }

