/* ============================================
   Roscoe Optometric Eye Clinic — Custom Styles
   ============================================ */

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* --- Geometric Hero Shapes --- */
.geo-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.geo-circle-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.15) 0%, transparent 70%);
    top: -150px;
    right: -100px;
    animation: float-slow 20s ease-in-out infinite;
}

.geo-circle-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
    bottom: -100px;
    left: -80px;
    animation: float-slow 15s ease-in-out infinite reverse;
}

.geo-circle-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(110, 231, 183, 0.1) 0%, transparent 70%);
    top: 40%;
    left: 10%;
    animation: float-slow 12s ease-in-out infinite;
}

.geo-square {
    position: absolute;
    pointer-events: none;
}

.geo-square-1 {
    width: 80px;
    height: 80px;
    background: rgba(52, 211, 153, 0.08);
    border: 2px solid rgba(52, 211, 153, 0.15);
    top: 20%;
    right: 15%;
    transform: rotate(45deg);
    animation: spin-slow 30s linear infinite;
}

.geo-square-2 {
    width: 50px;
    height: 50px;
    background: rgba(110, 231, 183, 0.06);
    border: 2px solid rgba(110, 231, 183, 0.12);
    bottom: 25%;
    right: 25%;
    transform: rotate(20deg);
    animation: spin-slow 25s linear infinite reverse;
}

.geo-dots {
    position: absolute;
    width: 200px;
    height: 200px;
    top: 30%;
    left: 5%;
    background-image: radial-gradient(circle, rgba(52, 211, 153, 0.3) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
    animation: float-slow 18s ease-in-out infinite;
}

/* --- Animations --- */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(2deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

@keyframes spin-slow {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

/* --- Navbar Scroll State --- */
#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .font-display {
    color: #0f1f19 !important;
}

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

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #059669, #34d399);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::after {
    transform: scaleX(1);
}

/* --- Frame Cards --- */
.frame-card {
    position: relative;
    cursor: pointer;
}

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

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 80px;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    line-height: 1;
    color: rgba(5, 150, 105, 0.08);
    pointer-events: none;
}

.testimonial-card.bg-emerald-800::before {
    color: rgba(255, 255, 255, 0.06);
}

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

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

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

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .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; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* --- Focus Styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 640px) {
    .geo-circle-1 {
        width: 300px;
        height: 300px;
    }
    .geo-circle-2 {
        width: 200px;
        height: 200px;
    }
    .geo-square-1 {
        width: 40px;
        height: 40px;
    }
    .geo-square-2 {
        width: 25px;
        height: 25px;
    }
}
