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

:root {
    --bg: #010204;
    --bg-soft: #050a11;
    --panel: rgba(8, 12, 18, 0.45);
    --panel-strong: rgba(5, 8, 12, 0.8);
    --line: rgba(82, 197, 255, 0.1);
    --line-strong: rgba(82, 197, 255, 0.35);
    --text: #f3fbff;
    --muted: #a1b6c7;
    --primary: #4faeff;
    --accent: #b252ff;
    --accent-2: #21ffb5;
    --easing: cubic-bezier(0.16, 1, 0.3, 1);
    --easing-soft: cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
    --glow: 0 0 50px rgba(79, 174, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: initial; /* Managed by Lenis */
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    font-family: 'Outfit', "Segoe UI", Arial, sans-serif;
    background-color: var(--bg);
    position: relative;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.loading {
    overflow: hidden;
}

/* Cinematic Loader */
.loader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-logo {
    width: 180px;
    height: auto;
    animation: logoBreathe 3s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(79, 174, 255, 0.3));
}

@keyframes logoBreathe {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}

.loader-bar {
    width: 200px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.loader-bar::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: var(--primary);
    transform: translateX(-100%);
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
    transition: transform 0.3s var(--easing), background 0.3s var(--easing);
    display: none;
}

@media (pointer: fine) {
    .custom-cursor { display: block; }
}

.custom-cursor.active {
    transform: scale(8);
    background: var(--primary);
}

/* Lenis Smooth Scroll Base Styles */
html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

.bg-mesh {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 30%, rgba(79, 174, 255, 0.15), transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(178, 82, 255, 0.12), transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(33, 255, 181, 0.08), transparent 50%);
    animation: meshMove 24s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes meshMove {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.1) translate(4%, 6%); }
    100% { transform: scale(1) translate(-4%, -3%); }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes textShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(circle at center, black 35%, transparent 92%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: 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;
    z-index: 9999;
}

#particles-container,
.cursor-glow,
.orb {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.cursor-glow {
    background: radial-gradient(circle 400px at var(--mx, 50%) var(--my, 50%), rgba(79, 174, 255, 0.06), transparent 60%);
    mix-blend-mode: screen;
}

.orb::before,
.orb::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    filter: blur(26px);
    opacity: 0.15;
    animation: drift 14s ease-in-out infinite;
    will-change: transform, opacity;
    pointer-events: none;
    transform: translate3d(0,0,0);
}

.orb::before {
    top: 120px;
    left: -60px;
    background: rgba(142, 212, 255, 0.3);
}

.orb::after {
    top: 560px;
    right: -80px;
    background: rgba(126, 255, 212, 0.15);
    animation-duration: 18s;
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    transform-origin: left center;
    transform: scaleX(0);
    background: linear-gradient(90deg, rgba(126, 255, 212, 0.8), rgba(142, 212, 255, 1), rgba(217, 244, 255, 0.8));
    box-shadow: 0 0 20px rgba(142, 212, 255, 0.4);
    z-index: 1200;
}

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

img {
    display: block;
    max-width: 100%;
    height: auto;
}

.wrap {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(2, 6, 11, 0.65);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    transition: background 0.4s var(--easing);
}

.nav-shell {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0;
}

.nav-brand {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.02em;
    color: var(--primary);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    cursor: pointer;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

nav a {
    color: #90a8ba;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.3s var(--easing);
}

nav a:hover,
nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

header {
    padding: 140px 0 80px;
    position: relative;
    z-index: 1;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 32px;
    align-items: stretch;
}

.glass {
    background:
        linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.02) 40%, transparent 60%),
        var(--panel);
    background-size: 200% auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    position: relative;
    z-index: 1;
    transform-style: preserve-3d;
    transition: border-color 0.4s var(--easing), transform 0.4s var(--easing);
}

.service-card, .showcase-card, .process-card, .about-panel, .hero-side-card, .metric {
    border-radius: 28px;
    padding: 32px;
}

.service-card::after,
.showcase-card::after,
.process-card::after,
.hero-side-card::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: conic-gradient(from 0deg, transparent 60%, var(--primary) 80%, var(--accent) 100%);
    z-index: -1;
    animation: borderSpin 6s linear infinite;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    padding: 1px;
    opacity: 0.15;
    transition: opacity 0.4s;
}

.service-card:hover::after,
.showcase-card:hover::after,
.process-card:hover::after,
.hero-side-card:hover::after {
    opacity: 0.6;
}

.hero-copy {
    padding: 64px;
    border-radius: 42px;
    background: var(--panel-strong);
    overflow: hidden;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 18px;
    border-radius: 999px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #a5c8de;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
}

.hero-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-2);
    box-shadow: 0 0 15px var(--accent-2);
}

.hero-title {
    font-size: clamp(3.2rem, 8vw, 6.5rem);
    line-height: 0.9;
    letter-spacing: -0.06em;
    font-weight: 800;
    margin-bottom: 24px;
    background: linear-gradient(90deg, #fff, var(--primary), var(--accent), #fff);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShimmer 10s linear infinite;
}

.hero-note {
    margin-top: 24px;
    max-width: 30rem;
    color: var(--muted);
    font-size: 1rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 40px;
}

.hero-button,
.hero-button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    padding: 16px 32px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.4s var(--easing);
}

