@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
    --bg-rich-black: #04162B; /* Rich Ocean Navy background from reference */
    --bg-charcoal: #061E3B; /* Secondary Navy */
    --bg-card: #09284F; /* Cards background */
    --color-white: #FFFFFF;
    --color-soft-white: #F8F8F8;
    --color-silver: #D2E4F6; /* Ice blue/silver secondary text */
    --color-graphite: #607C9C; /* Slate blue tertiary text */
    --color-border: rgba(10, 186, 181, 0.1); /* Tiffany Blue border tint */
    --color-border-hover: rgba(10, 186, 181, 0.25);
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    --cursor-size-dot: 8px;
    --cursor-size-ring: 40px;

    /* Theme override properties - default is Tiffany Blue + Ocean Navy + White */
    --accent-color: #0ABAB5; /* Tiffany Blue accent */
    --accent-color-rgb: 10, 186, 181;
    --accent-glow: radial-gradient(circle, rgba(10, 186, 181, 0.12) 0%, transparent 70%);
    --accent-glow-2: radial-gradient(circle, rgba(10, 186, 181, 0.06) 0%, transparent 60%);
    --text-gradient: linear-gradient(135deg, #ffffff 40%, #0ABAB5 100%);
    --btn-bg: #0ABAB5; /* Tiffany Blue button */
    --btn-text: #04162B; /* Dark Ocean Navy text */
    --theme-toggle-color: #0ABAB5;
}

body.theme-mono {
    --accent-color: var(--color-white);
    --accent-color-rgb: 255, 255, 255;
    --accent-glow: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    --accent-glow-2: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
    --text-gradient: linear-gradient(135deg, #ffffff 30%, #a3a3a3 100%);
    --btn-bg: var(--color-white);
    --btn-text: #04162B;
    --theme-toggle-color: var(--color-graphite);
}

#themeToggle {
    color: var(--theme-toggle-color) !important;
    border-color: rgba(var(--accent-color-rgb), 0.15) !important;
}

#themeToggle:hover {
    border-color: rgba(var(--accent-color-rgb), 0.4) !important;
    color: var(--accent-color) !important;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-rich-black);
    color: var(--color-soft-white);
    font-family: var(--font-body);
    overflow-x: hidden;
}

body {
    background-color: var(--bg-rich-black);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-rich-black);
}
::-webkit-scrollbar-thumb {
    background: var(--color-graphite);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-silver);
}

/* Custom Cursor */
.custom-cursor-dot {
    width: var(--cursor-size-dot);
    height: var(--cursor-size-dot);
    background-color: var(--accent-color);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10000;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.custom-cursor-ring {
    width: var(--cursor-size-ring);
    height: var(--cursor-size-ring);
    border: 1px solid rgba(var(--accent-color-rgb), 0.3);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.3s, height 0.3s, border-color 0.3s, background-color 0.3s;
}

/* Cursor Hover states */
body.hovering .custom-cursor-ring {
    width: 60px;
    height: 60px;
    background-color: rgba(var(--accent-color-rgb), 0.05);
    border-color: var(--accent-color);
}

body.hovering .custom-cursor-dot {
    width: 12px;
    height: 12px;
}

body.clicking .custom-cursor-ring {
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Typography styles */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--color-white);
}

.text-gradient {
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-silver {
    background: linear-gradient(135deg, #ffffff 0%, #707070 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Premium Background Effects */
.noise-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    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.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.02;
    pointer-events: none;
    z-index: 999;
}

.grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 50px 50px;
    background-image: 
        linear-gradient(to right, rgba(var(--accent-color-rgb), 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(var(--accent-color-rgb), 0.02) 1px, transparent 1px);
    pointer-events: none;
    z-index: 1;
}

.mesh-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--accent-glow);
    top: -100px;
    left: 20%;
    pointer-events: none;
    z-index: 1;
    filter: blur(80px);
}

.mesh-glow-2 {
    position: absolute;
    width: 800px;
    height: 800px;
    background: var(--accent-glow-2);
    bottom: -200px;
    right: 10%;
    pointer-events: none;
    z-index: 1;
    filter: blur(100px);
}

/* Glassmorphism details */
.glass {
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid var(--color-border);
}

.glass-card {
    background: rgba(15, 15, 15, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(20, 20, 20, 0.6);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(-4px);
}

/* Preloader styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-rich-black);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

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

.loader-bar-fill {
    width: 0%;
    height: 100%;
    background-color: var(--accent-color);
    position: absolute;
    top: 0;
    left: 0;
    transition: width 0.1s ease-out;
}

/* Buttons */
.btn-premium {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid var(--color-border);
    background: var(--btn-bg);
    color: var(--btn-text);
    font-weight: 500;
}

.btn-premium::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s;
}

.btn-premium:hover::after {
    left: 100%;
}

.btn-premium:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(var(--accent-color-rgb), 0.15);
}

.btn-secondary-premium {
    background: transparent;
    color: var(--color-white);
    border: 1px solid var(--color-border);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-secondary-premium:hover {
    border-color: var(--accent-color);
    background: rgba(var(--accent-color-rgb), 0.05);
    transform: scale(1.02);
}

/* What We Do Cards Hover Interaction */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card .details-panel {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.service-card:hover .details-panel {
    max-height: 120px;
    opacity: 1;
    margin-top: 16px;
}

/* Ecosystem connections */
.ecosystem-container {
    position: relative;
}

.ecosystem-node {
    z-index: 10;
    transition: all 0.3s ease;
}

.ecosystem-node:hover {
    background-color: var(--accent-color);
    color: var(--bg-rich-black);
    box-shadow: 0 0 30px rgba(var(--accent-color-rgb), 0.3);
    transform: scale(1.08);
}

/* Comparison Section */
.comparison-table {
    border-collapse: separate;
    border-spacing: 0 12px;
}

/* Before / After Slider */
.before-after-container {
    position: relative;
    width: 100%;
    height: 480px;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.before-image, .after-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    user-select: none;
}

.after-image {
    width: 50%;
    border-right: 1px solid var(--accent-color);
    overflow: hidden;
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, calc(240px - 20px));
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    color: var(--bg-rich-black);
}

/* Timelines */
.timeline-dot {
    position: relative;
}

.timeline-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* Tech Marquee */
.tech-marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
}

.tech-marquee-container::before,
.tech-marquee-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.tech-marquee-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-rich-black) 0%, transparent 100%);
}

.tech-marquee-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-rich-black) 0%, transparent 100%);
}

.tech-marquee-row {
    display: inline-block;
    animation: marquee 30s linear infinite;
}

.tech-marquee-row-reverse {
    display: inline-block;
    animation: marquee-reverse 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes marquee-reverse {
    0% { transform: translate3d(-50%, 0, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

/* Floating label inputs */
.floating-input-group {
    position: relative;
}

.floating-input {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    color: var(--color-white);
    transition: all 0.3s;
}

.floating-input:focus {
    outline: none;
    border-color: rgba(var(--accent-color-rgb), 0.4);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(var(--accent-color-rgb), 0.05);
}

.floating-label {
    position: absolute;
    left: 16px;
    top: 16px;
    color: var(--color-graphite);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-input:focus ~ .floating-label,
.floating-input:not(:placeholder-shown) ~ .floating-label {
    top: -10px;
    left: 12px;
    font-size: 0.75rem;
    color: var(--accent-color);
    background-color: var(--bg-rich-black);
    padding: 0 6px;
}

/* Sticky floating CTA trigger class */
.floating-cta {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.floating-cta.visible {
    opacity: 1;
    transform: translateY(0);
}
