@font-face {
    font-family: 'Rainy Hearts';
    src: url('https://cdn.jsdelivr.net/gh/Laemfresh/fonts@main/RainyHearts.woff2') format('woff2'),
        url('https://cdn.jsdelivr.net/gh/Laemfresh/fonts@main/RainyHearts.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
:root {
    --primary: #6e00ff;
    --secondary: #00f0ff;
    --accent: #00e88a;
    --dark: #0a0a16;
    --darker: #050510;
    --light: #f0f0ff;
    --text: #c4c4ff;
    --text-highlight: #ffffff;
    --heading-font: 'Rainy Hearts', cursive;
    --body-font: 'Rajdhani', sans-serif;
    --accent-font: 'Chakra Petch', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--body-font);
}

body {
    background-color: var(--darker);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--dark);
    overflow: hidden;
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(110, 0, 255, 0.1) 0%, rgba(5, 5, 16, 0.9) 70%);
    z-index: 1;
}

/* Cyberpunk grid overlay - using will-change for better performance */
.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 2;
    will-change: transform;
}

/* Digital noise effect - optimized */
.noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.4;
    z-index: 3;
}

.header-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 20px;
}

h1, h2, h3, .section-title, .footer-title {
    font-family: var(--heading-font);
}

.btn, .tagline, .highlight, .reason-title, .company-name {
    font-family: var(--accent-font);
}

h1 {
    font-size: 4.5rem;
    font-weight: normal;
    text-transform: uppercase;
    margin-bottom: 30px;
    color: var(--text-highlight);
    text-shadow: 0 0 10px rgba(110, 0, 255, 0.7);
    letter-spacing: 2px;
}

.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before, .glitch-text::after {
    content: "DECENTRALIZED CLOUD";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch-text::before {
    color: var(--accent);
    z-index: -1;
    animation: glitch 1s infinite; /* Sped up from 2s to 1s */
    clip: rect(44px, 450px, 56px, 0);
    transform: skew(0.5deg);
    will-change: clip, transform; /* Performance optimization */
}

.glitch-text::after {
    color: var(--secondary);
    z-index: -2;
    animation: glitch 1s infinite reverse; /* Sped up from 2s to 1s */
    clip: rect(44px, 450px, 46px, 0);
    transform: skew(-0.5deg);
    will-change: clip, transform; /* Performance optimization */
}

@keyframes glitch {
    0% {
        clip: rect(44px, 450px, 56px, 0);
        transform: skew(0.5deg);
    }
    5% {
        clip: rect(14px, 450px, 76px, 0);
        transform: skew(-0.5deg);
    }
    10% {
        clip: rect(74px, 450px, 96px, 0);
        transform: skew(0.8deg);
    }
    15% {
        clip: rect(24px, 450px, 36px, 0);
        transform: skew(-0.2deg);
    }
    20% {
        clip: rect(44px, 450px, 56px, 0);
        transform: skew(0.5deg);
    }
    100% {
        clip: rect(44px, 450px, 56px, 0);
        transform: skew(0.5deg);
    }
}

.tagline {
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--secondary);
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(0, 240, 255, 0.3);
}

.highlight {
    color: var(--text-highlight);
    font-weight: 700;
    text-shadow: 0 0 8px rgba(0, 232, 138, 0.7);
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    background: transparent;
    color: var(--light);
    border: 2px solid var(--primary);
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease; /* Sped up from 0.3s to 0.2s */
    cursor: pointer;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.2s ease; /* Sped up from 0.3s to 0.2s */
    z-index: -1;
    will-change: width; /* Performance optimization */
}

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

.btn:hover {
    color: var(--dark);
    box-shadow: 0 0 20px rgba(110, 0, 255, 0.7);
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border: none;
    color: var(--darker);
}

.btn-primary::before {
    background: linear-gradient(90deg, var(--accent), var(--primary));
}

/* Digital lines animation - optimized and sped up */
.digital-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.line {
    position: absolute;
    width: 1px;
    height: 100%;
    top: 0;
    background: linear-gradient(to bottom,
        rgba(110, 0, 255, 0) 0%,
        rgba(110, 0, 255, 0.3) 50%,
        rgba(110, 0, 255, 0) 100%);
    animation: lineAnimation 4s infinite linear; /* Sped up from 8s to 4s */
    will-change: transform, opacity; /* Performance optimization */
}

.line:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.line:nth-child(2) {
    left: 30%;
    animation-delay: 0.75s; /* Sped up from 1.5s to 0.75s */
}

.line:nth-child(3) {
    left: 50%;
    animation-delay: 1.5s; /* Sped up from 3s to 1.5s */
}

.line:nth-child(4) {
    left: 70%;
    animation-delay: 2.25s; /* Sped up from 4.5s to 2.25s */
}

.line:nth-child(5) {
    left: 90%;
    animation-delay: 3s; /* Sped up from 6s to 3s */
}

@keyframes lineAnimation {
    0% {
        opacity: 0;
        transform: translateY(-100%);
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(100%);
    }
}

