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

:root {
    --apple-blue: #0071e3;
    --apple-blue-hover: #0077ed;
    --apple-gray: #86868b;
    --apple-dark: #1d1d1f;
    --apple-light: #f5f5f7;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-bg-dark: rgba(29, 29, 31, 0.7);
    --glass-border-dark: rgba(255, 255, 255, 0.1);
    --transition: all 0.5s cubic-bezier(0.28, 0.11, 0.32, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--apple-light);
    color: var(--apple-dark);
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.5s ease, color 0.5s ease;
}

body.dark-mode {
    background-color: #000;
    color: #fff;
}

/* Glassmorphism - Liquid Glass */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.glass-card::after {
    content: "";
    position: absolute;
    inset: 0;
    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)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    mix-blend-mode: overlay;
}

body.dark-mode .glass-card {
    background: var(--glass-bg-dark);
    border-color: var(--glass-border-dark);
    box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.5),
        0 4px 6px -2px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.glass-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

body.dark-mode .glass-card:hover {
    box-shadow:
        0 25px 30px -5px rgba(0, 0, 0, 0.6),
        0 15px 15px -5px rgba(0, 0, 0, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

/* Typography */
.text-apple-blue { color: var(--apple-blue); }
.text-apple-gray { color: var(--apple-gray); }

.heading-xl {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.heading-lg {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Navbar */
.nav-blur {
    background: rgba(245, 245, 247, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

body.dark-mode .nav-blur {
    background: rgba(0, 0, 0, 0.8);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: opacity 0.8s cubic-bezier(0.28, 0.11, 0.32, 1),
                transform 1s cubic-bezier(0.28, 0.11, 0.32, 1);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Float Animation */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* Three.js Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
}

/* Buttons */
.apple-btn {
    background: var(--apple-blue);
    color: white;
    padding: 12px 24px;
    border-radius: 980px;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
    border: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.apple-btn:hover {
    background: var(--apple-blue-hover);
    transform: scale(1.05);
}

.apple-btn-secondary {
    color: var(--apple-blue);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    background: transparent;
    border: none;
}

.apple-btn-secondary:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Theme Toggle */
.theme-toggle {
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: rgba(0,0,0,0.05);
}

body.dark-mode .theme-toggle:hover {
    background: rgba(255,255,255,0.1);
}
