/* Charle's — tutto al buio, come il video e il volantino del locale.
   Intro: logo in alto, il panino del video a schermo pieno.
   Dopo il video il menu prende tutta la pagina, con il logo in filigrana. */
:root {
  --night: #0e0b09;
  --night-2: #1a1411;
  --night-3: #241c17;
  --cream: #f6ead6;
  --cream-soft: #b8aa96;
  --rule: rgba(246, 234, 214, .12);
  --cheddar: #f4a82a;
  --ketchup: #d23a26;
  --display: 'Ultra', 'Rockwell Extra Bold', 'Rockwell', Georgia, serif;
  --label: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --body: 'Barlow', 'Helvetica Neue', Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--night); }
body:not(.is-done) { overflow: hidden; height: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
a { color: var(--cheddar); }
:focus-visible { outline: 3px solid var(--cheddar); outline-offset: 3px; }

/* ------------------------------------------------------------------ intro */
.intro { position: fixed; inset: 0; z-index: 3; transition: opacity .7s ease, transform .9s cubic-bezier(.3, .7, .2, 1); }
.is-done .intro { opacity: 0; transform: scale(1.08); pointer-events: none; }
.is-skipintro .intro, .intro.is-gone { display: none; }
.film { position: absolute; inset: 0; display: grid; place-items: center; }
.frame { position: relative; cursor: pointer; outline: none; }
.frame:focus-visible::after { content: ""; position: absolute; inset: 30% 10% 12%; border-radius: 40%; outline: 3px solid var(--cheddar); }
.breath { position: absolute; inset: 0; transform-origin: 50% 75%; }
.is-idle .breath { animation: breath 4s ease-in-out infinite; }
@keyframes breath { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }
.frame video, .frame .poster { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: fill; }
.poster { transition: opacity .25s; -webkit-user-drag: none; user-select: none; }
.is-playing .poster { opacity: 0; }
.vignette { position: absolute; inset: -1px; pointer-events: none; box-shadow: inset 0 0 80px 46px var(--night); }
.shade { position: absolute; inset: 0; pointer-events: none; transition: opacity .6s; background: linear-gradient(180deg, rgba(14, 11, 9, .78) 0%, rgba(14, 11, 9, 0) 30%, rgba(14, 11, 9, 0) 78%, rgba(14, 11, 9, .6) 100%); }
.is-playing .shade { opacity: 0; }
.shine {
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url(/media/panino-mask.png) 0 0 / 100% 100% no-repeat;
  mask: url(/media/panino-mask.png) 0 0 / 100% 100% no-repeat;
  background: linear-gradient(112deg, rgba(255,255,255,0) 40%, rgba(255,240,210,.55) 49%, rgba(255,255,255,.75) 50%, rgba(255,240,210,.55) 51%, rgba(255,255,255,0) 60%);
  background-size: 260% 100%; background-position: 170% 0;
  mix-blend-mode: soft-light; opacity: 0;
}
.shine.is-on { animation: sweep 1.2s cubic-bezier(.45, .05, .3, 1) forwards; }
@keyframes sweep { 0% { background-position: 170% 0; opacity: 1; } 100% { background-position: -70% 0; opacity: 1; } }
.is-playing .shine { display: none; }

.brand {
  position: absolute; left: 0; right: 0;
  top: calc(env(safe-area-inset-top, 0px) + clamp(14px, 3vh, 34px));
  display: flex; justify-content: center;
  pointer-events: none;
  transition: opacity .8s, transform .8s cubic-bezier(.2, .8, .2, 1);
}
.brand img { height: clamp(118px, 21vh, 210px); width: auto; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .6)); }
.is-intro .brand { opacity: 0; transform: translateY(-12px); }
.is-playing .brand { opacity: 0; transform: translateY(-24px) scale(.9); transition: opacity .35s ease, transform .5s ease; }

