/* ========================================
   CodeVera - Modern Website Styles
   ======================================== */

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

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f8fafc;
    --bg-lighter: #ffffff;
    --bg-gradient-start: #e0f2fe;
    --bg-gradient-end: #f0f9ff;
    --gradient-start: #3b82f6;
    --gradient-end: #8b5cf6;
    --gradient-purple: #8b5cf6;
    --gradient-pink: #ec4899;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.2);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    background-attachment: fixed;
    position: relative;
}

/* Animated Canvas Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Floating Geometric Shapes */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--gradient-purple), var(--gradient-pink));
    border-radius: 50%;
    top: 60%;
    right: 10%;
    animation-delay: -5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, var(--accent-color), var(--gradient-start));
    border-radius: 0;
    transform: rotate(45deg);
    top: 80%;
    left: 20%;
    animation-delay: -10s;
}

.shape-4 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, var(--gradient-pink), var(--gradient-purple));
    border-radius: 50% 50% 0 50%;
    top: 30%;
    right: 30%;
    animation-delay: -15s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(100px, -100px) rotate(90deg);
    }
    50% {
        transform: translate(200px, 0) rotate(180deg);
    }
    75% {
        transform: translate(100px, 100px) rotate(270deg);
    }
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-medium);
}

.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
}

.logo-wide {
    height: 50px;
    width: auto;
    object-fit: contain;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    background: transparent;
    border: 1px solid transparent;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    transition: width 0.3s ease;
}

nav a:hover {
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: var(--shadow-light);
}

nav a:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: all 0.3s ease;
}

/* Main Container */
main {
    padding-top: 80px;
}

/* Section Base Styles */
section {
    min-height: 100vh;
    padding: 120px 5% 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    margin-bottom: 100px;
}

section:nth-child(odd) {
    background: transparent;
}

section:nth-child(even) {
    background: rgba(255, 255, 255, 0.4);
    /*backdrop-filter: blur(10px);*/
}

/* Diagonal Section Dividers */
.section-divider {
    position: absolute;
    width: 100%;
    height: 150px;
    left: 0;
    z-index: 1;
}

.divider-top {
    top: -75px;
    transform: rotate(2deg);
}

.divider-bottom {
    bottom: -75px;
    transform: rotate(-2deg);
}

/* Creative Section Layouts */
.section-content {
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Asymmetric Layouts */
section:nth-child(odd) .section-content {
    direction: ltr;
}

section:nth-child(even) .section-content {
    direction: rtl;
}

section:nth-child(even) .section-content > * {
    direction: ltr;
}

/* Content Cards */
.content-card {
    background: rgba(255, 255, 255, 0.0);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    /*border-radius: 30px;*/
    padding: 3rem;
    position: relative;
    overflow: hidden;
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.8s ease;
    box-shadow: var(--shadow-medium);
}

section.visible .content-card {
    transform: translateY(0);
    opacity: 1;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-purple), var(--gradient-pink));
}

.content-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: var(--shadow-heavy);
    transform: translateY(-5px);
}

/* Alternating Layouts */
section:nth-child(even) .section-content {
    direction: rtl;
}

section:nth-child(even) .section-content > * {
    direction: ltr;
}

/* Text Content Styles */
.text-content {
    /* padding: 0; */
}

.text-content h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    /*background: linear-gradient(135deg, var(--gradient-start), var(--gradient-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;*/
    background-clip: text;
    line-height: 1.2;
    position: relative;
}

.text-content h2::after {
    content: '';
    position: absolute;
    bottom: -25px;
    left: 0px;
    width: 30px;
    height: 15px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-purple));
    border-radius: 2px;
}

.text-content p {
    font-size: 1.15rem;
    line-height: 1.5;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-weight: 400;
    margin-left: 30px;
}

.text-content p:last-child {
    margin-bottom: 0;
}

/* 3D Image/Graphic Styles */
.graphic-content {
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    min-height: 500px;
}

.graphic-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s ease;
}

.graphic-wrapper:hover {
    transform: rotateY(5deg) rotateX(5deg) scale(1.05);
}

/* Floating 3D Cards */
.floating-card {
    /*background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.2);*/
    /*border-radius: 20px; */
    padding: 2rem;
    position: relative;
    animation: floatCard 6s ease-in-out infinite;
    /*box-shadow: var(--shadow-medium);*/
    overflow: hidden;
}

