/* ===========================================================================
   ONCE UPON A DISH — Fondamenta comuni a tutte le pagine
   Carta, inchiostro, oro e la rosa del marchio.
   Qui stanno: colori, caratteri, carta, bottoni, fregi, barra di
   navigazione, piè di pagina e le apparizioni allo scorrimento.
   Gli stili delle singole pagine stanno in pages.css, menu.css, booking.css.
   =========================================================================== */

:root {
  /* carta */
  --p-0: #fbf5e4; --p-1: #f4e9ce; --p-2: #ecdfbd; --p-3: #e3d2ab; --p-4: #d9c69c;

  /* inchiostro */
  --ink: #3f3020; --ink-soft: #6c5537;
  /* le note minori: abbastanza scure da restare leggibili (contrasto ~5:1) */
  --ink-faint: #74624a;
  /* i fregi, che invece devono restare lievi */
  --filigree: rgba(100,76,44,.34);
  --rule: rgba(141,110,61,.32);
  --rule-soft: rgba(141,110,61,.2);

  /* oro */
  --gold: #b8912f; --gold-lt: #e3c37e; --gold-dk: #7d5f1c; --gold-deep: #5c3f12;

  /* la rosa del marchio */
  --rose: #9e2a32; --rose-lt: #c0474f; --rose-dk: #6d1a21;
  --wax: #8d2b21;

  --danger: #94492b;

  --f-disp: "Cinzel", Georgia, "Times New Roman", serif;
  --f-body: "EB Garamond", Georgia, "Times New Roman", serif;
  --f-ui:   "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --ease: cubic-bezier(.22,.61,.36,1);
  --shadow:      0 1px 2px rgba(79,62,41,.05), 0 16px 40px rgba(79,62,41,.1);
  --shadow-lift: 0 2px 6px rgba(79,62,41,.07), 0 26px 56px rgba(79,62,41,.16);

  --nav-h: 58px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* i titoli raggiunti da un collegamento non finiscono sotto la barra */
  scroll-padding-top: calc(var(--nav-h) + 14px);
}

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--p-2);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

img { max-width: 100%; display: block; height: auto; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: -100px; left: 50%; transform: translateX(-50%);
  z-index: 99; padding: 12px 22px; border-radius: 0 0 8px 8px;
  background: #52402a; color: var(--p-0);
  font-family: var(--f-ui); font-size: .88rem; text-decoration: none;
  transition: top .25s var(--ease);
}
.skip-link:focus { top: 0; }

/* ===========================================================================
   LA CARTA — fondo di tutte le pagine
   =========================================================================== */

