/* ==========================================================================
   projekte.irmscher.at – öffentliche Seite
   ========================================================================== */

:root {
    --bg: #07070a;
    --surface: rgba(18, 18, 24, .62);
    --surface-2: rgba(28, 28, 36, .7);
    --line: rgba(255, 255, 255, .08);
    --line-2: rgba(255, 255, 255, .14);
    --text: #f4f3ef;
    --muted: #9b9aa3;
    --dim: #6b6a73;
    --ok: #34d399;
    --bad: #f87171;
    --radius: 26px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --spring: cubic-bezier(.34, 1.56, .64, 1);
    --card-accent: var(--accent);
    --mono: 'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #000; }
a { color: inherit; }
button { font: inherit; color: inherit; }
kbd {
    font-family: var(--mono);
    font-size: .72em;
    padding: .15em .45em;
    border-radius: 6px;
    border: 1px solid var(--line-2);
    background: rgba(255,255,255,.05);
    color: var(--muted);
}

/* --- Hintergrund ---------------------------------------------------------- */
#bg {
    position: fixed; inset: 0;
    width: 100vw; height: 100vh;
    z-index: -3;
    display: block;
}
.bg-fallback { position: fixed; inset: 0; z-index: -4; overflow: hidden; }
.bg-fallback i {
    position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45;
    animation: drift 22s ease-in-out infinite alternate;
}
.bg-fallback i:nth-child(1) { width: 50vw; height: 50vw; background: var(--accent); top: -15%; left: -10%; }
.bg-fallback i:nth-child(2) { width: 55vw; height: 55vw; background: var(--accent-2); bottom: -25%; right: -15%; animation-delay: -7s; }
.bg-fallback i:nth-child(3) { width: 30vw; height: 30vw; background: #ff3d6e; top: 35%; left: 45%; opacity: .25; animation-duration: 30s; }
@keyframes drift { to { transform: translate(8vw, 10vh) scale(1.15); } }
body.has-webgl .bg-fallback { display: none; }
body[data-bg="grid"] .bg-fallback,
body[data-bg="none"] .bg-fallback { display: none; }
body[data-bg="grid"]::before {
    content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse at 50% 20%, #000 10%, transparent 70%);
}

.cursor-glow {
    position: fixed; z-index: -1; pointer-events: none;
    width: 520px; height: 520px; border-radius: 50%;
    left: 0; top: 0;
    transform: translate(var(--cx, -999px), var(--cy, -999px)) translate(-50%, -50%);
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%);
    transition: opacity .4s;
    mix-blend-mode: screen;
}
@media (hover: none) { .cursor-glow { display: none; } }

/* --- Navigation ----------------------------------------------------------- */
.nav {
    position: fixed; top: 14px; left: 50%; z-index: 50;
    transform: translateX(-50%);
    width: min(1320px, calc(100% - 28px));
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 10px 12px 10px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background .4s var(--ease), border-color .4s, backdrop-filter .4s;
}
.nav.is-scrolled {
    background: rgba(10, 10, 14, .62);
    border-color: var(--line);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; }
.brand-mark {
    width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
    background: conic-gradient(from 180deg, var(--accent), var(--accent-2), var(--accent));
    animation: spin 8s linear infinite;
}
.brand-mark span { width: 20px; height: 20px; border-radius: 7px; background: var(--bg); display: block; animation: spin 8s linear infinite reverse; position: relative; }
.brand-mark span::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
.brand-text { font-size: .98rem; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.clock { display: flex; align-items: baseline; gap: 8px; font-family: var(--mono); font-size: .82rem; color: var(--muted); padding: 0 8px; }
.clock-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); }
#clock { color: var(--text); font-variant-numeric: tabular-nums; }
.kbd-btn {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 8px 10px 8px 14px; border-radius: 999px;
    border: 1px solid var(--line-2); background: rgba(255,255,255,.04);
    font-size: .86rem; color: var(--muted);
    transition: border-color .3s, color .3s, background .3s;
}
.nav-admin {
    display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; text-decoration: none;
    font-size: .86rem; font-weight: 600; color: #0b0b0e; background: var(--accent);
    transition: transform .35s var(--spring), box-shadow .35s;
}
.nav-admin:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px var(--accent); }
.kbd-btn:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: rgba(255,255,255,.07); }

