:root {
  --ink: #0a0806;
  --cream: #ecdfc5;
  --cream-dim: rgba(236, 223, 197, .62);
  --brass: #c29a5b;
  --brass-hi: #e4c48a;
  --oxblood: #7a2412;
  --serif: "Bodoni Moda", Georgia, serif;
  --text: "Cormorant Garamond", Georgia, serif;
  --label: "Josefin Sans", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: #000; color: var(--cream); }
body { font-family: var(--text); font-size: 20px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.is-locked { overflow: hidden; height: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; display: block; z-index: 0; }

.kicker { font-family: var(--label); font-weight: 300; font-size: 12px; letter-spacing: .38em; text-transform: uppercase; color: var(--brass); margin: 0 0 14px; }

/* ---------- pulsanti ---------- */
.btn { font-family: var(--label); font-size: 13px; letter-spacing: .32em; text-transform: uppercase; padding: 16px 34px 14px; border-radius: 2px; transition: background .4s, color .4s, border-color .4s, opacity .4s; }
.btn--brass { border: 1px solid var(--brass); color: var(--brass-hi); background: rgba(194, 154, 91, .06); }
.btn--brass:hover, .btn--brass:focus-visible { background: var(--brass); color: #120c05; }
.btn--ghost { color: var(--cream-dim); border: 1px solid transparent; }
.btn--ghost:hover { color: var(--cream); }
:focus-visible { outline: 1px solid var(--brass-hi); outline-offset: 4px; }

/* ---------- intro ---------- */
.intro { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; text-align: center; background: radial-gradient(ellipse at 50% 45%, #120c08 0%, #000 70%); transition: opacity 1.4s ease; padding: 24px 16px; }
.intro.is-out { opacity: 0; pointer-events: none; }
.intro__logo { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: clamp(52px, 11vw, 132px); line-height: .9; margin: 0 0 22px; color: var(--cream); letter-spacing: -.01em; }
.intro__logo span { display: block; }
.intro__logo span + span { font-style: normal; font-size: .55em; letter-spacing: .32em; text-transform: uppercase; margin-top: 18px; color: var(--brass-hi); padding-left: .32em; }
.intro__line { font-style: italic; font-size: 22px; color: var(--cream-dim); margin: 0 0 40px; }
.intro__load { width: 160px; height: 1px; background: rgba(236, 223, 197, .15); margin: 0 auto 14px; overflow: hidden; }
.intro__load span { display: block; height: 100%; width: 0; background: var(--brass); transition: width .3s; }
.intro__status { font-family: var(--label); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--cream-dim); margin: 0 0 30px; min-height: 1.5em; }
.intro__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }
.intro__actions[hidden] { display: none; }
.intro__hint { font-family: var(--label); font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: rgba(236, 223, 197, .35); margin: 0; }

/* ---------- alla porta ---------- */
.door-ui { position: fixed; left: 0; right: 0; bottom: max(8vh, 48px); z-index: 20; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; padding: 0 16px; }
.door-ui[hidden] { display: none; }
.door-ui__whisper { font-family: var(--text); font-style: italic; font-size: clamp(24px, 3vw, 34px); margin: 0; color: var(--cream); text-shadow: 0 2px 20px #000; }
.door-ui .btn { opacity: 0; transform: translateY(8px); transition: opacity .8s, transform .8s, background .4s, color .4s; }
.door-ui.is-ready .btn { opacity: 1; transform: none; }
.door-ui__whisper { opacity: 0; transition: opacity 1s; }
.door-ui.is-ready .door-ui__whisper { opacity: 1; }

/* ---------- barra in alto ---------- */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 25; display: flex; justify-content: space-between; align-items: center; padding: 24px clamp(16px, 4vw, 48px); opacity: 0; pointer-events: none; transition: opacity 1.2s; }
body.is-inside .topbar { opacity: 1; pointer-events: auto; }
.topbar__logo { font-family: var(--serif); font-style: italic; font-size: 22px; text-decoration: none; color: var(--cream); }
.topbar__menu { display: flex; align-items: center; gap: 14px; font-family: var(--label); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--cream); }
.topbar__burger { width: 26px; height: 9px; border-top: 1px solid var(--brass-hi); border-bottom: 1px solid var(--brass-hi); transition: transform .4s; }
.topbar__menu[aria-expanded="true"] .topbar__burger { transform: scaleY(.1); }

.nav { position: fixed; inset: 0; z-index: 24; background: rgba(0, 0, 0, .92); backdrop-filter: blur(6px); display: flex; flex-direction: column; justify-content: center; padding: 0 clamp(16px, 8vw, 120px); }
.nav[hidden] { display: none; }
.nav__list { list-style: none; margin: 0; padding: 0; }
.nav__list a { display: flex; align-items: baseline; gap: 22px; font-family: var(--serif); font-size: clamp(36px, 6vw, 72px); text-decoration: none; line-height: 1.25; color: var(--cream); transition: color .3s, padding .4s; }
.nav__list a:hover { color: var(--brass-hi); padding-left: 10px; }
.nav__list span { font-family: var(--label); font-size: 12px; letter-spacing: .3em; color: var(--brass); width: 36px; }
.nav__foot { margin-top: 48px; font-family: var(--label); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--cream-dim); }

/* ---------- pallini ---------- */
.dots { position: fixed; right: clamp(12px, 2.4vw, 32px); top: 50%; transform: translateY(-50%); z-index: 22; display: flex; flex-direction: column; gap: 14px; opacity: 0; transition: opacity 1s; }
body.is-inside .dots { opacity: 1; }
.dots button { width: 7px; height: 7px; border-radius: 50%; background: rgba(236, 223, 197, .25); padding: 0; transition: background .4s, transform .4s; }
.dots button.is-on { background: var(--brass-hi); transform: scale(1.5); }

/* ---------- audio ---------- */
.sound { position: fixed; left: clamp(16px, 3vw, 40px); bottom: clamp(16px, 3vw, 36px); z-index: 26; display: flex; align-items: flex-end; gap: 3px; height: 18px; padding: 4px; opacity: 0; transition: opacity 1s; }
body.is-started .sound { opacity: 1; }
.sound span { width: 2px; height: 3px; background: var(--brass-hi); transition: height .3s; }
.sound[aria-pressed="true"] span { animation: eq 1.1s ease-in-out infinite; }
.sound span:nth-child(2) { animation-delay: -.3s !important; }
.sound span:nth-child(3) { animation-delay: -.6s !important; }
.sound span:nth-child(4) { animation-delay: -.9s !important; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 16px; } }

