/* ============================================================
   ELVYON — Design System
   Dark. Silber/Metall. Minimal. Edel.
   ============================================================ */

:root {
    --bg-0: #000000;
    --bg-1: #0a0a0a;
    --bg-card: #111214;
    --bg-card-hover: #16181b;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    --text: #ffffff;
    --text-soft: #cfcfcf;
    --text-mute: #8a8c88;
    --text-faint: #555759;
    --silver-glow: rgba(192, 192, 192, 0.4);

    --font: 'Helvetica Neue', 'Inter', 'SF Pro Display', -apple-system,
            BlinkMacSystemFont, sans-serif;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body {
    height: 100%;
}

/* Platz für die Scrollleiste immer reservieren -> kein seitliches Verspringen */
html {
    scrollbar-gutter: stable;
}

body {
    font-family: var(--font);
    background-color: #000000;
    color: var(--text);
    min-height: 100vh;
    position: relative;
    font-feature-settings: "kern" 1, "liga" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Fixer Glow hinter dem Viewport: kein Farbsprung beim Scrollen */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(115% 85% at 50% -8%, #18181a 0%, #0b0b0c 46%, #000000 100%);
}

/* Abdeck-Ebene oben: identische Hintergrundfarbe wie die Seite (kein dunkler Balken),
   per Maske nur im oberen Streifen sichtbar, damit der Text sauber drunter wegscrollt */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    background: radial-gradient(115% 85% at 50% -8%, #18181a 0%, #0b0b0c 46%, #000000 100%);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 64px, transparent 112px);
            mask-image: linear-gradient(180deg, #000 0%, #000 64px, transparent 112px);
}

/* Auf der Startseite keine obere Abdeck-Maske, damit die Sterne bis oben reichen */
body.home::after { content: none; }

/* Dezenter Sternenhimmel oben (nur Startseite), nach unten ausgeblendet */
.starfield {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 58vh;
    z-index: -1;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 55%, transparent 100%);
            mask-image: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 55%, transparent 100%);
}

/* ---- Metall-Schrift (gebürstetes Silber) ---- */
.metal {
    background: linear-gradient(
        180deg,
        #f6f6f6 0%,
        #dadada 16%,
        #9a9a9a 36%,
        #ffffff 50%,
        #c2c2c2 64%,
        #828282 84%,
        #ececec 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}

/* ---- Divider mit Silber-Glow ---- */
.divider {
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e8e8e8, #c0c0c0, #e8e8e8, transparent);
    box-shadow: 0 0 15px var(--silver-glow);
    position: relative;
    margin: 0 auto;
}
.divider::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 3px;
    background: #e8e8e8;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(232, 232, 232, 0.6);
}

/* ============================================================
   STARTSEITE — Stage-Layout (eine Ansicht, kein Scroll)
   Mitte: ELVYON | Links: Referenzen | Rechts: Über uns/Kontakt
   ============================================================ */
.stage {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px;
    position: relative;
}

/* Seiten-Navigation, vertikal zentriert an den Rändern */
.side-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 22px;
    z-index: 50;
}
.side-nav.left  { left: 48px; align-items: flex-start; text-align: left; }
.side-nav.right { right: 48px; align-items: flex-end;  text-align: right; }

.nav-link {
    color: var(--text-mute);
    text-decoration: none;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    transition: color 0.35s var(--ease), letter-spacing 0.35s var(--ease);
    position: relative;
}
.nav-link:hover {
    color: var(--text);
    letter-spacing: 3.5px;
}

/* ---- Hero / Markenkern ---- */
.brand {
    font-size: clamp(48px, 9vw, 104px);
    font-weight: 200;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 30px;
}

.tagline {
    font-size: clamp(15px, 2.2vw, 20px);
    font-weight: 300;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 26px;
}

.stage .divider {
    margin-bottom: 26px;
}

.subtitle {
    font-size: clamp(13px, 1.6vw, 16px);
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--text-mute);
    max-width: 440px;
    line-height: 1.6;
}

/* Eintritts-Animationen NUR beim allerersten Öffnen der Website (per .intro auf <html>) */
.intro .brand        { animation: rise 1.4s var(--ease) both; }
.intro .tagline      { animation: rise 1.4s var(--ease) 0.3s both; }
.intro .stage .divider { animation: scaleX 1.6s var(--ease) 0.5s both; }
.intro .subtitle     { animation: rise 1.4s var(--ease) 0.7s both; }
.intro .page         { animation: rise 1s var(--ease) both; }

