/* ============================================
   Rabel Properties — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(161, 23, 54, 0.15);
    color: #6c1329;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #fefdfb;
}
::-webkit-scrollbar-thumb {
    background: #fce7eb;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #f5a8b8;
}

/* --- Navbar --- */
#navbar {
    transition: background-color 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(161, 23, 54, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #a11736;
    transition: width 0.3s ease;
}

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

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

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

.mobile-link {
    display: block;
    padding: 8px 0;
}

/* --- Hero Section --- */
#hero {
    position: relative;
}

/* --- Service Cards --- */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid transparent;
    border-radius: inherit;
    transition: border-color 0.5s ease;
    pointer-events: none;
}

.service-card:hover::before {
    border-color: rgba(161, 23, 54, 0.2);
}

/* --- Testimonial Cards --- */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 8rem;
    color: rgba(161, 23, 54, 0.06);
    line-height: 1;
    pointer-events: none;
}

/* --- Form Inputs --- */
input:focus,
textarea:focus,
select:focus {
    border-bottom-color: #a11736 !important;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    appearance: none;
    -webkit-appearance: none;
}

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal[data-reveal-delay="1"] { transition-delay: 0.1s; }
.reveal[data-reveal-delay="2"] { transition-delay: 0.2s; }
.reveal[data-reveal-delay="3"] { transition-delay: 0.3s; }
.reveal[data-reveal-delay="4"] { transition-delay: 0.4s; }
.reveal[data-reveal-delay="5"] { transition-delay: 0.5s; }
.reveal[data-reveal-delay="6"] { transition-delay: 0.6s; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal[data-reveal] {
        opacity: 1;
        transform: none;
    }
    .service-card,
    .testimonial-card,
    .overflow-hidden img {
        transition: none;
    }
    .overflow-hidden img:hover {
        transform: none;
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
}

/* --- Fade-in for hero stat cards (progressive enhancement) --- */
.stat-card {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .stat-card {
        animation: floatCard 6s ease-in-out infinite;
    }
    .stat-card:nth-child(1) { animation-delay: 0s; }
    .stat-card:nth-child(2) { animation-delay: -1.5s; }
    .stat-card:nth-child(3) { animation-delay: -3s; }
    .stat-card:nth-child(4) { animation-delay: -4.5s; }
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0px) rotate(var(--rotation, 0deg)); }
    50% { transform: translateY(-8px) rotate(var(--rotation, 0deg)); }
}
