/* ============================================
   WEB-VENTURE
   ============================================ */

@import url(https://fonts.bunny.net/css?family=space-grotesk:400,500,600,700);

/* ---------- CSS Variables ---------- */
:root {
    /* Colors */
    --color-bg: #0a0a0a;
    --color-bg-elevated: #111111;
    --color-text: #f5f5f0;
    --color-text-muted: #888888;
    --color-accent-1: #00d4ff;
    --color-accent-2: #a855f7;
    --color-gradient: linear-gradient(135deg, var(--color-accent-1), var(--color-accent-2));

    /* Typography */
    --font-main: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-xs: clamp(0.75rem, 1.5vw, 0.875rem);
    --font-size-sm: clamp(0.875rem, 2vw, 1rem);
    --font-size-base: clamp(1rem, 2.5vw, 1.125rem);
    --font-size-lg: clamp(1.25rem, 3vw, 1.5rem);
    --font-size-xl: clamp(1.5rem, 4vw, 2rem);
    --font-size-2xl: clamp(2rem, 5vw, 3rem);
    --font-size-3xl: clamp(2.5rem, 6vw, 4rem);
    --font-size-hero: clamp(2.5rem, 8vw, 6rem);

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

    /* Layout */
    --nav-height: 80px;
    --container-max: 1400px;
    --container-padding: clamp(1rem, 5vw, 4rem);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* scroll-behavior handled by GSAP for better control */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-main);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
    cursor: none;
}

/* Restore cursor on touch devices */
@media (hover: none) {
    body {
        cursor: auto;
    }
    .cursor {
        display: none !important;
    }
}

a {
    color: inherit;
    text-decoration: none;
    cursor: none !important;
}

button {
    font-family: inherit;
    cursor: none !important;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    cursor: none !important;
}

/* Hide default cursor on all interactive elements */
a:hover, button:hover, input:hover, textarea:hover, select:hover,
a:focus, button:focus, input:focus, textarea:focus, select:focus,
.service-card:hover, .service-card, [role="button"],
.custom-select, .custom-select *, .custom-select-trigger, .custom-select-option {
    cursor: none !important;
}

::selection {
    background: var(--color-accent-1);
    color: var(--color-bg);
}

/* ---------- Custom Cursor ---------- */
.cursor {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
}

.cursor-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--color-text);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.2s var(--ease-out-quart), opacity 0.2s, width 0.3s, height 0.3s, background 0.3s;
}

.cursor-outline {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s var(--ease-out-expo);
    opacity: 0.5;
}

/* Cursor icon inside */
.cursor-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s var(--ease-out-expo), transform 0.3s var(--ease-out-expo);
    background: var(--color-gradient);
    border-radius: 50%;
    color: var(--color-bg);
}

/* Semi-transparent when visible - allows users to see what's behind */
.cursor-icon.visible,
.cursor.hover-link .cursor-icon.icon-arrow,
.cursor.hover-back .cursor-icon.icon-arrow-back,
.cursor.hover-view .cursor-icon.icon-eye,
.cursor.hover-close .cursor-icon.icon-eye-closed,
.cursor.hover-input .cursor-icon.icon-pen,
.cursor.hover-select .cursor-icon.icon-chevron-down,
.cursor.hover-select-open .cursor-icon.icon-chevron-up,
.cursor.hover-option .cursor-icon.icon-check {
    opacity: 0.85;
}

.cursor-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* Hover state - link/button (arrow) */
.cursor.hover-link .cursor-dot,
.cursor.hover-link .cursor-outline {
    opacity: 0;
}

/* Hover state - view (eye for cards) */
.cursor.hover-view .cursor-dot,
.cursor.hover-view .cursor-outline {
    opacity: 0;
}

/* Hover state - close (closed eye for close buttons) */
.cursor.hover-close .cursor-dot,
.cursor.hover-close .cursor-outline {
    opacity: 0;
}

/* Hover state - input (pen) */
.cursor.hover-input .cursor-dot,
.cursor.hover-input .cursor-outline {
    opacity: 0;
}

/* Hover state - select dropdown closed (chevron down) */
.cursor.hover-select .cursor-dot,
.cursor.hover-select .cursor-outline {
    opacity: 0;
}

/* Hover state - select dropdown open (chevron up) */
.cursor.hover-select-open .cursor-dot,
.cursor.hover-select-open .cursor-outline {
    opacity: 0;
}

/* Hover state - dropdown option (checkmark) */
.cursor.hover-option .cursor-dot,
.cursor.hover-option .cursor-outline {
    opacity: 0;
}

