/* ============================================
   The Dexter — Custom Styles
   Classic & Elegant · Forest Green + Off-White
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #1a3a2a;
    color: #f5f0e8;
}

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

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

::-webkit-scrollbar-thumb {
    background: #8fad94;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #45734d;
}

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

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

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

/* --- Navbar Scroll State --- */
.navbar-scrolled {
    background-color: rgba(250, 248, 244, 0.97) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 58, 42, 0.08);
}

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

.navbar-scrolled .menu-line {
    background-color: #1a3a2a;
}

.navbar-scrolled .mobile-nav-link {
    color: #1a3a2a;
}

/* --- Mobile Menu --- */
.mobile-nav-link {
    opacity: 1;
    transition: opacity 0.3s ease, color 0.3s ease;
}

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

/* --- Hamburger Animation --- */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 24px;
}

/* --- Reveal Animations --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .group:hover img {
        transform: none;
    }
}

/* --- Form Styles --- */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.4) sepia(1) saturate(3) hue-rotate(95deg);
    cursor: pointer;
}

select {
    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='%2345734d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* --- Image Loading --- */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* --- Decorative Divider --- */
.divider-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.divider-ornament::before,
.divider-ornament::after {
    content: '';
    flex: 1;
    max-width: 120px;
    height: 1px;
    background: linear-gradient(to right, transparent, #b8ccbe, transparent);
}

/* --- Button Focus States --- */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #45734d;
    outline-offset: 2px;
}

/* --- Print Styles --- */
@media print {
    header, footer, #contact, #menu-toggle {
        display: none;
    }
    
    body {
        color: #1a3a2a;
        background: white;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}