.hint {
  position: absolute; left: 50%;
  bottom: calc(var(--safe-b) + clamp(30px, 7vh, 64px));
  transform: translateX(-50%);
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 10px 6px; border: 0; background: none; color: var(--cream);
  white-space: nowrap;
  transition: opacity .4s, transform .4s;
}
.hint__row { display: inline-flex; align-items: center; gap: 14px; }
.hint__row::before, .hint__row::after { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, rgba(246, 234, 214, 0), rgba(246, 234, 214, .55)); }
.hint__row::after { transform: scaleX(-1); }
.hint__text {
  font-family: var(--label); font-weight: 600; font-size: 14px; letter-spacing: .42em; text-transform: uppercase;
  padding-left: .42em;
  background: linear-gradient(100deg, rgba(246, 234, 214, .55) 0%, rgba(246, 234, 214, .55) 40%, #fff 50%, rgba(246, 234, 214, .55) 60%, rgba(246, 234, 214, .55) 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: glint 3.2s ease-in-out infinite;
}
@keyframes glint { 0% { background-position: 100% 0; } 55%, 100% { background-position: 0% 0; } }
.hint__sub { font-family: var(--body); font-size: 12px; letter-spacing: .04em; color: rgba(246, 234, 214, .45); }
.hint.is-off { opacity: 0; transform: translate(-50%, 10px); pointer-events: none; }
.hint.is-wait .hint__text { animation-duration: .9s; }

.skip {
  position: absolute;
  right: max(20px, env(safe-area-inset-right, 0px));
  bottom: calc(var(--safe-b) + 26px);
  display: inline-flex; flex-direction: column; align-items: flex-end; gap: 7px;
  padding: 8px 2px; border: 0; background: none; color: rgba(246, 234, 214, .78);
  font-family: var(--label); font-weight: 600; font-size: 13px; letter-spacing: .38em; text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .6);
  opacity: 0; pointer-events: none; transition: opacity .4s, color .2s;
}
.skip__label { display: inline-flex; align-items: center; gap: 8px; padding-left: .38em; }
.skip__label svg { width: 9px; height: 9px; }
.skip__bar { position: relative; width: 100%; min-width: 64px; height: 1px; background: rgba(246, 234, 214, .22); overflow: hidden; }
.skip__bar::after { content: ""; position: absolute; inset: 0; background: var(--cream); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.is-playing .skip { opacity: 1; pointer-events: auto; }

/* ----------------------------------------------------------- filigrana */
.filigrana {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  display: grid; place-items: center;
  opacity: 0; transition: opacity 1.4s ease .4s;
}
.is-done .filigrana { opacity: 1; }
.filigrana img { width: min(92vw, 620px); height: auto; opacity: .085; transform: rotate(-8deg); }
.filigrana::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cg fill='none' stroke='%23f6ead6' stroke-opacity='.035' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M93 108a17 13 0 0 1 34 0z'/%3E%3Cpath d='M91 113h38'/%3E%3Cpath d='M92 118q4.5 3 9 0t9 0t9 0t9 0'/%3E%3Crect x='93' y='122' width='34' height='7' rx='3.5'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 220px 220px;
}

/* ------------------------------------------------------------------- menu */
.menu {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(244, 168, 42, .10), rgba(244, 168, 42, 0) 60%),
    radial-gradient(90% 50% at 50% 100%, rgba(210, 58, 38, .08), rgba(210, 58, 38, 0) 70%);
  opacity: 0; visibility: hidden;
  transition: opacity .8s ease .15s, visibility 0s linear .95s;
}
html { scroll-padding-top: 70px; }
html.has-modal { overflow: hidden; }
.is-done .menu { opacity: 1; visibility: visible; transition: opacity .8s ease .15s, visibility 0s; }
.menu__in {
  position: relative; z-index: 1;
  max-width: 680px; margin: 0 auto;
  padding-block: calc(env(safe-area-inset-top, 0px) + 26px) calc(var(--safe-b) + 48px);
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.mhead { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.mhead img { width: clamp(108px, 30vw, 150px); height: auto; filter: drop-shadow(0 10px 26px rgba(0, 0, 0, .6)); }
.mhead__tag {
  margin: 4px 0 0; display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--label); font-weight: 600; font-size: 14px; letter-spacing: .38em; text-transform: uppercase; color: var(--cream-soft);
}
.mhead__tag::before, .mhead__tag::after { content: ""; width: 24px; height: 2px; border-radius: 2px; background: var(--cheddar); }
.mtitle { margin: 24px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(28px, 8.4vw, 44px); line-height: 1.04; text-align: center; text-wrap: balance; }
.mtitle span { color: var(--cheddar); }

/* sezioni: barra che resta in alto mentre si scorre */
.cats {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  display: flex; gap: 22px; overflow-x: auto;
  margin: 22px calc(-1 * max(20px, env(safe-area-inset-left, 0px))) 0;
  padding: 0 max(20px, env(safe-area-inset-left, 0px));
  background: rgba(14, 11, 9, .97);
  border-bottom: 1px solid var(--rule);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  scrollbar-width: none;
}
body.is-done::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--night); }
.cats::-webkit-scrollbar { display: none; }
.cats:empty { display: none; }
.cat-chip {
  flex: none; position: relative;
  padding: 15px 0 13px; border: 0; background: none; color: rgba(246, 234, 214, .55);
  font-family: var(--label); font-weight: 700; font-size: 15px; letter-spacing: .16em; text-transform: uppercase;
  transition: color .2s;
}
.cat-chip::after { content: ""; position: absolute; left: 0; right: .16em; bottom: -1px; height: 2px; background: var(--cheddar); transform: scaleX(0); transition: transform .25s ease; }
.cat-chip.is-on { color: var(--cream); }
.cat-chip.is-on::after { transform: scaleX(1); }