/* Hover state - back link (arrow back) */
.cursor.hover-back .cursor-dot,
.cursor.hover-back .cursor-outline {
    opacity: 0;
}

/* Clicking state */
.cursor.clicking .cursor-icon {
    transform: translate(-50%, -50%) scale(0.9);
}

/* ---------- Loader ---------- */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    gap: var(--space-md);
}

.loader-text {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    letter-spacing: 0.3em;
    display: flex;
    overflow: hidden;
}

.loader-text span {
    display: inline-block;
    transform: translateY(100%);
    animation: loaderTextIn 0.6s var(--ease-out-expo) forwards;
}

.loader-text span:nth-child(1) { animation-delay: 0.1s; }
.loader-text span:nth-child(2) { animation-delay: 0.15s; }
.loader-text span:nth-child(3) { animation-delay: 0.2s; }
.loader-text span:nth-child(4) { animation-delay: 0.25s; }
.loader-text span:nth-child(5) { animation-delay: 0.3s; }
.loader-text span:nth-child(6) { animation-delay: 0.35s; }
.loader-text span:nth-child(7) { animation-delay: 0.4s; }
.loader-text span:nth-child(8) { animation-delay: 0.45s; }
.loader-text span:nth-child(9) { animation-delay: 0.5s; }
.loader-text span:nth-child(10) { animation-delay: 0.55s; }
.loader-text span:nth-child(11) { animation-delay: 0.6s; }

@keyframes loaderTextIn {
    to {
        transform: translateY(0);
    }
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loader-progress {
    width: 0;
    height: 100%;
    background: var(--color-gradient);
    animation: loaderProgress 1.5s var(--ease-in-out) forwards;
    animation-delay: 0.5s;
}

@keyframes loaderProgress {
    to {
        width: 100%;
    }
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s var(--ease-out-expo), visibility 0.6s;
}

/* ---------- Navigation ---------- */
.nav {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    right: var(--space-sm);
    width: calc(100% - var(--space-sm) * 2);
    height: var(--nav-height);
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.6s, transform 0.6s;
    border-radius: 20px;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid transparent;
    box-shadow: none;
}

.nav.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Sticky nav that appears after scrolling past original position */
.nav.sticky {
    position: fixed;
    top: var(--space-sm);
    animation: navSlideDown 0.5s var(--ease-out-expo) forwards;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

@keyframes navSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
}

.nav-link {
    position: relative;
    font-size: var(--font-size-sm);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-gradient);
    transition: width 0.4s var(--ease-out-expo);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ---------- WebGL Canvas ---------- */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0;
    transition: opacity 1s var(--ease-out-expo);
    background: transparent;
}

#webgl-canvas.visible {
    opacity: 1;
}

/* ---------- Hero Section ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--nav-height) var(--container-padding) var(--space-lg);
}

.hero-content {
    text-align: center;
    max-width: 1000px;
}

.hero-headline-wrapper {
    overflow: hidden;
    margin-bottom: var(--space-md);
}

.hero-headline {
    font-size: var(--font-size-hero);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    word-spacing: 0.1em;
}

/* Keep "digitale Erlebnisse" together */
.hero-headline .word-group {
    display: inline-block;
    white-space: nowrap;
}

.hero-headline .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(100px) rotate(10deg);
}

.hero-subline-wrapper {
    overflow: hidden;
    margin-bottom: var(--space-lg);
}

.hero-subline {
    font-size: var(--font-size-xl);
    color: var(--color-text-muted);
    opacity: 0;
    transform: translateY(30px);
}

.hero-cta-wrapper {
    opacity: 0;
    transform: translateY(20px);
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 1.25rem 2.5rem;
    font-size: var(--font-size-base);
    font-weight: 600;
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-text);
    border-radius: 100px;
    transition: all 0.5s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.hero-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-gradient);
    transform: translateX(-100%);
    transition: transform 0.5s var(--ease-out-expo);
    z-index: -1;
}

.hero-cta:hover {
    color: var(--color-bg);
    border-color: transparent;
}

.hero-cta:hover::before {
    transform: translateX(0);
}

.hero-cta .btn-icon {
    display: flex;
    transition: transform 0.5s var(--ease-out-expo);
}

.hero-cta .btn-icon svg {
    width: 20px;
    height: 20px;
}

.hero-cta:hover .btn-icon {
    transform: translateX(5px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    opacity: 0;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-text), transparent);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: var(--color-accent-1);
    animation: scrollLine 2s var(--ease-in-out) infinite;
}

