/* ============================================
   IANNATHANAELJ — PREMIUM DESIGN SYSTEM
   ============================================ */

/* --- CUSTOM FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* --- CSS VARIABLES --- */
:root {
    --accent: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-glow: rgba(59, 130, 246, 0.4);
    --surface: #050505;
    --surface-card: rgba(255, 255, 255, 0.03);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.45);
    --text-muted: rgba(255, 255, 255, 0.2);
    --radius-card: 32px;
    --radius-pill: 100px;
}

/* --- BASE RESET & TYPOGRAPHY --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--surface);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- ANIMATED GRADIENT BACKGROUND --- */
.top-accent-glow {
    position: fixed;
    top: -400px;
    left: 50%;
    transform: translateX(-50%);
    width: 120vw;
    height: 800px;
    background: 
        radial-gradient(ellipse 60% 50% at 30% 40%, rgba(59, 130, 246, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 50% 60% at 70% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    filter: blur(80px);
    animation: glow-breathe 8s ease-in-out infinite alternate;
}

@keyframes glow-breathe {
    0% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    100% { opacity: 1; transform: translateX(-50%) scale(1.05); }
}

/* --- FLOATING PARTICLES CANVAS --- */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
}

/* --- NOISE TEXTURE OVERLAY --- */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 2;
    opacity: 0.4;
}

/* --- GRADIENT TEXT UTILITY --- */
.gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary), #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- GLASS CARD --- */
.glass-card {
    background: var(--surface-card);
    backdrop-filter: blur(40px) saturate(1.2);
    -webkit-backdrop-filter: blur(40px) saturate(1.2);
    border: 1px solid var(--border-subtle);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    border-color: rgba(59, 130, 246, 0.15);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 
        0 0 60px -20px rgba(59, 130, 246, 0.1),
        0 30px 60px -20px rgba(0, 0, 0, 0.3);
    transform: translateY(-4px);
}

/* --- DOCK STYLES --- */
.dock-link {
    position: relative;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    transition: opacity 0.3s ease;
}

.dock-link:hover {
    transform: translateY(-2px);
}

.dock-link.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary)) !important;
    color: white !important;
    box-shadow: 
        0 0 30px rgba(59, 130, 246, 0.5),
        0 0 60px rgba(139, 92, 246, 0.2) !important;
}

/* Expanding Label Animation */
.dock-link .hover-label {
    max-width: 0;
    opacity: 0;
    margin-left: 0;
    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dock-link:hover .hover-label,
.dock-link.active .hover-label {
    max-width: 80px;
    opacity: 1;
    margin-left: 12px;
}

.dock-link.active i { color: white !important; }

#bottom-dock {
    transform: translate(-50%, 0) scale(0);
    opacity: 0;
    transform-origin: center bottom;
    transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease !important;
}

#bottom-dock.show {
    transform: translate(-50%, 0) scale(1) !important;
    opacity: 1 !important;
}

/* --- REVEAL ANIMATION SYSTEM --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger delays for child elements */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* Special entrance for hero */
.hero-entrance {
    opacity: 0;
    transform: translateY(60px) scale(0.95);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-entrance.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Text clip reveal */
.text-reveal {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(10px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.text-reveal.active {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* --- MARQUEE SHOWCASE --- */
.marquee-container {
    overflow: hidden !important;
    width: 100% !important;
    padding: 60px 0 !important;
    display: flex !important;
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.marquee-content {
    display: flex !important;
    width: max-content !important;
    animation: marquee-scroll 30s linear infinite !important;
}

.marquee-content img {
    height: 80px !important;
    max-width: 200px !important;
    object-fit: contain !important;
    margin: 0 50px !important;
    filter: brightness(0) invert(1) !important;
    opacity: 0.3 !important;
    flex-shrink: 0 !important;
    transition: all 0.5s ease;
}

.marquee-content img:hover {
    opacity: 0.7 !important;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-33.33%); }
}

/* --- PREMIUM BUTTON STYLES --- */
.btn-primary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    color: #0a0a0a;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.5s ease;
}

.btn-primary:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-outline {
    position: relative;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-primary);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-outline::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-outline:hover::before {
    opacity: 1;
}

/* --- COUNTER NUMBER ANIMATION --- */
.counter-number {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- SECTION DIVIDER --- */
.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border-subtle) 50%, transparent 100%);
    margin: 0 auto;
}

/* --- SECTION LABEL --- */
.section-label {
    display: inline-block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    font-weight: 700;
    position: relative;
    padding-left: 24px;
}

.section-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

/* --- ANIMATED BORDER GRADIENT --- */
.animated-border {
    position: relative;
    border-radius: var(--radius-card);
    overflow: hidden;
}

.animated-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: conic-gradient(from 0deg, transparent 0%, var(--accent) 25%, transparent 50%, var(--accent-secondary) 75%, transparent 100%);
    border-radius: inherit;
    animation: rotate-border 6s linear infinite;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.animated-border:hover::before {
    opacity: 0.5;
}

@keyframes rotate-border {
    100% { transform: rotate(360deg); }
}

/* --- CURSOR GLOW (Desktop) --- */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 3;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease-out;
    display: none;
}

@media (min-width: 768px) and (hover: hover) {
    .cursor-glow { display: block; }
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- FOOTER STYLES --- */
.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--accent);
}

.footer-social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.footer-social-icon:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px var(--accent-glow);
}

/* --- MODAL --- */
#full-modal {
    backdrop-filter: blur(0px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#full-modal.is-open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    backdrop-filter: blur(20px);
}

#full-modal nav a {
    position: relative;
    transition: all 0.3s ease;
}

#full-modal nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

#full-modal nav a:hover::after {
    width: 60%;
}

/* --- LOADING SCREEN --- */
#page-loader {
    position: fixed;
    inset: 0;
    background: var(--surface);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#page-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-bar {
    width: 120px;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 24px;
}

.loader-bar-inner {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    border-radius: 2px;
    animation: loader-fill 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loader-fill {
    0% { width: 0%; }
    100% { width: 100%; }
}

.loader-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-secondary);
    animation: loader-pulse 1.5s ease-in-out infinite alternate;
}

@keyframes loader-pulse {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* --- iPhone/Mobile Specific --- */
@media (max-width: 640px) {
    .dock-link { padding-left: 0.6rem !important; padding-right: 0.6rem !important; }
    .dock-link.active { padding-right: 1.1rem !important; }
    #bottom-dock { gap: 2px !important; }
    
    .hero-title {
        font-size: 3.2rem !important;
        line-height: 0.9 !important;
    }
}

@media (max-width: 768px) {
    .section-label::before {
        width: 8px;
    }
    .section-label {
        padding-left: 18px;
    }
}

/* --- SMOOTH SELECTION --- */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: white;
}