/**
 * GreyNED Main Styles
 * Core styling and layout definitions
 */

/* CSS Variables */
:root {
    --primary-color: #00ff88;
    --secondary-color: #0088ff;
    --accent-color: #ff6b6b;
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --text-light: #ffffff;
    --text-muted: #b0b0b0;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Spacing */
    --section-padding: 150px 50px;
    --container-max-width: 1600px;
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --transition-slow: 0.8s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

p {
    line-height: 1.7;
}

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

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-darker);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity var(--transition-slow);
}

.loading-animation {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 30px;
}

.loading-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-top-color: var(--secondary-color);
    animation-duration: 0.8s;
    animation-direction: reverse;
}

.loading-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    margin-top: 20px;
    text-align: center;
    padding: 0 20px;
    transition: opacity 0.5s ease;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 50px;
    backdrop-filter: blur(20px);
    background: rgba(10, 10, 10, 0.9);
    border-bottom: 1px solid var(--glass-border);
    transition: all var(--transition-fast);
}

.nav.scrolled {
    padding: 15px 50px;
    background: rgba(10, 10, 10, 0.95);
}

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

.logo {
    font-size: 28px;
    font-weight: 900;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 4px;
    position: relative;
    cursor: pointer;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform var(--transition-fast);
}

.logo:hover::after {
    transform: scaleX(1);
}

.nav-links {
    display: flex;
    gap: 50px;
    align-items: center;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    transition: all var(--transition-fast);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all var(--transition-fast);
    transform: translateX(-50%);
}

.nav-links a:hover::before {
    width: 100%;
}

/* Section Layout */
.section {
    padding: var(--section-padding);
    max-width: var(--container-max-width);
    margin: 0 auto;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 100px;
}

.section-title {
    font-size: clamp(3rem, 6vw, 6rem);
    font-weight: 900;
    margin-bottom: 30px;
    background: linear-gradient(45deg, var(--text-light), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    font-weight: 300;
}

/* Glass Effect Utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-dark);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-light);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn:hover {
    transform: translateY(-3px);
}

.btn-primary:hover {
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.4);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background: rgba(0, 255, 136, 0.1);
}

/* Custom Cursor */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.1s ease;
    opacity: 0;
    mix-blend-mode: difference;
}

.cursor-follower {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transition: all 0.15s ease;
    opacity: 0;
}

/* Utility Classes */
.fade-in {
    opacity: 0;
    transform: translateY(50px);
    transition: all var(--transition-slow);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
}

.will-change {
    will-change: transform;
}

/* Error Handling */
.error-message {
    text-align: center;
    padding: 100px 20px;
    color: var(--text-muted);
}

.error-message h2 {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-size: 2rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    :root {
        --section-padding: 120px 30px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px 20px;
    }
    
    .nav {
        padding: 15px 20px;
    }
    
    .nav-links {
        gap: 20px;
        font-size: 12px;
    }
    
    .logo {
        font-size: 24px;
        letter-spacing: 2px;
    }
    
    .section-title {
        font-size: clamp(2rem, 8vw, 4rem);
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 60px 15px;
    }
    
    .nav-links {
        gap: 15px;
        font-size: 11px;
    }
    
    .section-header {
        margin-bottom: 60px;
    }
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Performance Optimizations */
.reduced-motion {
    animation: none !important;
    transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .cursor, .cursor-follower {
        display: none;
    }
}
@media (max-width: 1440px) {
    body {
        transform: scale(0.9);
        transform-origin: top left;
        width: 111.11%; /* 100% / 0.9 */
        height: auto;
    }
}

@media (max-width: 1200px) {
    body {
        transform: scale(0.7);
        transform-origin: top left;
        width: 142.86%; /* 100% / 0.7 */
        height: auto;
    }
}

@media (max-width: 768px) {
    body {
        transform: scale(0.6);
        transform-origin: top left;
        width: 166.67%; /* 100% / 0.6 */
    }
}

@media (max-width: 480px) {
    body {
        transform: scale(0.4);
        transform-origin: top left;
        width: 250%; /* 100% / 0.4 */
    }
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  overflow-y: auto;   /* allow vertical scrolling */
  overflow-x: hidden; /* prevent horizontal scroll */
}