/* geonas Site-Basis — gemeinsames Liquid-Glass-Design aller Content-Seiten
   (index, methodik*, impressum, datenschutz, nutzungsbedingungen, login,
   bestellung, aktiviert, 404). NICHT fuer karte.html/admin.html gedacht.

   Enthaelt: Design-Tokens, Reset/Basis, Hintergrund-Canvas #grid-bg samt
   statischem Fallback, Glas-Nav, Glas-Buttons (.btn), statische Glas-Panels
   (.glass-panel), interaktive Glas-Kacheln (.glass-tile), Badges und Footer.
   Seitenspezifisches bleibt im jeweiligen
   Inline-<style> der Seite (kommt nach dieser Datei und gewinnt bei gleicher
   Spezifitaet). Der lebendige Raster-Effekt dazu: js/grid-bg.js.

   WICHTIG fuer jede neue Seite: im <head> immer
   <meta name="color-scheme" content="dark"> UND <meta name="darkreader-lock">
   setzen — die Dark-Reader-Extension schreibt sonst Hintergruende/Gradients um
   und zerlegt Glas-Optik + #grid-bg (Firefox-Befund 2026-07-14; Lock ist der
   offizielle Opt-out fuer bewusst dunkle Seiten). */

:root {
    --accent: #33a4d7;
    --accent-dark: #1493c4;
    --energy: #22c55e;
    --orange: var(--accent);
    --orange-dark: var(--accent-dark);
    --dark: #090b10;
    --dark-mid: #101820;
    --dark-light: #17222d;
    --line: rgba(255, 255, 255, 0.055);
    --text: #eef4f8;
    --text-muted: #9aa8b5;
    --white: #ffffff;
}

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

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    font-family: 'DM Sans', sans-serif;
    background: linear-gradient(180deg, #090b10 0%, #0d141b 48%, #090b10 100%);
    color: var(--text);
    overflow-x: hidden;
}

h1, h2, h3 { text-wrap: balance; overflow-wrap: anywhere; }

::selection { background: rgba(51,164,215,0.32); color: var(--white); }

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

/* HINTERGRUND — reaktives Geogitter (js/grid-bg.js): leises, immer
   sichtbares Raster, das der Cursor lokal staerker enthuellt. */
#grid-bg {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    width: 100%; height: 100%;
}
/* Statisches Linienraster NUR fuer Touch/Reduced-Motion, wo der
   Canvas-Effekt nie laeuft (gleiche Bedingungen wie die Early-Returns
   in grid-bg.js, nur invertiert). Auf Desktop bleibt es komplett weg —
   sonst blitzten die Linien beim Laden kurz auf. */
@media (hover: none), (prefers-reduced-motion: reduce) {
    #grid-bg {
        /* Perioden-Wert 32px = CELL in grid-bg.js */
        background-image:
            repeating-linear-gradient(0deg, rgba(125,223,255,0.04) 0, rgba(125,223,255,0.04) 1px, transparent 1px, transparent 32px),
            repeating-linear-gradient(90deg, rgba(125,223,255,0.04) 0, rgba(125,223,255,0.04) 1px, transparent 1px, transparent 32px);
    }
}

/* NAV — Liquid Glass: durchscheinend, Seite und Raster bleiben dahinter
   sichtbar; Blur + dunkler Schleier halten die Links lesbar. */
nav {
    position: fixed; top: 0; left: 0; right: 0;
    padding: 18px 40px;
    display: flex; align-items: center; justify-content: space-between;
    z-index: 100;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0) 55%),
        linear-gradient(180deg, rgba(9,11,16,0.52), rgba(9,11,16,0.34));
    -webkit-backdrop-filter: blur(10px) saturate(1.4) brightness(1.05);
    backdrop-filter: blur(10px) saturate(1.4) brightness(1.05);
    border-bottom: 1px solid rgba(255,255,255,0.10);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 10px 30px rgba(0,0,0,0.25);
}

.nav-logo {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none; color: var(--white);
}
.nav-logo img { width: 146px; height: auto; display: block; }

.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
    color: var(--text-muted); text-decoration: none;
    font-size: 0.9rem; font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }
.nav-auth { display: inline-flex; align-items: center; gap: 10px; }
.auth-status__email {
    max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--text); font-size: 0.9rem; font-weight: 700;
}
.nav-auth button {
    background: transparent; color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.16); border-radius: 8px;
    padding: 7px 12px; cursor: pointer; font: inherit; font-size: 0.86rem; font-weight: 700;
}
.nav-auth button:hover { color: var(--white); border-color: rgba(255,255,255,0.35); }

.nav-cta {
    background: rgba(51,164,215,0.14); color: var(--text) !important;
    padding: 8px 20px; border-radius: 8px; font-weight: 700 !important;
    border: 1px solid rgba(125,223,255,0.22);
    transition: background 0.2s, border-color 0.2s;
}
.nav-cta:hover { background: rgba(51,164,215,0.22); border-color: rgba(125,223,255,0.38); color: var(--white) !important; }