/* --- Hero ----------------------------------------------------------------- */
.hero {
    min-height: 100svh;
    display: grid; place-items: center;
    padding: 130px 20px 90px;
    position: relative;
}
.hero-inner { width: min(1180px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; }
.pill {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 7px 16px 7px 12px; border-radius: 999px;
    background: rgba(255,255,255,.05); border: 1px solid var(--line-2);
    font-size: .84rem; color: var(--muted); margin-bottom: 26px;
    backdrop-filter: blur(10px);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); position: relative; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--ok); animation: ping 1.8s var(--ease) infinite; }
.pill.is-warn .pulse, .pill.is-warn .pulse::after { background: #fbbf24; border-color: #fbbf24; }
@keyframes ping { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }

.eyebrow {
    font-family: var(--mono); font-size: .76rem; letter-spacing: .2em; text-transform: uppercase;
    color: var(--muted); margin: 0 0 18px;
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 9.2vw, 8.6rem);
    line-height: .94;
    letter-spacing: -.045em;
    font-weight: 800;
    margin: 0 0 30px;
    text-wrap: balance;
}
.hero-title em {
    font-style: normal;
    background: linear-gradient(100deg, var(--accent) 0%, #ffd27a 25%, var(--accent) 45%, var(--accent-2) 75%, var(--accent) 100%);
    background-size: 250% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: shimmer 7s linear infinite;
    padding-right: .04em;
}
@keyframes shimmer { to { background-position: -250% 0; } }
.hero-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.hero-title .w > span { display: inline-block; transform: translateY(105%) rotate(4deg); transition: transform 1.1s var(--ease); transition-delay: calc(var(--d) * 70ms + 150ms); }
.is-ready .hero-title .w > span { transform: none; }

.hero-sub { max-width: 640px; font-size: clamp(1.02rem, 1.6vw, 1.22rem); color: var(--muted); margin: 0 0 36px; text-wrap: pretty; }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 70px; }
.btn {
    display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
    padding: 14px 24px; border-radius: 999px; font-weight: 600; font-size: .96rem;
    text-decoration: none; border: 1px solid transparent;
    transition: transform .4s var(--spring), box-shadow .4s, background .3s, border-color .3s;
}
.btn-primary { background: var(--accent); color: #0b0b0e; box-shadow: 0 10px 40px -10px var(--accent); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 50px -10px var(--accent); }
.btn-primary svg { transition: transform .4s var(--spring); }
.btn-primary:hover svg { transform: translateY(3px); }
.btn-ghost { background: rgba(255,255,255,.05); border-color: var(--line-2); color: var(--text); backdrop-filter: blur(10px); }
.btn-ghost:hover { background: rgba(255,255,255,.09); transform: translateY(-3px); }

.stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    width: min(860px, 100%); margin: 0;
    border: 1px solid var(--line); border-radius: 22px;
    background: rgba(12, 12, 16, .45);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
}
.stats > div { padding: 20px 18px; position: relative; }
.stats > div + div::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: var(--line); }
.stats dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); margin-bottom: 6px; }
.stats dd { margin: 0; font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stats > div:first-child dd { color: var(--accent); }

.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); width: 24px; height: 38px; border: 1.5px solid var(--line-2); border-radius: 14px; }
.scroll-hint span { position: absolute; left: 50%; top: 7px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--text); animation: wheel 2s var(--ease) infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.is-ready .reveal { opacity: 1; transform: none; }
.is-ready .hero-inner > .reveal:nth-child(1) { transition-delay: .05s; }
.is-ready .hero-inner > .reveal:nth-child(2) { transition-delay: .1s; }
.is-ready .hero-sub { transition-delay: .55s; }
.is-ready .hero-cta { transition-delay: .7s; }
.is-ready .stats { transition-delay: .85s; }

