/* ============================================
   Catered Carpet Care & Upholstery
   Custom Styles & Animations
   ============================================ */

/* --- Custom Properties --- */
:root {
    --burgundy-50: #fdf2f4;
    --burgundy-100: #fce7eb;
    --burgundy-600: #b82245;
    --burgundy-700: #961633;
    --burgundy-800: #7d162f;
    --burgundy-900: #6b162d;
    --burgundy-950: #3b0613;
    --blush-300: #ffc2d3;
    --blush-400: #ffa3b8;
    --cream: #FFFAF5;
}

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--cream);
}

/* --- Glassmorphism Navbar --- */
.nav-glass {
    background: rgba(255, 250, 245, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(107, 22, 45, 0.08);
}

.nav-glass.scrolled {
    background: rgba(255, 250, 245, 0.95);
    box-shadow: 0 4px 30px rgba(107, 22, 45, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--burgundy-600), var(--blush-400));
    transition: width 0.3s ease;
    border-radius: 1px;
}

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

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, var(--burgundy-700), var(--burgundy-600));
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(150, 22, 51, 0.3);
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(150, 22, 51, 0.4);
    background: linear-gradient(135deg, var(--burgundy-800), var(--burgundy-700));
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 16px;
}

/* --- Blobs --- */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.blob-burgundy {
    background: var(--burgundy-600);
}

.blob-blush {
    background: var(--blush-400);
}

.mid-right {
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
}

/* --- Geometric Shapes --- */
.geo-shape {
    position: absolute;
    pointer-events: none;
}

.geo-circle-1 {
    top: 10%;
    right: 5%;
    width: 300px;
    height: 300px;
    border: 3px solid var(--burgundy-100);
    border-radius: 50%;
    opacity: 0.5;
}

.geo-square-1 {
    top: 20%;
    left: 3%;
    width: 120px;
    height: 120px;
    background: var(--blush-200);
    opacity: 0.4;
    transform: rotate(45deg);
    border-radius: 16px;
}

.geo-triangle-1 {
    bottom: 15%;
    right: 8%;
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid var(--burgundy-200);
    opacity: 0.3;
    transform: rotate(-15deg);
}

/* --- Service Cards --- */
.service-card {
    perspective: 1000px;
}

.service-card:hover .service-card-inner {
    transform: translateY(-4px);
}

/* --- Scroll Reveal --- */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    }

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

/* --- Mobile Menu --- */
.mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--burgundy-600), var(--blush-400));
    transition: width 0.3s ease;
}

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

/* --- Mobile Menu Active State --- */
.mobile-menu.open {
    display: block;
}

.mobile-menu.hidden {
    display: none;
}

/* --- Input Focus Styles --- */
input:focus,
select:focus,
textarea:focus {
    border-color: var(--burgundy-500) !important;
    box-shadow: 0 0 0 4px rgba(184, 34, 69, 0.1) !important;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--cream);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--burgundy-300), var(--burgundy-500));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--burgundy-400), var(--burgundy-600));
}

/* --- Selection --- */
::selection {
    background: var(--burgundy-200);
    color: var(--burgundy-900);
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }

    .geo-circle-1,
    .geo-square-1,
    .geo-triangle-1 {
        display: none;
    }
}

/* --- Print Styles --- */
@media print {
    .nav-glass,
    .scroll-reveal,
    .blob,
    .geo-shape {
        display: none !important;
    }

    body {
        background: white !important;
    }

    .btn-primary,
    .btn-secondary {
        background: var(--burgundy-700) !important;
        color: white !important;
    }
}

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

    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}
