/**
 * AI Experience Room - Main Stylesheet
 * INNOPORT Reutlingen
 */

/* ============================================
   FONTS
============================================ */
@font-face {
    font-family: 'Campton';
    src: url('../assets/fonts/Campton-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Campton';
    src: url('../assets/fonts/Campton-Book.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   CSS VARIABLES
============================================ */
:root {
    --accent: #00f0ff;
    --accent-glow: rgba(0, 240, 255, 0.5);
    --accent-secondary: #b829ff;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-subtle: rgba(255, 255, 255, 0.1);
}

/* ============================================
   RESET & BASE
============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow: hidden;
    height: 100%;
}

body {
    font-family: 'Campton', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #000;
    color: #fff;
    line-height: 1.6;
    height: 100%;
    overflow-x: hidden;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

/* Mobile: softer scroll-snap */
@media (max-width: 768px) {
    body {
        scroll-snap-type: y proximity;
    }
}

/* ============================================
   AURORA BACKGROUND
============================================ */
.aurora-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: #030308;
    overflow: hidden;
}

.aurora-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 100% 60% at 10% 100%, rgba(0, 180, 255, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse 80% 50% at 30% 100%, rgba(0, 240, 255, 0.3) 0%, transparent 45%),
        radial-gradient(ellipse 60% 40% at 50% 100%, rgba(120, 0, 255, 0.25) 0%, transparent 40%),
        radial-gradient(ellipse 90% 55% at 70% 100%, rgba(200, 0, 150, 0.2) 0%, transparent 45%),
        radial-gradient(ellipse 70% 45% at 90% 100%, rgba(0, 240, 255, 0.2) 0%, transparent 50%);
    animation: aurora 8s ease-in-out infinite alternate;
}

.aurora-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
}

@keyframes aurora {
    0% {
        filter: hue-rotate(0deg) brightness(1);
        transform: translateY(0) scale(1);
    }
    50% {
        filter: hue-rotate(10deg) brightness(1.2);
    }
    100% {
        filter: hue-rotate(20deg) brightness(1);
        transform: translateY(-30px) scale(1.05);
    }
}

/* ============================================
   SCAN LINES
============================================ */
.scan-lines {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.03) 0px,
        rgba(0, 0, 0, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
    animation: scan-move 10s linear infinite;
}

@keyframes scan-move {
    0% { background-position: 0 0; }
    100% { background-position: 0 100px; }
}

/* ============================================
   AURORA BEAMS
============================================ */
.aurora-beams {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80%;
    display: flex;
    justify-content: space-around;
    opacity: 0.8;
}

.beam {
    width: 3px;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 240, 255, 1) 0%, rgba(0, 180, 255, 0.6) 30%, rgba(120, 0, 255, 0.3) 60%, transparent 100%);
    filter: blur(4px);
    animation: beam 2s ease-in-out infinite;
}

.beam:nth-child(2) { animation-delay: 0.3s; width: 4px; }
.beam:nth-child(3) { animation-delay: 0.6s; width: 5px; filter: blur(6px); }
.beam:nth-child(4) { animation-delay: 0.9s; width: 3px; }
.beam:nth-child(5) { animation-delay: 1.2s; width: 6px; filter: blur(8px); }
.beam:nth-child(6) { animation-delay: 0.2s; width: 4px; }
.beam:nth-child(7) { animation-delay: 0.7s; width: 5px; filter: blur(7px); }
.beam:nth-child(8) { animation-delay: 1s; width: 3px; }

@keyframes beam {
    0%, 100% {
        opacity: 0.3;
        transform: scaleY(1) scaleX(1);
    }
    50% {
        opacity: 1;
        transform: scaleY(1.15) scaleX(1.5);
    }
}

/* ============================================
   FLOATING PARTICLES
============================================ */
.particles-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    animation: particle-float 8s ease-in-out infinite;
    box-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent-glow);
}

.particle:nth-child(1) { left: 5%; top: 15%; animation-delay: 0s; animation-duration: 7s; }
.particle:nth-child(2) { left: 15%; top: 55%; animation-delay: 1s; animation-duration: 9s; }
.particle:nth-child(3) { left: 25%; top: 25%; animation-delay: 2s; animation-duration: 8s; }
.particle:nth-child(4) { left: 35%; top: 75%; animation-delay: 0.5s; animation-duration: 10s; }
.particle:nth-child(5) { left: 45%; top: 10%; animation-delay: 1.5s; animation-duration: 7s; }
.particle:nth-child(6) { left: 55%; top: 45%; animation-delay: 2.5s; animation-duration: 9s; }
.particle:nth-child(7) { left: 65%; top: 85%; animation-delay: 0.8s; animation-duration: 8s; }
.particle:nth-child(8) { left: 75%; top: 30%; animation-delay: 1.8s; animation-duration: 11s; }
.particle:nth-child(9) { left: 85%; top: 65%; animation-delay: 0.3s; animation-duration: 6s; }
.particle:nth-child(10) { left: 95%; top: 20%; animation-delay: 1.2s; animation-duration: 10s; }
.particle:nth-child(11) { left: 8%; top: 80%; animation-delay: 2.2s; animation-duration: 8s; }
.particle:nth-child(12) { left: 28%; top: 50%; animation-delay: 0.7s; animation-duration: 7s; }
.particle:nth-child(13) { left: 48%; top: 90%; animation-delay: 1.7s; animation-duration: 9s; }
.particle:nth-child(14) { left: 68%; top: 5%; animation-delay: 2.7s; animation-duration: 11s; }
.particle:nth-child(15) { left: 88%; top: 45%; animation-delay: 0.4s; animation-duration: 8s; }
.particle:nth-child(16) { left: 3%; top: 40%; animation-delay: 1.4s; animation-duration: 10s; }