/* --- Marquee -------------------------------------------------------------- */
.marquee {
    border-block: 1px solid var(--line);
    background: rgba(8, 8, 11, .5);
    backdrop-filter: blur(8px);
    overflow: hidden; padding: 18px 0;
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; gap: 34px; width: max-content; animation: marquee 50s linear infinite; font-family: var(--font-display); font-size: clamp(1.1rem, 2.2vw, 1.6rem); font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.marquee-track span { color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.35); }
.marquee-track b { color: var(--accent); font-weight: 400; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --- Sektion -------------------------------------------------------------- */
.section { width: min(1320px, calc(100% - 32px)); margin: 0 auto; padding: 110px 0 60px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.section-head h2 { font-family: var(--font-display); font-size: clamp(2rem, 4.6vw, 3.6rem); letter-spacing: -.04em; line-height: 1; margin: 0; font-weight: 700; display: flex; align-items: flex-start; gap: 12px; }
.section-head .eyebrow { margin-bottom: 12px; }
.count { font-family: var(--mono); font-size: .9rem; font-weight: 500; color: var(--accent); letter-spacing: 0; padding: 4px 9px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 999px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    cursor: pointer; padding: 9px 16px; border-radius: 999px; font-size: .88rem;
    border: 1px solid var(--line-2); background: rgba(255,255,255,.03); color: var(--muted);
    transition: all .3s var(--ease);
}
.chip:hover { color: var(--text); border-color: rgba(255,255,255,.3); }
.chip.is-active { background: var(--text); color: #0b0b0e; border-color: var(--text); }

/* --- Grid & Karten -------------------------------------------------------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    grid-auto-flow: dense;
    gap: 20px;
}
.card {
    --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg;
    position: relative;
    display: flex; flex-direction: column;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
    overflow: hidden;
    transform: perspective(1200px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--ty, 0));
    transition: transform .6s var(--ease), border-color .4s, box-shadow .6s var(--ease), opacity .5s;
    opacity: 0; translate: 0 40px;
}
.card.in { opacity: 1; translate: 0 0; transition: transform .6s var(--ease), border-color .4s, box-shadow .6s var(--ease), opacity .9s var(--ease), translate 1s var(--ease); transition-delay: 0s, 0s, 0s, calc(var(--n, 0) * 70ms), calc(var(--n, 0) * 70ms); }
.card.is-hidden { display: none; }
/* Lichtkegel, der der Maus folgt */
.card::before {
    content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
    background: radial-gradient(520px circle at var(--mx) var(--my), color-mix(in srgb, var(--card-accent) 16%, transparent), transparent 42%);
    opacity: 0; transition: opacity .4s;
}
/* leuchtender Rand */
.card::after {
    content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; padding: 1px;
    background: radial-gradient(380px circle at var(--mx) var(--my), var(--card-accent), transparent 45%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: 0; transition: opacity .4s;
}
.card:hover { box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.04); --ty: -6px; }
.card:hover::before, .card:hover::after { opacity: 1; }

.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0c0c11; margin: 8px 8px 0; border-radius: calc(var(--radius) - 8px); isolation: isolate; }
.card.is-featured { grid-column: span 2; grid-row: span 2; }
.card.is-featured .card-media { aspect-ratio: auto; flex: 1; min-height: 340px; }
.card.is-featured h3 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }

.frame-wrap { position: absolute; inset: 0; z-index: 1; }
.frame-wrap iframe {
    position: absolute; top: 0; left: 0;
    width: 1440px; height: 900px; border: 0;
    transform-origin: 0 0; transform: scale(var(--s, .25));
    pointer-events: none; opacity: 0; transition: opacity .8s;
}
.frame-wrap iframe.loaded { opacity: 1; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; transition: transform 1.2s var(--ease); }
.card-media img.shot { object-position: top center; opacity: 0; transition: opacity .8s, transform 1.2s var(--ease); }
.card-media img.shot.loaded { opacity: 1; }
.card:hover .card-media img { transform: scale(1.06); }
.media-skeleton {
    position: absolute; inset: 0; z-index: 0; display: grid; place-items: center;
    background:
        radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--card-accent) 30%, transparent), transparent 60%),
        linear-gradient(135deg, #111118, #0a0a0e);
}
.media-skeleton span { font-family: var(--font-display); font-size: clamp(1.2rem, 2.4vw, 2rem); font-weight: 700; letter-spacing: -.03em; color: rgba(255,255,255,.16); padding: 0 20px; text-align: center; overflow-wrap: anywhere; }
.media-skeleton::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.05) 50%, transparent 70%);
    background-size: 200% 100%; animation: sk 1.8s linear infinite;
}
@keyframes sk { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.media-shade { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.35), transparent 30%, transparent 65%, rgba(0,0,0,.45)); }