/* LIQUID-GLASS-BUTTONS: durchscheinend mit Backdrop-Blur, heller gebogener
   Glanzkante oben und feinem Lichtrand. Elemente mit [data-lens] bekommen
   zusaetzlich die Canvas-Lupe aus grid-bg.js. */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 30px; border-radius: 12px; /* gleiche Rundung wie .glass-tile */
    font-size: 1rem; font-weight: 700;
    text-decoration: none; cursor: pointer;
    position: relative;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.14);
    background: linear-gradient(165deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02) 55%, rgba(125,223,255,0.06));
    -webkit-backdrop-filter: blur(4px) saturate(1.5) brightness(1.08);
    backdrop-filter: blur(4px) saturate(1.5) brightness(1.08);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.22),
        inset 0 -1px 0 rgba(255,255,255,0.05),
        0 10px 26px rgba(0,0,0,0.30);
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s, transform 0.12s;
}
.btn::before {
    content: ''; position: absolute; inset: 1px; border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0) 48%);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary {
    border-color: rgba(125,223,255,0.35);
    background: linear-gradient(165deg, rgba(51,164,215,0.30), rgba(51,164,215,0.10) 58%, rgba(125,223,255,0.16));
    box-shadow:
        inset 0 1px 0 rgba(190,235,255,0.35),
        inset 0 -1px 0 rgba(125,223,255,0.10),
        0 10px 30px rgba(20,147,196,0.16);
}
.btn-primary:hover {
    border-color: rgba(125,223,255,0.6);
    background: linear-gradient(165deg, rgba(51,164,215,0.42), rgba(51,164,215,0.16) 58%, rgba(125,223,255,0.22));
    box-shadow:
        inset 0 1px 0 rgba(190,235,255,0.45),
        inset 0 -1px 0 rgba(125,223,255,0.12),
        0 12px 36px rgba(51,164,215,0.28);
}

.btn-secondary { color: var(--text); }
.btn-secondary:hover {
    border-color: rgba(255,255,255,0.32); color: var(--white);
    background: linear-gradient(165deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04) 55%, rgba(125,223,255,0.08));
}

/* Pfeile als eigenes Element: wandern beim Hover, statt den Button anzuheben */
.btn-arrow { display: inline-block; transition: transform 0.2s; }
.btn:hover .btn-arrow, .nav-cta:hover .btn-arrow { transform: translateX(3px); }
.btn:hover .btn-arrow--up { transform: translateY(-2px); }

/* LIQUID-GLASS-FLAECHEN: gemeinsame Glasoptik. .glass-panel bleibt statisch,
   .glass-tile hebt sich als interaktive Kachel beim Hover an. Bewusst nur leicht gerundet,
   passend zu den eckigen Rasterzellen im Hintergrund. Hover tritt zuegig vor
   und faehrt deutlich langsamer zurueck (Transition-Dauer im Ruhezustand
   laenger als im Hover) — bei schnellem Ueberstreichen koennen so kurz
   mehrere Kacheln gleichzeitig angehoben sein. */
.glass-panel,
.glass-tile {
    position: relative; border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.10);
    background:
        radial-gradient(130% 140% at 16% -8%, rgba(125,223,255,0.10), rgba(125,223,255,0.02) 46%, rgba(125,223,255,0) 70%),
        linear-gradient(165deg, rgba(255,255,255,0.05), rgba(9,11,16,0.35) 60%);
    -webkit-backdrop-filter: blur(5px) saturate(1.4) brightness(1.05);
    backdrop-filter: blur(5px) saturate(1.4) brightness(1.05);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.14),
        inset 0 -1px 0 rgba(255,255,255,0.03),
        0 16px 40px rgba(0,0,0,0.35);
}
.glass-tile {
    /* Hover-Hub laeuft ueber die eigenstaendige translate-Eigenschaft,
       NICHT ueber transform: Scroll-Einblende-Animationen (blockIn) halten
       transform dauerhaft besetzt und wuergen Transitions darauf ab.
       Ruhezustand = Rueckfahrt: sehr gemaechlich ausgleiten. */
    transition: translate 2.2s cubic-bezier(0.33, 0, 0.2, 1), border-color 2.2s ease, box-shadow 2.2s ease;
}
.glass-panel::before,
.glass-tile::before {
    content: ''; position: absolute; inset: 1px; border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(172deg, rgba(255,255,255,0.10), rgba(255,255,255,0) 34%);
}
.glass-tile:hover {
    translate: 0 -6px;
    border-color: rgba(125,223,255,0.26);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.18),
        inset 0 -1px 0 rgba(255,255,255,0.03),
        0 22px 52px rgba(0,0,0,0.42);
    /* Anheben: weich anschwingend, kein Snap */
    transition: translate 0.7s cubic-bezier(0.33, 0, 0.2, 1), border-color 0.7s ease, box-shadow 0.7s ease;
}

/* Produkt-/Status-Badges */
.product-badge {
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase;
    padding: 4px 10px; border-radius: 20px; font-weight: 500;
}
.badge-live { background: rgba(34,197,94,0.15); color: #22c55e; border: 1px solid rgba(34,197,94,0.3); }
.badge-soon { background: rgba(255,255,255,0.06); color: var(--text-muted); border: 1px solid rgba(255,255,255,0.1); }

/* FOOTER */
footer {
    padding: 40px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 20px;
    max-width: 1100px; margin: 0 auto;
}
footer .footer-left {
    font-family: 'DM Mono', monospace;
    font-size: 0.8rem; color: var(--text-muted);
}
footer .footer-left .version-badge {
    display: inline-block; margin-left: 10px; padding: 2px 10px;
    border-radius: 8px; border: 1px solid rgba(51,164,215,0.3);
    background: rgba(51,164,215,0.1); color: var(--accent);
    font-size: 0.72rem; letter-spacing: 0.04em; vertical-align: 1px;
}
footer .footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
footer .footer-links a {
    color: var(--text-muted); text-decoration: none;
    font-size: 0.85rem; transition: color 0.2s;
}
footer .footer-links a:hover { color: var(--white); }

/* RESPONSIVE Basis */
@media (max-width: 640px) {
    /* Auf kleinen Screens laeuft das Raster hinter dem Fliesstext:
       etwas zuruecknehmen */
    #grid-bg { opacity: 0.6; }
    nav { padding: 16px 20px; }
    .nav-logo img { width: 126px; }
    .nav-links a:not(.nav-cta), .nav-auth { display: none; }
    footer { padding: 30px 20px; }
}
