/* ============================
   food.me — Base Styles
   Variables, Reset, Typography
   ============================ */

:root {
    --warm-bg: #1a1410;
    --warm-surface: #241e18;
    --warm-surface-2: #2e2620;
    --accent-gold: #d4a853;
    --accent-amber: #e8923e;
    --accent-cream: #f5efe6;
    --accent-burgundy: #d94a88;
    --text-primary: #f5efe6;
    --text-secondary: #b8a898;
    --text-muted: #8f8071;
    --border: rgba(212, 168, 83, 0.15);

    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --max-width: 1280px;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

/* Image CLS prevention — all images get aspect-ratio from width/height attrs */
img {
    max-width: 100%;
    height: auto;
}

img[width][height] {
    aspect-ratio: attr(width) / attr(height);
}

/* Blur-up placeholder while images load */
img[loading="lazy"] {
    background: var(--warm-surface-2, #2e2620);
    transition: opacity 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    img[loading="lazy"] { transition: none; }
}

body {
    font-family: var(--font-body);
    background: var(--warm-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

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

ul, ol {
    list-style: none;
}

/* ============================
   Fade-in Animation
   ============================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================
   Skeleton / Shimmer Loading
   ============================ */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--warm-surface) 25%,
        var(--warm-surface-2) 50%,
        var(--warm-surface) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}


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

.reveal[data-reveal="fade-left"] {
    transform: translateX(40px);
}

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

/* Safety fallback: if JS fails or user prefers reduced motion, show content immediately */
@media (prefers-reduced-motion: reduce) {
    .fade-in, .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}
/* If JS hasn't run after 3s, show everything (noscript users, broken JS, slow devices) */
@keyframes reveal-fallback { to { opacity: 1; transform: none; } }
.reveal { animation: reveal-fallback 0s 3s forwards; }
.reveal.revealed { animation: none; }

