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

body {
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF7F5;
}
::-webkit-scrollbar-thumb {
    background: #EED4CC;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #D89688;
}

/* Vertical text utility */
.writing-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Navbar */
#navbar {
    background: rgba(250, 247, 245, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(107, 29, 42, 0.06);
}

#navbar.scrolled {
    box-shadow: 0 1px 30px rgba(107, 29, 42, 0.08);
}

/* Mobile menu */
.mobile-bar {
    transition: all 0.3s ease;
}

#mobile-menu.open .mobile-bar:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}
#mobile-menu.open .mobile-bar:nth-child(2) {
    opacity: 0;
}
#mobile-menu.open .mobile-bar:nth-child(3) {
    width: 1.5rem;
    margin-left: 0;
}

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

/* Mobile links */
.mobile-link {
    position: relative;
}
.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #6B1D2A;
    transition: width 0.3s ease;
}
.mobile-link:hover::after {
    width: 100%;
}

/* Scroll animation */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* Hero animations */
.hero-subtitle {
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}
.hero-headline {
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}
.hero-description {
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}
.hero-cta {
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

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

/* Scroll line animation */
@keyframes scrollLine {
    0% { top: -1rem; }
    100% { top: 3rem; }
}
.scroll-line-fill {
    animation: scrollLine 1.5s ease-in-out infinite;
}

/* Image hover glow */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.05);
}

/* Selection color */
::selection {
    background: #F9CFD7;
    color: #6B1D2A;
}

/* Focus styles */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 2px solid #6B1D2A;
    outline-offset: 2px;
}

/* Select arrow */
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='%23F9CFD7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    .scroll-line-fill {
        animation: none;
    }
}
