/* ============================================================
   MZ Server Hub — Core Styles
   Theme: Lila · Light/Dark
   Fonts: Space Grotesk (Headlines), Inter (Text),
          JetBrains Mono (Labels, Status, Zahlen)
   ============================================================ */

@font-face {
    font-family: 'Space Grotesk';
    src: url('/assets/fonts/SpaceGrotesk.ttf') format('truetype');
    font-weight: 300 700;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/Inter.ttf') format('truetype');
    font-weight: 100 900;
    font-display: swap;
}
@font-face {
    font-family: 'JetBrains Mono';
    src: url('/assets/fonts/JetBrainsMono.ttf') format('truetype');
    font-weight: 300 700;
    font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
    --font-head: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    --bg: #f6f3fb;
    --bg-soft: #efeaf8;
    --card: #ffffff;
    --ink: #211d2b;
    --muted: #6f6a7e;
    --line: #e3e0ec;

    --accent: #6d4fc4;
    --accent-ink: #5a3fb0;
    --accent-soft: #ece5f8;
    --accent-glow: rgba(109, 79, 196, 0.12);
    --grad-lilac: linear-gradient(135deg, #7c5ce0 0%, #5a3fb0 100%);
    --hero-glow: rgba(109, 79, 196, 0.15);
    --glow-violet: rgba(139, 92, 246, 0.11);
    --dot: rgba(109, 79, 196, 0.09);

    --ok: #1f9d61;
    --ok-soft: #e3f4ea;
    --bad: #d64550;
    --bad-soft: #f9e7e9;

    --shadow-sm: 0 1px 2px rgba(33, 29, 43, 0.05);
    --shadow-md: 0 6px 24px rgba(33, 29, 43, 0.08);
    --radius: 10px;
    --radius-lg: 14px;
    --container: 1080px;
}

html[data-theme='dark'] {
    --bg: #131020;
    --bg-soft: #191430;
    --card: #1b1629;
    --ink: #eceaf2;
    --muted: #a29cba;
    --line: #2d2642;

    --accent: #a68cf0;
    --accent-ink: #bda6ff;
    --accent-soft: #2a2140;
    --accent-glow: rgba(166, 140, 240, 0.13);
    --grad-lilac: linear-gradient(135deg, #bda6ff 0%, #8b6ff0 100%);
    --hero-glow: rgba(166, 140, 240, 0.13);
    --glow-violet: rgba(139, 92, 246, 0.16);
    --dot: rgba(166, 140, 240, 0.08);

    --ok: #3ecf8e;
    --ok-soft: #16281f;
    --bad: #ef6b74;
    --bad-soft: #2c1a1d;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.4);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

main { min-height: 60vh; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

h1, h2, h3 {
    font-family: var(--font-head);
    line-height: 1.15;
    letter-spacing: -0.015em;
    margin: 0 0 0.4em;
}

.icon { flex-shrink: 0; vertical-align: middle; }

code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--accent-soft);
    padding: 1px 6px;
    border-radius: 5px;
}

::selection { background: var(--accent); color: #fff; }
html[data-theme='dark'] ::selection { color: #14101f; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 14px;
}
.eyebrow::before {
    content: '';
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--grad-lilac);
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--grad-lilac);
    opacity: 0.9;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
    gap: 16px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { color: var(--accent); display: inline-flex; }
.brand-name {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.01em;
}

.site-nav { display: flex; align-items: center; gap: 4px; }

.nav-link {
    position: relative;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
}
.nav-link:hover { color: var(--ink); background: var(--bg-soft); }
.nav-link.is-active { color: var(--ink); }
.nav-link.is-active::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 2px;
    height: 2.5px;
    border-radius: 2px;
    background: var(--grad-lilac);
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-left: 6px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--card);
    color: var(--muted);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); transform: rotate(15deg); }

.theme-icon { display: none; }
html[data-theme='light'] .theme-icon-dark { display: inline-flex; }
html[data-theme='dark'] .theme-icon-light { display: inline-flex; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 84px 0 56px; overflow: hidden; }
.hero::before {
    content: '';
    position: absolute;
    top: -180px;
    right: -120px;
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, var(--hero-glow) 0%, transparent 65%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(640px 320px at 6% 108%, var(--glow-violet), transparent 70%),
        radial-gradient(var(--dot) 1px, transparent 1.6px);
    background-size: auto, 22px 22px;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), transparent 88%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), transparent 88%);
    pointer-events: none;
}

