/* ===== R&R Bistro — "Evening at the Barn" =====
   Dark, candlelit, moorland-green register with a brass/honey lamp-glow accent.
   Display: Libre Caslon Display · Body/UI: Hanken Grotesk
   Colour in OKLCH. */

:root {
    /* Surfaces — deep moorland green, near-black (environmental: barn at night) */
    --bg:        oklch(0.165 0.018 156);
    --surface:   oklch(0.215 0.024 157);
    --surface-2: oklch(0.265 0.028 157);

    /* Ink */
    --ink:    oklch(0.945 0.014 92);   /* warm parchment */
    --muted:  oklch(0.770 0.020 96);   /* secondary text */
    --line:   oklch(0.330 0.022 155);  /* hairlines / borders */

    /* Brand */
    --moss:        oklch(0.66 0.10 152);  /* the farm green */
    --gold:        oklch(0.840 0.118 82); /* brass / lamp glow — primary accent */
    --gold-bright: oklch(0.885 0.125 86);

    --maxw: 1180px;
    --pad: clamp(1.25rem, 4vw, 2.5rem);

    /* z-index scale */
    --z-base: 1;
    --z-sticky: 100;
    --z-nav: 200;

    --serif: "Libre Caslon Display", Georgia, "Times New Roman", serif;
    --sans: "Hanken Grotesk", system-ui, -apple-system, sans-serif;

    --ease: cubic-bezier(0.22, 1, 0.36, 1); /* ease-out-quint-ish */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; overflow-x: hidden; }

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: -0.02em;
    text-wrap: balance;
    color: var(--ink);
}
h1 { font-size: clamp(2.5rem, 7vw, 4.75rem); }
h2 { font-size: clamp(2.1rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); }

p { text-wrap: pretty; }

a { color: var(--gold); text-decoration: none; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 999;
    background: var(--gold); color: var(--bg); padding: 0.6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--sans); font-weight: 600; font-size: 0.96rem;
    letter-spacing: 0.01em; line-height: 1;
    padding: 0.95rem 1.7rem; border-radius: 999px; cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.35s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn-primary { background: var(--gold); color: oklch(0.18 0.02 156); }
