/* The Impossible Menu — "The Dark Kitchen". Mobile first: a 9:16 film on black with the real text below it;
   on wide screens the text moves beside the film. DABA fonts are self-hosted copies from the Studio repo (OFL 1.1). */
@font-face { font-family: 'Fraunces'; src: url('assets/fonts/fraunces-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('assets/fonts/instrument-serif-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('assets/fonts/instrument-serif-latin-400-italic.woff2') format('woff2'); font-style: italic; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('assets/fonts/archivo-latin-wdth-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --black: #050403;
  --cream: #efe2c4;
  --cream-soft: #c9b99a;
  --gold: #c9a25a;
  --ease: cubic-bezier(.6, .05, .25, 1);
  /* The film is a 9:16 window: full width on a phone, full height on a wide screen. */
  --film-w: min(100vw, calc(100dvh * 9 / 16));
  --film-h: min(100dvh, calc(100vw * 16 / 9));
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--black); color: var(--cream); font-family: 'Archivo', system-ui, sans-serif; overflow: hidden; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid #e3c47e; outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 1rem; top: -4rem; z-index: 99; background: #111; color: var(--cream); padding: .6rem 1rem; }
.skip:focus { top: 1rem; }

/* ---------- Chrome ---------- */
.chrome { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: max(.9rem, env(safe-area-inset-top)) 1rem .9rem; pointer-events: none; }
.chrome > * { pointer-events: auto; }
.brandline { margin: 0; font-size: .66rem; letter-spacing: .26em; text-transform: uppercase; color: #bba887; }
.demo-tag { margin-left: .5em; padding: .2em .55em; border: 1px solid rgba(215, 190, 140, .3); border-radius: 999px; font-size: .9em; letter-spacing: .16em; }
.chrome__actions { display: flex; gap: .4rem; }
.chip { background: rgba(5, 4, 3, .45); border: 1px solid rgba(215, 190, 140, .3); border-radius: 999px; padding: .55em 1em; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--cream); transition: border-color .3s, background .3s; }
.chip:hover { border-color: rgba(227, 196, 126, .7); }
.chip[aria-pressed='true'] { background: rgba(215, 190, 140, .14); border-color: rgba(227, 196, 126, .7); }
@media (max-width: 420px) { .brandline__name { display: none; } }

/* ---------- The kitchen ---------- */
.kitchen { position: fixed; inset: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.film { position: absolute; left: 50%; top: 50%; width: var(--film-w); height: var(--film-h); transform: translate(-50%, -50%); overflow: hidden; background: var(--black); }
/* Feather the film into the black around it, so on wide screens there is no visible rectangle. */
.film::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 6vmin 4vmin var(--black);
  background: linear-gradient(to bottom, var(--black), rgba(5, 4, 3, 0) 16%), linear-gradient(to top, var(--black), rgba(5, 4, 3, 0) 12%); }
.spot { position: absolute; inset: 0; background: radial-gradient(ellipse 70% 42% at 50% 34%, rgba(255, 196, 128, .12), transparent 70%); opacity: 0; transition: opacity 2s ease; }
.is-ready .spot { opacity: 1; }
.shot { position: absolute; inset: 0; will-change: transform, opacity; }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* At rest the dish breathes very slightly, so the screen never looks frozen. */
.is-ready #shot-a img { animation: breathe 9s ease-in-out infinite alternate; transform-origin: 50% 35%; }
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.035); } }
.clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.clip.is-on { opacity: 1; }

/* Until a moment has its Flow still: a quiet placeholder in the same place. */
.placeholder { position: absolute; left: 50%; top: 34%; width: 62%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center; text-align: center;
  background: radial-gradient(circle at 40% 35%, rgba(255, 236, 200, .2), rgba(255, 210, 150, .05) 55%, transparent 70%); box-shadow: 0 2.5vmin 6vmin rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(201, 162, 90, .25); }
.placeholder span { font-family: 'Fraunces', serif; font-weight: 300; font-size: clamp(1.3rem, 5.5vw, 2.1rem); line-height: 1.05; color: var(--gold); padding: 0 12%; }
.placeholder small { display: block; margin-top: .7em; font-family: 'Archivo', sans-serif; font-size: .55rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(201, 162, 90, .6); }
.placeholder--cloche { border-radius: 50% 50% 8% 8% / 70% 70% 8% 8%; aspect-ratio: 1.25; top: 36%;
  background: radial-gradient(ellipse at 35% 30%, rgba(255, 255, 255, .28), rgba(200, 200, 210, .08) 45%, transparent 70%); box-shadow: inset 0 0 0 1px rgba(220, 220, 230, .25), 0 3vmin 6vmin rgba(0, 0, 0, .6); }

/* ---------- Panels: the real text ---------- */
.panel { position: absolute; z-index: 10; left: 0; right: 0; bottom: 0; padding: 4rem max(1.4rem, env(safe-area-inset-left)) calc(env(safe-area-inset-bottom) + 2.2rem);
  background: linear-gradient(to top, rgba(5, 4, 3, .94) 55%, rgba(5, 4, 3, 0));
  opacity: 0; visibility: hidden; transform: translateY(1rem);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s; }
