/* ==========================================================================
   The Pharo — flip-book menu (/menu). Built phone-first, because most guests
   arrive by scanning the QR code on their table.
   Sizes inside a page are relative to the page width (--pw), so a page looks
   the same on a phone and on a desktop spread.
   ========================================================================== */

@font-face { font-family: "Cinzel"; src: url("../fonts/cinzel-latin-500-normal.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-500-normal.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-600-normal.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }

:root {
  --obsidian: #0b0a08;
  --gold: #c9a45c;
  --gold-light: #e8cf98;
  --gold-deep: #9c7a3c;
  --red: #d42a2f;
  --paper: #f6eedd;
  --ink: #1c170f;
  --ink-soft: #5d5241;
  --display: "Cinzel", Georgia, serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --turn: .85s;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body.menu-page { display: flex; flex-direction: column; margin: 0; min-height: 100dvh; background: radial-gradient(110% 80% at 50% 0%, #1b2d4f 0%, #0c1628 38%, var(--obsidian) 78%); color: #efe4cf; font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; overflow: hidden; touch-action: manipulation; }
img { display: block; max-width: 100%; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }

/* ---------- Top and bottom bars ---------- */

.fb-top { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) clamp(14px, 4vw, 34px) 10px; }
.fb-brand { display: flex; align-items: center; gap: 12px; color: var(--gold-light); text-decoration: none; }
.fb-brand img { width: 34px; height: auto; }
.fb-brand span { font: 500 1.3rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; }
.fb-brand small { display: block; margin-bottom: 2px; font-size: .45em; letter-spacing: .5em; }
.fb-brand b { color: var(--red); font-weight: inherit; }
.fb-tools { display: flex; align-items: center; gap: 12px; }
.fb-live { display: inline-flex; align-items: center; gap: 7px; color: #9fe0bb; font-size: .68rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.fb-live i { width: 7px; height: 7px; border-radius: 50%; background: #4fd18a; animation: fb-pulse 2s infinite; }
@keyframes fb-pulse { 0% { box-shadow: 0 0 0 0 rgba(79, 209, 138, .55); } 70% { box-shadow: 0 0 0 8px rgba(79, 209, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(79, 209, 138, 0); } }
.fb-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 18px; border: 1px solid rgba(201, 164, 92, .5); border-radius: 999px; background: rgba(11, 10, 8, .4); color: var(--gold-light); font-size: .68rem; font-weight: 600; letter-spacing: .22em; text-decoration: none; text-transform: uppercase; cursor: pointer; }
.fb-btn:hover { border-color: var(--gold-light); }

.fb-bar { display: flex; flex: none; align-items: center; justify-content: center; gap: 22px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); }
.fb-nav { width: 50px; height: 50px; border: 1px solid rgba(201, 164, 92, .5); border-radius: 50%; background: rgba(11, 10, 8, .4); color: var(--gold-light); font-size: 1.6rem; line-height: 1; cursor: pointer; transition: border-color .2s, opacity .2s; }
.fb-nav:hover:not(:disabled) { border-color: var(--gold-light); }
.fb-nav:disabled { opacity: .3; cursor: default; }
.fb-count { min-width: 120px; color: #cfc3aa; font-size: .7rem; font-weight: 600; letter-spacing: .24em; text-align: center; text-transform: uppercase; }

/* ---------- The book ---------- */

.fb-stage { display: grid; flex: 1; place-items: center; min-height: 0; padding: 4px 0; overflow: hidden; }
.fb-book { position: relative; width: calc(var(--pw, 320px) * var(--cols, 1)); height: var(--ph, 440px); perspective: 2600px; transition: transform var(--turn) cubic-bezier(.3, .1, .2, 1); -webkit-user-select: none; user-select: none; }
.fb-book.is-spread.at-start { transform: translateX(-25%); }
.fb-book.is-spread.at-end { transform: translateX(25%); }
.fb-book.is-spread::after { content: ""; position: absolute; top: 2%; bottom: 2%; left: 50%; z-index: 0; width: 46px; margin-left: -23px; border-radius: 50%; background: rgba(0, 0, 0, .55); filter: blur(16px); }
.fb-leaf { position: absolute; top: 0; right: 0; width: var(--pw, 320px); height: 100%; transform-origin: left center; transform-style: preserve-3d; transition: transform var(--turn) cubic-bezier(.3, .1, .2, 1); cursor: pointer; }
.fb-leaf.is-flipped { transform: rotateY(-180deg); }
.fb-face { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; border-radius: 3px 12px 12px 3px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.fb-back { transform: rotateY(180deg); border-radius: 12px 3px 3px 12px; }
/* The shadow that falls into the spine. */
.fb-face::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(60, 40, 10, .28), rgba(60, 40, 10, .06) 7%, transparent 16%); pointer-events: none; }
.fb-back::after { background: linear-gradient(270deg, rgba(60, 40, 10, .28), rgba(60, 40, 10, .06) 7%, transparent 16%); }
.fb-book:not(.is-spread) .fb-face { border-radius: 12px; }
.fb-book:not(.is-spread) .fb-face::after { background: linear-gradient(90deg, rgba(60, 40, 10, .16), transparent 8%); }
.fb-measure { position: absolute; top: 0; left: 0; width: var(--pw, 320px); height: var(--ph, 440px); visibility: hidden; pointer-events: none; }

/* ---------- A page ---------- */

.fb-page { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; padding: 2.6em 2.5em 1.5em; background: radial-gradient(120% 90% at 30% 10%, #fbf5e8, var(--paper) 55%, #ecdfc4); color: var(--ink); font-size: clamp(12.5px, calc(var(--pw, 320px) * .0355), 17px); line-height: 1.45; overflow: hidden; }
.fb-page::before { content: ""; position: absolute; inset: 1em; border: 1px solid rgba(156, 122, 60, .6); border-radius: 4px; box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px rgba(156, 122, 60, .28); pointer-events: none; }
.fb-head { flex: none; margin-bottom: 1.1em; text-align: center; }
.fb-kicker { margin: 0 0 .5em; color: var(--gold-deep); font-size: .62em; font-weight: 700; letter-spacing: .34em; text-transform: uppercase; }
.fb-head h2 { margin: 0; font: 500 1.75em/1.12 var(--display); letter-spacing: .03em; }
.fb-head h2 small { display: block; margin-top: .3em; color: var(--ink-soft); font: italic 400 .55em var(--serif); letter-spacing: 0; }
.fb-head p:not(.fb-kicker) { margin: .45em 0 0; color: var(--ink-soft); font: italic 400 1.12em/1.3 var(--serif); }
.fb-rule { display: flex; align-items: center; gap: .8em; margin: .9em auto 0; width: 62%; color: var(--gold-deep); }
.fb-rule::before, .fb-rule::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .6; }
.fb-rule i { width: .5em; height: .5em; background: currentColor; transform: rotate(45deg); }
.fb-items { flex: 1; min-height: 0; overflow: hidden; }
.fb-item { display: flex; gap: .9em; padding: .58em 0; }
.fb-item + .fb-item { border-top: 1px solid rgba(156, 122, 60, .2); }
.fb-item-img { flex: none; width: 3.5em; height: 3.5em; border-radius: .55em; object-fit: cover; background: #e3d5b6; }
.fb-item-main { flex: 1; min-width: 0; }
.fb-item-head { display: flex; align-items: baseline; gap: .5em; }
.fb-item-head h3 { margin: 0; font: 600 1.02em/1.3 var(--body); }
.fb-dots { flex: 1; min-width: 1em; border-bottom: 1px dotted rgba(93, 82, 65, .55); transform: translateY(-.28em); }
.fb-price { flex: none; color: var(--ink); font: 600 1.02em var(--display); letter-spacing: .02em; white-space: nowrap; }
.fb-price small { margin-right: .25em; color: var(--ink-soft); font: 500 .68em var(--body); letter-spacing: .06em; }
.fb-item p { margin: .12em 0 0; color: var(--ink-soft); font: italic 400 1.06em/1.28 var(--serif); }
.fb-item.is-soldout h3, .fb-item.is-soldout .fb-price { color: #9b907c; text-decoration: line-through; }
.fb-sold { display: inline-block; margin-left: .5em; padding: .05em .6em; border-radius: 999px; background: #efe1bf; color: #7a5200; font: 700 .62em/1.6 var(--body); letter-spacing: .12em; text-decoration: none; text-transform: uppercase; vertical-align: .12em; }
.fb-foot { display: flex; flex: none; align-items: center; justify-content: space-between; margin-top: .8em; color: var(--gold-deep); font-size: .6em; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; }

/* Dish labels: vegetarian (green mark), spicy (red), chef's signature (gold star). */
.fb-tag { display: inline-block; width: .78em; height: .78em; margin-left: .4em; vertical-align: -.02em; }
.fb-tag.is-veg { border: 1.5px solid #2c8a4b; border-radius: 2px; background: radial-gradient(circle, #2c8a4b 0 38%, transparent 42%); }
.fb-tag.is-spicy { background: #c8362c; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.fb-tag.is-signature { background: var(--gold-deep); clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 76%, 20% 100%, 30% 60%, 0 38%, 38% 35%); width: .95em; height: .95em; }

/* Cover, inside cover, closing pages */
.fb-page.is-cover, .fb-page.is-back, .fb-page.is-note, .fb-page.is-ornament { align-items: center; justify-content: center; text-align: center; }
.fb-page.is-cover { background: radial-gradient(110% 80% at 50% 20%, #fffaf0, #f4e9d2 55%, #e4d3ae); }
.fb-page.is-cover::before { inset: 1.2em; border-width: 2px; }
.fb-cover-logo { width: 62%; height: auto; }
.fb-cover-title { margin: 1.4em 0 0; font: 500 2em/1.1 var(--display); letter-spacing: .12em; text-transform: uppercase; }
.fb-cover-hint { margin: 1.6em 0 0; color: var(--gold-deep); font-size: .66em; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; animation: fb-nudge 2.4s ease-in-out infinite; }
@keyframes fb-nudge { 50% { transform: translateX(.6em); } }
.fb-sun { width: 46%; height: auto; margin: 0 auto 1em; color: var(--gold-deep); }
.fb-note-text { max-width: 26em; margin: .8em 0 0; color: var(--ink-soft); font: italic 400 1.2em/1.45 var(--serif); white-space: pre-line; }
.fb-note-legend { display: grid; gap: .5em; margin: 1.8em 0 0; padding: 0; color: var(--ink-soft); font-size: .86em; list-style: none; text-align: left; }
.fb-page.is-ornament img { width: 30%; opacity: .2; }
.fb-page.is-back img { width: 26%; margin-bottom: 1.2em; }
.fb-page.is-back h2 { margin: 0; font: 500 1.6em/1.2 var(--display); letter-spacing: .05em; }
.fb-page.is-back p { margin: .7em 0 0; color: var(--ink-soft); font: italic 400 1.15em/1.4 var(--serif); }
.fb-page.is-back .fb-kicker { margin-top: 2em; }

/* ---------- Without JavaScript (and while it starts) ---------- */

.fb-fallback { width: min(640px, 100vw - 32px); max-height: 100%; padding: 30px 26px; border-radius: 14px; background: var(--paper); color: var(--ink); overflow-y: auto; }
.fb-fallback img { width: 150px; height: auto; margin: 0 auto 10px; }
.fb-fallback h1 { margin: 0 0 20px; font: 500 1.6rem var(--display); text-align: center; }
.fb-fallback h2 { margin: 24px 0 4px; font: 500 1.2rem var(--display); }
.fb-fallback ul { margin: 8px 0 0; padding: 0; list-style: none; }
.fb-fallback li { padding: 8px 0; border-top: 1px solid rgba(156, 122, 60, .25); }
.fb-fallback span { color: var(--ink-soft); font-size: .9em; }
.js .fb-fallback { visibility: hidden; }

/* ---------- Contents panel ---------- */

.fb-contents { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: flex-end; background: rgba(5, 5, 4, .6); }
.fb-contents[hidden] { display: none; }
.fb-contents-panel { position: relative; display: flex; flex-direction: column; gap: 6px; width: min(380px, 100%); height: 100%; padding: calc(26px + env(safe-area-inset-top)) 26px 26px; border-left: 1px solid rgba(201, 164, 92, .3); background: #12100c; overflow-y: auto; animation: fb-in .35s cubic-bezier(.19, 1, .22, 1); }
@keyframes fb-in { from { transform: translateX(40px); opacity: 0; } }
.fb-contents-close { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px; width: 44px; height: 44px; border: 1px solid rgba(201, 164, 92, .3); border-radius: 50%; background: transparent; color: var(--gold-light); font-size: 1.4rem; cursor: pointer; }
.fb-contents .fb-kicker { margin: 4px 0 12px; color: var(--gold); font-size: .68rem; }
.fb-contents ol { flex: 1; margin: 0; padding: 0; list-style: none; counter-reset: c; }
.fb-contents li button { display: flex; align-items: baseline; gap: 14px; width: 100%; padding: 14px 0; border: 0; border-bottom: 1px solid rgba(201, 164, 92, .18); background: none; color: #efe4cf; font: 500 1.15rem var(--display); text-align: left; cursor: pointer; }
.fb-contents li button::before { counter-increment: c; content: counter(c, upper-roman); min-width: 30px; color: var(--gold); font-size: .7rem; letter-spacing: .1em; }
.fb-contents li button:hover { color: var(--gold-light); }
.fb-contents li small { margin-left: auto; color: #968b76; font: 500 .72rem var(--body); }
.fb-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 0; padding: 0; color: #cfc3aa; font-size: .8rem; list-style: none; }
.fb-legend li { display: flex; align-items: center; gap: 4px; }
.fb-legend .fb-tag { margin: 0 4px 0 0; }
.fb-legend .is-veg { background: radial-gradient(circle, #4fd18a 0 38%, transparent 42%); border-color: #4fd18a; }
.fb-legend .is-signature { background: var(--gold); }

.fb-toast { position: fixed; bottom: calc(86px + env(safe-area-inset-bottom)); left: 50%; z-index: 40; padding: 10px 20px; border: 1px solid rgba(201, 164, 92, .4); border-radius: 999px; background: rgba(11, 10, 8, .92); color: var(--gold-light); font-size: .8rem; white-space: nowrap; transform: translateX(-50%); animation: fb-toast 3.2s forwards; pointer-events: none; }
@keyframes fb-toast { 0% { opacity: 0; transform: translate(-50%, 10px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

@media (max-width: 480px) {
  .fb-live { display: none; }
  .fb-brand span { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  :root { --turn: .01s; }
  .fb-cover-hint, .fb-live i { animation: none; }
}
@media print {
  body.menu-page { display: block; overflow: visible; background: #fff; }
  .fb-top, .fb-bar, .fb-contents { display: none; }
}