/* ---- Footer (cleaner Rechts-Riegel unten) ---- */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 48px;
    z-index: 50;
}
.site-footer .copyright { order: -1; }
.footer-links {
    display: flex;
    gap: 26px;
}
.footer-links a {
    color: var(--text-faint);
    text-decoration: none;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: color 0.3s var(--ease);
}
.footer-links a:hover { color: var(--text-soft); }
.copyright {
    font-size: 10.5px;
    color: var(--text-faint);
    letter-spacing: 1px;
    font-weight: 300;
}

/* ---- Animationen ---- */
@keyframes rise {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleX {
    from { opacity: 0; transform: scaleX(0); }
    to   { opacity: 1; transform: scaleX(1); }
}

/* Sanftes Einblenden des Inhalts bei SPA-Navigation (nur Opacity, kein Überlauf/Scrollbar) */
.spa-enter { animation: spaIn 0.24s var(--ease) both; }
@keyframes spaIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ============================================================
   UNTERSEITEN — gleiche DNA, kein 0815
   ============================================================ */



/* Inhalts-Container */
.page {
    max-width: 760px;
    margin: 0 auto;
    padding: 120px 24px 120px;
}
.page.wide { max-width: 1120px; }

/* Seite, die ohne Scroll in den Viewport passt (wie Kontakt) */
.page-fit {
    min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
    padding: 100px 24px 86px;
}
.page-fit .divider { margin-bottom: 20px; }
.page-fit .lead { font-size: clamp(15px, 2vw, 19px); margin-bottom: 18px; }
.page-fit .prose h2 { margin: 16px 0 6px; font-size: 17px; }
.page-fit .prose p { font-size: 14.5px; line-height: 1.6; margin-bottom: 4px; }
.page-fit .page-eyebrow { margin-bottom: 12px; }
.page-fit .page-title { margin-bottom: 18px; }
.page-eyebrow {
    font-size: 12px; letter-spacing: 0.35em; text-transform: uppercase;
    color: var(--text-faint); margin-bottom: 16px;
}
.page-title {
    font-size: clamp(34px, 6vw, 58px);
    font-weight: 200; letter-spacing: 0.12em; text-transform: uppercase;
    line-height: 1.05; margin-bottom: 26px;
}
.page .divider { margin: 0 0 34px; }
.lead {
    font-size: clamp(17px, 2.4vw, 21px);
    font-weight: 300; line-height: 1.6; color: var(--text-soft);
    margin-bottom: 30px; max-width: 640px;
}
.prose p { color: var(--text-mute); font-weight: 300; line-height: 1.75; margin-bottom: 16px; font-size: 15.5px; }
.prose h2 { color: var(--text); font-weight: 400; font-size: 19px; letter-spacing: 0.04em; margin: 32px 0 10px; }
.prose h3 { color: var(--text-soft); font-weight: 400; font-size: 16px; margin: 22px 0 8px; }
.prose ul { color: var(--text-mute); font-weight: 300; line-height: 1.7; padding-left: 20px; margin-bottom: 16px; font-size: 15px; }
.prose li { margin-bottom: 5px; }
.prose a { color: #cfd2d6; text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text-soft); font-weight: 500; }

.back-link {
    display: inline-block; margin-top: 34px;
    color: var(--text-mute); text-decoration: none;
    font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
    transition: color 0.3s var(--ease);
}
.back-link:hover { color: var(--text); }

/* Statischer Footer für Unterseiten */
.page-footer {
    padding: 24px 48px;
    display: flex; flex-direction: row; align-items: center;
    justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.page-footer .copyright { order: -1; }

/* Referenzen-Grid (Audi-Showroom) */
.ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px; margin-top: 8px;
}
.ref-card {
    position: relative;
    display: flex; flex-direction: column; justify-content: space-between;
    min-height: 230px; padding: 26px;
    border: 1px solid var(--border); border-radius: 16px;
    background: var(--bg-card); text-decoration: none;
    overflow: hidden;
    transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}
.ref-card::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,0.05), transparent 60%);
    opacity: 0; transition: opacity 0.4s var(--ease);
}
.ref-card:hover { background: var(--bg-card-hover); border-color: var(--border-hover); }
.ref-card:hover::after { opacity: 1; }
.ref-head .ref-name { font-size: 22px; font-weight: 300; letter-spacing: 0.05em; color: var(--text); }
.ref-head .ref-cat { font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--text-faint); margin-top: 6px; }
.ref-logo { flex: 1; display: flex; align-items: center; justify-content: center; padding: 18px 0; }
.ref-logo .wordmark { font-size: 28px; font-weight: 200; letter-spacing: 0.05em; }
/* Alle Card-Logos in gleicher quadratischer Box, optisch gleich groß */
.ref-logo-img { width: 66px; height: 66px; object-fit: contain; opacity: 0.92; transition: opacity 0.4s var(--ease); }
.ref-card:hover .ref-logo-img { opacity: 1; }

