:root {
  --bg: #000000;          /* the page */
  --night: #0f0c0a;       /* the panel: a warm black */
  --night-2: #1a1411;     /* the panel where the candle light falls */
  --bone: #efe6d8;        /* the big entries, the brand */
  --muted: #8f8378;       /* notes, address, hours */
  --amber: #e9b878;       /* the candle: the accent, the arrow, the light on the edges */
  --line: rgba(239, 230, 216, 0.09); /* the thin borders */
}

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

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--bone);
  font-family: 'Mona Sans Variable', 'Mona Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 12px;
  overflow: hidden;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* the whole menu: the frame it opens over. Every size comes from its width and height, so it fits a phone box too */
.fumo {
  --w: min(960px, calc(100vw - 24px));
  --h: min(600px, calc(100vh - 24px));
  --pad: clamp(14px, calc(var(--w) * 0.034), 30px);
  --bar: clamp(46px, calc(var(--h) * 0.11), 58px);
  position: relative;
  width: var(--w);
  height: var(--h);
}

/* ---- the bar: brand and hamburger, always on top ---- */
.bar {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  right: 10px;
  height: var(--bar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 0 calc(var(--bar) * 0.42);
  border-radius: 999px;
}

/* its own glass, there only while the menu is closed (the panel takes its place when open) */
.bar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(120% 160% at 85% -40%, rgba(233, 184, 120, 0.16), transparent 55%),
    linear-gradient(180deg, #1b1613, #0f0c0a);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 220, 0.09),
    inset 0 0 0 1px var(--line),
    0 18px 40px -22px rgba(233, 184, 120, 0.28),
    0 10px 24px -16px rgba(0, 0, 0, 0.9);
  opacity: var(--bar-glass, 1);
  transition: opacity 0.45s ease;
}

.bar__brand {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: clamp(15px, calc(var(--bar) * 0.34), 19px);
  font-variation-settings: 'wght' 420, 'opsz' 24, 'SOFT' 100;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.bar__brand em {
  font-style: italic;
  color: var(--amber);
  font-variation-settings: 'wght' 360, 'opsz' 24, 'SOFT' 100;
}

/* the hamburger: a small round glass button with three drawn lines */
.burger {
  position: relative;
  width: calc(var(--bar) - 12px);
  height: calc(var(--bar) - 12px);
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: none;
  color: var(--bone);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.burger__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 244, 228, 0.12), rgba(255, 244, 228, 0.035));
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 228, 0.18),
    inset 0 0 0 1px rgba(255, 244, 228, 0.08),
    0 6px 14px -8px rgba(0, 0, 0, 0.9);
  transition: background 0.3s ease;
}

.burger__icon {
  width: 46%;
  height: 46%;
  overflow: visible;
}

