/* ===== Embankment Winery — 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;
}

/* --- Selection --- */
::selection {
    background: #c44d27;
    color: #FDFBF7;
}

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

#navbar.scrolled {
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding-top: 0;
    padding-bottom: 0;
    box-shadow: 0 1px 0 rgba(196, 77, 39, 0.08);
}

.nav-text {
    transition: color 0.3s ease;
}

.nav-subtext {
    transition: color 0.3s ease;
}

#navbar:not(.scrolled) .nav-text {
    color: #5a2417;
}

#navbar:not(.scrolled) .nav-subtext {
    color: #c44d27;
}

.nav-link {
    position: relative;
}

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

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

.nav-cta {
    position: relative;
    overflow: hidden;
}

.nav-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #c44d27;
    transition: left 0.3s ease;
    z-index: -1;
}

.nav-cta:hover::before {
    left: 0;
}

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

.mobile-link {
    position: relative;
}

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

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

/* --- Hero Animations --- */
.hero-sub {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.hero-title {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.hero-desc {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.9s;
    opacity: 0;
}

.hero-cta {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 1.1s;
    opacity: 0;
}

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

/* --- Scroll Line --- */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.3;
        height: 48px;
    }
    50% {
        opacity: 1;
        height: 64px;
    }
}

/* --- Divider --- */
.divider-line {
    animation: fadeIn 1s ease forwards;
}

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

/* --- Reveal Animations --- */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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

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

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

/* --- Image Hover --- */
img {
    display: block;
    max-width: 100%;
}

/* --- Form Styles --- */
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='%23c44d27' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 2rem;
}

select option {
    background: #FDFBF7;
    color: #5a2417;
}

/* --- Focus Visible --- */
:focus-visible {
    outline: 1px solid #c44d27;
    outline-offset: 4px;
}

/* --- Mobile Menu Button --- */
.menu-line {
    transition: all 0.3s ease;
}

#menu-btn.active .line-1 {
    transform: rotate(45deg) translate(2px, 2px);
}

#menu-btn.active .line-2 {
    transform: rotate(-45deg) translate(2px, -2px);
    width: 24px;
}

/* --- Smooth scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #e08364;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c44d27;
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-title br {
        display: none;
    }
    
    .hero-title span {
        display: inline;
    }
}
