/* ============================================================
   Onno. Bistro — immersive dark theme
   Per-client theming: colors + fonts in :root.
   Pure CSS/JS animations. Hidden pre-reveal states only under
   html.js; everything degrades gracefully without JS and under
   prefers-reduced-motion.
   ============================================================ */
:root {
  --color-accent: #c8402f;        /* tomato red, brightened for the dark theme */
  --color-accent-deep: #9e1b1e;   /* brand red from their menu card */
  --color-text: #f5f2ec;          /* brand cream */
  --color-text-dim: rgba(245, 242, 236, 0.55);
  --color-bg: #16120f;            /* warm near-black */
  --color-bg-lift: #1e1915;       /* slightly lifted panels */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

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

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

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

h1, h2, h3 { line-height: 1.1; }

a { color: var(--color-text); }

::selection { background: var(--color-accent); color: var(--color-text); }

.btn {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-text);
  padding: 0.85rem 2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.35s var(--ease-out), background 0.25s;
}

.btn:hover { background: var(--color-accent-deep); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  border: 1px solid rgba(245, 242, 236, 0.55);
}

.btn-outline:hover { background: rgba(245, 242, 236, 0.12); transform: translateY(-2px); }

.section { padding: 7rem 0; scroll-margin-top: 60px; }

.section-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--color-accent);
  margin-bottom: 2.5rem;
}

.section-note { margin-top: 3rem; color: var(--color-text-dim); }
.section-note a { color: var(--color-text); }

/* ---------- intro curtain (js only) ---------- */
.intro { display: none; }

html.js .intro {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 200;
  transition: transform 0.9s var(--ease-out);
}

html.js .intro.intro-done { transform: translateY(-100%); }

.intro-brand {
  font-size: clamp(3rem, 12vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  animation: intro-rise 1s var(--ease-out) both 0.1s;
}

.intro-dot { color: var(--color-accent); }

@keyframes intro-rise {
  from { opacity: 0; transform: translateY(60px); }
}

/* ---------- film grain ---------- */
html.js .grain {
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: 140;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(2) infinite;
}

@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

.site-header:not(.at-top) {
  background: rgba(22, 18, 15, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.nav-brand {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-dot { color: var(--color-accent); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text);
}

.nav-links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}

.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: -14% 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
  transform: scale(1.08); /* static fallback; js drives ken-burns zoom + parallax */
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(22, 18, 15, 0.55) 0%, rgba(22, 18, 15, 0.25) 45%, var(--color-bg) 100%);
}

.hero-content {
  position: relative;
  width: 100%;
  will-change: transform, opacity;
  padding-top: 4rem;
}

.hero-kicker {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--color-text-dim);
  margin-bottom: 1rem;
  animation: rise-in 0.9s var(--ease-out) both 1.15s;
}

.hero-title {
  font-size: clamp(5rem, 19vw, 17rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  display: flex;
}

.hero-letter {
  display: inline-block;
  animation: letter-rise 0.9s var(--ease-out) both;
}

.hero-letter:nth-child(1) { animation-delay: 0.55s; }
.hero-letter:nth-child(2) { animation-delay: 0.63s; }
.hero-letter:nth-child(3) { animation-delay: 0.71s; }
.hero-letter:nth-child(4) { animation-delay: 0.79s; }
.hero-letter:nth-child(5) { animation-delay: 0.9s; }

.hero-letter-dot { color: var(--color-accent); }

@keyframes letter-rise {
  from { opacity: 0; transform: translateY(0.35em) rotate(4deg); }
}

.hero-tagline {
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin: 1.6rem 0 2.4rem;
  animation: rise-in 0.9s var(--ease-out) both 1.25s;
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  animation: rise-in 0.9s var(--ease-out) both 1.4s;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(34px); }
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  right: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  writing-mode: vertical-rl;
  animation: rise-in 0.9s var(--ease-out) both 1.8s;
}

.scroll-hint-line {
  width: 1px;
  height: 56px;
  background: var(--color-text-dim);
  overflow: hidden;
  position: relative;
}

.scroll-hint-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: -100%;
  width: 100%;
  height: 100%;
  background: var(--color-accent);
  animation: hint-drop 1.8s ease-in-out infinite;
}

@keyframes hint-drop {
  to { top: 100%; }
}

/* ---------- statement (words light up while scrolling) ---------- */
.statement {
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  max-width: 20em;
}

html.js .statement .word {
  opacity: 0.16;
  transition: opacity 0.35s ease;
}

html.js .statement .word.lit { opacity: 1; }

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 3rem;
}

.chips li {
  border: 1px solid rgba(245, 242, 236, 0.25);
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  font-size: 0.9rem;
  color: var(--color-text-dim);
}

/* ---------- full-bleed quote banner ---------- */
.banner {
  position: relative;
  min-height: 72svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.banner-bg {
  position: absolute;
  inset: -18% 0;
  background-size: cover;
  background-position: center 30%;
  will-change: transform;
}

.banner-shade {
  position: absolute;
  inset: 0;
  background: rgba(22, 18, 15, 0.6);
}

.banner-quote {
  position: relative;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.4;
  font-style: normal;
  max-width: 22em;
}

/* ---------- dishes ---------- */
.dishes { padding-bottom: 3rem; }

.dish-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  margin-bottom: 7rem;
}

