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

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

body {
    overflow-x: hidden;
}

::selection {
    background: #C4704B;
    color: #FDFBF7;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #FDFBF7;
}
::-webkit-scrollbar-thumb {
    background: #d4a55a;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C4704B;
}

/* ===== Navigation ===== */
.nav-logo-text {
    color: #1a1a1a;
}

.nav-link {
    position: relative;
}

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

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

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

#navbar.scrolled .nav-logo-text {
    color: #1a1a1a;
}

/* ===== Mobile Menu ===== */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

#menu-toggle.active .menu-line:nth-child(3) {
    width: 6px;
    transform: rotate(-45deg) translate(3px, -3px);
}

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

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

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

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

/* ===== Hero Animations ===== */
.hero-subtitle {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.hero-title {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards;
}

.hero-desc {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

.hero-cta-primary {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.hero-cta-secondary {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
}

.hero-stats {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

.hero-image-wrapper {
    animation: fadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
    opacity: 0;
}

.hero-float-card {
    animation: floatIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
    opacity: 0;
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Scroll line animation */
@keyframes scrollLine {
    0% { top: -16px; }
    100% { top: 48px; }
}

.scroll-line {
    animation: scrollLine 1.5s ease-in-out infinite;
}

/* ===== Divider ===== */
.divider-line {
    animation: expandLine 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform-origin: left;
}

@keyframes expandLine {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* ===== Section Reveals ===== */
.section-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ===== Feature Cards ===== */
.feature-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for feature cards */
.feature-card:nth-child(1) { transition-delay: 0s; }
.feature-card:nth-child(2) { transition-delay: 0.15s; }
.feature-card:nth-child(3) { transition-delay: 0.3s; }

/* ===== About Image ===== */
.about-image-wrapper {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-image-wrapper.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Form Styles ===== */
input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.4;
    cursor: pointer;
}

select option {
    background: #FDFBF7;
    color: #1a1a1a;
}

/* ===== Image Break ===== */
section:nth-of-type(3) img {
    opacity: 0;
    transition: opacity 1s ease;
}

section:nth-of-type(3) img.revealed {
    opacity: 1;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-title br {
        display: none;
    }
    
    .hero-float-card {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
        max-width: 100%;
    }
    
    .hero-stats {
        gap: 8px;
    }
    
    .hero-stats > div {
        flex: 1;
    }
    
    .about-image-wrapper {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .about-image-wrapper.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 360px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-cta-primary,
    .hero-cta-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 12px;
    }
    
    .hero-stats > div:not(:last-child) {
        border-right: none;
    }
    
    .hero-stats > div:not(:first-child) {
        border-top: 1px solid #e9d5ab;
        padding-top: 12px;
    }
}
