:root {
    --bg-color: #050508;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --accent: #3b82f6; /* Blue */
    --accent-glow: rgba(59, 130, 246, 0.4);
    --card-bg: rgba(10, 20, 40, 0.6);
    --card-border: rgba(59, 130, 246, 0.3);

    /* Envyse Colors */
    --env-orange: #ff6b4a; /* Approximate orange from logo/vibes */
    --env-sun: #ffdcb5;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    flex-direction: column; /* Stack sections vertically */
    overflow: hidden;
    line-height: 1.6;
}

/* === Section 1: Netrevision (Top 66%) === */
#netrevision {
    position: relative;
    height: 66vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    z-index: 1;
}

/* Background Effects specific to Netrevision section */
#bg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.content-wrapper {
    text-align: center;
    max-width: 600px;
    padding: 2rem;
    z-index: 2;
    transform: scale(0.9); /* Slight scale down to fit comfortably in 2/3 height */
}

/* Header & Logo */
header {
    margin-bottom: 2rem;
}

.logo {
    max-width: 250px;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.2));
}

/* Typography */
h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #fff;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Card */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 50px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 4px 50px rgba(59, 130, 246, 0.15);
}

.card h2 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 1rem;
}

/* Contact Grid */
.contact-grid {
    display: grid;
    gap: 0.8rem;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.8rem;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.contact-item:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--accent);
    color: #fff;
}

.contact-item svg {
    stroke: var(--accent);
    width: 20px;
    height: 20px;
}

/* Legal Footer */
.legal {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    line-height: 1.4;
    position: relative;
    padding: 1rem 0;
    border-top: 1px solid var(--accent);
    text-shadow: 0 0 8px var(--accent-glow);
    animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
    from { text-shadow: 0 0 8px var(--accent-glow); }
    to { text-shadow: 0 0 20px var(--accent-glow); }
}

/* === Section 2: Envyse AG (Bottom 33%) === */
#envyse {
    position: relative;
    height: 34vh;
    width: 100%;
    background: transparent;
    display: flex;
    justify-content: center;
    overflow: visible; /* Allow glow to bleed up */
    z-index: 5;
    /* Group Entrance Animation */
    animation: slideUpGroup 3s cubic-bezier(0.2, 0.8, 0.2, 1) 2s both;
}

/* Keyframes for sliding in from bottom */
@keyframes slideUpGroup {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Planet Wrapper (Handles Breathe Animation) */
.planet-wrapper {
    position: absolute;
    width: 4000px;
    height: 4000px;
    left: 50%;
    top: 60px;
    transform: translateX(-50%);
    animation: planetBreathe 8s infinite ease-in-out alternate;
    z-index: 1; /* Behind content */
}

/* Link Wrapper for Planet */
.planet-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    text-decoration: none;
}

/* Planet Blob (Handles Hover Scale) */
.planet-blob {
    width: 100%;
    height: 100%;
    border-radius: 50%;

    /* The Planet Look: Light Cream Body with Orange Glow */
    background: #fff6e0;
    box-shadow:
        0 -5px 40px rgba(255, 107, 74, 0.4),
        0 -10px 80px rgba(255, 107, 74, 0.3);

    /* Smooth transition for scale */
    transition: transform 0.6s ease-in-out;
    transform: scale(1);
    transform-origin: center top;
}

@keyframes planetBreathe {
    0% { transform: translateX(-50%) scale(1); }
    100% { transform: translateX(-50%) scale(1.002); }
}

/* Hover Interaction: Scale Inner Planet */
.planet-link:hover .planet-blob,
#envyse:hover .planet-blob {
    transform: scale(1.30); /* User requested large scale */
    transition-delay: 250ms;
}

.envyse-content {
    position: relative;
    z-index: 20; /* Above the planet */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding-top: 85px; /* Moved up 15px to 85px */
    pointer-events: none; /* Let hover pass through to section/planet */
}

.teaser-text {
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    opacity: 1; /* Visible by default (handled by group anim) */
    pointer-events: auto;
}

.logo-link {
    position: relative;
    display: inline-block;
    cursor: pointer;
    text-decoration: none;
    margin-top: 0.2rem;
    pointer-events: auto;
}

.envyse-logo {
    max-width: 60px; /* 60px size */
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    opacity: 1; /* Visible by default (handled by group anim) */
    transition: transform 0.6s ease-in-out;
}

/* Coordinated Logo Hover: Scale 1.6 on Section Hover */
#envyse:hover .envyse-logo {
    transform: scale(1.6);
}

/* Specific Logo Hover: Also Scale 1.6 (Consistent) */
#envyse .logo-link:hover .envyse-logo {
    transform: scale(1.6);
}

/* Orange Sparkles */
.sparkles {
    position: absolute;
    width: 150%;
    left: -25%;
    height: 150%;
    top: -25%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 60;
}

.logo-link:hover .sparkles {
    opacity: 1;
}

.sparkles span {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--env-orange);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--env-orange);
    animation: sparkleFloat 1.5s linear infinite;
    animation-delay: calc(var(--i) * 0.2s);
}

/* Sparkle Positions */
.sparkles span:nth-child(1) { top: 0%; left: 80%; }
.sparkles span:nth-child(2) { top: 100%; left: 20%; }
.sparkles span:nth-child(3) { top: 40%; left: 0%; }
.sparkles span:nth-child(4) { top: 10%; left: 60%; }

@keyframes sparkleFloat {
    0% { transform: scale(0) translate(0, 0); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: scale(1.5) translate(var(--dir-x, 10px), var(--dir-y, -10px)); opacity: 0; }
}

/* Animations Helpers */
.fade-in {
    animation: fadeIn 1s ease-out forwards;
    opacity: 0;
}

.fade-in-delay {
    animation: fadeIn 1s ease-out 0.3s forwards;
    opacity: 0;
}

.fade-in-delay-2 {
    animation: fadeIn 1s ease-out 0.6s forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    body {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }

    #netrevision {
        height: auto;
        min-height: 80vh;
        padding: 2rem 0;
    }

    #envyse {
        height: 60vh;
    }

    .content-wrapper {
        transform: none;
    }

    /* On mobile, keep the fixed planet but maybe adjust top if needed */
    .planet-wrapper {
         top: 80px;
    }

    .envyse-content {
        padding-top: 2rem;
    }
}
