/**
 * TWJ - Technical Solutions Website
 * Main Stylesheet
 * Version: 1.2 - Chill Multi-Color Theme
 */

/* ==========================================================================
   CSS Variables & Root Styles
   ========================================================================== */

:root {
    /* Primary Palette - Sky Blue & Teal */
    --color-primary: #0369a1;
    /* Sky Blue (Deep) */
    --color-primary-light: #0284c7;
    /* Light Sky */
    --color-primary-dark: #075985;
    /* Dark Sky */
    --color-secondary: #0d9488;
    /* Teal (Deep) */
    --color-secondary-light: #14b8a6;
    --color-secondary-dark: #0f766e;

    /* Accent Colors */
    --color-accent-emerald: #34d399;
    --color-accent-amber: #fbbf24;
    --color-accent-rose: #fb7185;
    --color-accent-purple: #a78bfa;

    /* Backgrounds */
    --color-bg-dark: #09090b;
    /* Deep Black */
    --color-bg-medium: #18181b;
    /* Dark Gray */
    --color-bg-light: #1f1f22;
    /* Medium Gray */

    /* Text */
    --color-text-primary: #e4e4e7;
    /* Light Gray */
    --color-text-secondary: #a1a1aa;
    /* Silver */
    --color-border: #27272a;
    /* Border Gray */

    --font-primary: 'IBM Plex Sans Arabic', sans-serif;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

body {
    background-color: var(--color-bg-dark);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    overflow-x: hidden;
}

/* ==========================================================================
   Custom Scrollbar
   ========================================================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-dark);
}

::-webkit-scrollbar-thumb {
    background: #3f3f46;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #3f3f46 var(--color-bg-dark);
}

/* ==========================================================================
   Selection Styles - Sky Blue
   ========================================================================== */

::selection {
    background-color: rgba(3, 105, 161, 0.4);
    color: #ffffff;
}

::-moz-selection {
    background-color: rgba(3, 105, 161, 0.4);
    color: #ffffff;
}

/* ==========================================================================
   Background Effects
   ========================================================================== */

/* Grid Background Pattern */
.grid-bg {
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

/* Perspective Floor Grid Effect - Sky/Teal */
.perspective-grid {
    background-image:
        linear-gradient(to right, rgba(3, 105, 161, 0.15) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(13, 148, 136, 0.15) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: perspective(500px) rotateX(60deg);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
}

/* Hero Background Image */
.hero-bg-image {
    position: absolute;
    inset: 0;
    background-image: url('../images/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.25;
    z-index: 0;
}

.hero-bg-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(9, 9, 11, 0.7) 0%,
            rgba(9, 9, 11, 0.5) 50%,
            rgba(9, 9, 11, 0.9) 100%);
}

/* Service Card Image */
.service-card-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    border-radius: inherit;
}

.service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    transition: opacity 0.5s ease, transform 0.7s ease;
    transform: scale(1);
}

.group:hover .service-card-image img {
    opacity: 0.45;
    transform: scale(1.05);
}

.service-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(24, 24, 27, 0.85) 0%,
            rgba(24, 24, 27, 0.7) 50%,
            rgba(24, 24, 27, 0.85) 100%);
    z-index: 1;
}

/* ==========================================================================
   Glow & Shadow Effects
   ========================================================================== */

.box-shadow-glow {
    box-shadow: 0 0 20px rgba(3, 105, 161, 0.5);
}

.glow-sky {
    box-shadow: 0 0 30px rgba(3, 105, 161, 0.4);
}

.glow-sky:hover {
    box-shadow: 0 0 50px rgba(3, 105, 161, 0.6);
}

.glow-teal {
    box-shadow: 0 0 30px rgba(13, 148, 136, 0.4);
}

.glow-teal:hover {
    box-shadow: 0 0 50px rgba(13, 148, 136, 0.6);
}

/* ==========================================================================
   Text Utilities
   ========================================================================== */

/* Hero Headline Line Height */
#hero h1 {
    line-height: 1.4;
}

.text-stretch {
    transform: scaleY(0.9);
}

.stretched-text span {
    display: inline-block;
    width: 100%;
    text-align: center;
}

/* Text Gradient - Multi Color */
.text-gradient-primary {
    background: linear-gradient(to right, #0369a1, #0d9488, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   Animation Keyframes
   ========================================================================== */

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(50%);
    }
}

@keyframes pulse-slow {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================================================
   Animation Classes
   ========================================================================== */

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-marquee {
    animation: marquee 25s linear infinite;
}

.animate-pulse-slow {
    animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-fade-in-up {
    animation: fade-in-up 0.6s ease-out forwards;
}

.animate-scale-in {
    animation: scale-in 0.4s ease-out forwards;
}

/* ==========================================================================
   Card Styles
   ========================================================================== */

.card-hover {
    transition: all 0.5s ease;
}

.card-hover:hover {
    transform: translateY(-12px);
}

/* Service Card Colors */
.service-card-sky {
    --card-color: #0369a1;
}

.service-card-teal {
    --card-color: #0d9488;
}

.service-card-emerald {
    --card-color: #34d399;
}

.service-card-amber {
    --card-color: #fbbf24;
}

.service-card-rose {
    --card-color: #fb7185;
}

.service-card-purple {
    --card-color: #a78bfa;
}

/* ==========================================================================
   Form Styles
   ========================================================================== */

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

input::placeholder,
textarea::placeholder {
    color: #71717a;
}

/* ==========================================================================
   Button Styles - Gradient Theme
   ========================================================================== */

.btn-primary {
    background: linear-gradient(to right, #0369a1, #0d9488);
    color: white;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(3, 105, 161, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(to right, #075985, #0f766e);
    box-shadow: 0 0 50px rgba(3, 105, 161, 0.6);
}

.btn-secondary {
    border: 1px solid #3f3f46;
    color: white;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: rgba(3, 105, 161, 0.6);
    background-color: rgba(3, 105, 161, 0.1);
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */

@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    body {
        background: white;
        color: black;
    }

    .no-print {
        display: none !important;
    }
}

/* ==========================================================================
   Scroll Reveal Animations
   ========================================================================== */

/* Initial hidden state */
.reveal-element {
    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);
}

/* Revealed state */
.reveal-element.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stats number animation */
.text-stretch {
    transition: transform 0.5s ease, color 0.3s ease;
}

.stats-animated {
    animation: countUp 0.8s ease-out forwards;
}

@keyframes countUp {
    0% {
        opacity: 0;
        transform: scaleY(0.9) translateY(20px);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 1;
        transform: scaleY(0.9) translateY(0);
    }
}

/* Service cards reveal with scale */
#services .grid>div {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

#services .grid>div.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Methodology steps slide in from right */
.space-y-8>div {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.space-y-8>div.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Section headers with fade */
section h2.revealed,
section h3.revealed {
    animation: fadeInDown 0.8s ease forwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form slide up */
form.reveal-element {
    opacity: 0;
    transform: translateY(50px);
}

form.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Parallax-like floating elements */
.animate-float {
    will-change: transform;
}

/* Smooth hover transitions for all interactive elements */
button,
a,
.group {
    transition: all 0.3s ease;
}

/* Glowing orbs pulse animation */
.animate-pulse-slow {
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(1.1);
    }
}