/* ============================================
   Animal Pantry — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(255, 107, 53, 0.15);
    color: #1c1c20;
}

/* Navigation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #ff6b35;
    transition: width duration 300ms;
}

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

/* Mobile Menu */
.mobile-menu-link {
    position: relative;
}

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

/* Hero Animations */
.hero-subtitle {
    animation: fadeUp 0.8s ease forwards 0.2s;
}

.hero-title {
    animation: fadeUp 0.8s ease forwards 0.4s;
}

.hero-description {
    animation: fadeUp 0.8s ease forwards 0.6s;
}

.hero-cta {
    animation: fadeUp 0.8s ease forwards 0.8s;
}

.hero-scroll {
    animation: fadeUp 0.8s ease forwards 1s;
}

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

/* Decorative Circles */
.deco-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    background: white;
}

.deco-circle-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.deco-circle-2 {
    width: 250px;
    height: 250px;
    bottom: 10%;
    left: -50px;
    animation: float 6s ease-in-out infinite reverse;
}

.deco-circle-3 {
    width: 150px;
    height: 150px;
    bottom: 30%;
    right: 15%;
    animation: float 10s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.02);
    }
}

/* Divider Line */
.divider-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, #e3e3e5, transparent);
}

/* Section Styles */
.section-label {
    letter-spacing: 0.3em;
}

.section-title {
    letter-spacing: -0.01em;
}

/* Product Cards */
.product-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.product-card-img-wrap {
    position: relative;
    overflow: hidden;
}

.product-card-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.05), transparent);
    pointer-events: none;
}

.product-card-desc {
    line-height: 1.7;
}

/* About Section */
.info-item {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.info-item.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Contact Form */
.contact-input {
    border-bottom-width: 1px;
}

.contact-input:focus {
    border-bottom-color: #ff6b35;
}

.contact-submit {
    position: relative;
    overflow: hidden;
}

.contact-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-submit:hover::before {
    opacity: 1;
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Stagger children */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.3s; }

.reveal-stagger.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

.nav-scrolled .nav-logo {
    color: #1c1c20 !important;
}

.nav-scrolled .menu-line {
    background: #1c1c20 !important;
}

/* Mobile menu button animation */
.menu-line {
    transition: all 0.3s ease;
}

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

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

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

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

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

/* 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,
    .reveal.revealed,
    .product-card,
    .product-card.revealed,
    .info-item,
    .info-item.revealed {
        opacity: 1;
        transform: none;
    }
}