@keyframes scrollLine {
    0% {
        transform: translateY(-100%);
    }
    50% {
        transform: translateY(200%);
    }
    50.01%, 100% {
        transform: translateY(-100%);
    }
}

.scroll-text {
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
}

/* Hero Shapes */
.hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: var(--color-accent-1);
    top: -200px;
    right: -200px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--color-accent-2);
    bottom: -100px;
    left: -100px;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: var(--color-accent-1);
    top: 50%;
    left: 30%;
    opacity: 0.15;
}

/* ---------- Services Section ---------- */
.services {
    position: relative;
    padding: var(--space-xl) var(--container-padding);
    min-height: 100vh;
}

.services-header {
    max-width: var(--container-max);
    margin: 0 auto var(--space-xl);
    text-align: center;
}

.section-label {
    display: inline-block;
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--color-accent-1);
    margin-bottom: var(--space-md);
    opacity: 0;
    transform: translateY(20px);
}

.services-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    line-height: 1.2;
}

.services-title .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(60px);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    max-width: var(--container-max);
    margin: 0 auto;
    position: relative;
}

/* Service Card */
.service-card {
    position: relative;
    perspective: 1000px;
    opacity: 0;
    transform: translateY(60px);
    z-index: 1;
    display: flex;
}

.card-inner {
    position: relative;
    padding: var(--space-lg);
    background: var(--color-bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    transition: transform 0.6s var(--ease-out-expo), box-shadow 0.6s, background 0.3s, border 0.3s;
    transform-style: preserve-3d;
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover .card-inner {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.card-icon {
    width: 64px;
    height: 64px;
    color: var(--color-accent-1);
    margin-bottom: var(--space-md);
    transition: transform 0.6s var(--ease-out-expo);
}

.service-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.card-number {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--color-text-muted);
    opacity: 0.3;
}

.card-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.card-tagline {
    font-size: var(--font-size-sm);
    background: var(--color-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.card-description {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: 1.7;
    flex-grow: 1;
}

/* Active card state */
.service-card.active .card-inner {
    border-color: var(--color-accent-1);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.2);
}

/* ---------- Service Detail Panel ---------- */
.service-detail {
    max-width: var(--container-max);
    margin: var(--space-xl) auto 0;
    background: var(--color-bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: var(--space-xl);
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo);
}

.service-detail.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.service-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.service-detail-info {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.service-detail-icon {
    width: 80px;
    height: 80px;
    color: var(--color-accent-1);
}

.service-detail-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.service-detail-tagline {
    font-size: var(--font-size-lg);
    background: var(--color-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.service-detail-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--color-text);
    transition: all 0.3s var(--ease-out-expo);
    flex-shrink: 0;
}

.service-detail-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.service-detail-close svg {
    width: 20px;
    height: 20px;
}

/* Service tabs */
.service-tabs {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.service-tab {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--color-text-muted);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    transition: all 0.3s var(--ease-out-expo);
    white-space: nowrap;
}

.service-tab:hover {
    color: var(--color-text);
    border-color: rgba(255, 255, 255, 0.2);
}

.service-tab.active {
    background: var(--color-gradient);
    color: var(--color-bg);
    border-color: transparent;
}

/* Service content panels */
.service-content-wrapper {
    position: relative;
    overflow: hidden;
}

.service-content {
    display: none;
    animation: fadeSlideIn 0.4s var(--ease-out-expo);
}

.service-content.active {
    display: block;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.service-content-text {
    font-size: var(--font-size-base);
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: var(--space-lg);
}

.service-content h4 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

/* Feature cards */
.card-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.feature-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: var(--space-md);
    transition: all 0.3s var(--ease-out-expo);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.feature-item h5 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.feature-item p {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    line-height: 1.5;
}



.card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--color-accent-1) 0%, transparent 70%);
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.6s;
    pointer-events: none;
}

.service-card:hover .card-glow {
    opacity: 0.05;
}


/* ---------- Contact Section ---------- */
.contact {
    position: relative;
    padding: var(--space-xl) var(--container-padding);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.contact-gradient {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 150%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(168, 85, 247, 0.15) 0%, transparent 60%);
}

.contact-content {
    position: relative;
    max-width: 700px;
    width: 100%;
}

.contact-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.contact-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

.contact-title .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(60px);
}

.contact-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    opacity: 0;
    transform: translateY(20px);
}

