/* ========================================
   Markar Dental Lab — Custom Styles
   Classic & Elegant Design System
   ======================================== */

/* --- Base Reset & Global --- */
*, *::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: rgba(201, 168, 76, 0.3);
    color: #ffffff;
}

/* --- Smooth Scroll Offset for Fixed Nav --- */
[id^="hero"],
[id^="services"],
[id^="about"],
[id^="craft"],
[id^="contact"] {
    scroll-margin-top: 80px;
}

/* --- Navbar --- */
#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#navbar.scrolled {
    background: rgba(5, 16, 36, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(201, 168, 76, 0.1);
}

.nav-link {
    position: relative;
}

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

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

/* --- Hero Animations --- */
.hero-eyebrow {
    animation: fadeSlideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

.hero-headline {
    animation: fadeSlideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
}

.hero-subhead {
    animation: fadeSlideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.7s forwards;
}

.hero-ctas {
    animation: fadeSlideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.9s forwards;
}

.hero-scroll {
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 1.2s forwards;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- CTA Buttons --- */
.cta-primary {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #c9a84c 0%, #e8c76a 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.cta-primary:hover::before {
    opacity: 1;
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 168, 76, 0.3);
}

.cta-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 168, 76, 0.1);
}

/* --- Section Eyebrows & Titles --- */
.section-eyebrow {
    animation: fadeIn 0.6s ease forwards;
}

.section-title {
    animation: fadeSlideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c9a84c, transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

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

/* --- Process Steps --- */
.process-step {
    position: relative;
}

.process-step:hover .step-number {
    opacity: 0.3;
}

/* --- Form Styles --- */
select option {
    background: #051024;
    color: #ffffff;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(201, 168, 76, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1) !important;
}

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.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; }

/* --- Mobile Menu --- */
#mobile-menu {
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

/* --- Image Hover --- */
aspect-ratio\:4\/5 img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Gold Gradient Text Utility --- */
.text-gold-gradient {
    background: linear-gradient(135deg, #c9a84c 0%, #e8c76a 50%, #c9a84c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 76, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 168, 76, 0.5);
}

/* --- Responsive Adjustments --- */
@media (max-width: 767px) {
    #hero {
        padding-top: 0;
    }

    .hero-headline {
        font-size: 3rem !important;
    }

    .hero-subhead {
        font-size: 1rem !important;
    }

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

    .service-card {
        padding: 1.5rem !important;
    }

    .step-number {
        font-size: 4rem !important;
    }

    blockquote {
        font-size: 1.25rem !important;
    }
}

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

/* --- Print Styles --- */
@media print {
    #navbar,
    #mobile-menu,
    .hero-scroll,
    button {
        display: none !important;
    }

    body {
        background: white !important;
        color: #1a1a1a !important;
    }

    .bg-navy-900,
    .bg-navy-950,
    .bg-navy-800 {
        background: white !important;
    }

    .text-white,
    .text-white\/70,
    .text-white\/60,
    .text-white\/50,
    .text-white\/80 {
        color: #1a1a1a !important;
    }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