.btn-primary:hover { background: var(--gold-bright); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: oklch(0.95 0 0 / 0.35); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

.link {
    color: var(--gold); font-weight: 600;
    border-bottom: 1px solid oklch(0.84 0.118 82 / 0.4);
    padding-bottom: 1px; transition: border-color 0.25s var(--ease);
}
.link:hover { border-color: var(--gold); }

/* ===== Header ===== */
.site-header {
    position: fixed; inset: 0 0 auto 0; z-index: var(--z-nav);
    transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
    border-bottom: 1px solid transparent;
}
.site-header.is-stuck {
    background: oklch(0.165 0.018 156 / 0.85);
    backdrop-filter: blur(12px);
    border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 78px; }

.brand { display: inline-flex; align-items: baseline; gap: 0.5rem; }
.brand-rr {
    font-family: var(--serif); font-size: 1.65rem; color: var(--ink);
    letter-spacing: 0.01em;
}
.brand-rr .amp { color: var(--gold); margin: 0 0.04em; }
.brand-word {
    font-family: var(--sans); font-weight: 500; font-size: 0.78rem;
    text-transform: uppercase; letter-spacing: 0.34em; color: var(--muted);
    transform: translateY(-1px);
}

.nav-panel { display: flex; align-items: center; }
.nav-list { list-style: none; display: flex; align-items: center; gap: 2rem; }
.nav-list a { color: var(--ink); font-weight: 500; font-size: 0.95rem; opacity: 0.85; transition: opacity 0.2s, color 0.2s; }
.nav-list a:hover { opacity: 1; }
.nav-list .nav-book { opacity: 1; padding: 0.7rem 1.3rem; font-size: 0.9rem; color: oklch(0.18 0.02 156); }
.nav-panel-title, .nav-panel-foot, .nav-backdrop { display: none; }

.nav-toggle {
    display: none; flex-direction: column; gap: 6px;
    background: none; border: 0; cursor: pointer; padding: 8px; z-index: var(--z-nav);
}
.nav-toggle span { width: 26px; height: 2px; background: var(--ink); transition: transform 0.3s var(--ease), opacity 0.3s; }

/* ===== Hero ===== */
.hero {
    position: relative; min-height: 100svh; display: flex; flex-direction: column;
    justify-content: center; isolation: isolate; padding-top: 78px; overflow: hidden;
}
.hero-bg {
    position: absolute; inset: -24% 0; z-index: -2;
    background: url("https://images.unsplash.com/photo-1414235077428-338989a2e8c0?auto=format&fit=crop&w=2000&q=80") center/cover no-repeat;
    transform: scale(1.06);
    will-change: transform;
}
.hero-scrim {
    position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(180deg, oklch(0.16 0.018 156 / 0.55) 0%, oklch(0.16 0.018 156 / 0.35) 35%, oklch(0.16 0.018 156 / 0.92) 100%),
        linear-gradient(90deg, oklch(0.16 0.018 156 / 0.75) 0%, oklch(0.16 0.018 156 / 0.15) 70%);
}
.hero-inner { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-block: 4rem; }
.hero-place {
    font-weight: 600; font-size: 0.82rem; letter-spacing: 0.28em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 1.4rem;
}
.hero-title { max-width: 16ch; }
.hero-lead { max-width: 52ch; margin-top: 1.6rem; font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: oklch(0.94 0.012 92 / 0.92); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.4rem; }
.hero-strip {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem;
    padding: 1.2rem var(--pad); border-top: 1px solid var(--line);
    font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
    width: 100%; max-width: var(--maxw); margin-inline: auto;
}
.hero-strip .dot { color: var(--gold); }

/* ===== Section rhythm ===== */
.section { padding-block: clamp(4.5rem, 10vw, 8rem); }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media {
    border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 5;
    box-shadow: 0 30px 60px -30px oklch(0 0 0 / 0.7);
}
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-text p { color: var(--muted); margin-top: 1.2rem; font-size: 1.08rem; max-width: 56ch; }
.split-text h2 + p { margin-top: 1.6rem; }
.split-text .link { display: inline-block; margin-top: 1.8rem; }

.feature-list { list-style: none; margin-top: 1.8rem; display: grid; gap: 0.1rem; }
.feature-list li {
    color: var(--muted); padding: 1rem 0; border-top: 1px solid var(--line); font-size: 1.02rem;
}
.feature-list li:last-child { border-bottom: 1px solid var(--line); }
.feature-list strong { color: var(--ink); font-weight: 600; }

.local { background: var(--surface); }

/* ===== Bar ===== */
.bar { position: relative; isolation: isolate; color: var(--ink); overflow: hidden; }
.bar-bg {
    position: absolute; inset: 0; z-index: -2;
    background: url("https://images.unsplash.com/photo-1514362545857-3bc16c4c7d1b?auto=format&fit=crop&w=1600&q=80") center right/cover no-repeat;
    transform: scale(1.22);
    will-change: transform;
}
.bar-scrim {
    position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(90deg, oklch(0.15 0.018 156 / 0.96) 0%, oklch(0.15 0.018 156 / 0.85) 45%, oklch(0.15 0.018 156 / 0.25) 100%);
}
.bar-inner { display: flex; }
.bar-text { max-width: 36rem; }
.bar-text p { color: oklch(0.86 0.014 92); margin-top: 1.4rem; font-size: 1.08rem; max-width: 46ch; }
.drinks { list-style: none; margin: 2rem 0; }
.drinks li {
    display: flex; align-items: baseline; gap: 1rem;
    padding: 0.85rem 0; border-bottom: 1px dashed var(--line);
    font-family: var(--serif); font-size: 1.25rem; color: var(--ink);
}
.drinks li::before { content: "✦"; color: var(--gold); font-size: 0.8rem; font-family: var(--sans); }

/* ===== Events ===== */
.events { background: var(--surface); }
.events-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.events-head { position: sticky; top: 110px; }
.events-head p { color: var(--muted); margin-top: 1.4rem; font-size: 1.08rem; max-width: 42ch; }
.events-note { font-size: 0.98rem !important; }
.events-list { list-style: none; }
.event { padding: 1.8rem 0; border-top: 1px solid var(--line); }
.events-list .event:last-child { border-bottom: 1px solid var(--line); }
.event-kind {
    display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--gold); margin-bottom: 0.7rem;
}
.event h3 { margin-bottom: 0.5rem; }
.event p { color: var(--muted); max-width: 54ch; }