/* Contact Form */
.contact-form {
    opacity: 0;
    transform: translateY(40px);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.form-group {
    position: relative;
    margin-bottom: var(--space-lg);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--space-md) 0;
    font-size: var(--font-size-base);
    color: var(--color-text);
    background: transparent;
    border: none;
    outline: none;
}

/* Override Chrome autofill styling */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus,
.form-group textarea:-webkit-autofill,
.form-group textarea:-webkit-autofill:hover,
.form-group textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--color-text);
    -webkit-box-shadow: 0 0 0px 1000px var(--color-bg) inset;
    box-shadow: 0 0 0px 1000px var(--color-bg) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* Keep label up when autofilled */
.form-group input:-webkit-autofill ~ label {
    top: -0.5rem;
    font-size: var(--font-size-xs);
    color: var(--color-accent-1);
}

.form-group select {
    appearance: none;
    cursor: pointer;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group label {
    position: absolute;
    top: var(--space-md);
    left: 0;
    font-size: var(--font-size-base);
    color: var(--color-text-muted);
    pointer-events: none;
    transition: all 0.3s var(--ease-out-expo);
}

.form-group input:not([type="hidden"]):focus ~ label,
.form-group input:not([type="hidden"]):not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label,
.form-group select:focus ~ label,
.form-group select:valid ~ label {
    top: -0.5rem;
    font-size: var(--font-size-xs);
    color: var(--color-accent-1);
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.input-line::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-gradient);
    transition: width 0.4s var(--ease-out-expo);
}

.form-group input:focus ~ .input-line::after,
.form-group textarea:focus ~ .input-line::after,
.form-group select:focus ~ .input-line::after {
    width: 100%;
}

/* Custom Select Dropdown */
.form-group-select {
    position: relative;
}

.custom-select {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
    cursor: pointer;
    min-height: 56px;
}

.custom-select-value {
    font-size: var(--font-size-base);
    color: var(--color-text);
}

.custom-select-value:empty::after {
    content: '';
}

.custom-select-arrow {
    transition: transform 0.3s var(--ease-out-expo);
}

.custom-select-arrow svg {
    width: 20px;
    height: 20px;
    color: var(--color-text-muted);
}

.custom-select.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-label {
    position: absolute;
    top: var(--space-md);
    left: 0;
    font-size: var(--font-size-base);
    color: var(--color-text-muted);
    pointer-events: none;
    transition: all 0.3s var(--ease-out-expo);
}

.custom-select.has-value + .custom-select-label,
.custom-select.open + .custom-select-label {
    top: -0.5rem;
    font-size: var(--font-size-xs);
    color: var(--color-accent-1);
}

.form-group-select .input-line::after {
    width: 0;
}

.custom-select.open ~ .input-line::after,
.custom-select.has-value ~ .input-line::after {
    width: 100%;
}

/* Dropdown Options */
.custom-select-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--color-bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s var(--ease-out-expo);
    z-index: 100;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    max-height: 300px;
    overflow-y: auto;
}

.custom-select.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Custom scrollbar for dropdown */
.custom-select-options::-webkit-scrollbar {
    width: 8px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    margin: 8px 0;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-accent-1), var(--color-accent-2));
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--color-accent-1), var(--color-accent-2));
    border: 1px solid transparent;
    background-clip: padding-box;
}

/* Firefox scrollbar */
.custom-select-options {
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent-1) rgba(255, 255, 255, 0.03);
}

.custom-select-option {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s var(--ease-out-expo);
    position: relative;
}

.custom-select-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--color-gradient);
    transform: scaleY(0);
    transition: transform 0.2s var(--ease-out-expo);
}

.custom-select-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text);
}

.custom-select-option:hover::before {
    transform: scaleY(1);
}

.custom-select-option.selected {
    background: rgba(0, 212, 255, 0.1);
    color: var(--color-accent-1);
}

.custom-select-option.selected::before {
    transform: scaleY(1);
}

.form-group select:focus ~ .select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* Submit Button */
.submit-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: 1.5rem 2.5rem;
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-bg);
    border-radius: 100px;
    overflow: hidden;
    transition: transform 0.5s var(--ease-out-expo);
}

.submit-btn .btn-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-gradient);
    z-index: -1;
    transition: transform 0.5s var(--ease-out-expo);
}

.submit-btn:hover .btn-bg {
    transform: scale(1.05);
}

.submit-btn .btn-text {
    position: relative;
    z-index: 1;
}

.submit-btn .btn-icon {
    position: relative;
    z-index: 1;
    display: flex;
    transition: transform 0.5s var(--ease-out-expo);
}

