/*
Theme Name: BitByte Factory Theme
Theme URI: https://bitbytefactory.com
Author: BitByte Factory
Author URI: https://bitbytefactory.com
Description: Custom award-winning automation agency theme with 3D interactions and dark mode.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
    --primary: #00f2ea;
    --secondary: #ff0055;
    --bg-dark: #050507;
    --card-bg: rgba(255, 255, 255, 0.03);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: white;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #000;
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Link Underline Animation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Dynamic Background */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
}

/* Glassmorphism */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
}

.glass-card:hover {
    border-color: rgba(0, 242, 234, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(0, 242, 234, 0.05);
}

/* Disable hover effects for the onboarding form to improve typing experience */
#onboarding-form.glass-card:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.1);
}

#onboarding-form.glass-card:hover:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 242, 234, 0.1);
}

/* Neon Glow Text */
.text-glow {
    text-shadow: 0 0 10px rgba(0, 242, 234, 0.5);
}

.text-glow-purple {
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #00f2ea, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Button Effects */
.btn-glow {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
    z-index: -1;
}

.btn-glow:hover::before {
    left: 100%;
}

/* Magnetic Button Effect */
.magnetic-btn {
    display: inline-block;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Text Reveal Animation */
.reveal-text {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal-text.visible {
    transform: translateY(0);
    opacity: 1;
}

/* Loader for Form Submission */
.loader {
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 3px solid var(--primary);
    width: 24px;
    height: 24px;
    -webkit-animation: spin 1s linear infinite; /* Safari */
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

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

/* Hexagon Grid Background for specific sections */
.hex-bg {
    background-color: #000;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg id='hexagons' fill='%23111' fill-opacity='0.4' fill-rule='nonzero'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-7.5L27.99 34H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Cursor */
.cursor-dot,
.cursor-dot-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
}

.cursor-dot-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--primary);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Marquee Animation */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Page Transitions */
.page-transition {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Navbar Active State */
.nav-link.active {
    color: var(--primary);
}

/* WordPress Menu Styling Fixes */
.menu-item {
    position: relative; /* Context for the underline */
}

/* The animated underline for WP Menu items */
.menu-item a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.menu-item a:hover::after,
.menu-item.current-menu-item a::after {
    width: 100%;
}

/* Ensure mobile menu items don't have the underline behavior if not desired, or adjust padding */
#mobile-menu .menu-item a {
    display: block;
    width: 100%;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
#mobile-menu .menu-item a::after {
    display: none; /* Disable the animated underline in mobile to keep it clean */
}

/* Onboarding & Simulation Styles */
.phone-mockup {
    border: 12px solid #1a1a1a;
    border-radius: 40px;
    overflow: hidden;
    position: relative;
    background: #0b141a; /* WhatsApp Dark BG color approx */
    box-shadow: 0 0 50px rgba(0, 242, 234, 0.1);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
}

.phone-mockup:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.phone-header {
    background-color: #202c33;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    z-index: 10;
    position: relative;
}

.chat-area {
    height: 450px;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png'); /* WhatsApp Doodle bg pattern */
    background-blend-mode: overlay;
    background-color: #0b141a;
}

.chat-bubble {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 14px;
    position: relative;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    line-height: 1.4;
}

@keyframes popIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.chat-bubble.received {
    align-self: flex-start;
    background-color: #202c33;
    color: #e9edef;
    border-top-left-radius: 0;
}

.chat-bubble.sent {
    align-self: flex-end;
    background-color: #005c4b;
    color: #e9edef;
    border-top-right-radius: 0;
}

.chat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.option-btn {
    background: rgba(0, 242, 234, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn:hover {
    background: var(--primary);
    color: black;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    width: fit-content;
    background-color: #202c33;
    border-radius: 12px;
    border-top-left-radius: 0;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: #8696a0;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group input, 
.input-group select, 
.input-group textarea {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 1rem;
    border-radius: 0.5rem;
    color: white;
    outline: none;
    transition: all 0.3s;
}

.input-group input:focus, 
.input-group select:focus, 
.input-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 242, 234, 0.2);
    background: #000; /* Solid black background for clear visibility */
    color: var(--primary);
    transform: scale(1.02);
}

.input-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: #9ca3af;
    pointer-events: none;
    transition: all 0.3s;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group select:valid ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:not(:placeholder-shown) ~ label {
    top: -0.5rem;
    left: 0.8rem;
    font-size: 0.75rem;
    background: #000;
    padding: 0 0.25rem;
    color: var(--primary);
}
