/**
 * ============================================================================
 * CEIRAN NEW-WEBSITE STYLES
 * ============================================================================
 * Consolidated stylesheet with all necessary styles.
 * ============================================================================
 */

/* ============================================================================
   BASE STYLES
   ============================================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: #ffffff;
    background-color: #0c0c0e;
}

::selection {
    background-color: #fe16cf;
    color: #ffffff;
}


/* ============================================================================
   NAVIGATION
   ============================================================================ */

.nav-logo {
    height: 48px;
    width: auto;
}


/* ============================================================================
   ANIMATED GRADIENT BORDER
   ============================================================================ */

@property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes rotate-border {
    to { --border-angle: 360deg; }
}


/* ============================================================================
   GLASSMORPHISM COMPONENTS
   ============================================================================ */

.glass-panel {
    background: rgba(18, 18, 22, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.liquid-glass-dock {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.3),
        inset 0 0 1px 1px rgba(255, 255, 255, 0.05);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.liquid-glass-dock:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.4),
        inset 0 0 1px 1px rgba(255, 255, 255, 0.1);
}

.glass-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(from var(--border-angle), #fe16cf, #a855f7 30%, transparent 45%, transparent 55%, #a855f7 70%, #fe16cf);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.glass-card:hover {
    border-color: transparent;
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-4px);
}

.glass-card:hover::before {
    opacity: 1;
    animation: rotate-border 3s linear infinite;
}


/* ============================================================================
   GLOW EFFECTS
   ============================================================================ */

.purple-glow,
.primary-glow {
    box-shadow: 0 0 40px rgba(254, 22, 207, 0.15);
}


/* ============================================================================
   DISABLED/LEGACY COMPONENTS
   ============================================================================ */

.carbon-texture {
    background-color: transparent;
}




/* ============================================================================
   3D DEVICE CANVAS
   ============================================================================ */

#device-canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

#device-canvas-container {
    perspective: 1000px;
}


/* ============================================================================
   GRADIENT ORBS (Animated Background)
   ============================================================================ */

.gradient-orbs {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    opacity: 1;
    will-change: transform, border-radius, opacity;
    filter: blur(80px);
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: rgba(254, 22, 207, 0.35);
    top: -200px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: rgba(168, 85, 247, 0.3);
    top: 40%;
    right: -100px;
}

.orb-3 {
    width: 450px;
    height: 450px;
    background: rgba(254, 22, 207, 0.25);
    bottom: -100px;
    left: 25%;
}

.orb-4 {
    width: 550px;
    height: 350px;
    background: rgba(192, 132, 252, 0.2);
    top: 10%;
    right: 15%;
}

.orb-5 {
    width: 400px;
    height: 500px;
    background: rgba(217, 70, 239, 0.2);
    bottom: 5%;
    right: 25%;
}


/* ============================================================================
   TEXT REVEAL ANIMATION
   ============================================================================ */

.text-reveal .word {
    display: inline-flex;
    vertical-align: bottom;
    overflow: hidden;
}

.text-reveal .word-inner {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    clip-path: inset(-20% -20% -20% -20%);
    /* Full reveal: no sides cut off */
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1),
        opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.text-reveal.revealed .word-inner {
    transform: translateY(0);
    opacity: 1;
}

/* Animated gradient text keyframes */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Base fix for gradient text inside text-reveal */
.text-reveal span[class*="bg-clip-text"] {
    position: relative;
    display: inline-block;
    background: none !important;
}

/* Per-word animated gradient with staggered delay for flowing effect */
.text-reveal span[class*="bg-clip-text"] .word-inner {
    background-image: linear-gradient(90deg, #fe16cf, #a855f7, #c084fc, #a855f7, #fe16cf) !important;
    background-size: 200% 100% !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    opacity: 1 !important;
    animation: gradient-shift 6s ease-in-out infinite;
    animation-delay: calc(var(--word-i, 0) * -1.5s);
}


/* ============================================================================
   TILT CARDS (3D Effect)
   ============================================================================ */

.tilt-card {
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

.tilt-card .js-tilt-glare {
    border-radius: inherit;
}


/* ============================================================================
   MAGNETIC BUTTONS
   ============================================================================ */

.magnetic-btn {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}


/* ============================================================================
   RIPPLE EFFECT
   ============================================================================ */

.ripple-btn {
    position: relative;
    overflow: hidden;
}

.ripple-btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1);
        box-shadow: 0 0 0 0 rgba(254, 22, 207, 0.4);
    }

    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.02);
        box-shadow: 0 0 20px 5px rgba(254, 22, 207, 0.2);
    }
}

@keyframes pulse-glow-rounded {

    0%,
    100% {
        opacity: 0.9;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(254, 22, 207, 0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.03);
        box-shadow: 0 0 15px 3px rgba(254, 22, 207, 0.25);
    }
}

/* ============================================================================
   FAQ ACCORDION
   ============================================================================ */

.faq-item {
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(254, 22, 207, 0.3);
}

.faq-trigger {
    cursor: pointer;
    background: none;
    border: none;
    color: inherit;
}

.faq-trigger:focus {
    outline: none;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-content {
    max-height: 500px;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}


/* ============================================================================
   CHART ANIMATION
   ============================================================================ */

#chart-line {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
}

#chart-line.animated {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.5s ease-out;
}


/* ============================================================================
   SMOOTH SCROLL (Lenis)
   ============================================================================ */

html.lenis,
html.lenis body {
    height: auto;
}

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

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

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

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