.submit-btn .btn-icon svg {
    width: 20px;
    height: 20px;
}

.submit-btn:hover .btn-icon {
    transform: translateX(5px) rotate(-10deg);
}

/* Contact Success */
.contact-success {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s, visibility 0.6s;
}

.contact-success.visible {
    opacity: 1;
    visibility: visible;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-gradient);
    border-radius: 50%;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    color: var(--color-bg);
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
}

.contact-success.visible .success-icon svg {
    animation: checkmark 0.6s var(--ease-out-expo) forwards;
    animation-delay: 0.3s;
}

@keyframes checkmark {
    to {
        stroke-dashoffset: 0;
    }
}

.contact-success h3 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-sm);
}

.contact-success p {
    color: var(--color-text-muted);
}

/* ---------- Footer ---------- */
.footer {
    padding: var(--space-lg) var(--container-padding);
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
}

.footer-link {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    transition: color 0.3s;
}

.footer-link:hover {
    color: var(--color-text);
}

/* ---------- Magnetic Button Effect ---------- */
.magnetic-btn {
    transition: transform 0.3s var(--ease-out-expo);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 60px;
        --font-size-hero: clamp(2rem, 10vw, 3rem);
        --font-size-xl: clamp(1rem, 4vw, 1.25rem);
    }

    .nav {
        padding: var(--space-xs) var(--space-sm);
    }

    .nav-links {
        gap: var(--space-sm);
    }

    .nav-link {
        font-size: 0.85rem;
        letter-spacing: 0.03em;
    }

    .hero {
        padding: calc(var(--nav-height) + var(--space-md)) var(--space-sm) var(--space-lg);
        min-height: 100svh;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-headline {
        line-height: 1.2;
    }

    .hero-headline-wrapper {
        margin-bottom: var(--space-sm);
    }

    .hero-subline-wrapper {
        margin-bottom: var(--space-md);
    }

    .hero-cta {
        padding: 1rem 1.75rem;
        font-size: var(--font-size-sm);
    }

    .hero-cta .btn-icon svg {
        width: 16px;
        height: 16px;
    }

    .scroll-indicator {
        bottom: var(--space-lg);
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Service detail mobile styles */
    .service-detail {
        padding: var(--space-md);
        margin: var(--space-md) auto 0;
        border-radius: 16px;
    }

    .service-detail-header {
        flex-direction: column;
        gap: var(--space-md);
        padding-bottom: var(--space-md);
        margin-bottom: var(--space-md);
    }

    .service-detail-info {
        gap: var(--space-md);
    }

    .service-detail-icon {
        width: 50px;
        height: 50px;
    }

    .service-detail-title {
        font-size: var(--font-size-lg);
    }

    .service-detail-tagline {
        font-size: var(--font-size-base);
    }

    .service-detail-close {
        position: absolute;
        top: var(--space-md);
        right: var(--space-md);
        width: 36px;
        height: 36px;
    }

    .service-detail {
        position: relative;
    }

    .service-tabs {
        gap: var(--space-xs);
        margin-bottom: var(--space-md);
    }

    .service-tab {
        padding: var(--space-xs) var(--space-sm);
        font-size: 11px;
    }

    .service-content-text {
        font-size: var(--font-size-sm);
        margin-bottom: var(--space-md);
    }

    .card-features {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .feature-item {
        padding: var(--space-sm);
    }

    .service-tabs {
        justify-content: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-md);
    }

    .hero-shapes .shape {
        transform: scale(0.5);
    }
}

@media (max-width: 480px) {
    :root {
        --nav-height: 50px;
        --font-size-hero: clamp(1.75rem, 9vw, 2.5rem);
        --font-size-xl: clamp(0.875rem, 3.5vw, 1rem);
    }

    .nav {
        padding: var(--space-xs) var(--space-sm);
    }

    .nav-links {
        gap: var(--space-sm);
    }

    .nav-link {
        font-size: 0.75rem;
        letter-spacing: 0.02em;
    }

    .hero {
        min-height: 100svh;
        padding: calc(var(--nav-height) + var(--space-md)) var(--space-sm) var(--space-lg);
    }

    .hero-headline {
        line-height: 1.25;
        letter-spacing: -0.01em;
    }

    .hero-subline {
        line-height: 1.5;
    }

    .hero-cta {
        width: auto;
        padding: 0.875rem 2rem;
    }

    .scroll-indicator {
        bottom: var(--space-md);
    }
}

/* ---------- 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-line::after {
        animation: none;
    }
}