.sheet { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.paper {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(28% 22% at 14% 11%, rgba(252,245,226,.5),  transparent 70%),
    radial-gradient(22% 18% at 67% 8%,  rgba(206,178,128,.26), transparent 72%),
    radial-gradient(26% 20% at 90% 34%, rgba(196,166,116,.3),  transparent 74%),
    radial-gradient(30% 22% at 34% 42%, rgba(250,242,220,.38), transparent 72%),
    radial-gradient(24% 18% at 8%  58%, rgba(200,170,120,.24), transparent 74%),
    radial-gradient(34% 24% at 72% 66%, rgba(246,236,210,.34), transparent 72%),
    radial-gradient(26% 20% at 22% 86%, rgba(198,168,118,.28), transparent 74%),
    radial-gradient(30% 22% at 88% 92%, rgba(190,160,110,.3),  transparent 76%),
    linear-gradient(162deg, var(--p-1) 0%, var(--p-2) 34%, var(--p-3) 66%, var(--p-4) 100%);
}

.paper__edge {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply;
  background:
    radial-gradient(124% 106% at 50% 50%, transparent 46%, rgba(140,106,56,.1) 76%, rgba(100,72,32,.26) 100%),
    linear-gradient(90deg, rgba(128,98,52,.26), transparent 9%, transparent 91%, rgba(128,98,52,.26));
}

.grain {
  position: absolute; inset: 0; pointer-events: none;
  mix-blend-mode: multiply; opacity: .2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 190px 190px;
}
.grain::after {
  content: ""; position: absolute; inset: 0; opacity: .3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.09' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='600' height='600' filter='url(%23f)'/%3E%3C/svg%3E");
  background-size: 600px 600px;
}

/* il contenuto sta sopra la carta */
.page { position: relative; z-index: 1; }

/* ===========================================================================
   IMPAGINAZIONE E TIPOGRAFIA
   =========================================================================== */

.shell { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: clamp(16px, 5vw, 40px); }
.shell--narrow { max-width: 760px; }

.section { padding-block: clamp(52px, 9vw, 104px); }
.section--tight { padding-block: clamp(36px, 6vw, 68px); }
.section + .section { padding-top: 0; }

.prose { max-width: 62ch; }
.prose p { margin: 0 0 1.1em; }
.prose p:last-child { margin-bottom: 0; }

.eyebrow {
  margin: 0;
  font-family: var(--f-disp); font-weight: 500;
  font-size: .62rem; letter-spacing: .36em; text-transform: uppercase;
  color: var(--gold-dk);
}

.h1, .h2, .h3 { margin: 0; font-family: var(--f-disp); font-weight: 400; color: var(--ink); text-wrap: balance; }
.h1 { font-size: clamp(1.9rem, 7vw, 3.1rem); letter-spacing: .06em; line-height: 1.18; }
.h2 { font-size: clamp(1.5rem, 5.2vw, 2.2rem); letter-spacing: .12em; line-height: 1.24; text-transform: uppercase; }
.h3 { font-size: clamp(1.05rem, 3.4vw, 1.3rem); letter-spacing: .1em; line-height: 1.3; text-transform: uppercase; font-weight: 500; }

.lead { font-size: clamp(1.04rem, 2.6vw, 1.22rem); line-height: 1.6; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.ui { font-family: var(--f-ui); }

.center { text-align: center; }
.center .prose, .center .lead { margin-inline: auto; }

/* ===========================================================================
   LA ROSA E I FREGI
   =========================================================================== */

.rose { display: inline-block; width: 1em; height: 1em; color: var(--rose); flex: none; }
.rose svg { width: 100%; height: 100%; display: block; }
.rose--gold { color: var(--gold-dk); }

/* un filetto con la rosa al centro: il divisore ricorrente del sito */
.rule {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  width: min(300px, 74%); margin: clamp(18px, 4vw, 28px) auto;
}
.rule__line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--rule)); }
.rule__line:last-child { background: linear-gradient(90deg, var(--rule), transparent); }
.rule .rose { font-size: 20px; }
.rule--left { margin-inline: 0; justify-content: flex-start; }

/* la rosa che respira appena: un movimento quasi impercettibile */
@media (prefers-reduced-motion: no-preference) {
  .rule .rose svg { animation: roseSway 7s ease-in-out infinite; transform-origin: 50% 85%; }
}
@keyframes roseSway {
  0%, 100% { transform: rotate(-2.5deg); }
  50%      { transform: rotate(2.5deg); }
}

/* una cornice di carta: il contenitore elegante usato in tutto il sito */
.frame {
  position: relative;
  background:
    radial-gradient(120% 70% at 12% 0%, rgba(252,246,228,.75), transparent 62%),
    linear-gradient(170deg, rgba(252,246,228,.72), rgba(226,208,166,.5));
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}
.frame::before {
  content: ""; position: absolute; inset: 5px; pointer-events: none;
  border: 1px solid rgba(141,110,61,.22);
}
.frame > * { position: relative; }

/* ===========================================================================
   BOTTONI
   =========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .7em;
  padding: 15px 26px; min-height: 48px;
  font-family: var(--f-disp); font-weight: 600;
  font-size: clamp(.62rem, 2.2vw, .7rem); letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; text-align: center;
  border: 1px solid var(--rule); position: relative;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), color .3s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 4px; border: 1px solid rgba(141,110,61,.22);
  pointer-events: none; transition: inset .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:hover::before { inset: 6px; }
.btn:active { transform: translateY(0); }

.btn--gold {
  color: #4a3208; border-color: rgba(141,108,36,.6);
  background: linear-gradient(170deg, rgba(255,250,232,.9), rgba(226,201,142,.8));
}
.btn--gold:hover { background: linear-gradient(170deg, rgba(255,252,240,.95), rgba(231,209,156,.9)); }

.btn--ghost { color: var(--gold-deep); background: rgba(255,250,232,.3); }
.btn--ghost:hover { background: rgba(255,250,232,.6); }

.btn--rose {
  color: #fdf3ec; border-color: rgba(109,26,33,.6);
  background: linear-gradient(170deg, var(--rose), var(--rose-dk));
}
.btn--rose::before { border-color: rgba(255,228,216,.3); }
.btn--rose:hover { box-shadow: 0 14px 34px rgba(109,26,33,.3); }
.btn--rose .rose { color: rgba(255,226,214,.9); }

.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .45; pointer-events: none; transform: none; box-shadow: none;
}

/* un gruppo di bottoni che su schermo stretto si impila */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.center .btns { justify-content: center; }
@media (max-width: 420px) {
  .btns { flex-direction: column; align-items: stretch; }
  .btns .btn { width: 100%; }
}