@keyframes particle-float {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.5;
    }
    25% {
        transform: translateY(-50px) translateX(20px) scale(1.2);
        opacity: 1;
    }
    50% {
        transform: translateY(-20px) translateX(-10px) scale(0.8);
        opacity: 0.7;
    }
    75% {
        transform: translateY(-70px) translateX(15px) scale(1.1);
        opacity: 0.9;
    }
}

/* ============================================
   SECTIONS
============================================ */
section {
    scroll-snap-align: start;
    height: 100vh;
    height: 100dvh; /* Fallback: 100vh für Browser ohne dvh-Support */
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 2rem 1rem;
}

/* Mobile: flexible section height */
@media (max-width: 768px) {
    section {
        height: auto;
        min-height: 100dvh;
        overflow: visible;
        padding: 3rem 1rem 5rem;
    }
}

/* ============================================
   TYPOGRAPHY
============================================ */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.1;
}

h2 {
    font-size: clamp(2rem, 8vw, 4rem);
    text-align: center;
    margin-bottom: 1rem;
}

h3 {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
}

p {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
}

.section-subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.accent-text {
    color: var(--accent);
}

/* ============================================
   BUTTONS
============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: inherit;
    font-weight: 700;
    font-size: clamp(0.85rem, 2vw, 1rem);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #00c8ff);
    color: #000;
    box-shadow: 0 0 30px var(--accent-glow), 0 0 60px rgba(0, 240, 255, 0.3);
    animation: glow-breathe 3s ease-in-out infinite;
}

.btn-primary:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 0 50px var(--accent-glow), 0 0 100px rgba(0, 240, 255, 0.5), 0 10px 30px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: border-glow 4s ease-in-out infinite;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}


/* ============================================
   FLOATING NAVIGATION
============================================ */
.floating-nav {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-end;
}

.nav-dot {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
}

.nav-dot::after {
    content: '';
    width: 10px;
    height: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.nav-dot:hover::after,
.nav-dot.active::after {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.nav-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(0, 0, 0, 0.8);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.nav-dot:hover .nav-label,
.nav-dot.active .nav-label {
    color: var(--accent);
}

@media (max-width: 768px) {
    .floating-nav {
        right: 0.75rem;
        gap: 0.5rem;
    }

    .nav-dot::after {
        width: 8px;
        height: 8px;
    }

    .nav-label {
        display: none;
    }
}

/* ============================================
   SCROLL ANIMATIONS
============================================ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }
.stagger-7 { transition-delay: 0.7s; }
.stagger-8 { transition-delay: 0.8s; }

/* ============================================
   KEYFRAME ANIMATIONS
============================================ */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-25px) rotate(3deg);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 30px var(--accent)) drop-shadow(0 0 60px var(--accent-glow));
    }
    50% {
        filter: drop-shadow(0 0 60px var(--accent)) drop-shadow(0 0 120px var(--accent-glow));
    }
}

@keyframes bounce-down {
    0%, 100% {
        transform: rotate(45deg) translateY(0);
        opacity: 1;
    }
    50% {
        transform: rotate(45deg) translateY(12px);
        opacity: 0.4;
    }
}

@keyframes glow-breathe {
    0%, 100% {
        box-shadow: 0 0 20px var(--accent-glow), inset 0 0 10px rgba(0, 240, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 40px var(--accent-glow), 0 0 60px var(--accent-glow), inset 0 0 20px rgba(0, 240, 255, 0.2);
    }
}

@keyframes border-glow {
    0%, 100% {
        border-color: rgba(0, 240, 255, 0.3);
    }
    50% {
        border-color: rgba(0, 240, 255, 0.8);
    }
}

/* ============================================
   SCROLL INDICATOR
============================================ */
.scroll-indicator {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 20;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scroll-indicator:hover {
    transform: translateX(-50%) translateY(-3px);
}

.scroll-indicator:hover span {
    color: var(--accent);
    opacity: 1;
}

.scroll-indicator span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #fff;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.scroll-indicator .chevron {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
    animation: bounce-down 1.5s infinite;
}

/* ============================================
   LIGHTBOX
============================================ */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: zoom-out;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 0 60px rgba(0, 240, 255, 0.3);
}

.lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: var(--accent);
}

.lightbox-close svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

/* ============================================
   GALLERY
============================================ */
.gallery-img {
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.gallery-img:hover {
    transform: scale(1.02);
}

/* ============================================
   ACCESSIBILITY
============================================ */

/* A11y: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .aurora-bg::before,
    .beam,
    .particle,
    .scan-lines,
    .synapse-canvas {
        animation: none !important;
        opacity: 0.3 !important;
    }
}

/* A11y: Skip Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #000;
    padding: 1rem 2rem;
    font-weight: 700;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 8px 8px;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.skip-link-nav {
    left: calc(50% + 200px);
}

/* A11y: Focus Visible */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* A11y: Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* A11y: High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --accent: #00ffff;
        --border-subtle: rgba(255, 255, 255, 0.5);
    }
    .btn-primary {
        border: 2px solid #000;
    }
}
