/* Leoscar Custom Font */
@font-face {
    font-family: 'Leoscar';
    src: url('../assets/leoscar/LeoscarSansSerif.ttf') format('truetype'),
         url('../assets/leoscar/Leoscar Sans Serif.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Leoscar Typography Enhancements: Letter spacing & line height refinement (preserving logos) */
[style*="'Leoscar'"]:not(.brand-logo):not(.logo-brand),
.font-leoscar:not(.brand-logo):not(.logo-brand) {
    letter-spacing: 0.048em !important;
    line-height: 1.36 !important;
}

h1[style*="'Leoscar'"]:not(.brand-logo):not(.logo-brand),
h2[style*="'Leoscar'"]:not(.brand-logo):not(.logo-brand) {
    letter-spacing: 0.042em !important;
    line-height: 1.24 !important;
}

h3[style*="'Leoscar'"]:not(.brand-logo):not(.logo-brand),
h4[style*="'Leoscar'"]:not(.brand-logo):not(.logo-brand),
h5[style*="'Leoscar'"]:not(.brand-logo):not(.logo-brand) {
    letter-spacing: 0.038em !important;
    line-height: 1.38 !important;
}

/* Override aggressive negative tracking / leading on Leoscar headings */
h1[style*="'Leoscar'"].tracking-tight,
h2[style*="'Leoscar'"].tracking-tight,
h3[style*="'Leoscar'"].tracking-tight,
h4[style*="'Leoscar'"].tracking-tight,
h5[style*="'Leoscar'"].tracking-tight,
[style*="'Leoscar'"].tracking-tight {
    letter-spacing: 0.036em !important;
}

h1[style*="'Leoscar'"].tracking-tighter,
h2[style*="'Leoscar'"].tracking-tighter,
h3[style*="'Leoscar'"].tracking-tighter,
[style*="'Leoscar'"].tracking-tighter {
    letter-spacing: 0.028em !important;
}

h1[style*="'Leoscar'"].leading-tight,
h2[style*="'Leoscar'"].leading-tight,
h3[style*="'Leoscar'"].leading-tight {
    line-height: 1.28 !important;
}

h1[style*="'Leoscar'"].leading-none,
h2[style*="'Leoscar'"].leading-none,
h3[style*="'Leoscar'"].leading-none {
    line-height: 1.22 !important;
}

/* Rondured Custom Font */
@font-face {
    font-family: 'Rondured';
    src: url('../assets/rondured/RonduredRegular.ttf') format('truetype'),
         url('../assets/rondured/Rondured Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Global styles, layout fixes, dark theme variables */
html {
    font-family: 'Inter', sans-serif;
    background-color: #000000;
    width: 100%;
    min-height: 100%;
    height: auto;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #000000;
    width: 100%;
    min-height: 100vh;
    height: auto;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

@media (max-width: 768px) {
    html,
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
}

.main-wrapper {
    overflow: clip !important;
    transform: none !important;
    filter: none !important;
}

/* Custom Scrollbar for dark theme */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #000000;
}

::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

/* Subtle dark futuristic scanning/ambient effects */
.ambient-radial {
    background: radial-gradient(circle at 50% 50%, rgba(12, 12, 16, 0.8) 0%, rgba(0, 0, 0, 1) 80%);
}

/* 3D Robot Positioning & Background Fixes */
html,
body,
.ambient-radial {
    background: #000000 !important;
    background-color: #000000 !important;
}

/* Desktop Hero Background */
.desktop-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    background: #000000;
}

.desktop-hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 220px;
    background: radial-gradient(ellipse 90% 100% at 50% 0%, rgba(112, 0, 230, 0.32) 0%, rgba(98, 0, 200, 0.14) 50%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

.desktop-hero-bg video {
    position: absolute;
    top: -6%;
    left: 0;
    width: 100%;
    height: 114%;
    object-fit: cover;
    object-position: center bottom;
    display: block;
    transform: translateY(6%);
}

spline-viewer {
    display: block;
    width: 100%;
    height: 100%;
    background: transparent !important;
    background-color: transparent !important;
}

.robot-wrapper {
    display: none;
    position: absolute;
    bottom: -2%;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 85vh;
    z-index: 10;
    pointer-events: auto;
}

@media (min-width: 768px) {
    .robot-wrapper {
        display: block !important;
    }

    .robot-wrapper spline-viewer {
        filter: sepia(100%) hue-rotate(220deg) saturate(450%) brightness(0.60) contrast(1.25) drop-shadow(0 0 24px #6200C8);
    }
}

/* ===================== */
/* SCI-FI EYE WIDGET (PURPLE THEME) */
/* ===================== */
.eye-widget {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eye-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(138, 0, 255, 0.35);
}

.eye-ring-outer {
    width: 36px;
    height: 36px;
    border-color: rgba(255, 255, 255, 0.15);
    border-top-color: #A855F7;
    animation: eye-spin 3s linear infinite;
}

.eye-ring-mid {
    width: 26px;
    height: 26px;
    border-color: rgba(255, 255, 255, 0.08);
    border-bottom-color: #8A00FF;
    animation: eye-spin-reverse 2s linear infinite;
}

.eye-iris {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle, #24093c 40%, #0c0215 100%);
    border: 1px solid rgba(168, 85, 247, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.eye-pupil {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #A855F7;
    box-shadow: 0 0 8px 3px rgba(168, 85, 247, 0.9);
    animation: eye-pulse-purple 2s ease-in-out infinite;
}

.eye-crosshair-h {
    position: absolute;
    width: 36px;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(168, 85, 247, 0.45), transparent);
}

.eye-crosshair-v {
    position: absolute;
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, transparent, rgba(168, 85, 247, 0.45), transparent);
}

@keyframes eye-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes eye-spin-reverse {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(-360deg);
    }
}

@keyframes eye-pulse-purple {
    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 8px 3px rgba(168, 85, 247, 0.9), 0 0 16px rgba(138, 0, 255, 0.5);
        transform: scale(1);
    }

    50% {
        opacity: 0.45;
        box-shadow: 0 0 4px 1px rgba(168, 85, 247, 0.4);
        transform: scale(0.8);
    }
}

/* ===================== */
/* ROADMAP CSS           */
/* ===================== */
.roadmap-card {
    transition: transform 0.4s ease-out;
}

.roadmap-card:hover {
    transform: translateY(-4px);
}

.roadmap-card .mockup-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}

.roadmap-card:hover .mockup-glow {
    opacity: 1;
}

.mockup-inner {
    position: relative;
    z-index: 2;
}

/* ===================== */
/* ESTIMATOR RANGE CSS   */
/* ===================== */
.calculator-range {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    transition: background 0.3s;
}

.calculator-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6200C8;
    /* Dark Purple matching signature website theme */
    cursor: pointer;
    box-shadow: 0 0 12px rgba(98, 0, 200, 0.6);
    border: 3px solid #111;
    /* Outer blackish border */
    transition: transform 0.2s, box-shadow 0.2s;
}

.calculator-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 18px rgba(112, 0, 230, 0.9);
}

