/* CSS Variables for elegant UI */
:root {
    --primary: #f83a3a;
    --primary-dark: #d62d2d;
    --secondary: #1e293b;
    --text-main: #1f2937;
    /* Darkened from #334155 for better readability on white */
    --text-light: #4b5563;
    /* Darkened from #64748b to ensure AAA compliance against #fff and #f8fafc */
    --bg-main: #ffffff;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 12px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-main);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--secondary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.highlight {
    color: var(--primary);
}

.section {
    padding: 5rem 0;
}

.bg-light {
    background-color: var(--bg-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(248, 58, 58, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(248, 58, 58, 0.23);
}

.btn-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, #ff6b6b 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(248, 58, 58, 0.4);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(248, 58, 58, 0.5);
}

.btn-outline-white {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    backdrop-filter: blur(5px);
}

.btn-outline-white:hover {
    background-color: var(--white);
    color: var(--secondary);
}

.btn-white {
    background-color: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Header & Nav */
.header {
    background-color: var(--secondary);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.25rem 0;
    transition: var(--transition);
    min-height: 80px;
    /* Fix CLS: Reserve header space */
}

.navbar.scrolled {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--white);
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--primary);
    margin-right: 0.25rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}

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

.nav-links a:hover {
    color: var(--white);
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--white);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 10rem 0 8rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(248, 58, 58, 0.15), transparent 40%),
        radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.05), transparent 40%);
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(248, 58, 58, 0.15);
    color: #ff8a8a;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(248, 58, 58, 0.3);
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.95);
    /* Better contrast against the hero image gradients */
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.features-mini {
    display: flex;
    gap: 2rem;
    color: rgba(255, 255, 255, 0.95);
    /* Increased text contrast */
    font-size: 0.9rem;
}

.features-mini span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.features-mini svg {
    color: var(--primary);
}

.hero-image-wrapper {
    position: relative;
    z-index: 2;
}

.hero-image-wrapper::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top right, var(--primary), transparent);
    top: -20px;
    right: -20px;
    border-radius: 20px;
    z-index: -1;
    opacity: 0.3;
}

.hero-img {
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
}

.hero-img:hover {
    transform: perspective(1000px) rotateY(0deg) translateY(-10px);
}

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

@keyframes floating {
    0% {
        transform: translateY(0px) rotate(-5deg);
        /* Match starting transform to prevent harsh initial shift */
    }

    50% {
        transform: translateY(-15px) rotate(-5deg);
    }

    100% {
        transform: translateY(0px) rotate(-5deg);
    }
}

.wave-bottom {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
}

.wave-bottom svg {
    display: block;
    width: calc(100% + 1.3px);
    height: 70px;
}

/* Section Title */
.section-title {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--primary);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
    height: 100%;
}

.service-icon {
    width: 70px;
    height: 70px;
    background: rgba(248, 58, 58, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.1);
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* About Section */
.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-content h2 {
    font-size: 2.5rem;
}

.about-content p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.about-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
}

.check-list {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.check-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.check-list svg {
    color: var(--primary);
    width: 20px;
    height: 20px;
}

.image-stack {
    position: relative;
    padding-right: 2rem;
    padding-bottom: 2rem;
}

.img-front {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
}

.experience-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--primary);
    color: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(248, 58, 58, 0.4);
    z-index: 3;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 140px;
    height: 140px;
    border: 4px solid var(--white);
}

.experience-badge .number {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.experience-badge .text {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--secondary) 0%, #0f172a 100%);
    color: var(--white);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(248, 58, 58, 0.2);
    filter: blur(100px);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.text-center {
    text-align: center;
    position: relative;
    z-index: 2;
}

.cta-section h2 {
    color: var(--white);
    font-size: 3rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.floating-tire {
    position: absolute;
    bottom: -50px;
    left: 10%;
    width: 150px;
    height: 150px;
    background-image: radial-gradient(circle, transparent 30%, rgba(255, 255, 255, 0.05) 30%, rgba(255, 255, 255, 0.05) 70%, transparent 70%);
    border-radius: 50%;
    border: 20px solid rgba(255, 255, 255, 0.05);
    z-index: 1;
    animation: rotateTire 10s linear infinite;
}

@keyframes rotateTire {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Footer */
.footer {
    background-color: #0f172a;
    color: #f1f5f9;
    /* Changed to solid slate-100 for guaranteed AAA contrast */
    padding: 5rem 0 0;
}

.logo-footer {
    display: inline-block;
    margin-bottom: 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-col h3 {
    color: #ffffff;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #f83a3a;
    /* Using solid primary color instead of CSS variable to be entirely safe */
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.contact-info p {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-info svg {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 3px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: var(--white);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 0;
}

.pb-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.seo-text-footer {
    font-size: 0.85rem;
    color: #e2e8f0;
    /* Solid slate-200 color instead of rgba transparency */
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3rem;
    }

    .hero-content,
    .about-wrapper {
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {

    .nav-links,
    .cta-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        padding: 8rem 0 5rem;
        text-align: center;
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        margin: 0 auto 2rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .features-mini {
        justify-content: center;
    }

    .about-wrapper {
        grid-template-columns: 1fr;
    }

    .image-stack {
        margin-top: 2rem;
        padding-right: 0;
        padding-bottom: 0;
    }

    .experience-badge {
        top: -20px;
        right: 20px;
        bottom: auto;
        width: 100px;
        height: 100px;
    }

    .experience-badge .number {
        font-size: 1.8rem;
    }

    .cta-section h2 {
        font-size: 2.2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .pb-flex {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* Mobile Menu Active State */
.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--secondary);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}