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

:root {
    --center-nudge-x: 0; /* adjust left/right */
    --center-nudge-y: 0; /* adjust up/down */
}

body, html {
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    background: #000;
}

.water-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(180deg, #000408 0%, #000815 100%);
    overflow: hidden;
}

.water-surface {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(0, 40, 80, 0.15) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 30% 60%, rgba(0, 60, 120, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 70% 50% at 70% 30%, rgba(0, 80, 160, 0.06) 0%, transparent 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, transparent 30%),
        linear-gradient(45deg, rgba(0, 100, 200, 0.03) 0%, transparent 40%);
    backdrop-filter: blur(0.4px);
    z-index: 1;
}


/* Hero group (brand + infinity) centered on screen */
.hero {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 0 1rem;
    width: 100%;
    max-width: 1200px;
}


.header-text {
    text-align: center;
    z-index: 15;
}

.content-wrapper {
    position: static;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.centerpiece-container {
    text-align: center;
    z-index: 15;
    perspective: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eight-to-infinity {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-size: clamp(12rem, 30vw, 24rem);
    font-weight: 900;
    transform-style: preserve-3d;
    margin-top: 0;
    text-align: center;
    line-height: 1;
    width: max-content;
    margin-left: auto;
    margin-right: auto;
}

.number-eight {
    display: none;
}

.infinity-symbol {
    position: static;
    display: block;
    opacity: 1;
}

/* High-definition SVG infinity symbol */
.infinity-svg {
    display: block;
    width: clamp(260px, 40vw, 620px);
    height: auto;
    shape-rendering: geometricPrecision;
    text-rendering: optimizeLegibility;
    image-rendering: -webkit-optimize-contrast;
    filter: drop-shadow(0 10px 30px rgba(0, 200, 255, 0.25)) drop-shadow(0 0 12px rgba(255,255,255,0.25));
}

.infinity-path {
    vector-effect: non-scaling-stroke;
    /* Stroke width defined in SVG; keep crisp without blurring */
}

/* Brief flash on logo click */
.infinity-path.flash {
    animation: logo-flash 320ms ease-out;
}

@keyframes logo-flash {
    0% {
        filter: brightness(1) saturate(1);
        stroke-opacity: 1;
    }
    45% {
        filter: brightness(1.8) saturate(1.2);
        stroke-opacity: 1;
    }
    100% {
        filter: brightness(1) saturate(1);
        stroke-opacity: 1;
    }
}

/* Path-matched ripple effect for the SVG infinity symbol */
.infinity-svg .path-ripple {
    fill: none;
    stroke: url(#gradInfinity);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 40; /* match base path to ensure visibility against main stroke */
    pointer-events: none;
    filter: drop-shadow(0 0 10px rgba(0, 200, 255, 0.35)) drop-shadow(0 0 20px rgba(255,255,255,0.2));
    /* Allow JS to tune end width and duration via CSS variables */
    --ripple-end-width: 110;
    animation: svg-path-ripple var(--ripple-duration, 900ms) ease-out forwards;
}

/* Size variants for halo ripple */
.infinity-svg .path-ripple-small {
    --ripple-end-width: 80;
    --ripple-duration: 800ms;
}

.infinity-svg .path-ripple-large {
    --ripple-end-width: 180;
    --ripple-duration: 1200ms;
}

@keyframes svg-path-ripple {
    0% {
        stroke-width: 40; /* base stroke width of the main infinity path */
        opacity: 0.85;
    }
    100% {
        stroke-width: var(--ripple-end-width); /* expand beyond to create a halo ripple */
        opacity: 0;
    }
}


.brand-subtitle {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0.8rem;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
    letter-spacing: 0.4em;
    animation: none;
}

.tagline {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.9rem, 2.2vw, 1.1rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-shadow: 0 0 6px rgba(255,255,255,0.08);
    animation: none;
}

.contact-section {
    position: absolute;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 400;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

.contact-section a {
    color: rgba(0, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-section a:hover {
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
}

.footer {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-weight: 300;
    text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .header-text {
        top: 2rem;
    }
    
    .brand-subtitle {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }
    
    .tagline {
        font-size: clamp(0.8rem, 3vw, 1rem);
    }
    
    .eight-to-infinity {
        font-size: clamp(8rem, 30vw, 15rem);
    }
    
    .footer {
        bottom: 1rem;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .header-text {
        top: 1.5rem;
    }
    
    .brand-subtitle {
        font-size: clamp(1.2rem, 7vw, 2rem);
    }
    
    .tagline {
        font-size: clamp(0.7rem, 3.5vw, 0.9rem);
    }
    
    .eight-to-infinity {
        font-size: clamp(6rem, 35vw, 12rem);
    }
}

/* Water flow animation */
@keyframes waterFlow {
    0% {
        transform: translateX(-1px) translateY(-0.5px);
        filter: blur(0.3px);
    }
    50% {
        transform: translateX(0.6px) translateY(0.6px);
        filter: blur(0.6px);
    }
    100% {
        transform: translateX(-0.5px) translateY(-1px);
        filter: blur(0.3px);
    }
}

/* Performance optimizations */
.water-container * {
    will-change: transform, opacity;
}

.eight-to-infinity, .infinity-symbol {
    backface-visibility: hidden;
    transform: translateZ(0);
}
