/* ============================================
   Sylvii Styles LLC — Custom Styles
   Classic & Elegant | Teal + Slate + Warm
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #0f4c5c;
    color: #faf6f1;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf6f1;
}
::-webkit-scrollbar-thumb {
    background: #0f4c5c;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #1a5058;
}

/* ---- Navbar ---- */
.nav-text {
    transition: color 0.3s ease;
}
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: #0f4c5c;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.nav-link:hover::after {
    width: 100%;
}
.nav-link:hover {
    color: #0f4c5c;
}

/* Navbar scrolled state */
.navbar-scrolled {
    background-color: rgba(250, 246, 241, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}
.navbar-scrolled .nav-text {
    color: #1a2332 !important;
}
.navbar-scrolled .nav-link {
    color: #1a2332 !important;
}
.navbar-scrolled .nav-link:hover {
    color: #0f4c5c !important;
}

/* ---- Mobile Menu ---- */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 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; }

/* Hamburger */
#menuBtn {
    background: transparent;
    border: none;
    padding: 0;
}
.menu-line {
    position: absolute;
    left: 50%;
    width: 18px;
    height: 1.5px;
    background: #0f4c5c;
    transform: translateX(-50%);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
}
.menu-line.top { top: 9px; }
.menu-line:nth-child(2) { top: 50%; transform: translate(-50%, -50%); }
.menu-line.bottom { bottom: 9px; }

#menuBtn.active .menu-line.top {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translate(-50%, -50%) scaleX(0);
}
#menuBtn.active .menu-line.bottom {
    bottom: 50%;
    transform: translate(-50%, 50%) rotate(-45deg);
}

/* ---- Hero Animations ---- */
.hero-subtitle {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}
.hero-line {
    animation: slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-line:nth-child(1) { animation-delay: 0.3s; }
.hero-line:nth-child(2) { animation-delay: 0.45s; }
.hero-line:nth-child(3) { animation-delay: 0.6s; }
.hero-line:nth-child(4) { animation-delay: 0.8s; }
.hero-desc {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.9s both;
}
.hero-cta {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.05s both;
}

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

/* Scroll dot animation */
@keyframes scrollDot {
    0% { top: -16px; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 32px; opacity: 0; }
}
.animate-scroll-dot {
    animation: scrollDot 1.8s ease-in-out infinite;
}

/* ---- Reveal Animations ---- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Progressive enhancement: JS adds .revealed for animated reveals */
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Default state for reveal elements — always visible */
.reveal {
    opacity: 1;
    transform: translateY(0);
}

/* When JS enables animations, set initial hidden state */
.js-enabled .reveal {
    opacity: 0;
    transform: translateY(24px);
}
.js-enabled .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
.js-enabled .reveal:nth-child(1) { transition-delay: 0s; }
.js-enabled .reveal:nth-child(2) { transition-delay: 0.1s; }
.js-enabled .reveal:nth-child(3) { transition-delay: 0.2s; }
.js-enabled .reveal:nth-child(4) { transition-delay: 0.3s; }
.js-enabled .reveal:nth-child(5) { transition-delay: 0.4s; }
.js-enabled .reveal:nth-child(6) { transition-delay: 0.5s; }

/* ---- 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 !important;
        transform: none !important;
    }
    .js-enabled .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ---- Image Hover Effects ---- */
.group img {
    will-change: transform;
}

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

/* ---- Button Hover Lift ---- */
button, a {
    will-change: transform;
}

/* ---- Utility ---- */
.text-balance {
    text-wrap: balance;
}

/* ---- Print ---- */
@media print {
    nav, #menuBtn, .reveal { display: none; }
    body { background: white; color: black; }
}
