/* ═══════════════════════════════════════════════════════════════
   RAC CONSULTING GROUP — Professional Stylesheet
   Fonts: Plus Jakarta Sans (headings) + DM Sans (body)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Base ─────────────────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'DM Sans', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dark body {
    background-color: #0f172a;
}

::selection {
    background-color: rgba(51, 117, 255, 0.2);
    color: inherit;
}

/* ─── Typography ───────────────────────────────────────────── */
.font-heading {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.font-body {
    font-family: 'DM Sans', sans-serif;
}

/* ─── Transitions ──────────────────────────────────────────── */
nav, .mobile-menu, .card-hover, .testimonial-card, #contactForm, footer {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ─── Hero Section ─────────────────────────────────────────── */
.hero-section {
    background:
        linear-gradient(135deg,
            #0c1d4d 0%,
            #1a3a8a 25%,
            #2563eb 50%,
            #0891b2 80%,
            #06b6d4 100%);
    position: relative;
}

.hero-grid-overlay {
    position: absolute;
    inset: 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;
}

.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-particles::before,
.hero-particles::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
}

.hero-particles::before {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -100px;
    animation: float-particle 8s ease-in-out infinite;
}

.hero-particles::after {
    width: 400px;
    height: 400px;
    bottom: -100px;
    left: -50px;
    animation: float-particle 10s ease-in-out infinite reverse;
}

@keyframes float-particle {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -20px) scale(1.1); }
}

/* ─── Gradient Utilities ───────────────────────────────────── */
.gradient-bg {
    background: linear-gradient(135deg, #1a3a8a 0%, #2563eb 50%, #06b6d4 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #1a3a8a 0%, #3375ff 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Buttons ──────────────────────────────────────────────── */
.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.btn-ticket {
    background: linear-gradient(135deg, #f97316 0%, #eab308 100%);
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-ticket:hover {
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.35);
    transform: translateY(-1px);
}

.btn-loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

/* ─── Cards ────────────────────────────────────────────────── */
.card-hover {
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-hover:hover {
    transform: translateY(-6px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(37, 99, 235, 0.08);
}

.dark .card-hover:hover {
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(37, 99, 235, 0.15);
}

/* ─── Navigation ───────────────────────────────────────────── */
.nav-link {
    position: relative;
    letter-spacing: 0.05em;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 1px;
}

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

/* ─── Animations ───────────────────────────────────────────── */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out both;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out both;
}

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

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

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

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

/* ─── Mobile Menu ──────────────────────────────────────────── */
.mobile-menu {
    transform: translateX(110%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-menu.active {
    transform: translateX(0);
}

/* ─── Service Icons ────────────────────────────────────────── */
.service-icon {
    background: linear-gradient(135deg, #1a3a8a 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* ─── Contact Form ─────────────────────────────────────────── */
.contact-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-input:focus {
    border-color: #3375ff;
    box-shadow: 0 0 0 3px rgba(51, 117, 255, 0.12);
}

.contact-input.invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ─── Logo ─────────────────────────────────────────────────── */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 56px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo-container:hover .logo-img {
    transform: scale(1.03);
}

.logo-img-mobile {
    height: 36px;
    width: auto;
    object-fit: contain;
}

/* ─── Logo Footer ──────────────────────────────────────────── */
.logo-footer {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-footer-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-footer-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ─── Social Icons ─────────────────────────────────────────── */
.social-icon {
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.social-icon:hover {
    transform: translateY(-3px);
}

/* ─── Dark Mode Toggle ─────────────────────────────────────── */
.theme-toggle {
    position: relative;
    width: 56px;
    height: 28px;
    background: #e5e7eb;
    border-radius: 28px;
    cursor: pointer;
    transition: background 0.3s ease;
    border: none;
    padding: 0;
    flex-shrink: 0;
}

.theme-toggle-sm {
    width: 48px;
    height: 24px;
}

.dark .theme-toggle {
    background: #374151;
}

.theme-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.theme-toggle-sm .theme-toggle-slider {
    width: 18px;
    height: 18px;
}

.dark .theme-toggle-slider {
    transform: translateX(28px);
    background: #3375ff;
}

.dark .theme-toggle-sm .theme-toggle-slider {
    transform: translateX(24px);
}

.theme-toggle-icon {
    width: 12px;
    height: 12px;
}

.theme-toggle-sm .theme-toggle-icon {
    width: 10px;
    height: 10px;
}

/* Show/hide sun and moon icons */
.sun-icon {
    display: block;
    color: #f59e0b;
}

.moon-icon {
    display: none;
    color: #fff;
}

.dark .sun-icon {
    display: none;
}

.dark .moon-icon {
    display: block;
}

/* ─── Counter Animation ────────────────────────────────────── */
.counter {
    font-variant-numeric: tabular-nums;
}

/* ─── Scroll Reveal ────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Focus Styles (Accessibility) ─────────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #3375ff;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ─── 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;
    }

    .floating {
        animation: none;
    }

    .hero-particles::before,
    .hero-particles::after {
        animation: none;
    }
}

/* ─── Print Styles ─────────────────────────────────────────── */
@media print {
    nav, .mobile-menu, #backToTop, .theme-toggle, .social-icon,
    .hero-particles, .hero-grid-overlay {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    a {
        color: black !important;
        text-decoration: underline;
    }
}
