/* ══════════════════════════════════════════
   Barbaro — Shared Styles
   Common CSS used across all pages:
   index.html, menu.html, build.html,
   recipe.html, about.html
   ══════════════════════════════════════════ */

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

/* ── Design tokens ──
   High-use: --cream, --ink, --rust, --rust-muted, --stone, --stone-light, --sand, --section-bg, --card-bg, --card-border
   Low-use (kept for consistency): --text-secondary, --divider-light, --subtitle-text, --body-text */
:root {
    --cream: #f1e9d4;
    --ink: #2a2521;
    --rust: #a0522d;
    --rust-muted: #b5714d;
    --stone: #7d7268;
    --stone-light: #a69e94;
    --sand: #e6ddd1;
    --section-bg: #e8e0cc;
    --card-bg: #f9f6ef;
    --card-border: rgba(0,0,0,.06);
    --text-secondary: #5c554d;
    --divider-light: #c9c1b5;
    --subtitle-text: #948b80;
    --body-text: #3F3A34;
}

html { scroll-behavior: smooth; }

/* ── Screen-reader only (accessible <h1>) ── */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

body {
    font-family: 'DM Sans', -apple-system, 'Segoe UI', sans-serif;
    background-color: var(--cream);
    color: var(--ink);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

/* ── Top bar: logo + nav ── */
.top-bar {
    max-width: 1060px;
    margin: 0 auto;
    padding: 12px 44px 4px;
    display: flex;
    align-items: center;
    gap: 28px;
    animation: fadeIn .6s ease-out;
}
/* Legacy .logo class (kept for backward compat, prefer .logo-wrap) */
.top-bar .logo { width: 128px; height: auto; flex-shrink: 0; }
/* Cropped logo: removes tagline via clip-path */
.logo-wrap { width: 110px; flex-shrink: 0; }
.logo-wrap img {
    width: 100%; display: block;
    clip-path: inset(0 0 24% 0);
    margin-bottom: -24%;
}
.site-nav {
    display: flex;
    gap: 28px;
}
.site-nav a {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--stone);
    text-decoration: none;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    padding-bottom: 2px;
    border-bottom: 1.5px solid transparent;
    transition: color .3s ease, border-color .3s ease;
}
.site-nav a:hover { color: var(--rust); border-bottom-color: rgba(160, 82, 45, .35); }
.site-nav a:focus-visible { color: var(--rust); border-bottom-color: rgba(160, 82, 45, .35); outline: 2px solid var(--rust); outline-offset: 2px; border-radius: 2px; }
.site-nav a.active { color: var(--rust); border-bottom-color: var(--rust); }

/* ── Sticky Nav ── */
.sticky-nav-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgb(241, 233, 212);
    transition: box-shadow 0.3s ease;
}
.sticky-nav-wrapper.scrolled {
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

/* ── Container ── */
.container { max-width: 1060px; margin: 0 auto; padding: 0 44px 50px; }

/* ── Ribbon (header + footer) ── */
.ribbon-glass {
    padding: 6px;
    background: rgba(232,224,204,.5);
    backdrop-filter: blur(12px) saturate(1.1);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
    border: 1px solid rgba(0,0,0,.05);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.04);
    margin-bottom: 20px;
}
.photo-strip {
    display: flex; gap: 4px; height: 140px;
    overflow: hidden; border-radius: 8px;
}
.photo-strip img {
    flex: 1; object-fit: cover; min-width: 0; height: 100%;
    aspect-ratio: 4 / 3;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    transition: transform .4s ease;
}
.photo-strip img:hover,
.photo-strip img:focus-visible { transform: scale(1.03); }

/* ── Intro box (shared across pages) ── */
.intro-box {
    background: var(--section-bg);
    border-radius: 12px;
    padding: 20px 28px;
    margin-bottom: 20px;
    animation: fadeDown .6s ease-out;
}
.intro-box-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 28px;
    font-weight: 400;
    color: var(--rust);
    margin-bottom: 10px;
    letter-spacing: .3px;
}
.intro-box p {
    font-family: 'Lora', Georgia, serif;
    font-size: 15px;
    line-height: 1.7; color: var(--text-secondary);
}
.intro-box p + p { margin-top: 10px; }

