:root {
    /* Color Palette */
    --bg-dark: #030508;
    --bg-surface: #0a0e17;
    --bg-surface-elevated: #111827;
    
    --accent-primary: #00E5FF;
    --accent-secondary: #0077FF;
    --accent-glow: rgba(0, 229, 255, 0.4);
    
    --text-primary: #FFFFFF;
    --text-secondary: #9CA3AF;
    --text-muted: #4B5563;
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(0, 229, 255, 0.2);

    /* Typography */
    --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout */
    --container-width: 1200px;

    /* The Easing Blueprint - From Guidelines */
    --ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
    --ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
    --ease-out-quint: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --ease-out-circ: cubic-bezier(0.075, 0.82, 0.165, 1);

    --ease-in-out-quad: cubic-bezier(0.455, 0.03, 0.515, 0.955);
    --ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1);
    --ease-in-out-quart: cubic-bezier(0.77, 0, 0.175, 1);
    --ease-in-out-quint: cubic-bezier(0.86, 0, 0.07, 1);
    --ease-in-out-expo: cubic-bezier(1, 0, 0, 1);
    --ease-in-out-circ: cubic-bezier(0.785, 0.135, 0.15, 0.86);

    --ease-hover: ease;
    
    /* Durations */
    --dur-micro: 150ms;
    --dur-standard: 250ms;
    --dur-complex: 400ms;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Hide default cursor for custom cursor */
}

/* Fallback cursor if custom cursor is disabled via media query */
@media (hover: none) or (pointer: coarse) {
    * {
        cursor: auto;
    }
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Cursor */
.cursor-dot, .cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    will-change: transform, width, height, opacity;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-primary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-primary);
    opacity: 0.5;
    transition: width var(--dur-micro) var(--ease-hover), height var(--dur-micro) var(--ease-hover), opacity var(--dur-micro) var(--ease-hover);
}

.cursor-outline.hover-active {
    width: 60px;
    height: 60px;
    opacity: 1;
    background-color: rgba(0, 229, 255, 0.05);
    border-color: rgba(0, 229, 255, 0.8);
}

.cursor-outline.hover-magnetic {
    opacity: 0; /* Hide outline when magnetic snaps */
}

@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse) {
    .cursor-dot, .cursor-outline {
        display: none !important;
    }
    * {
        cursor: auto !important;
    }
}

/* Background & Noise */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9000;
    opacity: 0.04;
    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.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.glow-pointer {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 119, 255, 0.15) 0%, rgba(0, 229, 255, 0.05) 30%, transparent 70%);
    border-radius: 50%;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
    will-change: transform;
    mix-blend-mode: screen;
}

.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: 60px 60px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    z-index: -2;
}

.grid-fade {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, transparent 20%, var(--bg-dark) 100%);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.overflow-hidden {
    overflow: hidden;
}

/* Splash Section */
.splash-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 2rem;
}

.splash-content {
    max-width: 900px;
    z-index: 10;
}

.eyebrow {
    font-family: var(--font-sans);
    color: var(--accent-primary);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
}

.hero-headline {
    font-family: var(--font-sans);
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.hero-headline .highlight {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.sub-headline {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem auto;
    font-weight: 300;
}

/* Magnetic Button */
.btn-wrapper {
    display: inline-block;
}

.magnetic-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: var(--text-primary);
    color: var(--bg-dark);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1rem;
    padding: 1.25rem 2.5rem;
    border-radius: 100px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    will-change: transform;
    /* Spring-like behavior handled in JS, standard ease fallback here */
    transition: background-color var(--dur-standard) var(--ease-hover), transform var(--dur-micro) var(--ease-hover);
}

.magnetic-btn:active {
    transform: scale(0.97) !important;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: transform var(--dur-standard) var(--ease-out-quint);
    will-change: transform;
}

.magnetic-btn:hover .btn-icon {
    transform: rotate(45deg);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0; /* GSAP will fade in */
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-secondary);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s cubic-bezier(0.645, 0.045, 0.355, 1) infinite;
}

@keyframes scroll {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 15px); opacity: 0; }
}

/* Solutions Section */
.solutions-section {
    padding: 8rem 0;
    position: relative;
    z-index: 10;
    background: linear-gradient(180deg, transparent 0%, var(--bg-dark) 10%);
}

.section-header {
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-sans);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
}

.section-line {
    height: 1px;
    background: linear-gradient(90deg, var(--border-accent), transparent);
    width: 0%; /* GSAP fills this */
    margin-top: 1rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

/* Premium Glassmorphic Cards */
.tool-card {
    position: relative;
    border-radius: 16px;
    background: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    min-height: 400px;
    will-change: transform;
    /* JS handles the 3D tilt, this is the fallback transition */
    transition: border-color var(--dur-standard) var(--ease-hover), transform var(--dur-standard) var(--ease-out-quint);
}

.card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 2;
}

/* Dynamic Glow Border (JS driven via CSS vars) */
.card-border {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--dur-standard) var(--ease-hover);
    background: radial-gradient(
        800px circle at var(--mouse-x, 0) var(--mouse-y, 0),
        rgba(0, 229, 255, 0.15),
        transparent 40%
    );
    z-index: 1;
    pointer-events: none;
}

.tool-card:hover .card-border {
    opacity: 1;
}

.tool-card:hover {
    border-color: rgba(0, 229, 255, 0.4);
}

.tool-icon {
    color: var(--accent-primary);
    margin-bottom: 2rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: transform var(--dur-standard) var(--ease-out-quint);
    will-change: transform;
}

.tool-icon.custom-logo {
    width: auto;
    height: 48px;
}

.tool-icon img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.tool-card:hover .tool-icon {
    transform: scale(1.05) translateY(-5px);
}

.tool-name {
    font-family: var(--font-sans);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.tool-description {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

.tool-action {
    margin-top: auto;
}

/* Small Magnetic Button */
.magnetic-btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid var(--border-subtle);
    transition: all var(--dur-standard) var(--ease-hover);
    will-change: transform, background-color;
}

.magnetic-btn-small:hover {
    background: var(--text-primary);
    color: var(--bg-dark);
    border-color: var(--text-primary);
}

.magnetic-btn-small:active {
    transform: scale(0.97) !important;
}

/* Footer */
.site-footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-dark);
    position: relative;
    z-index: 10;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.copyright {
    color: var(--text-muted);
}

.return-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--dur-micro) var(--ease-hover);
}

.return-link:hover {
    color: var(--text-primary);
}

.return-link svg {
    transition: transform var(--dur-micro) var(--ease-out-quint);
    will-change: transform;
}

.return-link:hover svg {
    transform: translateX(-4px);
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
    
    .wheel {
        animation: none !important;
        opacity: 0.5;
    }
    
    .glow-pointer {
        display: none !important;
    }
}