.hero-button {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #051018;
    box-shadow: 0 10px 30px rgba(79, 174, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-button-secondary {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.hero-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(178, 82, 255, 0.5);
}

.hero-button-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 48px;
}

.metric {
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.metric strong {
    display: block;
    font-size: 1.6rem;
    margin-bottom: 6px;
    color: #fff;
}

.metric span {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.4;
}

.hero-visual {
    min-height: 420px;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    background: 
        linear-gradient(180deg, rgba(7, 14, 26, 0.1), rgba(7, 14, 26, 0.8)),
        url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1200&q=80") center/cover;
}

.hero-ui {
    position: absolute;
    inset: 24px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 16px;
}

.hero-ui-bar,
.hero-ui-window,
.hero-ui-stack article {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hero-ui-bar {
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hero-ui-dots { display: flex; gap: 6px; }
.hero-ui-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); }
.hero-ui-label { font-size: 0.8rem; color: #dce8ef; }

.hero-ui-window { padding: 20px; display: grid; gap: 12px; }
.hero-ui-pill { padding: 6px 12px; border-radius: 999px; background: rgba(33, 255, 181, 0.1); color: var(--accent-2); font-size: 0.75rem; width: fit-content; }
.hero-ui-lines { display: grid; gap: 8px; }
.hero-ui-lines span { height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgba(255,255,255,0.15), transparent); }

.section { padding: 100px 0; }
.section-intro { max-width: 800px; margin: 0 auto 64px; text-align: center; }
.kicker { display: block; margin-bottom: 16px; color: var(--primary); letter-spacing: 0.25em; text-transform: uppercase; font-size: 0.75rem; font-weight: 700; }
h2 { font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1.1; letter-spacing: -0.04em; font-weight: 800; margin-bottom: 24px; color: #fff; }

.service-grid, .showcase-grid, .process-grid { display: grid; gap: 24px; }
.service-grid { grid-template-columns: repeat(3, 1fr); }
.showcase-grid { grid-template-columns: 1.1fr 0.9fr; }
.process-grid { grid-template-columns: repeat(4, 1fr); }

.service-card:hover, .showcase-card:hover, .process-card:hover, .about-panel:hover, .hero-side-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.05);
}

.num {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-weight: 800;
    color: #07101f;
    background: linear-gradient(135deg, var(--accent), var(--primary));
}

.service-list { list-style: none; display: grid; gap: 12px; margin-top: 24px; }
.service-list li { display: flex; align-items: center; gap: 12px; font-size: 0.95rem; color: #dce8ef; }
.service-list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }

.showcase-card.large {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.9)), url("https://images.unsplash.com/photo-1460925895917-afdab827c52f?auto=format&fit=crop&w=1200&q=80") center/cover;
}

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-card {
    padding: 40px;
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 32px;
    transition: all 0.4s var(--easing);
}
.contact-card:hover { transform: translateY(-8px); border-color: var(--primary); background: rgba(255, 255, 255, 0.06); }
.contact-card span { color: var(--primary); font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.2em; }
.contact-card strong { display: block; font-size: 1.8rem; margin: 16px 0 8px; color: #fff; }
.contact-card small { color: var(--muted); font-size: 0.9rem; }

.footer-shell {
    padding: 40px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Premium Reveal Utilities */
.reveal-up { 
    opacity: 0; 
    transform: translateY(30px); 
    transition: transform 1.2s var(--easing), opacity 1.2s var(--easing);
    will-change: transform, opacity;
}
.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-skew {
    opacity: 0;
    transform: translateY(40px) skewY(2deg);
    transition: transform 1.5s var(--easing), opacity 1.5s var(--easing);
    will-change: transform, opacity;
}
.reveal-skew.active {
    opacity: 1;
    transform: translateY(0) skewY(0);
}

/* Optimize card transitions */
.glass, .service-card, .showcase-card, .process-card, .contact-card {
    transition: transform 0.6s var(--easing), border-color 0.6s var(--easing), background 0.6s var(--easing);
    will-change: transform;
}

.service-card:hover, .showcase-card:hover, .process-card:hover, .contact-card:hover {
    transform: translateY(-10px) scale(1.02) !important;
}

@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; }
    .service-grid, .process-grid { grid-template-columns: repeat(2, 1fr); }
    .showcase-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .service-grid, .process-grid, .contact-grid { grid-template-columns: 1fr; }
    .hero-stats { grid-template-columns: 1fr; }
    .footer-shell { flex-direction: column; gap: 32px; text-align: center; }
    .hero-copy { padding: 40px 24px; }
    .hero-title { font-size: 3.5rem; }
    .menu-toggle { display: block; }
    nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 40px 24px;
        background: var(--bg);
        flex-direction: column;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        display: none;
    }
    nav ul.open { display: flex; }
}
