/* ================================================================
   SACEYO IT SOLUTIONS — Custom Styles
   ================================================================ */

:root {
    --orange: #FF7A00;
    --orange-light: #FFB347;
    --dark-bg: #08080F;
    --dark-card: #0F0F1E;
    --dark-border: rgba(255, 122, 0, 0.2);
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #08080F; }
::-webkit-scrollbar-thumb { background: #FF7A00; border-radius: 99px; }

/* Selection */
::selection { background: rgba(255,122,0,0.3); color: #fff; }

/* ======================== TYPOGRAPHY ======================== */
body {
    font-family: 'Inter', sans-serif;
    background-color: #08080F;
    color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

/* ======================== NAVBAR ======================== */
#navbar.scrolled {
    background: rgba(8, 8, 15, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,122,0,0.1);
    padding-top: 12px;
    padding-bottom: 12px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #FF7A00, #FFB347);
    transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* Mobile Menu Toggle Animation */
#menu-toggle.open .menu-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#menu-toggle.open .menu-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
#menu-toggle.open .menu-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ======================== HERO ======================== */
@keyframes scrollDown {
    0%   { transform: translateY(-100%); opacity: 0; }
    50%  { opacity: 1; }
    100% { transform: translateY(200%); opacity: 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-20px); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(255,122,0,0.3); }
    50%       { box-shadow: 0 0 40px rgba(255,122,0,0.6); }
}

@keyframes ticker {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-33.33%); }
}

/* ======================== REVEAL ANIMATIONS ======================== */
/* Initial hidden state is set by GSAP via fromTo — no CSS opacity:0 here
   to avoid conflicts. GSAP's fromTo handles both start and end states. */
.reveal-up,
.reveal-left,
.reveal-right {
    will-change: transform, opacity;
}

/* ======================== CARDS ======================== */
.service-card,
.dev-card,
.other-card,
.why-card,
.stat-card {
    will-change: transform, opacity;
}

/* Service card hover border glow */
.service-card:hover {
    border-color: rgba(255,122,0,0.4) !important;
    box-shadow: 0 8px 40px rgba(255,122,0,0.1);
}

/* Dev card hover */
.dev-card:hover {
    border-color: rgba(255,122,0,0.35) !important;
    box-shadow: 0 10px 50px rgba(255,122,0,0.08);
}

/* Glare effect (Vanilla Tilt) */
.js-tilt-glare {
    border-radius: inherit;
}

/* ======================== STAT CARDS FLOAT ======================== */
.stat-card:nth-child(1) { animation: float 6s ease-in-out infinite; }
.stat-card:nth-child(2) { animation: float 6s ease-in-out 1.5s infinite; }
.stat-card:nth-child(3) { animation: float 6s ease-in-out 3s infinite; }
.stat-card:nth-child(4) { animation: float 6s ease-in-out 4.5s infinite; }

/* ======================== CURSOR ======================== */
@media (pointer: coarse) {
    #cursor, #cursor-trail { display: none; }
}

/* ======================== GRADIENT TEXT UTILITY ======================== */
.gradient-text {
    background: linear-gradient(135deg, #FF7A00, #FFB347);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ======================== SECTION SPACING ======================== */
section { position: relative; }

/* ======================== PROGRESS BAR ======================== */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #FF7A00, #FFB347);
    z-index: 9999;
    transition: width 0.1s linear;
    border-radius: 0 99px 99px 0;
}

/* ======================== CANVAS ======================== */
#hero-canvas {
    opacity: 0.9;
}

/* ======================== CONTACT FORM ======================== */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #0F0F1E inset;
    -webkit-text-fill-color: #fff;
    caret-color: #fff;
}

/* ======================== BACK TO TOP ======================== */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF7A00, #FFB347);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 0 20px rgba(255,122,0,0.4);
}
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}
#back-to-top:hover { transform: translateY(-3px); }

/* ======================== RESPONSIVE ======================== */
@media (max-width: 768px) {
    .stat-card { animation: none !important; }
}

/* ======================== LOADING ======================== */
body.loaded #loader {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* ======================== REDUCED MOTION ======================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .stat-card { animation: none !important; }
}