.floating-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0) rotateX(0deg); }
    50% { transform: translateY(-20px) rotateX(5deg); }
}

/* 3D Logo Effect */
.logo-3d {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(37, 99, 235, 0.3));
    transform: translateZ(50px);
    transition: all 0.5s ease;
}

.logo-3d:hover {
    transform: translateZ(80px) scale(1.05);
    filter: drop-shadow(0 30px 60px rgba(37, 99, 235, 0.4));
}

/* AI Generated Images */
.floating-card img {
    width: 100%;
    height: auto;
    /*max-height: 400px;*/
    object-fit: contain;
    border-radius: 15px;
    transition: transform 0.5s ease;
}

.floating-card:hover img {
    transform: scale(1.05);
}

/* 3D Mockup Effects */
.mockup-3d {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mockup-container {
    position: relative;
    width: 300px;
    height: 200px;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 15px;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.2),
        inset 0 2px 4px rgba(255,255,255,0.5);
    transform: rotateX(10deg) rotateY(-5deg);
    transition: all 0.5s ease;
}

.mockup-container:hover {
    transform: rotateX(5deg) rotateY(5deg) scale(1.05);
    box-shadow: 
        0 30px 60px rgba(0,0,0,0.3),
        inset 0 2px 4px rgba(255,255,255,0.5);
}

