/* ============================================
   New Win Shing — 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 {
    overflow-x: hidden;
}

::selection {
    background: #8B5E3C;
    color: #FDF8F0;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #3D2B1F;
}
::-webkit-scrollbar-thumb {
    background: #8B5E3C;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b34524;
}

/* --- Header --- */
#site-header {
    transition: background 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

#site-header.scrolled {
    background: rgba(61, 43, 31, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(139, 94, 60, 0.2);
}

.nav-link {
    position: relative;
}

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

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

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

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

.mobile-link {
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    transform: translateY(0);
    opacity: 1;
}

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

/* 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;
}

/* --- Hero --- */
.hero-bg {
    transition: transform 8s ease;
}

.hero-active .hero-bg {
    transform: scale(1);
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards 0.3s;
}

.hero-title {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s ease forwards 0.6s;
}

.hero-desc {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards 0.9s;
}

.hero-ctas {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards 1.2s;
}

.scroll-indicator {
    opacity: 0;
    animation: fadeIn 1s ease forwards 1.8s;
}

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

/* --- Divider --- */
.divider-line {
    height: 1px;
    background: linear-gradient(to right, transparent, #e8c4b0, transparent);
    margin: 0;
}

/* --- Menu --- */
.menu-item {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.menu-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.menu-item:hover h4 {
    color: #e8c4b0;
    transition: color 0.3s ease;
}

/* --- Data-animate --- */
[data-animate] {
    opacity: 0;
    transform: translateY(40px);
    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);
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

[data-animate="left"] {
    transform: translateX(-40px);
}
[data-animate="left"].visible {
    transform: translateX(0);
}

[data-animate="right"] {
    transform: translateX(40px);
}
[data-animate="right"].visible {
    transform: translateX(0);
}

[data-animate="scale"] {
    transform: scale(0.95);
}
[data-animate="scale"].visible {
    transform: scale(1);
}

/* Stagger children */
.stagger-children [data-animate] {
    transition-delay: calc(var(--stagger-index, 0) * 0.1s);
}

/* --- Form --- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

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='%238B5E3C' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* --- Date input --- */
input[type="date"] {
    color-scheme: light;
}

/* --- Keyframes --- */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scaleY(1);
    }
    50% {
        opacity: 1;
        transform: scaleY(1.3);
    }
}

/* --- Focus visible --- */
:focus-visible {
    outline: 2px solid #8B5E3C;
    outline-offset: 2px;
}

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

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.75rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 5rem;
    }
}

@media (min-width: 1280px) {
    .hero-title {
        font-size: 5.625rem;
    }
}

@media (min-width: 1536px) {
    .hero-title {
        font-size: 6.25rem;
    }
}
