/* Manakin Bistro: shared tokens and chrome for every page. Page-specific rules live in
   hero.css (home + events), order.css (pedir + events), trabaja.css. Motion budget everywhere:
   only transform and opacity animate, off-screen blocks are paused, reduced-motion is honoured. */

:root {
  --crema: #f8f1e3; --negro: #231f20; --fondo: #141213; --fondo-2: #262122;
  --linea: #d9cbb0; --suave: #6b6262; --error: #a3341f; --papel: #fbf7ee;
  --serif-d: "Instrument Serif", "Times New Roman", serif;
  --serif: "Newsreader", Georgia, serif;
  --wrap: 760px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--crema); color: var(--negro);
  font-family: var(--serif); font-optical-sizing: auto; line-height: 1.45;
  min-height: 100vh; overflow-x: hidden; display: flex; flex-direction: column;
}
body > .dark { flex: 1; background: var(--fondo); color: var(--crema); }
a { color: inherit; text-underline-offset: 3px; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Backgrounds: drifting seigaiha (wave scales) with a static centre fade. */
.paused, .paused * { animation-play-state: paused !important; }
.scales { position: relative; isolation: isolate; overflow: hidden; }
.pattern { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.pattern i { position: absolute; top: 0; bottom: 0; left: -60px; right: 0; background-image: var(--seigaiha); background-size: 60px 30px; will-change: transform; animation: drift 14s linear infinite; }
.pattern::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0%, transparent 6%, var(--bg) 30%, var(--bg) 70%, transparent 94%, transparent 100%); }
@keyframes drift { to { transform: translate3d(60px, 0, 0); } }
.light { --bg: var(--crema); --seigaiha: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3Cdefs%3E%3Cg id='s'%3E%3Ccircle r='30' fill='%23f8f1e3'/%3E%3Cg fill='none' stroke='%23eadcc3' stroke-width='.9'%3E%3Ccircle r='29.5'/%3E%3Ccircle r='22.5'/%3E%3Ccircle r='15'/%3E%3Ccircle r='7.5'/%3E%3C/g%3E%3C/g%3E%3C/defs%3E%3Cuse href='%23s' x='30' y='-15'/%3E%3Cuse href='%23s' x='0' y='0'/%3E%3Cuse href='%23s' x='60' y='0'/%3E%3Cuse href='%23s' x='30' y='15'/%3E%3Cuse href='%23s' x='0' y='30'/%3E%3Cuse href='%23s' x='60' y='30'/%3E%3Cuse href='%23s' x='30' y='45'/%3E%3C/svg%3E"); }
.dark  { --bg: var(--fondo); --seigaiha: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3Cdefs%3E%3Cg id='s'%3E%3Ccircle r='30' fill='%23141213'/%3E%3Cg fill='none' stroke='%232e2a2b' stroke-width='.9'%3E%3Ccircle r='29.5'/%3E%3Ccircle r='22.5'/%3E%3Ccircle r='15'/%3E%3Ccircle r='7.5'/%3E%3C/g%3E%3C/g%3E%3C/defs%3E%3Cuse href='%23s' x='30' y='-15'/%3E%3Cuse href='%23s' x='0' y='0'/%3E%3Cuse href='%23s' x='60' y='0'/%3E%3Cuse href='%23s' x='30' y='15'/%3E%3Cuse href='%23s' x='0' y='30'/%3E%3Cuse href='%23s' x='60' y='30'/%3E%3Cuse href='%23s' x='30' y='45'/%3E%3C/svg%3E"); }

/* Wave strips: a strip twice the window wide slides by half and loops seamlessly. */
.strip { display: block; overflow: hidden; position: relative; }
.strip svg { display: block; width: 200%; height: 100%; will-change: transform; animation: slide var(--t, 6s) linear infinite; }
.strip.rev svg { animation-direction: reverse; }
@keyframes slide { to { transform: translate3d(-50%, 0, 0); } }
.ornament { width: 66px; height: 10px; margin: 12px auto clamp(16px, 3.5vw, 22px); --t: 3.2s; }

/* Header: bird mark + section nav; on hero pages the name is dropped since the lockup follows. */
.top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; max-width: 1100px; margin: 0 auto; width: 100%; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 1rem; white-space: nowrap; }
.brand svg { width: 46px; height: auto; display: block; color: var(--negro); flex: none; }
.top-hero .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.top nav ul { list-style: none; display: flex; gap: 4px 18px; flex-wrap: wrap; justify-content: flex-end; font-style: italic; font-size: 1.02rem; }
.top nav a { text-decoration: none; padding: 6px 2px; border-bottom: 1px solid transparent; transition: border-color .2s; }
.top nav a:hover, .top nav a[aria-current="page"] { border-bottom-color: currentColor; }
@media (max-width: 560px) {
  .top { flex-wrap: wrap; }
  .top nav { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .top nav::-webkit-scrollbar { display: none; }
  .top nav ul { flex-wrap: nowrap; justify-content: flex-start; gap: 16px; padding-bottom: 2px; }
}

.top nav a.ext::after { content: "\2197"; font-size: .75em; margin-left: 3px; opacity: .7; }
.foot-fam { margin-top: 6px; }
.fam .kicker { text-align: center; }

/* Type and layout */
main { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: clamp(8px, 4vw, 28px) 16px 0; }
main.wide { max-width: 1000px; }
h1, h2, h3.d { font-family: var(--serif-d); font-style: italic; font-weight: 400; line-height: 1; }
h1 { font-size: clamp(2.8rem, 12vw, 4.6rem); margin: 6px 0 14px; }
h2 { font-size: clamp(2.1rem, 8vw, 2.6rem); }
.kicker { font-style: italic; color: var(--suave); }
.lede { font-size: clamp(1.15rem, 4.4vw, 1.4rem); max-width: 34em; margin: 0 auto; }
.center { text-align: center; }
p + p { margin-top: .8em; }
.sec { margin-top: clamp(40px, 8vw, 64px); }
.sec > h2 { text-align: center; }

/* Buttons */
.btn {
  display: inline-block; font: inherit; font-style: italic; font-size: 1.1rem; cursor: pointer; text-decoration: none;
  background: var(--negro); color: var(--crema); border: 1px solid var(--negro); border-radius: 999px; padding: 12px 22px;
  transition: transform .3s cubic-bezier(.3,1.4,.5,1), background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.dark .btn { background: var(--crema); color: var(--negro); border-color: var(--crema); }
.dark .btn.ghost { background: transparent; color: var(--crema); }
.ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.btn.is-pending { cursor: default; border-style: dashed; opacity: .8; }
.btn.is-pending:hover { transform: none; }

/* An owner fact that is not in yet: visible on purpose, findable with [data-pending]. */
.pending { font-style: italic; color: var(--suave); border-bottom: 1px dashed currentColor; }

/* Menus (carta, pedir, events, home teaser) */
.menu { padding: clamp(24px, 6vw, 48px) 0 clamp(40px, 8vw, 64px); text-align: center; }
.menu-sec + .menu-sec { margin-top: clamp(36px, 7vw, 48px); }
.dishes { list-style: none; }
.dishes li { font-size: clamp(1.35rem, 5.2vw, 1.75rem); letter-spacing: .01em; line-height: 1.38; }
.price-static { font-style: italic; opacity: .72; font-size: 1rem; margin-left: 8px; white-space: nowrap; }
.dishes > li > .soldout { font-style: italic; font-size: 1rem; opacity: .6; margin-left: 8px; white-space: nowrap; }
/* Muted text under a heading or a dish: ink grey on the cream bands, faded cream in the night
   band. Every crema-based colour here stays scoped to .dark (test/css.test.mjs). */
.sec-note { font-style: italic; color: var(--suave); margin: -6px 0 10px; }
.dark .sec-note { color: color-mix(in srgb, var(--crema) 62%, transparent); }
.dishes .desc { display: block; font-size: 1rem; color: var(--suave); line-height: 1.35; margin: -2px 0 8px; }
.dark .dishes .desc { color: color-mix(in srgb, var(--crema) 62%, transparent); }
.dish { position: relative; display: inline-block; cursor: default; padding: 0 2px; border-radius: 4px; -webkit-tap-highlight-color: transparent; transition: transform .35s cubic-bezier(.3,1.4,.5,1); }
.dish .strip { position: absolute; left: 0; right: 0; bottom: -2px; height: 7px; --t: 2.4s; transform: scaleX(0); opacity: 0; transform-origin: 50% 50%; transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .25s; }
.dish:hover, .dish:focus-visible, .dish.on { transform: translateY(-2px); }
.dish:hover .strip, .dish:focus-visible .strip, .dish.on .strip { transform: scaleX(1); opacity: 1; }
.especiales { position: relative; text-align: center; padding: clamp(24px, 5vw, 40px) 16px clamp(48px, 10vw, 80px); }
.menu-note { font-style: italic; color: var(--suave); max-width: 34em; margin: 10px auto 0; }

/* Cards (events, pillars) */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 22px; }
.card { border: 1px solid var(--linea); border-radius: 16px; padding: 18px; background: color-mix(in srgb, var(--crema) 85%, white); text-align: left; transition: transform .35s cubic-bezier(.3,1.4,.5,1), border-color .2s; }
.card:hover { transform: translateY(-3px); border-color: var(--negro); }
.card h3 { font-weight: 500; font-size: 1.2rem; }
.card p { color: var(--suave); margin-top: 4px; }
.card .when { font-style: italic; }
.card a.all { display: inline-block; margin-top: 10px; }
.dark .card { background: var(--fondo-2); border-color: #3a3435; color: var(--crema); }
.dark .card p { color: color-mix(in srgb, var(--crema) 70%, transparent); }

/* Hours list, contact rows */
.hours { list-style: none; max-width: 22em; margin: 0 auto; }
.hours li { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px solid var(--linea); }
.rows { list-style: none; max-width: 30em; margin: 18px auto 0; text-align: left; }
.rows li { display: grid; grid-template-columns: 9em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--linea); align-items: baseline; }
.rows li span:first-child { color: var(--suave); font-style: italic; }
@media (max-width: 480px) { .rows li { grid-template-columns: 1fr; gap: 2px; } }

/* Sections rise in once as they scroll into view; site.js also reveals everything after a
   short grace period, so a sleepy observer can never leave a page blank. */
.reveal { opacity: 0; transform: translate3d(0, 18px, 0); transition: opacity .7s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in, .no-js .reveal { opacity: 1; transform: none; }

/* The sea between the light page and the dark footer band */
.sea { position: relative; height: clamp(56px, 9vw, 92px); margin-top: clamp(40px, 8vw, 64px); }
.sea .layer { position: absolute; left: -40px; right: -40px; top: 0; bottom: 0; will-change: transform; }
.sea .strip { position: absolute; inset: 0; }
.sea .back { --t: 26s; } .sea .mid { --t: 17s; } .sea .front { --t: 11s; }

/* Footer */
.foot { color: color-mix(in srgb, var(--crema) 62%, transparent); text-align: center; font-size: .95rem; padding: 28px 16px 40px; }
.foot p + p, .foot nav { margin-top: 6px; }
.foot .pending { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .strip svg { animation-duration: calc(var(--t, 6s) * 2); }
  .pattern i { animation-duration: 28s; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .dish { transition: none; }
}