/* ===== Visit ===== */
.visit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.visit-intro { color: var(--muted); margin-top: 1.2rem; font-size: 1.08rem; max-width: 40ch; }
.info-block { margin-top: 2.6rem; }
.info-block h3 {
    font-family: var(--sans); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.2em;
    text-transform: uppercase; color: var(--gold); margin-bottom: 1rem;
}
.hours { list-style: none; max-width: 26rem; }
.hours li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.7rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem;
}
.hours li:last-child { border-bottom: 0; }
.hours .open { color: var(--moss); font-weight: 600; }
.hours .off span { color: var(--muted); }
.contact { font-style: normal; }
.contact p { color: var(--muted); margin-bottom: 1rem; line-height: 1.8; }
.contact .socials { line-height: 2; }
.info-block .btn { margin-top: 0.6rem; }

.visit-map {
    border-radius: 16px; overflow: hidden; min-height: 480px; height: 100%;
    border: 1px solid var(--line); position: sticky; top: 110px;
}
.visit-map iframe { width: 100%; height: 100%; min-height: 480px; border: 0; filter: grayscale(0.25) contrast(1.05); }

/* ===== No-Rush band ===== */
.norush { padding-block: clamp(4rem, 9vw, 7rem); text-align: center; border-block: 1px solid var(--line); }
.norush-inner { max-width: 60rem; }
.norush-kicker {
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.28em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 1.6rem;
}
.norush-statement {
    font-family: var(--serif); font-size: clamp(1.9rem, 4.6vw, 3.4rem); line-height: 1.1;
    letter-spacing: -0.02em; color: var(--ink); text-wrap: balance;
}
.norush-statement em { color: var(--gold); font-style: italic; }
.norush-sub { color: var(--muted); font-size: 1.1rem; margin-top: 1.6rem; max-width: 48ch; margin-inline: auto; }

/* ===== Today's Menu ===== */
.menu-head { max-width: 56rem; }
.menu-head p { color: var(--muted); margin-top: 1.2rem; font-size: 1.1rem; max-width: 60ch; }
.menu-flag {
    display: inline-block; margin-top: 1.4rem !important; font-size: 0.82rem !important;
    font-weight: 600; letter-spacing: 0.04em; color: var(--gold) !important;
    border: 1px solid var(--line); border-radius: 999px; padding: 0.45rem 1rem;
}
.menu-grid {
    margin-top: clamp(2.5rem, 5vw, 3.5rem);
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(2rem, 4vw, 3.5rem);
}
.menu-course-title {
    font-family: var(--sans); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.22em;
    text-transform: uppercase; color: var(--gold); padding-bottom: 1rem;
    border-bottom: 1px solid var(--line); margin-bottom: 0.5rem;
}
.menu-list { list-style: none; }
.menu-item { padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.menu-item:last-child { border-bottom: 0; }
.menu-item .dish { display: block; font-family: var(--serif); font-size: 1.32rem; color: var(--ink); line-height: 1.2; }
.dish-desc { color: var(--muted); font-size: 0.98rem; margin-top: 0.4rem; }
.tag-v {
    display: inline-block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--moss); border: 1px solid var(--line);
    border-radius: 4px; padding: 0.05rem 0.35rem; vertical-align: middle; margin-left: 0.2rem;
}

