/* TumiCodes 2026 Animation Layer */

/* ── Page Loader ── */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    background: #0A0A0F;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-top-color: #FF003C;
    border-right-color: #00D4FF;
    animation: loader-spin 0.9s linear infinite;
}

.loader-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: #B8B8D0;
    animation: loader-pulse 1.5s ease-in-out infinite;
}

@keyframes loader-spin {
    to { transform: rotate(360deg); }
}

@keyframes loader-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ── Scroll Progress ── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    z-index: 10001;
    background: linear-gradient(90deg, #FF003C, #00D4FF, #9D00FF);
    background-size: 200% 100%;
    animation: progress-shimmer 3s linear infinite;
    box-shadow: 0 0 12px rgba(255, 0, 60, 0.6);
    transition: width 0.08s linear;
}

@keyframes progress-shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ── Ambient Background Orbs ── */
.ambient-orbs {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: orb-drift var(--duration, 18s) ease-in-out infinite alternate;
}

.orb-1 {
    width: 420px;
    height: 420px;
    background: #FF003C;
    top: -10%;
    left: -5%;
    --duration: 22s;
}

.orb-2 {
    width: 360px;
    height: 360px;
    background: #00D4FF;
    bottom: 10%;
    right: -8%;
    --duration: 26s;
    animation-delay: -4s;
}

.orb-3 {
    width: 280px;
    height: 280px;
    background: #9D00FF;
    top: 45%;
    left: 40%;
    --duration: 20s;
    animation-delay: -8s;
}

@keyframes orb-drift {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.08); }
    66% { transform: translate(-25px, 35px) scale(0.95); }
    100% { transform: translate(20px, -15px) scale(1.05); }
}

/* ── Hero Mesh & Grid ── */
.hero-mesh {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 0, 60, 0.18), transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 50%, rgba(0, 212, 255, 0.12), transparent 55%);
    animation: mesh-breathe 8s ease-in-out infinite alternate;
}

.hero-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 75%);
    animation: grid-shift 20s linear infinite;
}

@keyframes mesh-breathe {
    0% { opacity: 0.7; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

@keyframes grid-shift {
    0% { background-position: 0 0; }
    100% { background-position: 60px 60px; }
}

/* ── Hero Badge ── */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    margin-bottom: 28px;
    border-radius: 100px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #00D4FF;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.25);
    backdrop-filter: blur(12px);
    animation: badge-glow 3s ease-in-out infinite alternate;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00D4FF;
    box-shadow: 0 0 10px #00D4FF;
    animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes badge-glow {
    0% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.15); }
    100% { box-shadow: 0 0 30px rgba(0, 212, 255, 0.35); }
}

@keyframes dot-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.7; }
}