.mockup-screen {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mockup-icon {
    font-size: 4rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Abstract 3D Graphics */
.abstract-3d {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cube-container {
    position: relative;
    width: 150px;
    height: 150px;
    transform-style: preserve-3d;
    animation: rotateCube 10s infinite linear;
}

@keyframes rotateCube {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

.cube-face {
    position: absolute;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(139, 92, 246, 0.8));
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    backdrop-filter: blur(5px);
}

.cube-face:nth-child(1) { transform: rotateY(0deg) translateZ(75px); }
.cube-face:nth-child(2) { transform: rotateY(90deg) translateZ(75px); }
.cube-face:nth-child(3) { transform: rotateY(180deg) translateZ(75px); }
.cube-face:nth-child(4) { transform: rotateY(-90deg) translateZ(75px); }
.cube-face:nth-child(5) { transform: rotateX(90deg) translateZ(75px); }
.cube-face:nth-child(6) { transform: rotateX(-90deg) translateZ(75px); }

/* Network/Connection 3D Graphic */
.network-3d {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.network-node {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
    animation: floatNode 3s ease-in-out infinite;
}

.network-node:nth-child(1) { top: 20%; left: 30%; animation-delay: 0s; }
.network-node:nth-child(2) { top: 50%; left: 50%; animation-delay: 0.5s; }
.network-node:nth-child(3) { top: 80%; left: 30%; animation-delay: 1s; }
.network-node:nth-child(4) { top: 50%; left: 70%; animation-delay: 1.5s; }

@keyframes floatNode {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.network-connection {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    transform-origin: left center;
    opacity: 0.6;
}

/* Rocket/Growth 3D Graphic */
.growth-3d {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rocket-container {
    position: relative;
    width: 120px;
    height: 200px;
    animation: launchRocket 2s ease-out infinite;
}

@keyframes launchRocket {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-30px); }
}

.rocket-body {
    width: 80px;
    height: 150px;
    background: linear-gradient(180deg, #ff6b6b, #ee5a5a);
    border-radius: 50% 50% 20% 20%;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(238, 90, 90, 0.4);
}

.rocket-window {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    border-radius: 50%;
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.5);
}

.rocket-flame {
    width: 40px;
    height: 60px;
    background: linear-gradient(180deg, #fbbf24, #f59e0b, transparent);
    margin: 0 auto;
    border-radius: 0 0 50% 50%;
    animation: flame 0.3s ease-in-out infinite alternate;
}

@keyframes flame {
    0% { height: 60px; opacity: 1; }
    100% { height: 80px; opacity: 0.8; }
}

/* Cloud/Hosting 3D Graphic */
.cloud-3d {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cloud-container {
    position: relative;
    width: 200px;
    height: 120px;
    animation: floatCloud 4s ease-in-out infinite;
}

@keyframes floatCloud {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.cloud-shape {
    position: absolute;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(240,240,240,0.9));
    border-radius: 50%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.cloud-shape:nth-child(1) { width: 100px; height: 100px; top: 0; left: 50px; }
.cloud-shape:nth-child(2) { width: 80px; height: 80px; top: 20px; left: 10px; }
.cloud-shape:nth-child(3) { width: 70px; height: 70px; top: 30px; left: 120px; }

.cloud-server {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 40px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 5px;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.server-light {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    top: 5px;
    right: 5px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Multi-Device 3D Mockup */
.devices-3d {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-desktop {
    position: relative;
    width: 200px;
    height: 140px;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transform: rotateX(10deg) rotateY(-10deg);
    transition: all 0.5s ease;
}

.device-desktop:hover {
    transform: rotateX(5deg) rotateY(5deg) scale(1.05);
}

.device-screen {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 5px;
}

.device-mobile {
    position: absolute;
    width: 50px;
    height: 100px;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 8px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    bottom: -30px;
    right: -20px;
    transform: rotateX(10deg) rotateY(10deg);
    transition: all 0.5s ease;
}

.device-mobile:hover {
    transform: rotateX(5deg) rotateY(-5deg) scale(1.1);
}

.device-mobile-screen {
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 5px;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-purple));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-top: 1.5rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
}

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

.btn:active {
    transform: translateY(-3px) scale(1.02);
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    padding: 3rem 5%;
    text-align: center;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    position: relative;
    z-index: 10;
}

footer p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .section-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    section:nth-child(even) .section-content {
        direction: ltr;
    }
    
    .content-card {
        padding: 2rem;
    }
    
    .text-content h2 {
        font-size: 2.5rem;
    }
    
    .text-content p {
        font-size: 1rem;
    }
    
    .graphic-content {
        min-height: 400px;
    }
    
    .shape {
        transform: scale(0.6);
    }
}

@media (max-width: 768px) {
    header {
        padding: 0 1rem;
    }
    
    .logo-wide {
        height: 40px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    nav {
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: var(--shadow-light);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    nav.active {
        max-height: 300px;
    }
    
    nav ul {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
    
    section {
        padding: 40px 1rem;
        min-height: auto;
    }
    
    .section-content {
        padding: 1.5rem;
    }
    
    .text-content h2 {
        font-size: 1.75rem;
    }
    
    .text-content p {
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    header {
        height: 60px;
    }
    
    .logo-wide {
        height: 35px;
    }
    
    nav {
        top: 60px;
    }
    
    .text-content h2 {
        font-size: 1.5rem;
    }
    
    .graphic-wrapper,
    .mockup-3d,
    .abstract-3d,
    .network-3d,
    .growth-3d,
    .cloud-3d,
    .devices-3d {
        height: 250px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    header,
    .btn,
    footer {
        display: none;
    }
    
    section {
        page-break-inside: avoid;
        min-height: auto;
        padding: 2rem;
    }
    
    .section-content {
        box-shadow: none;
    }
}


/* 3D Rotating Data Cube */
.hero-graphic {
  display: grid;
  place-items: center;
  perspective: 1000px;
  min-height: 600px;
}
.data-cube {
  width: 500px; height: 500px;
  position: relative;
  transform-style: preserve-3d;
  animation: rotateCube 20s infinite linear;
}
.cube-face {
  position: absolute;
  width: 200px; height: 200px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(73,182,255,.15), rgba(0,224,255,.08));
  border: 2px solid rgba(73,182,255,.4);
  backdrop-filter: blur(4px);
  color: var(--accent);
  font-weight: 700; font-size: 1.1rem;
  text-shadow: 0 0 10px rgba(0,224,255,.8);
  box-shadow: inset 0 0 20px rgba(73,182,255,.1), 0 0 30px rgba(0,224,255,.2);
}
.cube-face.front  { transform: translateZ(100px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(100px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(100px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(100px); }
.cube-face.top    { transform: rotateX(90deg) translateZ(100px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(100px); }

@keyframes rotateCube {
  0% { transform: rotateX(0deg) rotateY(0deg); }
  100% { transform: rotateX(360deg) rotateY(360deg); }
}