.scroll-hint { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 20; display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--label); font-size: 10px; letter-spacing: .4em; text-transform: uppercase; color: var(--cream-dim); opacity: 0; transition: opacity .8s; pointer-events: none; }
body.is-inside .scroll-hint.is-on { opacity: 1; }
.scroll-hint i { width: 1px; height: 36px; background: linear-gradient(var(--brass), transparent); animation: drop 2s ease-in-out infinite; transform-origin: top; }
@keyframes drop { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }


/* ---------- interfaccia del bancone ---------- */
.bar-ui { position: fixed; z-index: 16; left: clamp(16px, 7vw, 110px); bottom: clamp(70px, 13vh, 130px); max-width: 420px; opacity: 0; pointer-events: none; transition: opacity .9s; text-shadow: 0 2px 22px rgba(0, 0, 0, .95); }
.bar-ui.is-on { opacity: 1; pointer-events: auto; }
.bar-ui__count { display: flex; align-items: center; gap: 10px; font-family: var(--label); font-size: 12px; letter-spacing: .2em; color: var(--cream-dim); margin-bottom: 26px; }
.bar-ui__count i { width: 40px; height: 1px; background: rgba(236, 223, 197, .3); }
.bar-ui__name { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4vw, 56px); line-height: 1.04; margin: 0 0 14px; }
.bar-ui__desc { font-size: 21px; font-style: italic; color: var(--cream-dim); margin: 0 0 26px; min-height: 3em; }
.bar-ui__name, .bar-ui__desc, .bar-ui .kicker { transition: opacity .5s, transform .5s; }
.bar-ui.is-swap .bar-ui__name, .bar-ui.is-swap .bar-ui__desc, .bar-ui.is-swap .kicker { opacity: 0; transform: translateX(-12px); }
.bar-ui__nav { display: flex; gap: 10px; margin-bottom: 16px; }
.bar-ui__nav button { width: 52px; height: 52px; border: 1px solid rgba(194, 154, 91, .55); border-radius: 50%; color: var(--brass-hi); font-family: var(--label); font-size: 18px; transition: background .3s, color .3s; }
.bar-ui__nav button:hover { background: var(--brass); color: #120c05; }
.bar-ui__hint { font-family: var(--label); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: rgba(236, 223, 197, .38); margin: 0; }

/* ---------- pagine dopo la scena ---------- */
main { position: relative; z-index: 10; }
.story { height: 1300vh; }
.page { position: relative; background: #000; padding: clamp(80px, 14vh, 160px) clamp(16px, 7vw, 110px); }
.page::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 40vh; background: linear-gradient(transparent, #000); pointer-events: none; }
.page__inner { max-width: 1100px; margin: 0 auto; }
.page__title { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(64px, 10vw, 140px); line-height: .95; margin: 0 0 28px; }
.page__lead { font-size: 24px; font-style: italic; color: var(--cream-dim); max-width: 640px; margin: 0 0 70px; }
.page__note { margin-top: 60px; font-style: italic; color: var(--cream-dim); }
.menu { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 0 60px; }
.menu li { padding: 26px 0; border-top: 1px solid rgba(194, 154, 91, .25); display: grid; grid-template-columns: 30px 1fr; gap: 0 10px; cursor: pointer; }
.menu li:hover h3 { color: var(--brass-hi); }
.menu .n { font-family: var(--label); font-size: 11px; letter-spacing: .2em; color: var(--brass); padding-top: 9px; }
.menu h3 { font-family: var(--serif); font-weight: 400; font-size: 27px; margin: 0 0 6px; transition: color .3s; }
.menu p { margin: 0; color: var(--cream-dim); font-size: 19px; }
.visit { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 40px; margin-top: 40px; }
.visit h3 { font-family: var(--label); font-weight: 300; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--brass); margin: 0 0 14px; }
.visit p { margin: 0 0 14px; font-size: 23px; }
.visit .small { font-size: 18px; font-style: italic; color: var(--cream-dim); }
.link { font-family: var(--label); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--brass-hi); text-decoration: none; border-bottom: 1px solid rgba(228, 196, 138, .4); padding-bottom: 3px; }
.foot { max-width: 1100px; margin: 120px auto 0; padding-top: 30px; border-top: 1px solid rgba(236, 223, 197, .12); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-family: var(--label); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: rgba(236, 223, 197, .4); }
.foot p { margin: 0; }
.noscript { position: fixed; inset: auto 16px 16px; z-index: 99; }

@media (max-width: 760px) {
  body { font-size: 18px; }
  .bar-ui { left: 16px; right: 16px; bottom: 28px; max-width: none; }
  .bar-ui__desc { font-size: 18px; min-height: 0; margin-bottom: 16px; }
  .bar-ui__count { margin-bottom: 12px; }
  .bar-ui__hint { display: none; }
  .bar-ui__nav { position: absolute; right: 0; top: 0; margin: 0; }
  .bar-ui__nav button { width: 44px; height: 44px; }
  .dots { display: none; }
  .topbar { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-hint i, .sound span { animation: none !important; }
}

/* ---------- sottotitoli (come in un film) ---------- */
.subs { position: fixed; left: 0; right: 0; bottom: clamp(96px, 15vh, 150px); z-index: 18; display: flex; justify-content: center; padding: 0 16px; pointer-events: none; }
.subs__line { margin: 0; max-width: 760px; text-align: center; font-family: var(--text); font-style: italic; font-size: clamp(21px, 2.3vw, 30px); line-height: 1.35; color: #f1e7d3; text-shadow: 0 1px 2px #000, 0 0 22px rgba(0, 0, 0, .95); opacity: 0; transform: translateY(6px); transition: opacity .7s ease, transform .7s ease; }
.subs.is-on .subs__line { opacity: 1; transform: none; }
.subs__line::before { content: "— "; color: var(--brass); }

/* la domanda dallo spioncino ha lo stesso stile dei sottotitoli */
.door-ui__whisper { font-family: var(--text); font-style: italic; font-size: clamp(21px, 2.3vw, 30px); color: #f1e7d3; text-shadow: 0 1px 2px #000, 0 0 22px rgba(0, 0, 0, .95); }
.door-ui__whisper::before { content: "— "; color: var(--brass); }

/* ---------- "scorri per continuare" ---------- */
.scroll-hint { flex-direction: row; gap: 14px; bottom: clamp(26px, 5vh, 46px); letter-spacing: .32em; font-size: 11px; color: rgba(236, 223, 197, .75); }
.scroll-hint i { display: none; }
.scroll-hint__label::after { content: "Scorri"; }
.scroll-hint__finger { display: none; }
.scroll-hint .wheel { animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(7px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
@media (pointer: coarse) {
  .scroll-hint__mouse { display: none; }
  .scroll-hint__finger { display: block; }
  .scroll-hint__label::after { content: "Scorri"; }
  .scroll-hint .tip { animation: swipe 1.8s ease-in-out infinite; }
}
@keyframes swipe { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 80% { transform: translateY(-14px); opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .scroll-hint .wheel, .scroll-hint .tip { animation: none; } }
.scroll-hint__label { white-space: nowrap; }

/* finché non si è entrati dalla porta, le sezioni sotto non esistono: niente testo sopra la scena */
body.is-locked main { display: none; }
.intro__skip { margin: -14px auto 26px; display: block; font-size: 11px; }

/* ---------- partenza dalla porta: pochissimo testo ---------- */
.intro { background: #000; }
.start { position: fixed; left: 0; right: 0; bottom: max(9vh, 52px); z-index: 20; display: flex; justify-content: center; opacity: 0; animation: fadeUp 1.2s ease forwards; }
.start[hidden] { display: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.intro__skip { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40; margin: 0; }
/* il nome resta sempre in alto a sinistra; il menu compare solo una volta dentro */
body.is-started .topbar { opacity: 1; pointer-events: auto; }
.topbar__logo { font-size: 18px; }
.topbar__menu { opacity: 0; pointer-events: none; transition: opacity 1s; }
body.is-inside .topbar__menu { opacity: 1; pointer-events: auto; }
.nav__list a { gap: 0; }
.menu li { grid-template-columns: 1fr; }
.page__title { font-size: clamp(48px, 7vw, 96px); }
.page__lead { margin-bottom: 50px; }
.visit p { margin-bottom: 10px; }

/* ---------- frecce ai lati del bicchiere ---------- */
.glass-arrow { position: fixed; top: 50%; z-index: 17; width: 64px; height: 96px; margin-top: -48px; display: grid; place-items: center; color: rgba(236, 223, 197, .75); opacity: 0; pointer-events: none; transition: opacity .9s, color .3s; }
.glass-arrow--l { left: calc(50% - min(30vw, 260px) - 32px); }
.glass-arrow--r { left: calc(50% + min(30vw, 260px) - 32px); }
body.is-bar .glass-arrow { opacity: 1; pointer-events: auto; }
.glass-arrow:hover { color: var(--brass-hi); }
.glass-arrow svg { animation: nudgeR 2.4s ease-in-out infinite; }
.glass-arrow--l svg { animation-name: nudgeL; }
@keyframes nudgeR { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
@keyframes nudgeL { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-5px); } }
@media (max-width: 760px) { .glass-arrow--l { left: 4px; } .glass-arrow--r { left: auto; right: 4px; } }
@media (prefers-reduced-motion: reduce) { .glass-arrow svg { animation: none; } }
body.is-bar .scroll-hint { bottom: auto; top: clamp(70px, 11vh, 110px); }

/* ---------- durante l'entrata non si scorre ---------- */
html.no-scroll, html.no-scroll body { overflow: hidden; }

/* ---------- le informazioni al centro della fiche ---------- */
.info { position: fixed; inset: 0; z-index: 19; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity 1.1s ease; }
body.is-info .info { opacity: 1; pointer-events: auto; }
.info__inner {
  width: 56vmin; height: 56vmin; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: radial-gradient(circle, #0c0a09 0%, #0c0a09 78%, rgba(12,10,9,0) 81%); padding: 5vmin; color: #e9dcc0;
}
.info__kicker { font-family: var(--label); font-weight: 300; font-size: max(9px, 1.25vmin); letter-spacing: .4em; text-transform: uppercase; color: #c9a25a; margin: 0 0 1.4vmin; }
.info__title { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: max(22px, 4.6vmin); line-height: 1; margin: 0 0 2.2vmin; color: #f1e7d3; }
.info__line { font-family: var(--text); font-size: max(14px, 2.15vmin); margin: 0 0 .6vmin; color: #e9dcc0; }
.info__line a { color: #e4c48a; text-decoration: none; letter-spacing: .06em; }
.info__links { font-family: var(--label); font-size: max(9px, 1.25vmin); letter-spacing: .2em; text-transform: uppercase; margin: 1.4vmin 0 2.2vmin; color: rgba(233,220,192,.5); }
.info__links a { color: #c9a25a; text-decoration: none; }
.info__book { padding: 1.3vmin 3.4vmin 1.1vmin; font-size: max(10px, 1.3vmin); text-decoration: none; }
.info__foot { font-family: var(--label); font-weight: 300; font-size: max(8px, 1vmin); letter-spacing: .2em; text-transform: uppercase; color: rgba(233,220,192,.38); margin: 2.2vmin 0 0; }
/* senza 3D le informazioni restano in pagina, semplici */
body.is-fallback .info { position: static; opacity: 1; pointer-events: auto; min-height: 100vh; }

/* ---------- cornice "a stampa" anni '20 ---------- */
.deco { position: fixed; inset: 14px; z-index: 5; pointer-events: none; opacity: 0; transition: opacity 2s; }
body.is-started .deco { opacity: .5; }
.deco i { position: absolute; width: 34px; height: 34px; border-color: rgba(201,162,90,.55); border-style: solid; }
.deco i:nth-child(1) { top: 0; left: 0; border-width: 1px 0 0 1px; }
.deco i:nth-child(2) { top: 0; right: 0; border-width: 1px 1px 0 0; }
.deco i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.deco i:nth-child(4) { bottom: 0; right: 0; border-width: 0 1px 1px 0; }
.deco i::after { content: ""; position: absolute; width: 5px; height: 5px; border: 1px solid rgba(201,162,90,.55); transform: rotate(45deg); }
.deco i:nth-child(1)::after { top: 6px; left: 6px; } .deco i:nth-child(2)::after { top: 6px; right: 6px; }
.deco i:nth-child(3)::after { bottom: 6px; left: 6px; } .deco i:nth-child(4)::after { bottom: 6px; right: 6px; }
/* il menu compare solo dentro; fuori, solo il nome */
body.is-outside .topbar__menu { opacity: 0; pointer-events: none; }

/* pop-up di prenotazione */
.book { width: min(420px, calc(100vw - 32px)); padding: 44px 32px 32px; border: 1px solid rgba(194, 154, 91, .35); background: radial-gradient(circle at 50% 0%, #1b140d, #0a0806 70%); color: #e9dcc4; text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
.book::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(3px); }
.book[open] { animation: bookIn .6s cubic-bezier(.2, .7, .2, 1); }
@keyframes bookIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.book__close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; background: none; color: var(--brass-hi); font-size: 24px; cursor: pointer; }
.book__title { font-family: var(--serif, "Bodoni Moda", Georgia, serif); font-style: italic; font-weight: 400; font-size: 30px; margin: 6px 0 12px; }
.book__text { font-size: 16px; opacity: .8; margin: 0 0 26px; }
.book__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.book__btn { padding: 12px 26px 10px; text-decoration: none; letter-spacing: .3em; text-transform: uppercase; font-size: 11px; }
.book__num { margin: 22px 0 0; font-size: 13px; letter-spacing: .2em; color: var(--brass); }