.hero h1 {
    font-size: clamp(34px, 5.4vw, 54px);
    font-weight: 600;
    max-width: 14ch;
    background: linear-gradient(100deg, var(--ink) 52%, var(--accent-ink) 96%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero .lede {
    font-size: 18px;
    color: var(--muted);
    max-width: 52ch;
    margin: 14px 0 0;
}

.status-line {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 4px;
    gap: 10px;
    margin-top: 28px;
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    box-shadow: var(--shadow-sm);
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--muted);
    position: relative;
    z-index: 1;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.status-line:has(.dot--online) {
    border-color: color-mix(in srgb, var(--ok) 40%, var(--line));
    box-shadow: var(--shadow-sm), 0 0 0 3px var(--accent-glow);
}

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.dot--online { background: var(--ok); animation: pulse 2.4s ease-in-out infinite; }
.dot--offline { background: var(--bad); }
.dot--checking { background: var(--muted); opacity: 0.5; animation: blink 1.1s ease-in-out infinite; }

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 45%, transparent); }
    50% { box-shadow: 0 0 0 5px transparent; }
}
@keyframes blink {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.15; }
}

.status-line strong { color: var(--ink); font-weight: 500; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-head { margin-bottom: 28px; max-width: 60ch; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 600; }
.section-head p { color: var(--muted); margin: 6px 0 0; }

/* ---------- Service-Liste (Zugriffsliste) ---------- */
.service-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.service-row a {
    display: grid;
    grid-template-columns: 3.2rem 44px minmax(0, 1fr) auto 28px;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    color: inherit;
    border-bottom: 1px solid var(--line);
    position: relative;
    transition: background 0.15s ease;
}
.service-row a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--grad-lilac);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.18s ease;
}
.service-row a:hover::before { transform: scaleY(1); }
.service-row:last-child a { border-bottom: none; }
.service-row a:hover { background: var(--bg-soft); }
.service-row a:hover .service-name { color: var(--accent); }
.service-row a:hover .row-arrow { color: var(--accent); transform: translateX(3px); }
.service-row a:hover .service-index { color: var(--accent); opacity: 1; }

.service-index {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    opacity: 0.75;
    transition: color 0.15s ease, opacity 0.15s ease;
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent) 22%, var(--card)));
    color: var(--accent);
}

.service-name {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 16.5px;
    margin-bottom: 2px;
    transition: color 0.15s ease;
}
.service-desc { font-size: 13.5px; color: var(--muted); margin: 0; }

.service-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.row-arrow { color: var(--muted); transition: transform 0.15s ease, color 0.15s ease; }

.service-row.is-offline a { opacity: 0.55; cursor: not-allowed; }
.service-row.is-offline .service-icon { background: var(--bad-soft); color: var(--bad); }

/* ---------- Stats ---------- */
.stats-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.stat { padding: 22px 26px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat-value {
    font-family: var(--font-mono);
    font-size: 26px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.2;
}
.stat-value .stat-accent { color: var(--accent); }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ---------- Footer ---------- */
.site-footer {
    position: relative;
    border-top: none;
    padding: 44px 0 28px;
    background: var(--bg-soft);
    margin-top: 40px;
}
.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--grad-lilac);
    opacity: 0.55;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}
.footer-name { font-family: var(--font-head); font-weight: 600; margin: 0 0 6px; }
.footer-about p:last-child { margin: 0; font-size: 13.5px; color: var(--muted); max-width: 34ch; }
.footer-head {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 10px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 7px; }
.footer-col a { color: var(--ink); font-size: 14px; }
.footer-col a:hover { color: var(--accent); }
.footer-line {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    padding-top: 20px;
    margin: 0;
}
.footer-dot { opacity: 0.5; color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
    .hero { padding: 56px 0 40px; }
    .section { padding: 40px 0; }
    .stats-strip { grid-template-columns: 1fr; }
    .stat { border-right: none; border-bottom: 1px solid var(--line); }
    .stat:last-child { border-bottom: none; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .service-row a { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; }
    .service-index, .row-arrow { display: none; }
    .brand { flex-shrink: 0; }
    .brand-name { font-size: 15px; white-space: nowrap; }
    .site-nav { gap: 2px; }
    .site-nav .nav-link:first-child { display: none; } /* Start = Brand */
    .nav-link { padding: 8px 8px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