/* un collegamento discreto, con freccia */
.link {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--f-disp); font-weight: 600;
  font-size: .64rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold-deep); text-decoration: none;
  transition: letter-spacing .3s var(--ease), color .3s var(--ease);
}
.link::after { content: "\2192"; transition: transform .3s var(--ease); }
.link:hover { letter-spacing: .28em; }
.link:hover::after { transform: translateX(4px); }

/* ===========================================================================
   LA BARRA DI NAVIGAZIONE
   =========================================================================== */

.nav {
  position: sticky; top: 0; z-index: 40;
  background: linear-gradient(180deg, rgba(243,233,206,.94), rgba(240,229,200,.88));
  border-bottom: 1px solid var(--rule-soft);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: box-shadow .3s var(--ease);
}
.nav.is-stuck { box-shadow: 0 10px 30px rgba(79,62,41,.12); }

.nav__inner {
  display: flex; align-items: center; gap: 10px;
  width: 100%; max-width: 1180px; margin: 0 auto;
  min-height: var(--nav-h);
  padding: 8px clamp(14px, 4vw, 28px);
}

.nav__brand {
  display: inline-flex; align-items: center; gap: 9px;
  text-decoration: none; margin-right: auto; min-width: 0;
}
.nav__brand img { width: 34px; height: 34px; flex: none; }
.nav__brand span {
  font-family: var(--f-disp); font-weight: 600;
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink); white-space: nowrap;
}
@media (max-width: 400px) { .nav__brand span { font-size: .64rem; letter-spacing: .12em; } }

.nav__links { display: none; }

.nav__link {
  position: relative; padding: 6px 2px; text-decoration: none; white-space: nowrap;
  font-family: var(--f-disp); font-weight: 500;
  font-size: .64rem; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(70,54,32,.82);
  transition: color .25s var(--ease);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--gold-dk);
  transform: scaleX(0); transform-origin: center;
  transition: transform .3s var(--ease);
}
.nav__link:hover { color: var(--gold-deep); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--gold-deep); }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

.nav__cta {
  display: none;
  padding: 10px 18px; min-height: 40px;
  border: 1px solid rgba(141,108,36,.55);
  background: linear-gradient(170deg, rgba(255,250,232,.9), rgba(226,201,142,.75));
  color: #4a3208; text-decoration: none;
  font-family: var(--f-disp); font-weight: 600;
  font-size: .6rem; letter-spacing: .18em; text-transform: uppercase;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.nav__cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(92,64,22,.2); }

.lang { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.lang button {
  padding: 8px 5px;
  font-family: var(--f-disp); font-weight: 500;
  font-size: .62rem; letter-spacing: .12em;
  color: rgba(106,76,22,.92); opacity: .48;
  transition: opacity .25s var(--ease), color .25s var(--ease);
}
.lang button:hover { opacity: .85; }
.lang button[aria-pressed="true"] {
  opacity: 1; color: var(--gold-deep);
  text-decoration: underline; text-underline-offset: 4px;
}
.lang span { color: rgba(106,76,22,.4); font-size: .62rem; }

.nav__burger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0 10px; flex: none;
}
.nav__burger span {
  display: block; height: 1.4px; background: rgba(70,54,32,.85);
  transition: transform .34s var(--ease), opacity .2s var(--ease);
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.4px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.4px) rotate(-45deg); }

/* --- il pannello a tutto schermo sul telefono ----------------------------- */
.navpanel {
  position: fixed; inset: 0; z-index: 39;
  padding: calc(var(--nav-h) + 26px + env(safe-area-inset-top, 0px)) 22px 32px;
  background: linear-gradient(170deg, var(--p-1), var(--p-3));
  overflow-y: auto;
  opacity: 0; transform: translateY(-10px);
  transition: opacity .3s var(--ease), transform .35s var(--ease);
}
.navpanel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 190px 190px;
}
.navpanel.is-on { opacity: 1; transform: none; }

.navpanel__list { list-style: none; margin: 0 auto; padding: 0; max-width: 420px; position: relative; z-index: 1; }
.navpanel__list li + li { border-top: 1px solid var(--rule-soft); }
.navpanel__link {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 17px 4px; text-decoration: none;
  font-family: var(--f-disp); font-weight: 500;
  font-size: 1.04rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink);
}
.navpanel__link .rose { font-size: 15px; opacity: 0; transition: opacity .25s var(--ease); }
.navpanel__link[aria-current="page"] { color: var(--gold-deep); }
.navpanel__link[aria-current="page"] .rose, .navpanel__link:hover .rose { opacity: .9; }
.navpanel__foot { max-width: 420px; margin: 26px auto 0; position: relative; z-index: 1; text-align: center; }
.navpanel__foot .btn { width: 100%; }
.navpanel__tag {
  margin: 20px 0 0; font-style: italic; font-size: .92rem; color: var(--ink-soft);
}

