/* ===== Custom Styles for Intense Customs ===== */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    background-color: #080810;
    color: #ffffff;
}

/* Selection */
::selection {
    background: rgba(193, 24, 68, 0.4);
    color: #fce7eb;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f0f1a;
}
::-webkit-scrollbar-thumb {
    background: #7f1030;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9e1135;
}

/* ===== Hero Geometric Animations ===== */
@keyframes float-1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}
@keyframes float-2 {
    0%, 100% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(-15px) rotate(50deg); }
}
@keyframes float-3 {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
}
@keyframes float-4 {
    0%, 100% { transform: translateY(0) rotate(-12deg); }
    50% { transform: translateY(-12px) rotate(-8deg); }
}

.hero-geo {
    animation-duration: 6s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}
.geo-1 { animation-name: float-1; }
.geo-2 { animation-name: float-2; }
.geo-3 { animation-name: float-3; animation-duration: 8s; }
.geo-4 { animation-name: float-4; animation-duration: 7s; }

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered delays for service cards */
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* ===== Navbar ===== */
#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}
#navbar.scrolled {
    background: rgba(8, 8, 16, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== Mobile Menu ===== */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}
#mobileMenu.open .mobile-link {
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}
#mobileMenu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hamburger animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
body.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
body.menu-open .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
body.menu-open .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Service Cards ===== */
.service-card {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .service-card {
        opacity: 0;
        transform: translateY(20px);
    }
    .service-card.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Button focus styles ===== */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid #f87171;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Utility ===== */
.glow-text {
    text-shadow: 0 0 40px rgba(248, 113, 113, 0.3);
}

/* ===== Responsive adjustments ===== */
@media (max-width: 640px) {
    .font-heading {
        letter-spacing: -0.02em;
    }
}

@media (min-width: 1024px) {
    .service-card:hover {
        border-color: rgba(248, 113, 113, 0.3) !important;
        box-shadow: 0 20px 60px rgba(127, 16, 48, 0.15);
    }
}
