/* ============================================
   Jones Roland P. MD — Custom Styles
   Charcoal + Coral | Clean Minimalist
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #f45c1e;
    color: #ffffff;
}

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

::-webkit-scrollbar-track {
    background: #f7f7f7;
}

::-webkit-scrollbar-thumb {
    background: #d1d1d1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

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

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

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

/* --- Mobile Menu --- */
.mobile-menu-line {
    transition: all 0.3s ease;
}

.mobile-menu-open .mobile-menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

.mobile-menu-open .mobile-menu-line:nth-child(2) {
    opacity: 0;
}

/* --- Reveal Animations --- */
.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: 1;
    transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal.animated {
        opacity: 1;
        transform: translateY(0);
    }
}

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

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #ffffff, transparent);
    pointer-events: none;
}

/* --- Services Grid --- */
#services .grid > div {
    position: relative;
    overflow: hidden;
}

#services .grid > div::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(244, 92, 30, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

#services .grid > div:hover::before {
    opacity: 1;
}

/* --- Patient Info Cards --- */
#patient-info .grid > div {
    position: relative;
    overflow: hidden;
}

#patient-info .grid > div::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #f45c1e;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

#patient-info .grid > div:hover::after {
    transform: scaleX(1);
}

/* --- Form Inputs --- */
input:focus,
textarea:focus {
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: #d1d1d1;
}

/* --- Back to Top --- */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

#back-to-top:not(.visible) {
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
}

#back-to-top:hover {
    background-color: #f45c1e;
}

/* --- Responsive --- */
@media (max-width: 767px) {
    #hero::after {
        height: 60px;
    }
    
    .font-serif {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}

/* --- Print --- */
@media print {
    nav, #back-to-top, button {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    section {
        page-break-inside: avoid;
    }
}