/* ── Scroll Reveal ── */
[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

[data-reveal="fade-left"] {
    transform: translateX(-50px);
}

[data-reveal="fade-right"] {
    transform: translateX(50px);
}

[data-reveal="scale-up"] {
    transform: scale(0.92);
}

[data-reveal="fade-up"].revealed,
[data-reveal="fade-left"].revealed,
[data-reveal="fade-right"].revealed,
[data-reveal="scale-up"].revealed {
    opacity: 1;
    transform: none;
}

/* Stagger children */
[data-reveal-stagger] > * {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal-stagger].revealed > * {
    opacity: 1;
    transform: none;
}

[data-reveal-stagger].revealed > *:nth-child(1) { transition-delay: 0.05s; }
[data-reveal-stagger].revealed > *:nth-child(2) { transition-delay: 0.1s; }
[data-reveal-stagger].revealed > *:nth-child(3) { transition-delay: 0.15s; }
[data-reveal-stagger].revealed > *:nth-child(4) { transition-delay: 0.2s; }
[data-reveal-stagger].revealed > *:nth-child(5) { transition-delay: 0.25s; }
[data-reveal-stagger].revealed > *:nth-child(6) { transition-delay: 0.3s; }

/* ── Hero Title Split Animation ── */
.hero-title .title-line {
    display: block;
    overflow: hidden;
}

.hero-title .title-line span {
    display: inline-block;
    animation: title-rise 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-title .title-line:nth-child(2) span {
    animation-delay: 0.15s;
}

@keyframes title-rise {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-description,
.hero-buttons {
    animation: hero-fade-in 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

@keyframes hero-fade-in {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
}

/* ── 3D Card Tilt ── */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out, box-shadow 0.4s ease;
}

.tilt-card .service-icon,
.tilt-card .project-image {
    transition: transform 0.4s ease;
}

.tilt-card:hover {
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(255, 0, 60, 0.15);
}

/* ── Magnetic Button ── */
.btn-magnetic {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-magnetic::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, #FF003C, #00D4FF, #9D00FF);
    background-size: 200% 200%;
    z-index: -3;
    opacity: 0;
    filter: blur(8px);
    transition: opacity 0.4s ease;
    animation: btn-border-flow 4s linear infinite;
}

.btn-magnetic:hover::after {
    opacity: 0.6;
}

@keyframes btn-border-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ── Shimmer Text ── */
.shimmer-text {
    background: linear-gradient(
        90deg,
        #fff 0%,
        #00D4FF 25%,
        #FF003C 50%,
        #9D00FF 75%,
        #fff 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer-slide 4s linear infinite;
}

@keyframes shimmer-slide {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* ── Section Divider ── */
.section-divider {
    width: 80px;
    height: 4px;
    margin: 0 auto 24px;
    border-radius: 4px;
    background: linear-gradient(90deg, #FF003C, #00D4FF);
    animation: divider-expand 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes divider-expand {
    from { width: 0; opacity: 0; }
    to { width: 80px; opacity: 1; }
}

/* ── Partners Marquee ── */
.partners-marquee {
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.partners-track {
    display: flex;
    gap: 48px;
    width: max-content;
    animation: marquee-scroll 30s linear infinite;
    align-items: center;
}

.partners-marquee .partners-grid {
    display: flex;
    flex-shrink: 0;
    gap: 48px;
    align-items: center;
}

.partners-marquee .partner-logo {
    flex-shrink: 0;
}

.partners-track:hover {
    animation-play-state: paused;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.partner-logo {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

.partner-logo:hover {
    transform: scale(1.08) translateY(-6px);
    filter: drop-shadow(0 0 20px rgba(255, 0, 60, 0.4));
}

/* ── Feature Item Glow ── */
.feature-item {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.feature-item:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 32px rgba(255, 0, 60, 0.2);
}

/* ── Community Buttons Pulse ── */
.community-buttons .btn {
    position: relative;
    overflow: hidden;
}

.community-buttons .btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.community-buttons .btn:hover::before {
    transform: translateX(100%);
}

/* ── Custom Cursor (desktop) ── */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 0, 60, 0.08) 0%, transparent 70%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

body.cursor-active .cursor-glow {
    opacity: 1;
}

body.cursor-active {
    cursor: none;
}

body.cursor-active a,
body.cursor-active button,
body.cursor-active .btn {
    cursor: none;
}

.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FF003C;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 12px #FF003C;
    transition: width 0.2s ease, height 0.2s ease, background 0.2s ease;
    opacity: 0;
}

body.cursor-active .cursor-dot {
    opacity: 1;
}

body.cursor-active .cursor-dot.hovering {
    width: 40px;
    height: 40px;
    background: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* ── Header Enhanced Scroll ── */
.header {
    transition:
        padding 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.4s ease,
        box-shadow 0.4s ease,
        transform 0.4s ease;
}

.header.header-hidden {
    transform: translateY(-100%);
}

.header.scrolled {
    padding: 12px 0;
    background: rgba(10, 10, 15, 0.92);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border-bottom-color: rgba(255, 0, 60, 0.15);
}

/* ── Floating Particles Canvas ── */
#particleCanvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

/* ── Footer Glow ── */
.footer {
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #FF003C, #00D4FF, transparent);
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }

    .page-loader {
        display: none;
    }

    .cursor-glow,
    .cursor-dot {
        display: none;
    }
}

/* ── Auth Pages (login / signup) ── */
.auth-page {
    animation: auth-enter 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.auth-page .login-form-container,
.auth-page .signup-form-container {
    animation: auth-card-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.auth-page .login-info,
.auth-page .signup-info {
    animation: auth-slide-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

@keyframes auth-enter {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes auth-card-rise {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

@keyframes auth-slide-in {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: none; }
}

.auth-page .header {
    animation: auth-header-drop 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes auth-header-drop {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 768px) {
    .cursor-glow,
    .cursor-dot {
        display: none;
    }

    body.cursor-active {
        cursor: auto;
    }
}
