/* ============================================================================
   JBA Agency — One Man Agency, Backed by Agents
   Custom styles beyond Tailwind utilities
   ============================================================================ */

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0a0f;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.4);
}

/* ---------- Smooth scroll ---------- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* ---------- Section Label ---------- */
.section-label {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #555566;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding-left: 1rem;
    border-left: 2px solid #00f0ff;
}

/* ---------- Logo ---------- */
.text-logo {
    transition: all 0.3s ease;
}
.text-logo:hover {
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

/* ---------- Navigation ---------- */
#main-header {
    background: transparent;
}
#main-header.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00f0ff, #a855f7);
    transition: width 0.3s ease;
}
.nav-link:hover,
.nav-link.active {
    color: #fff;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link-cta {
    padding: 0.5rem 1.5rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(168, 85, 247, 0.15));
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: #00f0ff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}
.nav-link-cta:hover {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(168, 85, 247, 0.25));
    border-color: rgba(0, 240, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

/* Hamburger */
body.menu-open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
body.menu-open .hamburger-line:nth-child(2) {
    opacity: 0;
}
body.menu-open .hamburger-line:nth-child(3) {
    width: 1.75rem;
    transform: rotate(-45deg) translate(4px, -4px);
}
body.menu-open .mobile-menu {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}
.mobile-link:hover {
    color: #00f0ff;
}

/* ---------- CTAs ---------- */
.cta-primary {
    background: linear-gradient(135deg, #00f0ff, #a855f7);
    color: #0a0a0f;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}
.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 240, 255, 0.3);
    background: linear-gradient(135deg, #a855f7, #00f0ff);
}

.cta-outline {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    background: transparent;
}
.cta-outline:hover {
    border-color: rgba(0, 240, 255, 0.5);
    color: #00f0ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 240, 255, 0.1);
}

/* ---------- Typing Cursor ---------- */
.typing-cursor {
    animation: blink 1s infinite;
    font-weight: 100;
}
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ---------- Glass Card ---------- */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}
.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* ---------- Stat Cards ---------- */
.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---------- Orbiting Visual ---------- */
.orbit-container {
    perspective: 800px;
}

.orbit-ring {
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}
.orbit-ring-1 {
    animation: orbit 20s linear infinite;
}
.orbit-ring-2 {
    animation: orbit 30s linear infinite reverse;
}

.orbit-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00f0ff;
    transition: all 0.3s ease;
}
.orbit-icon:hover {
    background: rgba(0, 240, 255, 0.2);
    border-color: rgba(0, 240, 255, 0.4);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
    transform: scale(1.2);
}

/* Position orbit icons around the ring */
.orbit-icon-1 { top: 0; left: 50%; transform: translateX(-50%); }
.orbit-icon-2 { top: 50%; right: 0; transform: translateY(-50%); }
.orbit-icon-3 { bottom: 0; left: 50%; transform: translateX(-50%); }
.orbit-icon-4 { top: 0; left: 50%; transform: translateX(-50%); }
.orbit-icon-5 { bottom: 30%; right: 0; transform: translateY(-50%); }
.orbit-icon-6 { bottom: 0; left: 30%; transform: translateX(-50%); }

/* Counter-rotate icons to keep them upright */
.orbit-ring-1 .orbit-icon {
    animation: counter-orbit 20s linear infinite;
}
.orbit-ring-2 .orbit-icon {
    animation: counter-orbit 30s linear infinite reverse;
}

@keyframes orbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes counter-orbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

/* ---------- Service Cards ---------- */
.service-card {
    position: relative;
    overflow: hidden;
    cursor: default;
}
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.service-card[data-accent="cyan"]::before { background: radial-gradient(circle at 50% 0, rgba(0, 240, 255, 0.08), transparent 70%); }
.service-card[data-accent="purple"]::before { background: radial-gradient(circle at 50% 0, rgba(168, 85, 247, 0.08), transparent 70%); }
.service-card[data-accent="green"]::before { background: radial-gradient(circle at 50% 0, rgba(34, 197, 94, 0.08), transparent 70%); }
.service-card[data-accent="blue"]::before { background: radial-gradient(circle at 50% 0, rgba(59, 130, 246, 0.08), transparent 70%); }
.service-card[data-accent="pink"]::before { background: radial-gradient(circle at 50% 0, rgba(236, 72, 153, 0.08), transparent 70%); }

.service-card:hover::before {
    opacity: 1;
}
.service-card:hover {
    transform: translateY(-8px);
}
.service-card[data-accent="cyan"]:hover { border-color: rgba(0, 240, 255, 0.3); box-shadow: 0 8px 30px rgba(0, 240, 255, 0.1); }
.service-card[data-accent="purple"]:hover { border-color: rgba(168, 85, 247, 0.3); box-shadow: 0 8px 30px rgba(168, 85, 247, 0.1); }
.service-card[data-accent="green"]:hover { border-color: rgba(34, 197, 94, 0.3); box-shadow: 0 8px 30px rgba(34, 197, 94, 0.1); }
.service-card[data-accent="blue"]:hover { border-color: rgba(59, 130, 246, 0.3); box-shadow: 0 8px 30px rgba(59, 130, 246, 0.1); }
.service-card[data-accent="pink"]:hover { border-color: rgba(236, 72, 153, 0.3); box-shadow: 0 8px 30px rgba(236, 72, 153, 0.1); }

