/* ============================================
   VISIOTECH DESIGN SYSTEM
   Version: 2.0
   ============================================ */

/* Variables */
:root {
    /* Colors */
    --color-primary: #3b82f6;
    --color-primary-dark: #2563eb;
    --color-secondary: #06b6d4;
    --color-accent: #8b5cf6;
    
    /* Neutrals */
    --color-bg: #0f172a;
    --color-bg-light: #1e293b;
    --color-bg-lighter: #334155;
    --color-text: #f8fafc;
    --color-text-muted: #94a3b8;
    --color-text-dim: #64748b;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --gradient-dark: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    
    /* Spacing */
    --section-padding: 8rem;
    --container-max: 1400px;
    --container-padding: 2rem;
    
    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.3);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
    background: var(--color-primary);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--color-bg-lighter);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

p {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-base);
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ============================================
   LOADER
   ============================================ */
.loader {
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}

.logo-anim {
    width: 100%;
    height: 100%;
}

.logo-circle {
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    animation: drawCircle 1s ease forwards;
}

.logo-check {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawCheck 0.5s ease 0.8s forwards;
}

.loader-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    animation: fadeInUp 0.5s ease 1.2s forwards;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all var(--transition-base);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 0;
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    z-index: 1001;
}

.logo-icon {
    width: 40px;
    height: 40px;
    transition: transform var(--transition-base);
}

.nav-logo:hover .logo-icon {
    transform: rotate(10deg) scale(1.1);
}

.logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
}

.nav-link {
    position: relative;
    font-weight: 500;
    color: var(--color-text-muted);
    padding: 0.5rem 0;
    transition: color var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text);
}

.nav-link-hover {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

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

.nav-cta {
    margin-left: 1rem;
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: all var(--transition-base);
}

.hamburger {
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 1001;
    width: 0%;
    transition: width 0.1s;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-bg-lighter);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(59, 130, 246, 0.1);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

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

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

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.hero-orb-1 {
    width: 600px;
    height: 600px;
    background: var(--color-primary);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.hero-orb-2 {
    width: 400px;
    height: 400px;
    background: var(--color-secondary);
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-title .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.6s ease 0.4s both;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.section-title {
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-muted);
}

/* ============================================
   CARDS
   ============================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--gradient-glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(600px circle at var(--mouse-x, 0) var(--mouse-y, 0), 
                rgba(59, 130, 246, 0.1), transparent 40%);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.card:hover::before {
    opacity: 1;
}

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

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
    transition: transform var(--transition-base);
}

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

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-text {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.card-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.card-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
}

.card-list li::before {
    content: '✓';
    width: 20px;
    height: 20px;
    background: rgba(6, 182, 212, 0.2);
    color: var(--color-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    position: relative;
    padding-top: 6rem;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--color-primary);
    top: -250px;
    left: -250px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--color-secondary);
    bottom: -200px;
    right: -200px;
}

.footer-content {
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-tagline {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.footer-socials {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--color-bg-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: all var(--transition-base);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-link:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-3px);
    border-color: var(--color-primary);
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--color-text-muted);
    transition: all var(--transition-base);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--color-primary);
    transform: translateX(5px);
}

.contact-list {
    list-style: none;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.contact-list i {
    color: var(--color-primary);
    width: 20px;
}

.contact-list a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--color-text-dim);
}

/* ============================================
   COOKIE BANNER
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    background: var(--color-bg-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    z-index: 9998;
    max-width: 90%;
    width: 600px;
    transition: transform var(--transition-slow);
}

.cookie-banner.show {
    transform: translateX(-50%) translateY(0);
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-text {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.cookie-text i {
    font-size: 1.5rem;
    color: var(--color-secondary);
}

.cookie-text p {
    margin: 0;
    font-size: 0.9375rem;
}

.cookie-text a {
    color: var(--color-primary);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 0.75rem;
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--color-bg-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--color-text);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-5px);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass {
    background: var(--gradient-glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   CONTENT PAGES (Legal, etc.)
   ============================================ */
.content-page {
    padding-top: 120px;
    min-height: calc(100vh - 400px);
}

.content-header {
    text-align: center;
    margin-bottom: 4rem;
}

.content-section {
    max-width: 800px;
    margin: 0 auto;
}

.content-section h2 {
    color: var(--color-text);
    margin: 2.5rem 0 1rem;
    font-size: 1.75rem;
}

.content-section h3 {
    color: var(--color-text);
    margin: 2rem 0 1rem;
    font-size: 1.375rem;
}

.content-section p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.content-section ul {
    margin: 1rem 0 1.5rem 1.5rem;
    color: var(--color-text-muted);
}

.content-section li {
    margin-bottom: 0.5rem;
}

.legal-info-box {
    background: var(--color-bg-light);
    border-left: 4px solid var(--color-primary);
    padding: 1.5rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 2rem 0;
}

.legal-info-box h4 {
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.cookie-settings {
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2rem 0;
}

.cookie-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-category:last-child {
    border-bottom: none;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    background: var(--color-bg-lighter);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-base);
}

.toggle-switch.active {
    background: var(--color-primary);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition-base);
}

.toggle-switch.active::after {
    transform: translateX(24px);
}

/* Logo Image Styles */
.nav-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.nav-logo:hover .nav-logo-img {
    transform: scale(1.1) rotate(5deg);
}

.footer-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.loader-logo .logo-spin {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: cover;
    animation: spinScale 1.5s ease-in-out;
}

@keyframes spinScale {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Footer logo layout */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}