/* Responsive styles */
@media (max-width: 992px) {
    h1 {
        font-size: 3.5rem;
    }

    .tagline {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.8rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .btn-group {
        flex-direction: column;
        gap: 15px;
    }
}


/* Enhanced Multiverse/Dimension Glitch Effect */
.dimension-glitch {
    position: relative;
    display: inline-block;
    font-family: var(--heading-font);
    font-size: 4.5rem;
    font-weight: normal;
    text-transform: uppercase;
    color: var(--text-highlight);
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(110, 0, 255, 0.7);
}

@media (max-width: 768px) {
    .dimension-glitch, 
    .dimension-glitch-base,
    h1 {
        font-size: 2.5rem;
        line-height: 1.2;
        /* Allow text to wrap if needed */
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .dimension-glitch, 
    .dimension-glitch-base,
    h1 {
        font-size: 2rem;
        line-height: 1.1;
    }
    
    /* Adjust margins to keep centered */
    .header-content {
        padding: 10px;
    }
}

/* Base layer */
.dimension-glitch-base {
    position: relative;
    z-index: 2;
}

/* Create multiple copies with different effects */
.dimension-glitch::before,
.dimension-glitch::after,
.dimension-glitch-layer1,
.dimension-glitch-layer2,
.dimension-glitch-layer3 {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

/* Primary RGB shift layers */
.dimension-glitch::before {
    color: #FF004D; /* Red tint */
    z-index: 1;
    animation: dimension-shift-1 3s infinite alternate-reverse;
    clip: rect(44px, 450px, 56px, 0);
    transform: skew(0.5deg) translateX(-2px);
    filter: blur(1px);
    will-change: clip, transform;
}

.dimension-glitch::after {
    color: #00E5FF; /* Cyan tint */
    z-index: 1;
    animation: dimension-shift-2 2.5s infinite alternate-reverse;
    clip: rect(44px, 450px, 46px, 0);
    transform: skew(-0.5deg) translateX(2px);
    filter: blur(1px);
    will-change: clip, transform;
}

/* Additional dimension layers */
.dimension-glitch-layer1 {
    color: #FFFFFF;
    z-index: 1;
    opacity: 0.4;
    animation: dimension-shift-3 3.5s infinite linear;
    clip: rect(10px, 450px, 30px, 0);
    transform: translateY(-3px);
    filter: blur(2px);
    will-change: clip, transform;
}

.dimension-glitch-layer2 {
    color: #00E88A; /* Green tint */
    z-index: 1;
    opacity: 0.5;
    animation: dimension-shift-4 2.8s infinite linear;
    clip: rect(60px, 450px, 70px, 0);
    transform: translateY(3px) skew(1deg);
    filter: blur(1px);
    will-change: clip, transform;
}

.dimension-glitch-layer3 {
    color: #6E00FF; /* Purple tint */
    z-index: 1;
    opacity: 0.6;
    animation: dimension-shift-5 4s infinite linear;
    clip: rect(30px, 450px, 50px, 0);
    transform: translateX(-1px);
    filter: blur(1px);
    will-change: clip, transform;
}

/* Chromatic aberration animations */
@keyframes dimension-shift-1 {
    0% {
        clip: rect(44px, 450px, 56px, 0);
        transform: skew(0.5deg) translateX(-2px);
        opacity: 0.7;
    }
    5% {
        clip: rect(14px, 450px, 36px, 0);
        transform: skew(-0.3deg) translateX(-4px);
        opacity: 0.8;
    }
    10% {
        clip: rect(84px, 450px, 106px, 0);
        transform: skew(0.8deg) translateX(-1px);
        opacity: 0.6;
    }
    20% {
        clip: rect(24px, 450px, 46px, 0);
        transform: skew(-0.2deg) translateX(-3px);
        opacity: 0.9;
    }
    40% {
        clip: rect(4px, 450px, 26px, 0);
        transform: skew(0.5deg) translateX(-5px);
        opacity: 0.7;
    }
    60% {
        clip: rect(64px, 450px, 86px, 0);
        transform: skew(-0.4deg) translateX(-2px);
        opacity: 0.8;
    }
    80% {
        clip: rect(34px, 450px, 56px, 0);
        transform: skew(0.1deg) translateX(-3px);
        opacity: 0.7;
    }
    100% {
        clip: rect(44px, 450px, 66px, 0);
        transform: skew(0.5deg) translateX(-2px);
        opacity: 0.7;
    }
}

@keyframes dimension-shift-2 {
    0% {
        clip: rect(44px, 450px, 46px, 0);
        transform: skew(-0.5deg) translateX(2px);
        opacity: 0.7;
    }
    15% {
        clip: rect(24px, 450px, 56px, 0);
        transform: skew(0.3deg) translateX(4px);
        opacity: 0.8;
    }
    30% {
        clip: rect(74px, 450px, 96px, 0);
        transform: skew(-0.8deg) translateX(1px);
        opacity: 0.6;
    }
    45% {
        clip: rect(14px, 450px, 26px, 0);
        transform: skew(0.2deg) translateX(3px);
        opacity: 0.9;
    }
    60% {
        clip: rect(44px, 450px, 56px, 0);
        transform: skew(-0.5deg) translateX(5px);
        opacity: 0.7;
    }
    75% {
        clip: rect(54px, 450px, 76px, 0);
        transform: skew(0.4deg) translateX(2px);
        opacity: 0.8;
    }
    100% {
        clip: rect(34px, 450px, 46px, 0);
        transform: skew(-0.3deg) translateX(3px);
        opacity: 0.7;
    }
}

@keyframes dimension-shift-3 {
    0% {
        clip: rect(10px, 450px, 30px, 0);
        transform: translateY(-3px);
        opacity: 0.4;
    }
    25% {
        clip: rect(20px, 450px, 40px, 0);
        transform: translateY(-1px);
        opacity: 0.2;
    }
    50% {
        clip: rect(0px, 450px, 20px, 0);
        transform: translateY(-4px);
        opacity: 0.5;
    }
    75% {
        clip: rect(15px, 450px, 35px, 0);
        transform: translateY(-2px);
        opacity: 0.3;
    }
    100% {
        clip: rect(10px, 450px, 30px, 0);
        transform: translateY(-3px);
        opacity: 0.4;
    }
}

@keyframes dimension-shift-4 {
    0% {
        clip: rect(60px, 450px, 70px, 0);
        transform: translateY(3px) skew(1deg);
        opacity: 0.5;
    }
    33% {
        clip: rect(50px, 450px, 80px, 0);
        transform: translateY(2px) skew(0.5deg);
        opacity: 0.6;
    }
    66% {
        clip: rect(70px, 450px, 90px, 0);
        transform: translateY(4px) skew(-0.5deg);
        opacity: 0.4;
    }
    100% {
        clip: rect(60px, 450px, 70px, 0);
        transform: translateY(3px) skew(1deg);
        opacity: 0.5;
    }
}

@keyframes dimension-shift-5 {
    0% {
        clip: rect(30px, 450px, 50px, 0);
        transform: translateX(-1px);
        opacity: 0.6;
    }
    20% {
        clip: rect(40px, 450px, 60px, 0);
        transform: translateX(1px);
        opacity: 0.5;
    }
    40% {
        clip: rect(20px, 450px, 40px, 0);
        transform: translateX(-2px);
        opacity: 0.7;
    }
    60% {
        clip: rect(50px, 450px, 70px, 0);
        transform: translateX(2px);
        opacity: 0.5;
    }
    80% {
        clip: rect(25px, 450px, 45px, 0);
        transform: translateX(-1.5px);
        opacity: 0.6;
    }
    100% {
        clip: rect(30px, 450px, 50px, 0);
        transform: translateX(-1px);
        opacity: 0.6;
    }
}

/* Flicker effect for main text */
.dimension-flicker {
    animation: dimension-text-flicker 5s infinite;
}

@keyframes dimension-text-flicker {
    0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% {
        opacity: 1;
        text-shadow: 0 0 10px rgba(110, 0, 255, 0.7),
                     0 0 20px rgba(0, 240, 255, 0.5),
                     0 0 30px rgba(0, 232, 138, 0.3);
    }
    20%, 21.999%, 63%, 63.999%, 65%, 69.999% {
        opacity: 0.4;
        text-shadow: none;
    }
}

/* Random digital artifacts that appear and disappear */
.digital-artifacts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.artifact {
    position: absolute;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    animation: artifact-flicker 0.2s infinite;
}

@keyframes artifact-flicker {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 0.7;
    }
}

/* Intense dimension shift effect */
.dimension-shift-intense::before,
.dimension-shift-intense::after,
.dimension-shift-intense .dimension-glitch-layer1,
.dimension-shift-intense .dimension-glitch-layer2,
.dimension-shift-intense .dimension-glitch-layer3 {
    animation-duration: 0.5s !important;
    animation-timing-function: linear !important;
    opacity: 0.9 !important;
    filter: blur(2px) !important;
    transform: scale(1.05) translateX(var(--random-x, 5px)) translateY(var(--random-y, -3px)) !important;
}

.dimension-shift-intense .dimension-glitch-base {
    animation: intense-text-shift 0.5s infinite !important;
}

@keyframes intense-text-shift {
    0%, 100% {
        transform: translateX(0);
        filter: blur(0);
    }
    25% {
        transform: translateX(-4px);
        filter: blur(1px);
    }
    75% {
        transform: translateX(4px);
        filter: blur(2px);
    }
}

/* For reducing animations on low-end devices */
.reduce-animations .dimension-glitch::before,
.reduce-animations .dimension-glitch::after,
.reduce-animations .dimension-glitch-layer1,
.reduce-animations .dimension-glitch-layer2,
.reduce-animations .dimension-glitch-layer3,
.reduce-animations .digital-artifacts {
    animation-duration: 8s; /* Slower animations */
}

.reduce-animations .dimension-flicker {
    animation: none; /* Disable flickering */
}

.reduce-animations .artifact {
    display: none; /* Hide random artifacts */
}
