/* ============================================
   Kute & Kuddly Kids — Custom Styles
   ============================================ */

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

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #0D7377;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0f5659;
}

/* ---- Selection ---- */
::selection {
    background: #0D7377;
    color: #fff;
}

/* ---- Navbar ---- */
.nav-fixed {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-fixed.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.nav-link {
    position: relative;
}

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

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

.nav-link:hover {
    color: #0D7377;
}

/* ---- Hero ---- */
.hero {
    position: relative;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-img {
    will-change: transform;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(10, 30, 32, 0.72) 0%,
        rgba(13, 115, 119, 0.55) 50%,
        rgba(10, 61, 64, 0.70) 100%
    );
}

.hero-content {
    padding-top: 80px;
    padding-bottom: 80px;
}

.hero-badge {
    animation: fadeInDown 0.8s ease forwards;
}

.hero h1 {
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

.hero p {
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

.hero .flex {
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
}

.hero-scroll {
    animation: fadeInUp 1s ease 1s forwards;
    opacity: 0;
}

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

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

/* ---- Mobile Menu ---- */
.mobile-menu {
    position: fixed;
    inset: 0;
    top: auto;
    z-index: 50;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding-top: 80px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu-link {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

/* ---- Mobile Menu Button ---- */
.menu-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #334155;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-line.top {
    top: 10px;
}

.menu-line.middle {
    top: 16px;
}

.menu-line.bottom {
    top: 22px;
}

#menuBtn.active .menu-line.top {
    top: 16px;
    transform: translateX(-50%) rotate(45deg);
}

#menuBtn.active .menu-line.middle {
    opacity: 0;
}

#menuBtn.active .menu-line.bottom {
    top: 16px;
    transform: translateX(-50%) rotate(-45deg);
}

/* ---- Reveal Animations (progressive enhancement) ---- */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* When JS is active, set initial hidden state for elements below fold */
.js-active .reveal-up {
    opacity: 0;
    transform: translateY(40px);
}

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

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

/* Respect reduced motion preference */
@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-up,
    .reveal-left,
    .reveal-right {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ---- Image hover effects ---- */
img {
    max-width: 100%;
    height: auto;
}

/* ---- Focus styles ---- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #0D7377;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---- Button ripple effect ---- */
button,
a {
    -webkit-tap-highlight-color: transparent;
}

/* ---- Smooth image loading ---- */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

/* ---- Print styles ---- */
@media print {
    .nav-fixed,
    .hero-scroll,
    .mobile-menu {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
    }
}
