/* Import modern fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables */
:root {
    --primary: #6366f1;
    --primary-glow: #818cf8;
    --dark-bg: #020205;
    --card-bg: rgba(18, 18, 28, 0.6);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent: #22d3ee;
    --success: #10b981;
    --gradient-1: #6366f1;
    --gradient-2: #8b5cf6;
    --gradient-3: #ec4899;
}

/* Body styles */
body {
    font-family: 'Inter', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Safe area padding for iPhone notch */
@supports (padding: max(0px)) {
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* Logo text */
.logo-text {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: -0.02em;
    color: var(--text-secondary);
    position: relative;
    display: inline-block;
    transition: color 0.3s;
}

.nav-brand:hover .logo-text {
    color: var(--text-primary);
}

/* Modern Liquid Glass Background */
.liquid-glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -4;
    background: linear-gradient(125deg, #050515 0%, #0f0f25 50%, #08081a 100%);
    overflow: hidden;
}

/* Liquid Glass Layers */
.glass-layer {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
    mix-blend-mode: screen;
    animation: floatGlass 20s ease-in-out infinite;
}

.glass-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle at center, 
        rgba(99, 102, 241, 0.4) 0%, 
        rgba(99, 102, 241, 0.2) 40%,
        transparent 70%);
    top: -200px;
    left: -100px;
    animation-duration: 25s;
}

.glass-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle at center, 
        rgba(139, 92, 246, 0.35) 0%, 
        rgba(236, 72, 153, 0.15) 40%,
        transparent 70%);
    bottom: -150px;
    right: -100px;
    animation-duration: 30s;
    animation-delay: -5s;
}

.glass-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle at center, 
        rgba(34, 211, 238, 0.3) 0%, 
        rgba(99, 102, 241, 0.1) 40%,
        transparent 70%);
    top: 40%;
    left: 40%;
    animation-duration: 35s;
    animation-delay: -10s;
}

@keyframes floatGlass {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    25% {
        transform: translate(50px, -30px) scale(1.1) rotate(120deg);
    }
    50% {
        transform: translate(-30px, 50px) scale(0.9) rotate(240deg);
    }
    75% {
        transform: translate(-50px, -20px) scale(1.05) rotate(360deg);
    }
}

/* First Person Track View - Looking Forward */
.track-field {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) perspective(800px) rotateX(70deg);
    width: 150%;
    height: 150%;
    z-index: -3;
    opacity: 0.25;
}

/* Reduced opacity for terms and privacy pages */
.page-legal .track-field {
    opacity: 0.15;
    pointer-events: none;
}

.track-lane {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(99, 102, 241, 0.2) 30%,
        rgba(99, 102, 241, 0.6) 100%);
    transform-origin: center top;
}

/* Softer lanes for legal pages */
.page-legal .track-lane {
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(99, 102, 241, 0.1) 50%,
        rgba(99, 102, 241, 0.3) 100%);
    opacity: 0.5;
}

.track-lane:nth-child(1) {
    left: 35%;
}

.track-lane:nth-child(2) {
    left: 40%;
}

.track-lane:nth-child(3) {
    left: 45%;
}

.track-lane:nth-child(4) {
    left: 50%;
}

.track-lane:nth-child(5) {
    left: 55%;
}

.track-lane:nth-child(6) {
    left: 60%;
}

.track-lane:nth-child(7) {
    left: 65%;
}

.track-lane:nth-child(8) {
    left: 30%;
}

.track-lane:nth-child(9) {
    left: 70%;
}

/* Track curve SVG */
.track-curve {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: curveMove 8s ease-in-out infinite;
}

@keyframes curveMove {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

/* Frosted Glass Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at top left, 
            rgba(99, 102, 241, 0.06) 0%, 
            transparent 50%),
        radial-gradient(ellipse at bottom right, 
            rgba(139, 92, 246, 0.04) 0%, 
            transparent 50%);
    z-index: -2;
    pointer-events: none;
}

/* Glass Grain Texture */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.02;
    z-index: -1;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 2px,
            rgba(255, 255, 255, 0.03) 3px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 2px,
            rgba(255, 255, 255, 0.03) 3px
        );
    pointer-events: none;
}

/* Glass Navbar */
nav {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2rem;
    padding: 0.75rem 2rem;
    z-index: 1000;
    width: 90%;
    max-width: 1200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.nav-links {
    display: none;
    gap: 2rem;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
    transition: width 0.3s;
}

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

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

/* Back link for legal pages */
.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-link:hover {
    color: var(--primary-glow);
}

/* Common typography */
h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 3rem 0 1.5rem;
    color: var(--primary-glow);
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

strong {
    color: var(--text-primary);
    font-weight: 600;
}

a {
    color: var(--primary-glow);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--gradient-2);
    text-decoration: underline;
}

/* Nav brand specific - no underline on hover */
nav .nav-brand {
    text-decoration: none;
}

nav .nav-brand:hover {
    text-decoration: none;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    nav {
        width: 95%;
        padding: 0.6rem 1rem;
        top: 0.5rem;
    }

    .nav-brand {
        font-size: 1.1rem;
    }

    .logo-text {
        font-size: 1.3rem;
    }

    h1 {
        font-size: 2rem;
    }
}