.calculator-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #6200C8;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(98, 0, 200, 0.6);
    border: 3px solid #111;
    transition: transform 0.2s, box-shadow 0.2s;
}

.calculator-range::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 18px rgba(112, 0, 230, 0.9);
}

/* ===================== */
/* ROADMAP PATH FLOW CSS */
/* ===================== */
.path-flow {
    stroke-dasharray: 12 24;
    animation: flowLine 1.5s linear infinite;
}

@keyframes flowLine {
    to {
        stroke-dashoffset: -36;
    }
}

/* ===================== */
/* ANIMATED CARD BORDERS */
/* ===================== */
.animated-border-card {
    position: relative;
    background: transparent;
}

.animated-border-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent 70%, #7000E6 100%);
    animation: borderSpin 3s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes borderSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ============================================================ */
/* 3D FLIP ROTATING LOGOS (MOBILE PROJECTS SECTION)             */
/* ============================================================ */
.logo-flipper-container {
    perspective: 800px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
}

.logo-flipper-inner {
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.45s ease;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    will-change: transform, opacity;
}

.logo-flipper-inner.flip-out {
    transform: rotateX(-90deg) translateY(-6px);
    opacity: 0;
}

.logo-flipper-inner.flip-in {
    transform: rotateX(90deg) translateY(6px);
    opacity: 0;
}