/* ============================================
   Binkley James M DDS — Premium Dental Website
   Color Palette: Deep Emerald + Cream + Gold
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(212, 168, 83, 0.3);
    color: #FBF9F4;
}

/* ---- Grain Overlay ---- */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px 128px;
}

/* ---- Navigation ---- */
.nav {
    background: rgba(7, 26, 18, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(16, 185, 129, 0.08);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav.scrolled {
    background: rgba(7, 26, 18, 0.95);
    border-bottom-color: rgba(212, 168, 83, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-logo-icon {
    flex-shrink: 0;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #D4A853, #B8860B);
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: #D4A853 !important;
}

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

.mobile-menu-btn:active {
    transform: scale(0.9);
}

.mobile-menu {
    background: rgba(7, 26, 18, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(212, 168, 83, 0.1);
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

/* ---- Gold Button ---- */
.gold-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #D4A853 0%, #B8860B 100%);
    color: #071A12;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(212, 168, 83, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    letter-spacing: 0.02em;
}

.gold-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212, 168, 83, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: #071A12;
}

.gold-btn:active {
    transform: translateY(0);
}

/* ---- Outline Button ---- */
.hero-outline-btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 28px;
    border: 1px solid rgba(212, 168, 83, 0.4);
    border-radius: 12px;
    color: #D4A853;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    background: rgba(212, 168, 83, 0.05);
    letter-spacing: 0.02em;
}

.hero-outline-btn:hover {
    background: rgba(212, 168, 83, 0.1);
    border-color: rgba(212, 168, 83, 0.7);
    transform: translateY(-2px);
    color: #D4A853;
}

/* ---- Hero Section ---- */
.hero {
    position: relative;
}

.hero-bg {
    will-change: transform;
}

.hero-img {
    will-change: opacity;
}

.hero-overlay {
    background: rgba(7, 26, 18, 0.75);
}

.hero-content {
    will-change: transform, opacity;
}

.hero-badge {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

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

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

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

.hero-cards {
    animation: fadeInRight 1s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.hero-stat-card {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}

.hero-stat-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.card-1 { animation: float1 6s ease-in-out infinite; }
.card-2 { animation: float2 7s ease-in-out infinite; }
.card-3 { animation: float3 5.5s ease-in-out infinite; }
.card-4 { animation: float4 6.5s ease-in-out infinite; }

@keyframes float1 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(8px); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@keyframes float4 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(6px); }
}

/* Scroll Indicator */
.scroll-indicator {
    display: block;
}

.scroll-dot {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(6px); opacity: 0.4; }
}

/* ---- Section Styles ---- */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.section-title {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.section-subtitle {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

/* ---- Services Grid ---- */
.services-grid {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.service-card {
    opacity: 0;
    transform: translateY(20px);
}

.service-card.visible {
    animation: fadeInUp 0.6s ease forwards;
}

.service-card-inner {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-card-inner {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.service-icon {
    transition: all 0.4s ease;
}

/* ---- About Section ---- */
.about-image-container {
    opacity: 0;
    transform: translateX(-30px);
}

.about-image-container.visible {
    animation: slideInLeft 0.8s ease forwards;
}

.about-content {
    opacity: 0;
    transform: translateX(30px);
}

.about-content.visible {
    animation: slideInRight 0.8s ease forwards;
}

.about-image-wrapper {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

.about-img {
    transition: transform 0.6s ease;
}

.about-image-wrapper:hover .about-img {
    transform: scale(1.02);
}

/* ---- New Patients ---- */
.new-patients-card {
    opacity: 0;
    transform: translateY(20px);
}

.new-patients-card.visible {
    animation: fadeInUp 0.8s ease forwards;
}

.step-item {
    transition: all 0.3s ease;
}

.step-item:hover {
    transform: translateX(8px);
    border-color: rgba(16, 185, 129, 0.3) !important;
}

/* ---- Contact ---- */
.contact-info-card {
    transition: all 0.3s ease;
}

.contact-info-card:hover {
    transform: translateX(8px);
    border-color: rgba(16, 185, 129, 0.3);
}

.contact-form-wrapper {
    opacity: 0;
    transform: translateY(20px);
}

.contact-form-wrapper.visible {
    animation: fadeInUp 0.8s ease forwards;
}

/* ---- Form Styles ---- */
.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(7, 26, 18, 0.6);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 10px;
    color: #FBF9F4;
    font-size: 0.95rem;
    font-family: 'Inter', system-ui, sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: rgba(240, 232, 212, 0.3);
}

.form-input:focus {
    border-color: rgba(212, 168, 83, 0.5);
    background: rgba(7, 26, 18, 0.8);
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.1);
}

.form-select {
    appearance: none;
    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='%23D4A853' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-select option {
    background: #0D2818;
    color: #FBF9F4;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-success {
    animation: fadeInUp 0.5s ease forwards;
}

.form-success-icon {
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ---- Keyframes ---- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* ---- Scroll Reveal (progressive enhancement) ---- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
    }
}

/* ---- Responsive ---- */
@media (max-width: 1023px) {
    .hero-cards {
        display: none;
    }

    .hero-title {
        font-size: 3rem;
    }

    .about-image-container {
        opacity: 1;
        transform: none;
    }

    .about-content {
        opacity: 1;
        transform: none;
    }

    .about-frame {
        display: none;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2.25rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .new-patients-steps {
        margin-top: 2rem;
    }

    .contact-form-card {
        padding: 1.5rem;
    }
}

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

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
