/* Ultra-Premium Design System — fonts loaded via shared-nav.css */

:root {
    --primary: #6366F1;
    --secondary: #8B5CF6;
    --accent: #EC4899;
    --cyan: #06B6D4;
    
    --bg: #000000;
    --bg-secondary: #0A0A0A;
    --bg-tertiary: #141414;
    
    --text: #FFFFFF;
    --text-secondary: #A1A1AA;
    --text-tertiary: #71717A;
    
    --border: rgba(255, 255, 255, 0.1);
    --glow: rgba(99, 102, 241, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    cursor: none;
}

h1, h2, h3 {
    font-family: 'Syne', system-ui, sans-serif;
    font-weight: 700;
}

/* Custom Cursor */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.2s ease;
    mix-blend-mode: difference;
}

.cursor-follower {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10001;
    transition: transform 0.15s ease;
}

/* Particles Canvas */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.4;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 0rem 0;
    backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-cube {
    width: 32px;
    height: 32px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 10s infinite linear;
}

@keyframes rotateCube {
    from { transform: rotateX(0deg) rotateY(0deg); }
    to { transform: rotateX(360deg) rotateY(360deg); }
}

.cube-face {
    position: absolute;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

.front { transform: translateZ(16px); }
.back { transform: rotateY(180deg) translateZ(16px); }
.left { transform: rotateY(-90deg) translateZ(16px); }
.right { transform: rotateY(90deg) translateZ(16px); }
.top { transform: rotateX(90deg) translateZ(16px); }
.bottom { transform: rotateX(-90deg) translateZ(16px); }

.logo-text {
    font-family: 'Syne', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 3rem;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-button,
.cta-primary,
.cta-button {
    position: relative;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
}

.button-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0%, 100% { transform: translateX(-100%) rotate(45deg); }
    50% { transform: translateX(100%) rotate(45deg); }
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 10rem 4rem 4rem;
    position: relative;
}

.hero-container {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 6rem;
    align-items: center;
    position: relative;
    z-index: 10;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 3rem;
}

.badge-icon {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

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

.hero-title {
    font-size: 6rem;
    line-height: 1;
    margin-bottom: 2rem;
    letter-spacing: -3px;
}

.title-line {
    display: block;
    animation: fadeInUp 0.8s ease-out backwards;
}

.title-line:nth-child(2) {
    animation-delay: 0.2s;
}

.title-line:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientFlow 5s ease infinite;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s ease-out 0.8s backwards;
}

.cta-primary,
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 2.5rem;
}

.cta-primary:hover,
.cta-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.4);
}

.cta-secondary {
    padding: 1.25rem 2.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
}

.hero-metrics {
    display: flex;
    gap: 3rem;
    animation: fadeInUp 0.8s ease-out 1s backwards;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.metric-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.metric-number::after {
    content: attr(data-suffix);
    font-size: 2rem;
}

.metric-year {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metric-divider {
    width: 1px;
    background: var(--border);
}

/* Visual Grid */
.visual-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.grid-card {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--glow), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.grid-card:hover .card-glow {
    opacity: 1;
}

.tilt-card {
    transform-style: preserve-3d;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.card-content h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.card-metric {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
}

.metric-trend {
    color: #10B981;
    font-weight: 600;
}

.mini-chart {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    height: 60px;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 4px;
    animation: barGrow 1s ease-out backwards;
}

@keyframes barGrow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

.speed-meter {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    overflow: hidden;
    margin: 1rem 0;
}

.meter-fill {
    width: 85%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--cyan));
    animation: fillMeter 2s ease-out;
}

@keyframes fillMeter {
    from { width: 0; }
}

.status-dot {
    width: 12px;
    height: 12px;
    background: #10B981;
    border-radius: 50%;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.system-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin: 1rem 0;
}

.system-item {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    position: relative;
}

.system-item.active::after {
    content: '';
    position: absolute;
    inset: 4px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 4px;
}

.data-visual {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.data-line {
    height: 4px;
    background: linear-gradient(90deg, var(--primary), transparent);
    border-radius: 2px;
    animation: dataFlow 2s infinite;
}

.data-line:nth-child(2) {
    animation-delay: 0.3s;
}

.data-line:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes dataFlow {
    0%, 100% { width: 30%; }
    50% { width: 90%; }
}

.card-stat {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.scroll-indicator {
    position: absolute;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg, var(--primary), transparent);
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0%, 100% { transform: translateY(0); opacity: 0; }
    50% { transform: translateY(20px); opacity: 1; }
}

/* Services */
.services {
    padding: 8rem 4rem;
    position: relative;
}

.services-container {
    max-width: 1600px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 6rem;
}

.section-lead {
    max-width: 640px;
    margin: -3rem auto 0;
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.section-badge {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.bento-card.large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-card.medium {
    grid-column: span 2;
}

.bento-card.small {
    grid-column: span 1;
}

.bento-card {
    padding: 3rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.5);
}

.card-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.bento-card:hover .card-bg {
    opacity: 1;
}

.bento-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.gradient-1 {
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
}

.gradient-2 {
    background: linear-gradient(135deg, #06B6D4, #3B82F6);
}

.gradient-3 {
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
}

.gradient-4 {
    background: linear-gradient(135deg, #F59E0B, #EF4444);
}

.bento-content h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.bento-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-stack span {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* CTA */
.cta {
    padding: 4rem;
}

.cta-container {
    max-width: 1400px;
    margin: 0 auto;
}

.cta-card {
    padding: 6rem 4rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 32px;
    position: relative;
    overflow: hidden;
}

.cta-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.cta-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cta-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-visual {
    position: absolute;
    inset: 0;
}

.visual-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.orb-1 {
    top: -20%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary), transparent);
}

.orb-2 {
    bottom: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--secondary), transparent);
}

.orb-3 {
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent), transparent);
}

/* Footer */
.footer {
    padding: 6rem 4rem 3rem;
    border-top: 1px solid var(--border);
}

.footer-container {
    max-width: 1600px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-logo span {
    font-family: 'Syne', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-brand p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-section h4 {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 1rem;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 3rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-tertiary);
    text-decoration: none;
}

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

/* Magnetic Effect */
.magnetic {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive */
@media (max-width: 1400px) {
    .hero-title {
        font-size: 5rem;
    }
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bento-card.large,
    .bento-card.medium,
    .bento-card.small {
        grid-column: span 1;
        grid-row: span 1;
    }
}

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 4rem;
    }
    .section-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    body {
        cursor: auto;
    }
    .cursor,
    .cursor-follower {
        display: none;
    }
    .nav-container {
        padding-left: max(0.875rem, env(safe-area-inset-left, 0px));
        padding-right: max(0.875rem, env(safe-area-inset-right, 0px));
    }
    .hero-title {
        font-size: 3rem;
    }
    .section-title {
        font-size: 2.5rem;
    }
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