/*  La navigazione distesa compare solo quando ci sta davvero: le voci in
    italiano sono lunghe, sotto questa misura resta il pannello.          */
@media (min-width: 1080px) {
  .nav__links { display: flex; align-items: center; gap: clamp(12px, 1.6vw, 24px); margin-inline: auto; }
  .nav__cta { display: inline-flex; align-items: center; }
  .nav__burger { display: none; }
  .navpanel { display: none !important; }
}

/* fra 1080 e 1200 resta il solo marchio, senza il nome scritto accanto */
@media (min-width: 1080px) and (max-width: 1199px) {
  .nav__brand span { display: none; }
}

/* ===========================================================================
   IL PIÈ DI PAGINA
   =========================================================================== */

.foot {
  position: relative; z-index: 1;
  margin-top: clamp(40px, 8vw, 90px);
  padding: clamp(40px, 7vw, 72px) 0 calc(26px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, #4a3a26, #342918);
  color: rgba(249,242,226,.84);
  font-family: var(--f-ui);
}
.foot::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(227,195,126,.6), transparent);
}

.foot__brand { text-align: center; }
.foot__brand img { width: 84px; height: 84px; margin: 0 auto 14px; opacity: .95; }
.foot__name {
  margin: 0; font-family: var(--f-disp); font-weight: 600;
  font-size: 1rem; letter-spacing: .26em; text-transform: uppercase; color: #f6ecd4;
}
.foot__tag { margin: 8px 0 0; font-family: var(--f-body); font-style: italic; font-size: 1rem; color: rgba(246,236,212,.64); }

.foot .rule { width: min(260px, 70%); }
.foot .rule__line { background: linear-gradient(90deg, transparent, rgba(227,195,126,.4)); }
.foot .rule__line:last-child { background: linear-gradient(90deg, rgba(227,195,126,.4), transparent); }
.foot .rule .rose { color: var(--rose-lt); }

.foot__cols {
  display: grid; gap: 30px 24px; margin: clamp(26px, 5vw, 42px) 0 0;
  grid-template-columns: 1fr;
}
@media (min-width: 620px) { .foot__cols { grid-template-columns: repeat(3, 1fr); } }

.foot__col h2 {
  margin: 0 0 14px; font-family: var(--f-disp); font-weight: 600;
  font-size: .62rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-lt);
}
.foot__col ul { list-style: none; margin: 0; padding: 0; }
.foot__col li { margin: 0 0 9px; font-size: .9rem; }
.foot__col a { color: rgba(249,242,226,.86); text-decoration: none; border-bottom: 1px solid rgba(227,195,126,.3); transition: color .25s var(--ease), border-color .25s var(--ease); }
.foot__col a:hover { color: var(--gold-lt); border-color: var(--gold-lt); }

.foot__hours { font-variant-numeric: tabular-nums; }
.foot__hours li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 14px; }
.foot__hours b { font-weight: 500; color: rgba(249,242,226,.95); }

.foot__soon {
  display: inline-block; margin-left: 8px;
  font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(227,195,126,.7); border: 1px dashed rgba(227,195,126,.45); padding: 1px 7px; border-radius: 3px;
}
.foot__ph { color: rgba(249,242,226,.6); }

.foot__legal {
  margin: clamp(28px, 5vw, 44px) 0 0; padding-top: 20px;
  border-top: 1px solid rgba(227,195,126,.18);
  font-size: .76rem; line-height: 1.6; color: rgba(246,236,212,.52); text-align: center;
}
.foot__credit { margin: 0 auto 10px; max-width: 54ch; font-family: var(--f-body); font-style: italic; font-size: .92rem; color: rgba(246,236,212,.6); }

/* ===========================================================================
   APPARIZIONI ALLO SCORRIMENTO
   =========================================================================== */

.reveal { opacity: 0; transform: translateY(20px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal--d1.is-in { transition-delay: .09s; }
.reveal--d2.is-in { transition-delay: .18s; }
.reveal--d3.is-in { transition-delay: .27s; }

/* la pagina entra come una pagina voltata */
@media (prefers-reduced-motion: no-preference) {
  .page { animation: pageIn .6s var(--ease) both; }
}
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
