:root {
    --bg: #050505;
    --primary: #ffffff;
    --accent: #7c3aed;
    --text: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.4);
    --border: rgba(255, 255, 255, 0.1);
    --font: 'Outfit', sans-serif;
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

/* Base Fixes for Mobile & PC */
html, body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    background-color: var(--bg);
}

body {
    color: var(--text);
    font-family: var(--font);
    line-height: 1.4;
}

/* Desktop-only Cursor */
@media (min-width: 1025px) {
    * { cursor: none; }
    .custom-cursor { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 10001; display: block; }
}
@media (max-width: 1024px) {
    .custom-cursor { display: none !important; }
    * { cursor: auto !important; }
}

.custom-cursor { display: none; }
.cursor-dot { position: absolute; width: 20px; height: 20px; background: white; border-radius: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 900; color: black; z-index: 10002; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.cursor-outline { position: absolute; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50%; transform: translate(-50%, -50%); z-index: 10001; }
.custom-cursor.active .cursor-dot { width: 45px; height: 45px; background: var(--accent); color: white; font-size: 12px; }

.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 4rem; position: relative; }

/* Noise & Canvas */
.noise { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; opacity: 0.04; background-image: url('https://grainy-gradients.vercel.app/noise.svg'); }
#canvas-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; background: #050505; }
main { position: relative; z-index: 10; width: 100%; }