/* Großes Logo auf der Projekt-Unterseite, gleiche Box */
.project-logo { width: 84px; height: 84px; object-fit: contain; display: block; margin-bottom: 24px; }

/* Kopf der Projektseite: Logo links, Titel rechts daneben */
.project-head { display: flex; align-items: center; gap: 22px; margin-bottom: 26px; }
.project-head .project-logo { margin-bottom: 0; }
.project-head .page-title { margin-bottom: 0; }
@media (max-width: 560px) { .project-head { gap: 16px; } }

/* Logos, die als Form kleiner wirken, optisch angleichen */
.ref-logo-img.logo-lg { width: 114px; height: 114px; }   /* lex (Dreieck) größer */
.project-logo.logo-lg { width: 138px; height: 138px; }
.ref-logo-img.logo-md { width: 80px; height: 80px; }     /* DroneRadar (Hexagon) etwas kleiner */
.project-logo.logo-md { width: 96px; height: 96px; }

/* Marke oben mittig (nur Unterseiten) */
.top-brand {
    position: fixed; top: 22px; left: 50%; transform: translateX(-50%);
    z-index: 100; font-size: 20px; font-weight: 300;
    letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none;
}

/* Externer Live-Link */
.live-link {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 8px; padding: 11px 20px;
    border: 1px solid var(--border-hover); border-radius: 999px;
    color: var(--text-soft); text-decoration: none;
    font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
    transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}
.live-link:hover { border-color: var(--text-soft); color: var(--text); background: rgba(255,255,255,0.03); }
.ref-foot { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.ref-foot .more { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-mute); }
.ref-arrow { color: var(--text-mute); transition: transform 0.4s var(--ease), color 0.4s var(--ease); }
.ref-card:hover .ref-arrow { transform: translateX(5px); color: var(--text); }

/* Kontakt */
.contact-stage {
    min-height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 120px 24px 80px;
}
.contact-mail {
    font-size: clamp(24px, 5vw, 44px);
    font-weight: 200; letter-spacing: 0.03em; text-decoration: none;
    display: inline-block; margin: 22px 0;
    transition: opacity 0.3s var(--ease);
}
.contact-mail:hover { opacity: 0.8; }
.contact-phone {
    display: inline-block; margin-top: 16px;
    text-decoration: none;
    font-size: clamp(18px, 3.4vw, 30px); font-weight: 200; letter-spacing: 0.03em;
    transition: opacity 0.3s var(--ease);
}
.contact-phone:hover { opacity: 0.8; }
.contact-sub { color: var(--text-mute); font-size: 14px; letter-spacing: 0.08em; line-height: 1.7; }

/* Über uns — Säulen */
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 14px; }
.pillar { border: 1px solid var(--border); border-radius: 16px; padding: 26px; background: var(--bg-card); }
.pillar h3 { color: var(--text); font-weight: 400; font-size: 17px; letter-spacing: 0.06em; margin-bottom: 10px; }
.pillar p { color: var(--text-mute); font-weight: 300; font-size: 14.5px; line-height: 1.7; }

@media (max-width: 720px) {
    .pillars { grid-template-columns: 1fr; }
    .page { padding: 132px 20px 90px; }
}

/* ---- Responsive ---- */
@media (max-width: 720px) {
    .top-brand { top: 16px; font-size: 18px; }
    .side-nav {
        position: fixed; top: 14px; bottom: auto; transform: none;
        flex-direction: row; gap: 14px; margin: 0; z-index: 100;
    }
    .side-nav.left  { left: 16px; right: auto; }
    .side-nav.right { right: 16px; left: auto; }
    .side-nav .nav-link { font-size: 11px; letter-spacing: 1.5px; }
    .side-nav .nav-link:hover { letter-spacing: 1.5px; }
    .stage { justify-content: center; padding-top: 96px; }
    .site-footer { position: static; flex-direction: column; text-align: center; gap: 8px; padding: 26px 20px; }
    .page-footer { flex-direction: column; text-align: center; gap: 10px; padding: 26px 20px; }
    .site-footer .copyright, .page-footer .copyright { order: 0; }
}