.burger__l {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.burger:focus-visible { outline: none; }
.burger:focus-visible .burger__face { box-shadow: inset 0 1px 0 rgba(255, 244, 228, 0.18), 0 0 0 2px var(--night), 0 0 0 3.5px var(--amber); }

@media (hover: hover) {
  .burger:hover .burger__face { background: linear-gradient(180deg, rgba(255, 244, 228, 0.18), rgba(255, 244, 228, 0.06)); }
}

/* ---- the panel over the whole frame, cut by the curtain (a path the script redraws) ---- */
.fumo__panel {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(70% 90% at 78% 40%, var(--night-2), transparent 70%),
    linear-gradient(180deg, #14100d 0%, var(--night) 46%, #0a0807 100%);
  box-shadow: inset 0 1px 0 rgba(255, 240, 220, 0.07), inset 0 0 0 1px var(--line);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
}

.fumo.is-open .fumo__panel,
.fumo.is-moving .fumo__panel { visibility: visible; }

/* a warm breath of candle light behind the photo, and the bottom edge of the curtain catching it */
.fumo__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(40% 50% at 70% 55%, rgba(233, 184, 120, 0.09), transparent 70%);
  pointer-events: none;
}

.fumo__body {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  column-gap: calc(var(--pad) * 1.2);
  row-gap: 14px;
  padding: calc(var(--bar) + 10px + var(--pad) * 0.9) var(--pad) var(--pad);
}

/* ---- the big entries ---- */
.fumo__nav {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  min-height: 0;
}

.fumo__list {
  list-style: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: calc(var(--h) * 0.012);
}

.voce__link {
  display: block;
  color: inherit;
  text-decoration: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* each entry rises out of its own mask */
.voce__mask {
  display: block;
  overflow: hidden;
  padding: 0.04em 0 0.1em;
  margin: -0.04em 0 -0.1em;
}

.voce__in {
  display: inline-flex;
  align-items: center;
  gap: 0.24em;
  will-change: transform;
}

.voce__txt {
  --wg: 330;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: clamp(20px, min(5.1vw, 8vh), 50px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  white-space: nowrap;
  font-variation-settings: 'wght' var(--wg), 'opsz' 96, 'SOFT' 60;
  color: var(--bone);
  transition: font-variation-settings 0.55s cubic-bezier(0.2, 0.9, 0.25, 1.15), color 0.4s ease, opacity 0.4s ease;
}

.voce__arrow {
  width: 0.42em;
  height: 0.42em;
  font-size: clamp(20px, min(5.1vw, 8vh), 50px);
  fill: none;
  stroke: var(--amber);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
  transition: stroke-dashoffset 0.5s cubic-bezier(0.3, 0.8, 0.3, 1), opacity 0.25s ease;
}

.voce__note {
  display: block;
  margin-top: 2px;
  font-size: clamp(10px, calc(var(--h) * 0.022), 12px);
  font-variation-settings: 'wdth' 100;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.4s ease;
}

/* the one under the pointer takes weight and the candle colour; the others step back */
.fumo__list.has-on .voce__txt { opacity: 0.42; }
.voce.is-on .voce__txt { --wg: var(--wg-on, 560); opacity: 1; color: #fff7ec; }
.voce.is-on .voce__arrow { stroke-dashoffset: 0; opacity: 1; }
.voce.is-on .voce__note { color: var(--amber); }
.voce__link:focus-visible .voce__txt { text-decoration: none; color: #fff7ec; }
.voce__link:focus-visible .voce__mask { box-shadow: inset 0 -1.5px 0 var(--amber); }

/* ---- the photo ---- */
.foto {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: relative;
  min-height: 0;
}

.foto__frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #090706;
  box-shadow:
    0 0 0 1px rgba(255, 240, 220, 0.07),
    0 30px 60px -30px rgba(0, 0, 0, 0.95),
    0 14px 30px -20px rgba(233, 184, 120, 0.2);
}

.foto__zoom {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.foto__shot {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.foto__shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

/* the line of light along the curtain's edge as the new photo drops in */
.foto__edge {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  z-index: 6;
  background: linear-gradient(90deg, transparent, rgba(255, 226, 180, 0.9) 30%, #fff3df 50%, rgba(255, 226, 180, 0.9) 70%, transparent);
  box-shadow: 0 0 14px 2px rgba(233, 184, 120, 0.45);
  opacity: 0;
  pointer-events: none;
}

.foto__grain {
  position: absolute;
  inset: 0;
  z-index: 7;
  width: 100%;
  height: 100%;
  mix-blend-mode: overlay;
  opacity: 0.32;
  pointer-events: none;
}

.foto__vignette {
  position: absolute;
  inset: 0;
  z-index: 8;
  border-radius: inherit;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(10, 6, 4, 0.55) 100%),
    linear-gradient(180deg, transparent 62%, rgba(10, 6, 4, 0.6) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 240, 220, 0.12);
  pointer-events: none;
}

/* the caption: a small glass label that rolls to the photo of the entry */
.foto__cap {
  position: absolute;
  z-index: 9;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 7px 12px 7px;
  border-radius: 999px;
  background: rgba(20, 15, 12, 0.42);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255, 240, 220, 0.16), inset 0 0 0 1px rgba(255, 240, 220, 0.08);
  font-size: clamp(10px, calc(var(--h) * 0.022), 12px);
  letter-spacing: 0.02em;
  color: #f6ecdf;
}

.foto__cap-mask {
  display: block;
  height: 1.3em;
  overflow: hidden;
}

.foto__cap-roll {
  display: flex;
  flex-direction: column;
}

.foto__cap-roll span {
  display: block;
  height: 1.3em;
  line-height: 1.3em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- address and hours ---- */
.fumo__foot {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: clamp(10px, calc(var(--h) * 0.022), 12px);
  letter-spacing: 0.02em;
  color: var(--bone);
}

.fumo__foot p { white-space: nowrap; }

.fumo__label {
  margin-right: 8px;
  color: var(--muted);
}

/* ---- narrow frames (a phone): the photo becomes a band on top, the entries under it ---- */
@media (max-width: 600px) {
  .fumo { --w: calc(100vw - 24px); }
  .fumo__body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto auto;
    row-gap: calc(var(--h) * 0.03);
  }
  .foto { grid-column: 1; grid-row: 1; }
  .fumo__nav { grid-row: 2; }
  .fumo__foot { grid-row: 3; padding-top: 8px; gap: 2px 16px; }
  .voce__txt, .voce__arrow { font-size: clamp(18px, min(7vw, 5.6vh), 30px); }
  .fumo__list { gap: 0; }
  .voce__link { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
  .voce__note { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}

@media (max-height: 470px) and (min-width: 601px) {
  .voce__note { display: none; }
}
