/* =============================================
   Samuel Wisco Ong — Medical & Health
   Clean Minimalist · Burgundy + Blush
   ============================================= */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: #7B2D3B;
    color: #faf8f7;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f5f0ec;
}
::-webkit-scrollbar-thumb {
    background: #d89298;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7B2D3B;
}

/* ---- Animations ---- */
@keyframes scroll {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

.animate-scroll {
    animation: scroll 1.5s ease-in-out infinite;
}

/* ---- Scroll Reveal (progressive enhancement) ---- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .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; }
}

/* ---- Navbar ---- */
.nav-link {
    position: relative;
}

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

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

/* ---- Mobile Menu ---- */
.menu-line {
    display: block;
}

#mobile-menu.open {
    transform: translateX(0);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 24px;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: #7B2D3B;
    transition: height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* ---- Approach Cards ---- */
.approach-card {
    position: relative;
}

.approach-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    transition: width 0.5s ease;
}

.approach-card:hover::after {
    width: 80%;
}

/* ---- Form Inputs ---- */
input:focus,
textarea:focus {
    border-color: #7B2D3B !important;
}

input:focus + label,
textarea:focus + label {
    color: #7B2D3B;
}

/* ---- Button Hover Effects ---- */
button[type="submit"],
a[href="#contact"] {
    position: relative;
    overflow: hidden;
}

button[type="submit"]::after,
a[href="#contact"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

button[type="submit"]:hover::after,
a[href="#contact"]:hover::after {
    width: 300px;
    height: 300px;
}

/* ---- Image Hover ---- */
img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---- Focus Styles (Accessibility) ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.1;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .lg\:sticky {
        position: sticky;
    }
}
