/* ============================================
   Rosinski Stanley J DDS — Custom Styles
   Classic & Elegant | Terracotta + Sand
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #c95322;
    color: #fefdfb;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f4f0e3;
}
::-webkit-scrollbar-thumb {
    background: #d4b888;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c49f6a;
}

/* ---- Hero Animations ---- */
.hero-eyebrow {
    animation: slideDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero-title-line {
    animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-title-line:nth-child(1) { animation-delay: 0.4s; }
.hero-title-line:nth-child(2) { animation-delay: 0.55s; }
.hero-title-line:nth-child(3) { animation-delay: 0.7s; }
.hero-title-line:nth-child(4) { animation-delay: 0.85s; }

.hero-fade {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.1s both;
}

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

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

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

/* ---- Scroll Reveal ---- */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up {
    transform: translateY(40px);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
    opacity: 1;
    transform: translate(0, 0);
}

/* ---- Service Cards ---- */
.service-card {
    transition: background-color 0.5s ease;
}

.service-card:hover svg {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.service-card svg {
    transition: transform 0.3s ease;
}

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

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

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

/* ---- Mobile Menu ---- */
.mobile-link {
    opacity: 1;
    transform: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobile-menu.open .mobile-link {
    animation: mobileLinkIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

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

/* ---- Decorative Elements ---- */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e2d5c8, transparent);
}

/* ---- Focus States ---- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #c95322;
    outline-offset: 4px;
    border-radius: 4px;
}

/* ---- 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-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
}

/* ---- Tablet ---- */
@media (min-width: 768px) and (max-width: 1023px) {
    .font-serif.text-5xl,
    .font-serif.text-4xl {
        font-size: 2.5rem;
    }
}

/* ---- Small Screens ---- */
@media (max-width: 639px) {
    .font-serif.text-5xl,
    .font-serif.text-4xl {
        font-size: 2rem;
    }

    section {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .max-w-7xl {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* ---- Print ---- */
@media print {
    header, footer, .reveal-up, .reveal-left, .reveal-right {
        transition: none !important;
        animation: none !important;
    }

    body {
        color: #1c1917;
        background: white;
    }
}
