/* ============================================
   EPITOME HOMECARE ASSISTANCE — 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(176, 141, 126, 0.3);
    color: #3a2b24;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f5f3ef;
}
::-webkit-scrollbar-thumb {
    background: #c4a69a;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #967263;
}

/* Brand accent line utility */
.brand-line {
    height: 1px;
    background: linear-gradient(90deg, #c4a69a, transparent);
}

/* ============================================
   NAVBAR
   ============================================ */
#navbar {
    background: transparent;
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background: rgba(250, 249, 247, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(196, 166, 154, 0.2);
}

#navbar.scrolled .text-current {
    color: #3a2b24 !important;
}

/* Mobile Menu */
#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle.active .menu-line:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-toggle.active .menu-line:last-child {
    transform: rotate(-45deg) translate(2px, -2px);
    opacity: 0;
}

/* ============================================
   HERO ANIMATIONS
   ============================================ */
.hero-elem {
    opacity: 1;
    transform: translateY(0);
    animation: heroFadeUp 0.8s ease forwards;
}

.hero-elem:nth-child(1) { animation-delay: 0.1s; }
.hero-elem:nth-child(2) { animation-delay: 0.3s; }
.hero-elem:nth-child(3) { animation-delay: 0.5s; }
.hero-elem:nth-child(4) { animation-delay: 0.7s; }

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

/* ============================================
   SERVICE CARDS
   ============================================ */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c4a69a, transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* ============================================
   CARE AREA ITEMS
   ============================================ */
.care-area-item {
    position: relative;
    cursor: default;
}

.care-area-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #c4a69a;
    transition: width 0.4s ease;
}

.care-area-item:hover::after {
    width: 60%;
}

/* ============================================
   TESTIMONIAL CARDS
   ============================================ */
.testimonial-card {
    position: relative;
}

.testimonial-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: linear-gradient(to top, rgba(176, 141, 126, 0.05), transparent);
    transition: height 0.5s ease;
}

.testimonial-card:hover::after {
    height: 100%;
}

/* ============================================
   SCROLL REVEAL (below the fold only)
   Progressive enhancement — content is visible
   by default; JS adds the animated state.
   ============================================ */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    .hero-elem {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   FORM STYLES
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    border-color: #b08d7e !important;
    box-shadow: 0 0 0 1px #b08d7e;
}

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='%23b08d7e' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .hero-elem {
        animation-duration: 0.6s;
    }
}
