/* ============================================
   DEWEY STREET — Custom Styles
   ============================================ */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

::selection {
    background: color-mix(in srgb, #10b981 30%, transparent);
    color: #064e3b;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #ecfdf5;
}
::-webkit-scrollbar-thumb {
    background: #a7f3d0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6ee7b7;
}

/* --- Nav --- */
#nav {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#nav.scrolled {
    background: rgba(254, 253, 248, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(6, 78, 59, 0.08);
}

#nav.scrolled .font-display {
    color: #064e3b !important;
}

#nav.scrolled a:not([class*="bg-emerald"]) {
    color: #065f46 !important;
}

/* --- Mobile Menu --- */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #10b981;
    border-radius: 1px;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 60%;
}

/* --- Feature Cards --- */
.feature-card {
    transform: translateY(0);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
}

/* --- Menu Tabs --- */
.menu-tab {
    background: transparent;
    color: #065f46;
    border: 1.5px solid #d1fae5;
    cursor: pointer;
    font-family: 'Inter', system-ui, sans-serif;
}

.menu-tab:hover {
    background: #ecfdf5;
    border-color: #6ee7b7;
}

.menu-tab.active {
    background: #065f46;
    color: #fefce8;
    border-color: #065f46;
}

/* --- Menu Items --- */
.menu-item {
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0fdf4;
}

.menu-item:last-child {
    border-bottom: none;
}

/* --- Testimonial Cards --- */
.testimonial-card {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(6, 78, 59, 0.1);
}

/* --- Scroll Reveal (progressive enhancement) --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .menu-tab, .feature-card, .testimonial-card, a {
        transition: none;
    }
}

/* --- Mobile menu animation --- */
#mobile-menu.open {
    translate: 0;
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    translate: 0 -10px;
    opacity: 0;
    pointer-events: none;
}

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

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

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

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

/* --- Gallery hover --- */
.rounded-2xl.overflow-hidden {
    position: relative;
}

.rounded-2xl.overflow-hidden::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6, 78, 59, 0.15), transparent 40%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
    pointer-events: none;
}

.rounded-2xl.overflow-hidden:hover::after {
    opacity: 1;
}

/* --- Button ripple on tap --- */
@media (hover: none) {
    a:active {
        transform: scale(0.97);
        transition: transform 0.1s ease;
    }
}