/* Header */
header { position: fixed; top: 0; width: 100%; z-index: 100; padding: 2.5rem 0; transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
header.scrolled { padding: 1.2rem 0; background: rgba(5, 5, 5, 0.85); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
nav { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.8rem; font-weight: 900; text-decoration: none; color: white; letter-spacing: -1px; }
.nav-right { display: flex; align-items: center; gap: 4rem; }
.nav-links { display: flex; gap: 3rem; list-style: none; }
.nav-links a { text-decoration: none; color: var(--text-dim); font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; transition: color 0.3s; }
.nav-links a:hover { color: white; }

/* Hamburger */
.hamburger { display: none; width: 24px; height: 14px; flex-direction: column; justify-content: space-between; cursor: pointer; z-index: 1001; }
.hamburger span { width: 100%; height: 1px; background: white; transition: all 0.3s; }

/* Minimal Mobile Menu */
.mobile-menu { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(5, 5, 5, 0.98); backdrop-filter: blur(20px); z-index: 1000; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.mobile-menu.active { opacity: 1; pointer-events: auto; }
.mobile-menu-close { position: absolute; top: 2rem; right: 2rem; font-size: 1.2rem; color: var(--text-dim); cursor: pointer; padding: 10px; z-index: 1002; transition: color 0.3s; }
.mobile-menu-inner { width: 100%; padding: 0 2rem; text-align: center; }
.mobile-nav-links { list-style: none; }
.mobile-nav-links li { margin: 1.2rem 0; overflow: hidden; }
.mobile-nav-links a { font-size: 1.8rem; font-weight: 400; text-decoration: none; color: var(--text-dim); text-transform: uppercase; letter-spacing: 4px; display: inline-block; transform: translateY(100%); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.mobile-menu.active .mobile-nav-links a { transform: translateY(0); }
.mobile-menu-footer { margin-top: 4rem; opacity: 0; transform: translateY(20px); transition: all 0.8s 0.5s; }
.mobile-menu.active .mobile-menu-footer { opacity: 1; transform: translateY(0); }

/* Buttons - Premium Fix */
.btn { 
    padding: 1.1rem 2.4rem; 
    border-radius: 50px; 
    font-weight: 700; 
    text-transform: uppercase; 
    font-size: 0.8rem; 
    letter-spacing: 1.5px; 
    cursor: pointer; 
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
    text-decoration: none; 
    display: inline-block; 
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 10;
}
.btn-primary { 
    background: white; 
    color: black; 
}
.btn-primary:hover { 
    background: var(--accent); 
    color: white; 
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.3);
}
.btn-outline { 
    border: 1px solid rgba(255,255,255,0.2); 
    color: white; 
    background: transparent;
}
.btn-outline:hover { 
    border-color: white; 
    background: white;
    color: black;
    transform: translateY(-3px);
}
.btn-block { width: 100%; text-align: center; }

/* Hero */
.hero-v2 { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; padding: 120px 0; }
.hero-v2-content { width: 100%; text-align: center; }
.big-title { font-size: clamp(3rem, 11vw, 10rem); font-weight: 900; line-height: 1; text-transform: uppercase; letter-spacing: -0.05em; margin-bottom: 0.5rem; }
.outline-text { -webkit-text-stroke: 1px rgba(255,255,255,0.3); color: transparent; }
.mask-wrap { overflow: hidden; padding: 0.1em 0; }
.mask-item { transform: translateY(105%); display: block; }
.hero-v2-bottom { margin-top: 3rem; display: flex; flex-direction: column; align-items: center; gap: 2.5rem; }
.hero-v2-bottom p { max-width: 600px; font-size: 1.2rem; color: var(--text-dim); line-height: 1.6; }
.cta-group { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section-padding { padding: 120px 0; }
.section-tag { font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 4px; margin-bottom: 2rem; }
.section-large-title { font-size: clamp(2.2rem, 6vw, 4.5rem); font-weight: 900; line-height: 1.1; }

/* Services */
.services-v2-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1px; background: var(--border); margin-top: 5rem; border: 1px solid var(--border); }
.service-card { background: var(--bg); padding: 5rem 4rem; display: flex; flex-direction: column; gap: 2.5rem; transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.service-card:hover { background: #0c0c0e; }
.service-card h3 { font-size: 2rem; font-weight: 600; }
.service-card p { color: var(--text-dim); font-size: 1.1rem; line-height: 1.7; }

/* Portfolio */
.portfolio-v5-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2.5rem; width: 100%; margin-top: 4rem; }
.portfolio-v5-item { position: relative; border-radius: 24px; overflow: hidden; background: #111; aspect-ratio: 16 / 10; border: 1px solid var(--border); }
.portfolio-v5-item img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.portfolio-v5-item:hover img { opacity: 1; transform: scale(1.05); }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2.5rem; margin-top: 5rem; }
.team-card { border-radius: 24px; overflow: hidden; background: rgba(255,255,255,0.01); border: 1px solid var(--border); text-align: center; transition: all 0.5s; }
.team-card:hover { border-color: rgba(255,255,255,0.2); transform: translateY(-10px); }
.team-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; filter: grayscale(100%); transition: 0.5s; }
.team-card:hover .team-img { filter: grayscale(0%); }
.team-info { padding: 2rem; }

/* Footer */
.footer-v3 { padding: 100px 0 50px; background: #000; border-top: 1px solid var(--border); position: relative; overflow: hidden; }
.footer-main { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 4rem; position: relative; z-index: 2; }
.footer-bg-text { position: absolute; bottom: -30px; left: 0; width: 100%; font-size: 22vw; font-weight: 900; color: rgba(255,255,255,0.02); pointer-events: none; text-align: center; line-height: 1; }

/* Responsive Overrides */
@media (max-width: 1024px) {
    .container { padding: 0 3rem; }
    .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .container { padding: 0 1.5rem; }
    .nav-links, .desktop-only { display: none; }
    .hamburger { display: flex; }
    .nav-right { gap: 1.5rem; }
    .big-title { font-size: 3.2rem; }
    .section-padding { padding: 80px 0; }
    .services-v2-grid { grid-template-columns: 1fr; }
    .portfolio-v5-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
    .team-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; }
    .team-info { padding: 1rem; }
    .footer-main { grid-template-columns: 1fr; text-align: center; }
    .footer-brand p { margin: 0 auto; }
    .footer-bottom { flex-direction: column; gap: 2rem; text-align: center; }
    .cta-group { flex-direction: column; width: 100%; }
    .btn { width: 100%; }
}

@media (max-width: 480px) {
    .big-title { font-size: 2.6rem; }
    .section-large-title { font-size: 2rem; }
    .hero-v2-bottom p { font-size: 1rem; }
    .service-card { padding: 4rem 2rem; }
}