.dish-row-flip .dish-media { order: 2; }
.dish-row-flip .dish-body { order: 1; }

.dish-media {
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 4 / 5;
}

.dish-media img {
  width: 100%;
  height: 118%;
  object-fit: cover;
  will-change: transform;
}

/* wipe reveal (js adds .visible) */
html.js .dish-media {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.1s var(--ease-out);
}

html.js .dish-row-flip .dish-media { clip-path: inset(0 0 0 100%); }

html.js .dish-media.visible { clip-path: inset(0 0 0 0); }

.dish-num {
  display: block;
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 800;
  line-height: 1;
  color: rgba(245, 242, 236, 0.14);
  margin-bottom: 0.5rem;
}

.dish-body h3 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}

.dish-body p { color: var(--color-text-dim); max-width: 34em; }

/* ---------- gallery ---------- */
/* default (mobile / touch / no-js / reduced motion): plain grid — nothing hidden,
   you just scroll down. Desktop gets the enhanced horizontal mode below. */
.hscroll { padding: 4rem 0; scroll-margin-top: 60px; }

.hscroll-track {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding: 0 1.5rem;
  max-width: 1080px;
  margin: 0 auto;
}

@media (min-width: 769px) {
  .hscroll-track { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}

.hscroll-intro { grid-column: 1 / -1; padding-bottom: 1rem; }

.hscroll-intro .section-label { margin-bottom: 1rem; }

.hscroll-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hpanel {
  overflow: hidden;
  border-radius: 6px;
}

.hpanel img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.6s var(--ease-out);
}

.hpanel:hover img { transform: scale(1.05); }

/* enhanced mode (js + desktop + fine pointer): pinned section, vertical scroll
   drives horizontal movement */
html.js.hscroll-enhanced .hscroll { height: 320vh; padding: 0; }

html.js.hscroll-enhanced .hscroll-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

html.js.hscroll-enhanced .hscroll-track {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  max-width: none;
  margin: 0;
  will-change: transform;
  padding: 0 4rem;
}

html.js.hscroll-enhanced .hscroll-intro { flex: 0 0 auto; padding: 0 2rem 0 0; }

html.js.hscroll-enhanced .hpanel { flex: 0 0 auto; width: min(44vw, 560px); }

html.js.hscroll-enhanced .hpanel img { aspect-ratio: 4 / 3; }

html.js.hscroll-enhanced .hpanel-tall img { aspect-ratio: 3 / 4; }

/* ---------- contact ---------- */
.contact-section { padding-bottom: 4rem; }

.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-big {
  font-size: clamp(1.8rem, 4.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.contact-big a { text-decoration: none; }

.contact-big a:hover { color: var(--color-accent); }

.contact-big-sub { color: var(--color-text-dim); font-size: clamp(1.3rem, 3vw, 2.2rem); }

.contact-big-sub a:hover { color: var(--color-text); }

.contact div { margin-bottom: 1.6rem; }

.contact dt {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--color-accent);
  margin-bottom: 0.3rem;
}

.contact dd { color: var(--color-text-dim); }
.contact dd a { color: var(--color-text); }

/* ---------- footer ---------- */
.site-footer { overflow: hidden; padding-top: 2rem; }

.footer-giant {
  font-size: clamp(6rem, 24vw, 22rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.8;
  text-align: center;
  color: rgba(245, 242, 236, 0.07);
  user-select: none;
  transform: translateY(0.12em);
}

.footer-giant span { color: rgba(200, 64, 47, 0.25); }

.footer-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid rgba(245, 242, 236, 0.12);
  font-size: 0.9rem;
  color: var(--color-text-dim);
}

.footer-meta a { color: var(--color-text); text-decoration: none; }
.footer-meta a:hover { color: var(--color-accent); }

/* ---------- scroll reveals ---------- */
html.js .reveal,
html.js [data-stagger] > * {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 0.7s ease,
    transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
}

html.js .reveal.visible,
html.js [data-stagger].visible > * {
  opacity: 1;
  transform: none;
}

/* ---------- lightbox (created by main.js) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 6, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 180;
  cursor: pointer;
}

.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
}

/* ---------- mobile ---------- */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(22, 18, 15, 0.97);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
  }

  .nav-links.open { display: flex; }

  .nav-links li { border-top: 1px solid rgba(245, 242, 236, 0.08); }

  .nav-links a { display: block; padding: 1rem 1.5rem; }

  .section { padding: 4.5rem 0; }

  .dish-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 4.5rem;
  }

  .dish-row-flip .dish-media { order: 0; }
  .dish-row-flip .dish-body { order: 1; }

  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }

  .scroll-hint { right: 1.25rem; }
}

/* ---------- reduced motion: shut it all down ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  html.js .reveal,
  html.js [data-stagger] > * {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html.js .statement .word { opacity: 1; }

  html.js .dish-media,
  html.js .dish-row-flip .dish-media {
    clip-path: none;
    transition: none;
  }

  .hero-bg,
  .hero-kicker, .hero-letter, .hero-tagline, .hero-actions, .scroll-hint,
  .scroll-hint-line::after,
  html.js .grain { animation: none; }

  html.js .intro { display: none; }
}
