/* ============================================
   Humble Tides — Custom Styles
   Classic & Elegant | Terracotta + Sand
   ============================================ */

/* --- 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 {
    max-width: 100%;
    height: auto;
    display: block;
}

::selection {
    background-color: #b96342;
    color: #fdfbf7;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf5eb;
}
::-webkit-scrollbar-thumb {
    background: #d8b06a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b96342;
}

/* --- Navbar --- */
#navbar {
    background: transparent;
    transition: background-color 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background: rgba(253, 251, 247, 0.97);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .font-serif,
#navbar.scrolled a,
#navbar.scrolled .menu-line {
    color: #1a2744;
}

#navbar.scrolled .menu-line {
    background: #1a2744 !important;
}

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

#mobile-menu .mobile-link {
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu .mobile-link:hover {
    opacity: 1;
}

/* --- Mobile menu button animation --- */
#menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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);
    }
    
    .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; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* --- Focus styles for accessibility --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #b96342;
    outline-offset: 2px;
}

/* --- Subtle image shimmer on load --- */
img {
    background: linear-gradient(135deg, #f5ecda 0%, #ebcfc3 100%);
}

/* --- Form styling --- */
input::placeholder,
textarea::placeholder {
    color: rgba(26, 39, 68, 0.2);
}

input:focus,
textarea:focus {
    background: rgba(251, 245, 235, 0.5);
}

/* --- Button hover lift --- */
button[type="submit"],
a[href="#contact"] {
    position: relative;
    overflow: hidden;
}

button[type="submit"]::after,
a[href="#contact"]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease;
}

button[type="submit"]:hover::after,
a[href="#contact"]:hover::after {
    opacity: 1;
}

/* --- Tablet adjustments --- */
@media (max-width: 767px) {
    #hero {
        min-height: 100vh;
        min-height: 100dvh;
    }
    
    #hero h1 {
        font-size: 3rem;
    }
    
    section {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

/* --- Large desktop --- */
@media (min-width: 1280px) {
    #hero h1 {
        font-size: 5.5rem;
    }
}
