/* ==========================================
   Rubina Ahmed Md — Custom Styles
   Clean Minimalist Medical Practice
   ========================================== */

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

body {
    letter-spacing: 0.01em;
}

::selection {
    background-color: rgba(212, 154, 15, 0.15);
    color: #102a43;
}

/* --- Form Inputs --- */
.form-input {
    border-radius: 0;
    font-family: 'Inter', system-ui, sans-serif;
}

.form-input:focus {
    border-color: #d49a0f;
    box-shadow: 0 0 0 1px #d49a0f;
}

.form-input::placeholder {
    color: #bcccdc;
}

/* --- Navbar --- */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(16, 42, 67, 0.06);
}

.navbar-scrolled .nav-text {
    color: #102a43;
}

.navbar-scrolled .nav-subtext {
    color: #627d98;
}

.navbar-scrolled .nav-link {
    color: #486081;
}

.navbar-scrolled .nav-link:hover {
    color: #102a43;
}

.navbar-scrolled .nav-btn span {
    background-color: #102a43;
}

.navbar-scrolled #logo-icon {
    border-color: #102a43;
    color: #102a43;
}

/* --- Hero Animations --- */
.hero-tagline {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-headline {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.hero-desc {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.hero-cta {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

.hero-trust {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 1s;
    opacity: 0;
}

.hero-image {
    animation: imageReveal 1.2s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
    transform: scale(1.05);
}

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

@keyframes imageReveal {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Section Animations (below fold) --- */
.section-tag,
.section-title,
.section-line,
.service-card,
.about-image,
.contact-item,
.form-group,
#form-success {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-tag.visible,
.section-title.visible,
.section-line.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

.about-image.visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.15s;
}

.contact-item {
    transition-delay: 0.1s;
}

.contact-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.form-group {
    transition-delay: 0.05s;
}

.form-group.visible {
    opacity: 1;
    transform: translateY(0);
}

#form-success.visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

/* --- Back to Top --- */
.back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    transform: translateY(-2px);
}

/* --- Mobile Menu --- */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: no-preference) {
    .hero-tagline,
    .hero-headline,
    .hero-desc,
    .hero-cta,
    .hero-trust,
    .hero-image {
        animation-fill-mode: both;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .hero-tagline,
    .hero-headline,
    .hero-desc,
    .hero-cta,
    .hero-trust,
    .hero-image,
    .section-tag,
    .section-title,
    .section-line,
    .service-card,
    .about-image,
    .contact-item,
    .form-group,
    #form-success {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .mobile-link {
        opacity: 1;
        transform: none;
    }
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .hero-headline {
        font-size: 2.75rem;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
    
    .service-card {
        border-left: none !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-headline {
        font-size: 3.5rem;
    }
}