/* Scanline effect on hover */
.service-card::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.4), transparent);
    transition: top 0.6s ease;
}
.service-card:hover::after {
    top: 100%;
}

.service-icon-wrap {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}
.service-card[data-accent="cyan"]:hover .service-icon-wrap { color: #00f0ff; }
.service-card[data-accent="purple"]:hover .service-icon-wrap { color: #a855f7; }
.service-card[data-accent="green"]:hover .service-icon-wrap { color: #22c55e; }
.service-card[data-accent="blue"]:hover .service-icon-wrap { color: #3b82f6; }
.service-card[data-accent="pink"]:hover .service-icon-wrap { color: #ec4899; }

a.service-card {
    text-decoration: none;
    color: inherit;
}

.tech-tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.agent-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.agent-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

/* ---------- Process ---------- */
.glow-cyan {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3), 0 0 40px rgba(0, 240, 255, 0.1);
}

.process-node {
    transition: all 0.3s ease;
}
.process-step:hover .process-node {
    transform: scale(1.1);
}

/* ---------- Agent Terminal ---------- */
.agent-terminal {
    background: rgba(10, 10, 15, 0.9);
}

.scanline-overlay {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 240, 255, 0.01) 2px,
        rgba(0, 240, 255, 0.01) 4px
    );
    pointer-events: none;
    z-index: 5;
}

.agent-entry {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    padding: 0.35rem 0;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInEntry 0.3s ease forwards;
}
@keyframes fadeInEntry {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.agent-entry .agent-id {
    color: #555566;
}
.agent-entry .agent-task {
    color: rgba(255, 255, 255, 0.6);
}
.agent-entry .status-done {
    color: #22c55e;
}
.agent-entry .status-progress {
    color: #00f0ff;
}

.dashboard-wrapper {
    transform: perspective(1000px) rotateY(-1deg);
    transition: transform 0.5s ease;
}
.dashboard-wrapper:hover {
    transform: perspective(1000px) rotateY(0deg);
}

/* ---------- Portfolio ---------- */
.portfolio-card {
    cursor: pointer;
}
.portfolio-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
.portfolio-card .portfolio-preview .absolute.inset-0.flex {
    background: rgba(10, 10, 15, 0.6);
}
.portfolio-card .portfolio-preview .absolute.inset-0.flex span {
    background: rgba(0, 240, 255, 0.25);
    border: 1px solid rgba(0, 240, 255, 0.6);
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 2rem;
    backdrop-filter: blur(8px);
}

/* ---------- Tech Badges ---------- */
.tech-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    animation: float-badge 6s ease-in-out infinite;
}
.tech-badge:nth-child(even) {
    animation-delay: -3s;
}
.tech-badge:nth-child(3n) {
    animation-delay: -1.5s;
}
.tech-badge:nth-child(5n) {
    animation-delay: -4.5s;
}

.tech-badge:hover {
    transform: scale(1.1) translateY(-4px);
}
.tech-badge[data-color="cyan"]:hover { border-color: rgba(0, 240, 255, 0.4); color: #00f0ff; box-shadow: 0 0 15px rgba(0, 240, 255, 0.15); }
.tech-badge[data-color="purple"]:hover { border-color: rgba(168, 85, 247, 0.4); color: #a855f7; box-shadow: 0 0 15px rgba(168, 85, 247, 0.15); }
.tech-badge[data-color="green"]:hover { border-color: rgba(34, 197, 94, 0.4); color: #22c55e; box-shadow: 0 0 15px rgba(34, 197, 94, 0.15); }
.tech-badge[data-color="blue"]:hover { border-color: rgba(59, 130, 246, 0.4); color: #3b82f6; box-shadow: 0 0 15px rgba(59, 130, 246, 0.15); }
.tech-badge[data-color="pink"]:hover { border-color: rgba(236, 72, 153, 0.4); color: #ec4899; box-shadow: 0 0 15px rgba(236, 72, 153, 0.15); }

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

/* ---------- Pricing ---------- */
.pricing-card-featured {
    transform: scale(1.02);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.1);
}
.pricing-card:hover {
    transform: translateY(-4px);
}
.pricing-card-featured:hover {
    transform: scale(1.02) translateY(-4px);
}

/* ---------- Contact Inputs ---------- */
.contact-input:focus {
    border-color: rgba(0, 240, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1);
}
.contact-input option {
    background: #111118;
    color: #f0f0f5;
}

/* ---------- WhatsApp Widget ---------- */
.whatsapp-menu.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

/* ---------- Cookie Consent ---------- */
#cookie-consent.show {
    transform: translateY(0);
}

/* ---------- Social Links ---------- */
.social-link:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

/* ---------- Animations ---------- */
/* GSAP handles initial opacity/transform via fromTo —
   no CSS opacity:0 to avoid invisible content if GSAP fails */

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal-up {
        opacity: 1;
        transform: none;
    }
    .tech-badge {
        animation: none;
    }
    .orbit-ring, .orbit-ring .orbit-icon {
        animation: none;
    }
    #particle-canvas {
        display: none;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .dashboard-wrapper {
        transform: none;
    }
    .dashboard-wrapper:hover {
        transform: none;
    }
    .pricing-card-featured {
        transform: none;
    }
    .pricing-card-featured:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 480px) {
    .orbit-container {
        width: 280px;
        height: 280px;
    }
}