.status {
    position: absolute; top: 12px; left: 12px; z-index: 4;
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 10px 5px 8px; border-radius: 999px;
    background: rgba(8,8,12,.7); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.1);
    font-family: var(--mono); font-size: .7rem; color: var(--muted);
}
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.status em { font-style: normal; }
.status.ok i { background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: blink 2.4s ease-in-out infinite; }
.status.ok { color: #c7f9e2; }
.status.down i { background: var(--bad); box-shadow: 0 0 10px var(--bad); }
.status.down { color: #fecaca; }
@keyframes blink { 50% { opacity: .35; } }

.peek {
    position: absolute; z-index: 4; left: 50%; top: 50%;
    transform: translate(-50%, -50%) scale(.85); opacity: 0;
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 11px 18px; border-radius: 999px;
    background: rgba(255,255,255,.92); color: #0b0b0e; border: 0; font-weight: 600; font-size: .88rem;
    box-shadow: 0 10px 30px rgba(0,0,0,.4);
    transition: opacity .35s, transform .45s var(--spring);
}
.card:hover .peek, .peek:focus-visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 0 0 auto; position: relative; z-index: 4; }
.card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: .78rem; }
.tag { padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--card-accent) 14%, transparent); color: var(--card-accent); font-weight: 600; letter-spacing: .02em; }
.host { font-family: var(--mono); color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card h3 { font-family: var(--font-display); font-size: 1.22rem; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 8px; font-weight: 600; }
.card p { margin: 0 0 18px; color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card.is-featured p { -webkit-line-clamp: 4; }
.card-link {
    margin-top: auto; align-self: flex-start;
    display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
    padding: 10px 12px 10px 16px; border-radius: 999px; font-weight: 600; font-size: .88rem;
    border: 1px solid var(--line-2); background: rgba(255,255,255,.03);
    transition: background .35s var(--ease), color .35s, border-color .35s, gap .35s var(--ease);
}
.card-link svg { transition: transform .45s var(--spring); }
.card:hover .card-link { background: var(--card-accent); color: #0b0b0e; border-color: var(--card-accent); gap: 14px; }
.card:hover .card-link svg { transform: rotate(45deg); }
.card-link::before { content: ""; position: absolute; inset: 0; z-index: -1; } /* ganze Karte klickbar */

/* Statistik-Karte */
.card-stats { grid-column: 1 / -1; }
.card-stats .card-body { height: 100%; padding: 26px 28px 24px; }
.card-stats h3 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); }
.spark { display: flex; align-items: flex-end; gap: 8px; height: 170px; margin: 14px 0 10px; }
.spark span {
    flex: 1; height: max(4px, var(--h)); border-radius: 6px 6px 3px 3px;
    background: linear-gradient(to top, color-mix(in srgb, var(--accent) 35%, transparent), var(--accent));
    transform-origin: bottom; transform: scaleY(0); transition: transform 1s var(--spring);
}
.card-stats.in .spark span { transform: scaleY(1); }
.spark span:nth-child(n) { transition-delay: calc(var(--k, 0) * 40ms + 300ms); }
.spark span:last-child { background: linear-gradient(to top, color-mix(in srgb, var(--accent-2) 40%, transparent), #fff); box-shadow: 0 0 20px rgba(255,255,255,.3); }
.spark-foot { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .72rem; color: var(--dim); }
.spark-foot strong { color: var(--text); font-weight: 600; }

.empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* --- Footer --------------------------------------------------------------- */
.footer { width: min(1320px, calc(100% - 32px)); margin: 60px auto 0; padding-bottom: 30px; overflow: hidden; }
.footer-word {
    display: flex; justify-content: center; align-items: center;
    width: 100%; overflow: hidden;
    font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; line-height: 1.15;
    font-size: 9vw; /* wird per JS exakt auf die Fensterbreite angepasst */
    user-select: none; margin-bottom: 10px; white-space: nowrap;
    opacity: 0; transition: opacity .6s;
}
.footer-word.is-fit { opacity: 1; }
.footer-word .fw-name { color: rgba(255,255,255,.13); }
.footer-word .fw-tld { display: inline-grid; overflow: hidden; padding: .05em .06em .05em 0; margin: -.05em 0; }
.footer-word .fw-tld span {
    grid-area: 1 / 1; display: block; color: var(--accent); opacity: .85;
    animation: tld 6s var(--ease) infinite;
}
.footer-word .fw-tld span + span { color: var(--accent-2); animation-delay: -3s; }
@keyframes tld {
    0%, 42% { transform: translateY(0); opacity: .85; }
    50%, 92% { transform: translateY(110%); opacity: 0; }
    92.01% { transform: translateY(-110%); opacity: 0; }
    100% { transform: translateY(0); opacity: .85; }
}
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--dim); }
.footer-row nav { display: flex; gap: 22px; }
.footer-row a { text-decoration: none; color: var(--muted); transition: color .3s; }
.footer-row a:hover { color: var(--accent); }

/* --- Dialoge -------------------------------------------------------------- */
dialog { color: var(--text); padding: 0; border: 0; background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(4, 4, 7, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
dialog[open] { animation: pop .5s var(--spring); }
dialog[open]::backdrop { animation: fade .4s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(.96); } }
@keyframes fade { from { opacity: 0; } }

.viewer { width: min(1440px, calc(100vw - 32px)); height: calc(100svh - 48px); }
.viewer[open] { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; border: 1px solid var(--line-2); background: #0d0d12; box-shadow: 0 60px 120px -20px rgba(0,0,0,.8); }
.viewer-bar { display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); background: #121218; }
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.viewer-url { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--mono); font-size: .8rem; color: var(--muted); background: rgba(255,255,255,.04); border: 1px solid var(--line); padding: 7px 12px; border-radius: 10px; }
.viewer-url span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-actions { display: flex; gap: 6px; }
.viewer-actions > * { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--muted); cursor: pointer; transition: all .25s; }
.viewer-actions > *:hover { color: var(--text); background: rgba(255,255,255,.08); }
.viewer-stage { flex: 1; display: grid; place-items: center; background: repeating-conic-gradient(#0f0f14 0 25%, #0c0c10 0 50%) 0 0 / 24px 24px; overflow: hidden; }
.viewer-stage iframe { width: 100%; height: 100%; border: 0; background: #fff; transition: width .6s var(--ease), height .6s var(--ease), border-radius .6s; }
.viewer.is-mobile .viewer-stage iframe { width: 390px; height: min(844px, 100% - 40px); border-radius: 34px; box-shadow: 0 0 0 10px #1b1b22, 0 40px 80px rgba(0,0,0,.6); }

.palette { width: min(620px, calc(100vw - 32px)); margin-top: 14vh; }
.palette[open] { border-radius: 20px; border: 1px solid var(--line-2); background: rgba(16, 16, 22, .92); backdrop-filter: blur(24px); box-shadow: 0 40px 100px -20px rgba(0,0,0,.8); overflow: hidden; }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-input input { flex: 1; background: none; border: 0; outline: none; color: var(--text); font: inherit; font-size: 1.05rem; }
#paletteList { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow: auto; }
#paletteList li { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; cursor: pointer; }
#paletteList li .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.05); font-family: var(--font-display); font-weight: 700; color: var(--accent); flex: none; }
#paletteList li .t { font-weight: 600; font-size: .95rem; }
#paletteList li .h { font-family: var(--mono); font-size: .74rem; color: var(--dim); }
#paletteList li .go { margin-left: auto; color: var(--dim); font-size: .8rem; opacity: 0; }
#paletteList li.is-active { background: rgba(255,255,255,.07); }
#paletteList li.is-active .go { opacity: 1; }
#paletteList li mark { background: none; color: var(--accent); }
.palette-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: .75rem; color: var(--dim); }
.palette-foot kbd { margin-right: 4px; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 900px) {
    .card.is-featured { grid-column: auto; grid-row: auto; }
    .card.is-featured .card-media { aspect-ratio: 16 / 10; min-height: 0; flex: none; }
}
@media (max-width: 720px) {
    .clock, .kbd-btn span, .kbd-btn kbd, .nav-admin span { display: none; }
    .nav-admin { padding: 9px; }
    .kbd-btn { padding: 9px; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .stats > div:nth-child(3)::before { display: none; }
    .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
    .grid { grid-template-columns: 1fr; }
    .section { padding-top: 80px; }
    .hero { padding-top: 110px; }
    .hero-cta { margin-bottom: 48px; }
    .peek { opacity: 1; transform: translate(-50%, -50%) scale(.9); top: auto; bottom: 10px; left: auto; right: 10px; transform: none; padding: 8px 12px; font-size: .78rem; }
    .viewer { width: 100vw; height: 100svh; }
    .viewer[open] { border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
    .card { opacity: 1; translate: none; }
}
