/* ============================================
   KenTenn Relics — Custom Styles
   ============================================ */

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

/* Selection */
::selection {
    background: #064e3b;
    color: #fefdf8;
}

/* ============================================
   Animations
   ============================================ */

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scrollLine {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        transform: scaleY(1);
        transform-origin: top;
    }
    51% {
        transform-origin: bottom;
    }
    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* Staggered reveal delays */
.scroll-reveal:nth-child(1) { transition-delay: 0s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.5s; }

/* ============================================
   Navbar
   ============================================ */

#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 20px rgba(0, 0, 0, 0.04);
}

#navbar.scrolled .nav-link {
    color: #374151;
}

#navbar.scrolled .font-display.text-neutral-900 {
    color: #111827;
}

/* ============================================
   Mobile Menu
   ============================================ */

#mobile-menu {
    animation: fadeIn 0.3s ease-out;
}

.mobile-nav-link {
    position: relative;
}

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

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

/* ============================================
   Buttons & Links
   ============================================ */

.nav-link {
    position: relative;
}

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

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

/* ============================================
   Form Styles
   ============================================ */

input:focus,
select:focus,
textarea:focus {
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: #9ca3af;
}

/* ============================================
   Image Optimization
   ============================================ */

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 640px) {
    .font-display {
        line-height: 1.15;
    }
}

@media (min-width: 768px) {
    /* Smooth scroll offset for fixed header */
    section[id] {
        scroll-margin-top: 80px;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    #navbar,
    #mobile-menu,
    .scroll-reveal {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