/* The text arrives only once the dish has settled: slower in than out. */
.panel.is-shown { opacity: 1; visibility: visible; transform: none; transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .2, 1), visibility 0s; }
.eyebrow { margin: 0 0 .5rem; font-size: .66rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.title { margin: 0; font-family: 'Fraunces', serif; font-weight: 300; font-size: clamp(2.4rem, 11vw, 4.2rem); line-height: .95; letter-spacing: .01em; text-transform: uppercase;
  background: linear-gradient(110deg, #8a6628 10%, #d7b46b 35%, #f4e2ac 50%, #c2933f 65%, #7c5a22 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.title span { display: block; font-family: 'Instrument Serif', serif; font-style: italic; text-transform: none; font-size: .45em; letter-spacing: .02em; }
.title--small { font-size: clamp(2rem, 9vw, 3rem); text-transform: none; }
.title em { font-family: 'Instrument Serif', serif; font-weight: 400; }
.lede { margin: .9rem 0 0; font-family: 'Instrument Serif', serif; font-size: 1.15rem; line-height: 1.35; color: var(--cream-soft); max-width: 24rem; }
.hint { display: flex; align-items: center; gap: .7rem; margin: 1.6rem 0 0; font-size: .64rem; letter-spacing: .26em; text-transform: uppercase; color: rgba(239, 226, 196, .7); }
.hint__line { width: 2.2rem; height: 1px; background: var(--gold); transform-origin: left; animation: hint 2.4s ease-in-out infinite; }
@keyframes hint { 0% { transform: scaleX(.2); } 50% { transform: scaleX(1); } 100% { transform: scaleX(.2); } }
.dish-name { margin: 0; font-family: 'Fraunces', serif; font-weight: 400; font-size: clamp(2rem, 8.5vw, 2.8rem); line-height: 1.02; color: #f6ead0; }
.desc { margin: .6rem 0 0; font-family: 'Instrument Serif', serif; font-size: 1.12rem; line-height: 1.35; color: var(--cream-soft); max-width: 26rem; }
.meta { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1rem 0 0; padding-top: .7rem; border-top: 1px solid rgba(201, 162, 90, .28); max-width: 26rem; }
.price { font-family: 'Fraunces', serif; font-size: 1.35rem; color: #f6ead0; white-space: nowrap; }
.allergens { font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: #b39a70; text-align: right; }
.colophon { display: flex; align-items: center; gap: .8rem; margin: 1.4rem 0 1.2rem; font-size: .72rem; line-height: 1.5; color: var(--cream-soft); }
.colophon img { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: #111; }
.colophon p { margin: 0; }
.colophon span { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 1rem; }

/* ---------- Rail: where am I, and a way to jump ---------- */
.rail { position: fixed; z-index: 15; right: max(.55rem, env(safe-area-inset-right)); top: 50%; transform: translateY(-50%); display: grid; gap: .25rem; }
.rail__dot { position: relative; width: 2rem; height: 2rem; border: 0; background: transparent; padding: 0; }
.rail__dot::before { content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; border-radius: 50%; transform: translate(-50%, -50%); background: rgba(239, 226, 196, .3); transition: background .3s, transform .3s; }
.rail__dot[aria-current='true']::before { background: var(--gold); transform: translate(-50%, -50%) scale(1.6); }
.rail__dot span { position: absolute; right: 2.2rem; top: 50%; transform: translateY(-50%); font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(239, 226, 196, .7); white-space: nowrap; opacity: 0; transition: opacity .3s; pointer-events: none; }
.rail__dot:hover span, .rail__dot:focus-visible span { opacity: 1; }

/* ---------- Wide screens: the text sits beside the film ---------- */
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .chrome { padding: 1.2rem 2rem; }
  .panel { left: calc(50% + var(--film-w) / 2 + 3vw); right: auto; bottom: 16vh; width: min(26rem, calc(50vw - var(--film-w) / 2 - 7vw)); padding: 0; background: none; }
  /* The column beside the film is narrow: size the title to it, not to the whole viewport. */
  .panel .title { font-size: min(4.2rem, calc((50vw - var(--film-w) / 2 - 7vw) / 6.4)); }
  .rail { right: 2rem; }
  .rail__dot span { opacity: .55; }
  .rail__dot[aria-current='true'] span { opacity: 1; color: var(--gold); }
}

/* ---------- Menu as text ---------- */
.reading { overflow: auto; }
.reading .kitchen { position: static; overflow: visible; touch-action: auto; user-select: text; -webkit-user-select: text; padding: 5rem 1.4rem 4rem; max-width: 34rem; margin: 0 auto; }
.reading .film, .reading .rail, .reading .hint { display: none; }
.reading .panel { position: static; opacity: 1; visibility: visible; transform: none; background: none; padding: 0 0 2.2rem; margin-bottom: 2.2rem; border-bottom: 1px solid rgba(201, 162, 90, .2); width: auto; }

/* ---------- Less motion ---------- */
.calm .hint__line, .calm #shot-a img { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .hint__line, #shot-a img { animation: none; }
}

/* Storefront accessibility: readable allergen text and clear mobile navigation. */
.reading .allergens{font-size:1rem;line-height:1.5;letter-spacing:.03em;text-align:left}
.reading .meta{flex-wrap:wrap;align-items:flex-start}
.reading .colophon{font-size:1rem}
.dish-name{overflow-wrap:anywhere}
@media(max-width:899px){.rail__dot{width:44px;height:44px}.rail__dot span{clip-path:inset(50%);width:1px;height:1px;overflow:hidden;white-space:nowrap}}
