/* ========================================
   Tea Time Marietta — Custom Styles
   ======================================== */

/* Base */
*, *::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: rgba(13, 148, 136, 0.15);
    color: #0f766e;
}

/* ========================================
   Navigation
   ======================================== */
#navbar {
    transition: background-color 0.5s ease, padding 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    padding-top: 1rem;
    padding-bottom: 1rem;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .nav-logo {
    color: #0f172a !important;
}

#navbar.scrolled .menu-line {
    background-color: #1e293b !important;
}

#navbar.scrolled .nav-link {
    color: #475569 !important;
}

/* ========================================
   Hero
   ======================================== */
.hero-bg {
    will-change: transform;
}

.hero-img {
    transition: transform 8s ease;
}

#hero:hover .hero-img {
    transform: scale(1.03);
}

/* Hero entrance animations */
.hero-subtitle {
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.hero-headline {
    animation: fadeSlideUp 0.9s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

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

.hero-cta {
    animation: fadeSlideUp 0.9s ease forwards;
    animation-delay: 0.9s;
    opacity: 0;
}

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

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

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scaleY(0.5);
        transform-origin: top;
    }
    50% {
        opacity: 0.8;
        transform: scaleY(1);
    }
}

/* ========================================
   Feature Banner
   ======================================== */
.feature-banner {
    will-change: transform;
}

/* ========================================
   Scroll Reveal Animations
   These are progressive enhancement —
   content is visible by default, JS adds
   the animated state for users with JS.
   ======================================== */
.reveal-up,
.reveal-left,
.reveal-right {
    /* Default: visible, no animation */
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Animated state — applied by JS */
.reveal-up.animated {
    opacity: 1;
    transform: translateY(0);
}

.reveal-up:not(.animated) {
    opacity: 0;
    transform: translateY(40px);
}

.reveal-left.animated {
    opacity: 1;
    transform: translateX(0);
}

.reveal-left:not(.animated) {
    opacity: 0;
    transform: translateX(-40px);
}

.reveal-right.animated {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right:not(.animated) {
    opacity: 0;
    transform: translateX(40px);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal-up:not(.animated),
    .reveal-left:not(.animated),
    .reveal-right:not(.animated) {
        opacity: 1;
        transform: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .scroll-line {
        animation: none;
    }
    
    .hero-subtitle,
    .hero-headline,
    .hero-desc,
    .hero-cta {
        animation: none;
        opacity: 1;
    }
}

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

#mobile-menu.open .mobile-link {
    animation: fadeSlideUp 0.4s ease forwards;
    opacity: 0;
}

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

/* Mobile menu button active state */
#mobile-menu-btn.active .menu-line:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}

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

#mobile-menu-btn.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ========================================
   Buttons & Links
   ======================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========================================
   Form Styles
   ======================================== */
input::placeholder,
textarea::placeholder {
    color: #cbd5e1;
}

/* ========================================
   Utility: Thin decorative lines
   ======================================== */
.divider-line {
    height: 1px;
    background: linear-gradient(to right, transparent, #bbf7d0, transparent);
}

/* ========================================
   Responsive adjustments
   ======================================== */
@media (max-width: 768px) {
    .hero-headline {
        font-size: 2.5rem !important;
    }
    
    #about .relative > div:last-child {
        position: static !important;
    }
}