/* ── Footer ── */
.footer {
    padding-top: 0;
    text-align: center;
    margin-top: 20px;
}
.footer-divider {
    height: 1px;
    background: var(--divider-light);
    margin-top: 36px;
    margin-bottom: 28px;
}
.footer-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}
.footer-icon {
    display: inline-block;
    color: var(--stone);
    transition: color .3s ease, transform .3s ease;
}
.footer-icon:hover { color: var(--rust); transform: scale(1.08); }
.footer-icon:focus-visible { color: var(--rust); transform: scale(1.08); outline: 2px solid var(--rust); outline-offset: 2px; border-radius: 4px; }
.footer-icon svg { width: 28px; height: 28px; }
.footer-credit { font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--text-secondary); margin-top: 8px; letter-spacing: 1px; }

/* ── Shared CTA link ── */
.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--rust);
    text-decoration: none;
    letter-spacing: .5px;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 1.5px solid rgba(160, 82, 45, .3);
    padding-bottom: 2px;
    transition: border-color .3s ease, gap .3s ease;
}
.cta-link:hover,
.cta-link:focus-visible {
    border-bottom-color: var(--rust);
    gap: 10px;
}
.cta-link svg {
    width: 14px;
    height: 14px;
    transition: transform .3s ease;
}
.cta-link:hover svg,
.cta-link:focus-visible svg { transform: translateX(2px); }

/* ── Elevated CTA — ghost pill (used sparingly for primary interactive features) ── */
.cta-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--rust);
    text-decoration: none;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1.5px solid rgba(160, 82, 45, .35);
    border-radius: 100px;
    padding: 8px 20px;
    background: transparent;
    transition: border-color .3s ease, background .3s ease, gap .3s ease;
}
.cta-pill:hover,
.cta-pill:focus-visible {
    border-color: var(--rust);
    background: rgba(160, 82, 45, .06);
    gap: 11px;
}
.cta-pill svg {
    width: 14px;
    height: 14px;
    transition: transform .3s ease;
}
.cta-pill:hover svg,
.cta-pill:focus-visible svg { transform: translateX(2px); }

/* ── Keyframes ── */
@keyframes fadeIn  { from { opacity:0 } to { opacity:1 } }
@keyframes fadeDown { from { opacity:0; transform:translateY(-18px) } to { opacity:1; transform:translateY(0) } }
@keyframes riseIn  { from { opacity:0; transform:translateY(20px) } to { opacity:1; transform:translateY(0) } }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Shared print ── */
@media print {
    body { background: #fff; }
    .top-bar, .site-nav, .footer-icons, .footer-divider { display: none !important; }
    .ribbon-glass { box-shadow: none; border: 1px solid #ddd; }
    .photo-strip img { break-inside: avoid; }
    .intro-box { background: #f5f0e6; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .footer-credit { font-size: 11px; color: #888; }
}

/* ── Shared tablet ── */
@media (max-width: 1020px) {
    .top-bar { padding: 10px 28px 4px; gap: 22px; }
    .top-bar .logo { width: 110px; }
    .logo-wrap { width: 90px; }
    .container { padding: 0 28px 40px; }
    .photo-strip { height: 120px; }
}

/* ── Shared mobile ── */
@media (max-width: 640px) {
    .top-bar { padding: 8px 16px 4px; gap: 12px; }
    .top-bar .logo { width: 76px; }
    .logo-wrap { width: 72px; }
    .site-nav { gap: 16px; }
    .site-nav a { font-size: 12px; letter-spacing: .8px; }
    .container { padding: 0 16px 32px; }
    .photo-strip { height: 90px; }
    .photo-strip img { aspect-ratio: unset; -webkit-backface-visibility: hidden; }
    .intro-box { padding: 16px 18px; }
    .intro-box-title { text-align: center; }
    .intro-box p { font-size: 14px; }
}