/* ===== Reviews ===== */
.reviews { background: var(--bg); }
.reviews-head { max-width: 42rem; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.reviews-eyebrow {
    display: flex; align-items: center; gap: 0.6rem; font-weight: 600;
    letter-spacing: 0.02em; color: var(--muted); margin-bottom: 1.2rem;
}
.reviews-eyebrow .stars { color: var(--gold); letter-spacing: 0.12em; }
.reviews-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 1.2rem;
}
.review {
    background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
    padding: 1.9rem; display: flex; flex-direction: column; gap: 1.1rem;
    transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.review:hover { transform: translateY(-4px); border-color: oklch(0.42 0.03 150); }
.review .stars { color: var(--gold); letter-spacing: 0.15em; font-size: 0.95rem; }
.review blockquote {
    font-family: var(--serif); font-size: 1.22rem; line-height: 1.45; color: var(--ink);
    flex: 1; text-wrap: pretty;
}
.review figcaption { color: var(--ink); font-size: 0.95rem; font-weight: 600; }
.review figcaption span { display: block; font-weight: 400; color: var(--muted); margin-top: 0.15rem; }
.reviews-flag { margin-top: 2rem; color: var(--muted); font-size: 0.9rem; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--line); padding-block: 3.5rem; text-align: center; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.footer-line { color: var(--muted); font-size: 0.96rem; }
.footer-copy { color: oklch(0.6 0.015 96); font-size: 0.86rem; }

/* ===== Scroll reveals: CSS transitions, flipped on scroll by IntersectionObserver =====
   Default leaves content visible; the .js gate hides it only once JS is present. */
.reveal, .stagger > * { opacity: 1; }

html.js .reveal {
    opacity: 0; transform: translateY(32px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
    will-change: opacity, transform;
}
html.js .reveal[data-dir="left"]  { transform: translateX(-52px); }
html.js .reveal[data-dir="right"] { transform: translateX(52px); }
html.js .reveal.is-in { opacity: 1; transform: none; }

html.js .stagger > * {
    opacity: 0; transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
html.js .stagger.is-in > * { opacity: 1; transform: none; }
html.js .stagger.is-in > *:nth-child(1) { transition-delay: 0.05s; }
html.js .stagger.is-in > *:nth-child(2) { transition-delay: 0.12s; }
html.js .stagger.is-in > *:nth-child(3) { transition-delay: 0.19s; }
html.js .stagger.is-in > *:nth-child(4) { transition-delay: 0.26s; }
html.js .stagger.is-in > *:nth-child(5) { transition-delay: 0.33s; }
html.js .stagger.is-in > *:nth-child(6) { transition-delay: 0.40s; }
html.js .stagger.is-in > *:nth-child(7) { transition-delay: 0.47s; }
html.js .stagger.is-in > *:nth-child(n+8) { transition-delay: 0.54s; }

/* ===== Responsive ===== */
@media (max-width: 880px) {
    .nav-toggle { display: flex; position: relative; z-index: 210; }

    .nav-backdrop {
        display: block; position: fixed; inset: 0; z-index: 150;
        background: oklch(0.10 0.012 156 / 0.55); backdrop-filter: blur(4px);
        opacity: 0; visibility: hidden;
        transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
    }
    .nav-backdrop.is-open { opacity: 1; visibility: visible; }

    .nav-panel {
        position: fixed; inset: 0 0 0 auto; z-index: 200;
        width: min(86vw, 360px); height: 100dvh;
        flex-direction: column; align-items: stretch; justify-content: space-between;
        gap: 1.5rem;
        padding: calc(78px + 1.5rem) clamp(1.5rem, 6vw, 2.25rem) max(2rem, env(safe-area-inset-bottom));
        background: linear-gradient(200deg, var(--surface-2), var(--surface) 55%);
        border-left: 1px solid var(--line);
        box-shadow: -40px 0 80px -30px oklch(0 0 0 / 0.85);
        transform: translateX(105%); transition: transform 0.45s var(--ease);
        overflow-y: auto;
    }
    .nav-panel.is-open { transform: translateX(0); }

    .nav-panel-title {
        display: block; font-family: var(--sans); font-size: 0.74rem; font-weight: 700;
        letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold);
    }
    .nav-list {
        flex-direction: column; align-items: stretch; gap: 0; width: 100%;
        flex: 1; justify-content: center;
    }
    .nav-list li { width: 100%; }
    .nav-list a:not(.nav-book) {
        display: block; padding: 1.05rem 0; font-family: var(--serif); font-size: 1.5rem;
        color: var(--ink); opacity: 1; border-bottom: 1px solid var(--line);
    }
    .nav-list a:not(.nav-book):hover { color: var(--gold); }
    .nav-list .nav-book {
        display: flex; width: 100%; justify-content: center;
        margin-top: 1.6rem; padding: 1rem; font-size: 1rem;
    }
    .nav-panel-foot { display: block; color: var(--muted); font-size: 0.92rem; line-height: 1.7; }
    .nav-panel-foot p { margin-bottom: 0.35rem; }

    body.nav-open { overflow: hidden; }
    .nav-open .nav-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
    .nav-open .nav-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

    .split, .events-grid, .visit-grid, .bar-inner { grid-template-columns: 1fr; }
    .split.reverse .split-media { order: 0; }
    .split-media { aspect-ratio: 16 / 11; }
    .events-head, .visit-map { position: static; }
    .visit-map { min-height: 360px; }
}

@media (max-width: 520px) {
    .brand-word { display: none; }
    .hero-strip { font-size: 0.66rem; gap: 0.3rem 0.7rem; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal, .stagger > * { animation: none !important; opacity: 1 !important; transform: none !important; }
    .hero-bg { transform: scale(1.04); }
    .bar-bg { transform: scale(1.22) !important; }
    * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
