/* ========================================
   Secret End — Custom Styles
   Deep Navy + Warm Gold | Warm & Friendly
   ======================================== */

/* --- Custom Properties --- */
:root {
    --color-navy-950: #061220;
    --color-navy-900: #0a1e33;
    --color-navy-800: #0f2b47;
    --color-navy-700: #153a5e;
    --color-navy-600: #1e4d7c;
    --color-navy-500: #2d6a9f;
    --color-gold-600: #c9a227;
    --color-gold-500: #eab308;
    --color-gold-100: #fef9c3;
    --color-amber-50: #fffbeb;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

::selection {
    background: var(--color-gold-200, #fef08a);
    color: var(--color-navy-900);
}

/* --- Navbar --- */
#navbar {
    background: rgba(255, 251, 235, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(15, 43, 71, 0.06);
}

#navbar.scrolled {
    background: rgba(255, 251, 235, 0.95);
    box-shadow: 0 4px 30px rgba(10, 30, 51, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-gold-600);
    transition: width 0.3s ease;
    border-radius: 1px;
}

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

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

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-gold-600);
    transition: width 0.3s ease;
}

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

/* --- Hero --- */
#hero {
    background: var(--color-amber-50);
}

/* --- Story Cards --- */
.story-card {
    position: relative;
}

.story-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, transparent, rgba(201, 162, 39, 0.2), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.story-card:hover::before {
    opacity: 1;
}

/* --- Pantry Items --- */
.pantry-item {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.pantry-item:hover {
    transform: translateY(-6px);
}

/* --- Scroll Reveal (Progressive Enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

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

/* --- Focus Styles --- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-gold-600);
    outline-offset: 3px;
    border-radius: 4px;
}

/* --- Utility Animations --- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* --- Responsive Tweaks --- */
@media (max-width: 767px) {
    #hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 60px;
    }
    
    .font-display {
        word-spacing: -0.02em;
    }
}

/* --- Print --- */
@media print {
    #navbar, #mobile-menu, .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
