:root {
    --loxone-green: #6ab344;
    --vectorworks-blue: #00a8ff;
    --qsys-blue: #0085ca;
    --dark-bg: #0a0a0a;
}

/* Preflight / Reset */
*, ::before, ::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e5e7eb;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    margin: 0;
    line-height: inherit;
    background-color: var(--dark-bg);
    color: #e5e5e5;
}

h1, h2, h3, h4, p, ul {
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4 {
    font-size: inherit;
    font-weight: inherit;
}

ul {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: inherit;
}

button {
    font-family: inherit;
    font-size: 100%;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
    background-color: transparent;
    background-image: none;
    cursor: pointer;
}

img, video {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Base & Scrolling */
.scroll-smooth { scroll-behavior: smooth; }
.antialiased {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout & Positioning */
.fixed { position: fixed; }
.sticky { position: sticky; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { inset: 0px; }
.top-0 { top: 0px; }
.top-8 { top: 2rem; }
.right-8 { right: 2rem; }

.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }
.z-\[100\] { z-index: 100; }

.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }

.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gap-3 { gap: 0.75rem; }
.gap-6 { gap: 1.5rem; }
.gap-12 { gap: 3rem; }
.gap-20 { gap: 5rem; }

.order-1 { order: 1; }
.order-2 { order: 2; }

.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.pointer-events-none { pointer-events: none; }

/* Sizing */
.w-0 { width: 0px; }
.w-\[0\%\] { width: 0%; }
.w-1\.5 { width: 0.375rem; }
.w-52 { width: 13rem; }
.w-auto { width: auto; }
.w-full { width: 100%; }

.h-1\.5 { height: 0.375rem; }
.h-10 { height: 2.5rem; }
.h-28 { height: 7rem; }
.h-auto { height: auto; }
.h-full { height: 100%; }

.min-h-\[60vh\] { min-height: 60vh; }
.max-h-\[90vh\] { max-height: 90vh; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-7xl { max-width: 80rem; }

.aspect-video { aspect-ratio: 16 / 9; }

/* Spacing */
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-4 { margin-left: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-20 { margin-bottom: 5rem; }

.p-4 { padding: 1rem; }
.p-10 { padding: 2.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-32 { padding-top: 8rem; padding-bottom: 8rem; }
.pt-4 { padding-top: 1rem; }
.pt-6 { padding-top: 1.5rem; }
.pt-8 { padding-top: 2rem; }
.pt-24 { padding-top: 6rem; }
.pb-12 { padding-bottom: 3rem; }
.pl-4 { padding-left: 1rem; }

.space-x-2 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.5rem; }
.space-x-8 > :not([hidden]) ~ :not([hidden]) { margin-left: 2rem; }
.space-x-10 > :not([hidden]) ~ :not([hidden]) { margin-left: 2.5rem; }
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }
.space-y-8 > :not([hidden]) ~ :not([hidden]) { margin-top: 2rem; }
.space-y-10 > :not([hidden]) ~ :not([hidden]) { margin-top: 2.5rem; }

/* Typography */
.text-\[9px\] { font-size: 9px; }
.text-\[10px\] { font-size: 10px; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-6xl { font-size: 3.75rem; line-height: 1; }

.font-light { font-weight: 300; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.italic { font-style: italic; }
.uppercase { text-transform: uppercase; }
.underline { text-decoration-line: underline; }
.text-center { text-align: center; }
.text-balance { text-wrap: balance; }

.leading-none { line-height: 1; }
.leading-relaxed { line-height: 1.625; }

.tracking-tighter { letter-spacing: -0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.tracking-\[0\.1em\] { letter-spacing: 0.1em; }
.tracking-\[0\.2em\] { letter-spacing: 0.2em; }
.tracking-\[0\.3em\] { letter-spacing: 0.3em; }

/* Colors & Backgrounds */
.text-white { color: #ffffff; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-loxone { color: var(--loxone-green); }
.text-vectorworks { color: var(--vectorworks-blue); }

.bg-black { background-color: #000000; }
.bg-black\/95 { background-color: rgba(0, 0, 0, 0.95); }
.bg-\[\#0f0f0f\] { background-color: #0f0f0f; }
.bg-white\/5 { background-color: rgba(255, 255, 255, 0.05); }
.bg-gray-600 { background-color: #4b5563; }
.bg-loxone\/10 { background-color: rgba(106, 179, 68, 0.1); }

.bg-gradient-to-b {
    background-image: linear-gradient(to bottom, var(--tw-gradient-from, transparent), var(--tw-gradient-via, transparent), var(--tw-gradient-to, transparent));
}
.from-black\/80 { --tw-gradient-from: rgba(0, 0, 0, 0.8); }
.via-transparent { --tw-gradient-via: transparent; }
.to-black { --tw-gradient-to: #000000; }

.bg-subtle-fachplanung { background-color: rgba(0, 168, 255, 0.05); }
.bg-subtle-loxone { background-color: rgba(106, 179, 68, 0.50); }
.bg-subtle-qsys { background-color: rgba(0, 133, 202, 0.05); }

/* Borders & Radii */
.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-l-2 { border-left-width: 2px; }

.border-white\/5 { border-color: rgba(255, 255, 255, 0.05); }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }
.border-white\/20 { border-color: rgba(255, 255, 255, 0.2); }
.border-loxone { border-color: var(--loxone-green); }
.border-qsys { border-color: var(--qsys-blue); }
.border-loxone-video { border: 2px solid var(--loxone-green); }

.rounded { border-radius: 0.25rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Effects */
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.opacity-0 { opacity: 0; }
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }
.opacity-100 { opacity: 1; }
.grayscale { filter: grayscale(100%); }
.backdrop-blur-2xl {
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}
.object-contain { object-fit: contain; }
.object-cover { object-fit: cover; }
.origin-top { transform-origin: top; }

.img-glow {
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    transition: transform 0.5s ease;
}
.img-glow:hover { transform: scale(1.01); }

/* Transitions & Animations */
.transition {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.transition-opacity {
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }
.video-fade { transition: opacity 0.8s ease-in-out; }

@keyframes kenburns {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.12) translate(-1%, -1%); }
    100% { transform: scale(1) translate(0, 0); }
}

.animate-kenburns {
    animation: kenburns 30s ease-in-out infinite;
    will-change: transform;
}

@keyframes loxProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

.animate-lox-progress {
    animation: loxProgress linear forwards;
}

/* Interactive & Group States */
.hover\:bg-white:hover { background-color: #ffffff; }
.hover\:border-loxone\/50:hover { border-color: rgba(106, 179, 68, 0.5); }
.hover\:text-black:hover { color: #000000; }
.hover\:text-loxone:hover { color: var(--loxone-green); }
.hover\:text-vectorworks:hover { color: var(--vectorworks-blue); }
.hover\:text-white:hover { color: #ffffff; }
.hover\:underline:hover { text-decoration-line: underline; }

.group:hover .group-hover\:opacity-100 { opacity: 1; }
.group.active .group-\[\.active\]\:animate-lox-progress { animation: loxProgress linear forwards; }
.group.active .group-\[\.active\]\:bg-loxone { background-color: var(--loxone-green); }
.group.active .group-\[\.active\]\:shadow-\[0_0_10px_\#6ab344\] { box-shadow: 0 0 10px #6ab344; }
.group.active .group-\[\.active\]\:text-white { color: #ffffff; }

/* Glass Divider */
.section-divider-glass {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to right, var(--divider-color), transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    mask-image: linear-gradient(to bottom, black, transparent);
    z-index: 10;
}
.divider-fachplanung { --divider-color: rgba(0, 168, 255, 0.25); }
.divider-loxone { --divider-color: rgba(106, 179, 68, 0.4); }
.divider-qsys { --divider-color: rgba(0, 133, 202, 0.3); }

/* Navigation */
nav {
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background-color 0.3s ease;
}
nav:hover {
    background-color: rgba(0, 0, 0, 0.6);
}
nav .nav-container {
    display: flex;
    align-items: flex-end;
    padding-top: 40px;
    padding-bottom: 20px;
}

/* Modals */
.modal-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #4b5563;
    margin-bottom: 0.5rem;
    display: block;
}

/* Responsive (md: >= 768px) */
@media (min-width: 768px) {
    .md\:flex { display: flex; }
    .md\:flex-row { flex-direction: row; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:items-start { align-items: flex-start; }
    .md\:order-1 { order: 1; }
    .md\:order-2 { order: 2; }
    .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
    .md\:text-5xl { font-size: 3rem; line-height: 1; }
    .md\:text-8xl { font-size: 6rem; line-height: 1; }
    .md\:text-xs { font-size: 0.75rem; line-height: 1rem; }
}