/* ============================================================================
   MOBILE PERFORMANCE OPTIMIZATIONS
   ============================================================================ */

/* CSS Variables for proportional spacing */
:root {
    --space-xs: clamp(0.25rem, 0.5vw + 0.125rem, 0.5rem);
    --space-sm: clamp(0.5rem, 1vw + 0.25rem, 0.75rem);
    --space-md: clamp(0.75rem, 1.5vw + 0.375rem, 1.25rem);
    --space-lg: clamp(1rem, 2vw + 0.5rem, 2rem);
    --space-xl: clamp(1.5rem, 3vw + 0.75rem, 3rem);
}

/* ============================================================================
   STICKY BOTTOM CTA (Mobile Only)
   ============================================================================ */

#sticky-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    background: rgba(23, 23, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(254, 22, 207, 0.2);
    z-index: 45;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#sticky-cta-bar.visible {
    transform: translateY(0);
}

#sticky-cta-bar.hidden-by-cta {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}


.sticky-cta-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #fe16cf 0%, #cc0fa5 100%);
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(254, 22, 207, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sticky-cta-btn:active {
    transform: scale(0.98);
}

.sticky-cta-btn .material-symbols-outlined {
    font-size: 1.25rem;
}

/* ============================================================================
   FLUID TYPOGRAPHY
   ============================================================================ */

/* Hero heading - fluid scaling */
#hero-text h1 {
    font-size: clamp(1.75rem, 5vw + 0.5rem, 5rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

/* Hero paragraph - fluid scaling */
#hero-text p {
    font-size: clamp(0.875rem, 1.5vw + 0.5rem, 1.5rem);
    line-height: 1.6;
}

/* Badge - fluid scaling */
#hero-text>div:first-child {
    font-size: clamp(0.625rem, 1vw + 0.25rem, 0.75rem);
    padding: var(--space-xs) var(--space-sm);
}

@media (max-width: 768px) {
    .glass-panel {
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        background: rgba(38, 38, 43, 0.9);
    }

    .glass-card {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(38, 38, 43, 0.9);
    }

    .gradient-orb {
        opacity: 0.2;
    }

    .purple-glow,
    .primary-glow {
        box-shadow: none;
    }

    /* Hide navbar CTA on mobile - moved to sticky bottom */
    header .magnetic-btn.bg-primary {
        display: none;
    }

    /* Improve touch target for hamburger menu */
    #mobile-menu-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    /* Mobile 3D Device Layout */
    #hero-trigger {
        min-height: 100vh;
        min-height: 100dvh;
        /* Dynamic viewport height for mobile browsers */
    }

    #3d-scroller {
        justify-content: flex-start;
        padding-top: 6rem;
        padding-bottom: 1rem;
        gap: 0;
    }

    #device-canvas-container {
        pointer-events: auto;
        position: relative;
        top: auto;
        bottom: auto;
        height: auto;
        flex: 1;
        min-height: 45vh;
        max-height: 60vh;
    }

    /* Hero text container */
    #hero-text {
        margin-top: var(--space-lg);
        margin-bottom: var(--space-sm);
        max-width: 95%;
        flex-shrink: 0;
        gap: var(--space-sm);
    }

    /* Remove fixed font overrides - use fluid values instead */
    #hero-text h1 {
        margin-bottom: var(--space-sm);
    }

    #hero-text p {
        margin-bottom: var(--space-md);
    }

    /* Adjust button container spacing */
    #hero-text .flex.flex-col {
        padding-top: 0;
        margin-top: var(--space-xs);
    }

    /* Show touch prompt on mobile */
    #touch-prompt {
        display: flex;
        opacity: 1;
        bottom: 1.5rem;
    }

    #touch-prompt>div {
        animation: pulse-glow-rounded 2s ease-in-out infinite;
    }

    /* Touch prompt styling - use the primary CTA instead */
    #hero-text button.magnetic-btn {
        min-height: 48px;
        /* Better touch target */
        font-size: clamp(0.75rem, 2vw + 0.25rem, 1rem);
    }
}

/* Ensure mobile nav covers everything */
#mobile-nav-overlay {
    z-index: 999999 !important;
    background-color: #0c0c0e !important;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
    pointer-events: none;
    opacity: 0;
}

#mobile-nav-overlay.active {
    visibility: visible;
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto;
}

/* Hide header when mobile menu is open to prevent overlap and shift issues */
body.mobile-menu-open header {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

/* Extra small devices (< 360px) */
@media (max-width: 359px) {
    #hero-text h1 {
        font-size: 1.5rem;
        line-height: 1.1;
    }

    #hero-text p {
        font-size: 0.8125rem;
    }

    .sticky-cta-btn {
        padding: 0.875rem 1rem;
        font-size: 0.75rem;
    }

    /* Navbar logo sizing */
    .nav-logo {
        height: 36px;
    }
}

/* Standard mobile devices */
@media (min-width: 360px) and (max-width: 640px) {
    #hero-text .flex-col.sm\:flex-row {
        gap: var(--space-sm);
    }

    section.py-32 .flex-col.sm\:flex-row {
        gap: var(--space-sm);
    }

    /* Add bottom padding to body to prevent content being hidden by sticky CTA */
    body {
        padding-bottom: 80px;
    }
}

/* Content visibility for off-screen sections (lazy rendering) */
#stats-section,
#features-section,
#revenue-section,
#faq-section {
    content-visibility: auto;
    contain-intrinsic-size: 0 600px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .gradient-orb {
        display: none;
    }

    #sticky-cta-bar {
        transition: none;
    }
}