.loading { text-align: center; color: var(--cream-soft); padding: 40px 0; }
.group { margin-top: 26px; scroll-margin-top: 70px; }
.group__head { display: flex; align-items: center; gap: 12px; }
.group__name {
  display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0;
  margin: 0;
  font-family: var(--label); font-weight: 700; font-size: 16px; letter-spacing: .28em; text-transform: uppercase; color: var(--cheddar);
}
.group__name::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(244, 168, 42, .5), rgba(244, 168, 42, 0)); }
.group__note { margin: 4px 0 0; font-size: 13.5px; color: var(--cream-soft); }
.rows { list-style: none; margin: 4px 0 0; padding: 0; }
.row { display: flex; align-items: flex-start; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.row__photo {
  flex: none; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 4px; overflow: hidden;
  background: var(--night-3); box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .8);
}
.row__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.row__main { flex: 1; min-width: 0; }
.row__line { display: flex; align-items: baseline; gap: 10px; }
.row__name { font-family: var(--label); font-weight: 700; font-size: 21px; letter-spacing: .03em; text-transform: uppercase; line-height: 1.1; min-width: 0; overflow-wrap: anywhere; }
.row__qty { font-family: var(--label); font-weight: 600; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--cream-soft); white-space: nowrap; }
.row__fill { flex: 1; border-bottom: 1px dotted rgba(246, 234, 214, .22); transform: translateY(-5px); min-width: 12px; }
.row__price { font-family: var(--label); font-weight: 700; font-size: 22px; color: var(--cream); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row__price b { color: var(--cheddar); font-weight: 700; margin-right: 2px; }
.row__desc { margin: 4px 0 0; font-size: 14px; color: var(--cream-soft); line-height: 1.35; }
.row__tags { display: flex; gap: 6px; margin-top: 6px; }
.tag { font-family: var(--label); font-weight: 700; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; padding: 3px 7px; border-radius: 2px; }
.tag--new { background: var(--cheddar); color: #1b130c; }
.tag--out { border: 1px solid rgba(246, 234, 214, .3); color: var(--cream-soft); }
.tag--hidden { background: var(--night-3); color: var(--cream-soft); }
.row.is-out .row__name, .row.is-out .row__price { opacity: .45; }
.row.is-out .row__price { text-decoration: line-through; }
.row.is-hidden { opacity: .5; }

.mfoot { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 40px; text-align: center; }
.shop { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.shop__row { display: inline-flex; align-items: center; gap: 8px; color: var(--cream); text-decoration: none; font-size: 15px; }
.shop__row svg { color: var(--cheddar); flex: none; }
.mfoot__note { margin: 6px 0 0; color: var(--cream-soft); font-size: 13.5px; max-width: 46ch; }
.mfoot__note:empty { display: none; }
.mfoot__slogan { margin: 6px 0 0; font-family: var(--label); font-weight: 600; font-size: 13px; letter-spacing: .32em; text-transform: uppercase; color: rgba(246, 234, 214, .4); }
.mfoot__admin { margin-top: 10px; font-family: var(--label); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: rgba(246, 234, 214, .35); text-decoration: none; padding: 8px; }
.is-admin .mfoot__admin { display: none; }

/* ------------------------------------------------------------ foto grande */
.lightbox {
  border: 0; padding: 0; margin: auto; background: transparent; color: var(--cream);
  max-width: min(92vw, 560px); width: 100%;
}
.lightbox::backdrop { background: rgba(6, 4, 3, .82); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lightbox img { display: block; width: 100%; max-height: 70vh; object-fit: contain; border-radius: 4px; background: var(--night-2); }
.lightbox__cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 4px 0; font-family: var(--label); font-weight: 700; font-size: 22px; text-transform: uppercase; letter-spacing: .03em; }
.lightbox__cap b { color: var(--cheddar); }
.lightbox__close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 3px; border: 1px solid rgba(246, 234, 214, .25); background: rgba(14, 11, 9, .75); color: var(--cream); font-size: 22px; line-height: 1; }

.net {
  position: fixed; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%);
  z-index: 50; background: var(--night-3); color: var(--cream); padding: 9px 16px; border-radius: 4px; font-size: 13px;
  border: 1px solid var(--rule); max-width: calc(100vw - 32px); text-align: center;
}
.noscript { text-align: center; padding: 30px; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b));
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 100;
  background: var(--cream); color: var(--night); padding: 11px 18px; border-radius: 4px;
  font-size: 14.5px; font-weight: 500; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .7);
  transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast--error { background: var(--ketchup); color: #fff; }
.toast--ok { background: #3f8a4f; color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .is-idle .breath, .hint__text { animation: none; }
  .intro, .menu, .filigrana, .brand { transition-duration: .01ms !important; transition-delay: 0s !important; }
}
