/* ==========================================================================
   Cucine senza confini — stile
   Bianco e grigio antracite. La scena 3D decide il colore del cielo:
   il JS aggiorna --scene-bg e aggiunge .is-night a <html> nel souk notturno.
   ========================================================================== */

:root {
  --scene-bg: #F7F7F5;
  --ink: #222326;
  --ink-soft: #5D5F65;
  --accent: #222326;
  --rule: color-mix(in oklab, var(--ink) 18%, transparent);
  /* separatori che nascono e muoiono sfumati */
  --fade-line: linear-gradient(90deg, transparent, var(--rule) 22%, var(--rule) 78%, transparent);

  --f-display: "Playfair Display", Georgia, serif;
  --f-body: "Poppins", "Segoe UI", system-ui, sans-serif;
  --f-arabic: "Amiri", "Traditional Arabic", serif;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  /* un solo margine editoriale per hero, sezioni e interludi */
  --edge: calc(var(--gutter) + clamp(0rem, 11vw, 10rem));
  --ease: cubic-bezier(.22, 1, .36, 1);
}

html.is-night {
  --ink: #F3ECE1;
  --ink-soft: #BDB3A5;
  --accent: #FFFFFF;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--scene-bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: clamp(.9rem, .87rem + .12vw, .97rem);
  line-height: 1.85;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  transition: color .9s var(--ease);
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--scene-bg); }

a { color: inherit; }
em { font-style: italic; }

.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 {
  position: fixed; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--scene-bg); padding: .6rem 1rem; text-decoration: none;
}
.skip:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

/* ---------- Scena ---------- */

.scene { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.scene canvas { display: block; width: 100%; height: 100%; }

.scene__fallback { display: none; }
html.no-webgl .scene canvas { display: none; }
html.no-webgl .scene__fallback {
  display: block; position: absolute; inset: 0;
  background:
    repeating-radial-gradient(ellipse 140% 60% at 50% 120%,
      transparent 0 22px, color-mix(in oklab, var(--ink) 9%, transparent) 22px 23px),
    var(--scene-bg);
}

/* grana di carta, sopra la scena e sotto il testo */
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .13  0 0 0 0 .13  0 0 0 0 .15  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}
html.is-night .grain { mix-blend-mode: screen; opacity: .04; }

main, .top, .foot { position: relative; z-index: 2; }
/* i veli dietro ai testi sbordano: si tagliano senza creare scroll orizzontale (e senza rompere lo sticky) */
main { overflow-x: clip; }

/* ---------- Header ---------- */

.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem var(--gutter);
}
.top::before {
  content: ""; position: absolute; inset: 0 0 -2rem; z-index: -1; pointer-events: none;
  background: linear-gradient(var(--scene-bg), color-mix(in oklab, var(--scene-bg) 0%, transparent));
  opacity: .9;
}

.brand { display: flex; align-items: baseline; gap: .8rem; text-decoration: none; }
.brand__it { font-family: var(--f-display); font-size: 1.08rem; font-weight: 500; letter-spacing: -.01em; line-height: 1; }
.brand__ar { font-family: var(--f-arabic); font-size: .95rem; color: var(--ink-soft); line-height: 1; }

.menu { display: flex; gap: clamp(1rem, 2.2vw, 2.2rem); align-items: center; }
.menu a {
  text-decoration: none; font-size: .8rem; font-weight: 400; letter-spacing: .04em; color: var(--ink-soft);
  position: relative; padding: .3rem 0; transition: color .3s;
}
.menu a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease);
}
.menu a:hover { color: var(--ink); }
.menu a:hover::after { transform: scaleX(1); transform-origin: left; }
/* sezione in cui ci si trova: il link resta sottolineato */
.menu a.is-active { color: var(--ink); }
.menu a.is-active::after { transform: scaleX(1); transform-origin: left; }
.menu .menu__cta.is-active { border-color: var(--ink); }
.menu .menu__cta { color: var(--ink); border: 1px solid var(--rule); border-radius: 999px; padding: .45rem 1.1rem; }
.menu .menu__cta::after { display: none; }
.menu .menu__cta:hover { border-color: var(--ink); }

.menu-toggle {
  display: none; background: none; border: 1px solid var(--rule); color: var(--ink);
  font: inherit; font-size: .85rem; letter-spacing: .06em; padding: .45rem 1rem; border-radius: 999px; cursor: pointer;
}

/* ---------- Tipografia ---------- */

h1, h2, h3 { font-family: var(--f-display); font-weight: 400; margin: 0; letter-spacing: -.015em; }
h2 { font-size: clamp(1.65rem, 1.3rem + 1.3vw, 2.5rem); line-height: 1.16; margin-bottom: 1.4rem; text-wrap: balance; }
h2 em { color: var(--ink-soft); }
h3 { font-size: 1.1rem; line-height: 1.3; font-weight: 500; }
p { margin: 0 0 1.1em; max-width: 58ch; text-wrap: pretty; }

.eyebrow, .kicker {
  font-size: .66rem; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft);
  margin: 0 0 1.4rem; display: flex; align-items: center; gap: .9rem;
}
.kicker::before {
  /* un filo sottile che nasce dal nulla, al posto dei numeri */
  content: ""; flex: none; width: 1.8rem; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ink-soft));
  opacity: .7;
}

.aside { font-family: var(--f-display); font-style: italic; font-size: 1.02rem; line-height: 1.4; color: var(--ink-soft); }

/* righe spezzate da SplitText */
.split .line-mask { overflow: clip; padding-bottom: .08em; margin-bottom: -.08em; }

/* ---------- Link e pulsanti ---------- */

.textlink {
  display: inline-flex; align-items: center; gap: .5rem; margin-left: .2rem;
  font-size: .88rem; text-decoration: none; color: var(--ink); white-space: nowrap;
  border-bottom: 1px solid currentColor; padding-bottom: .05rem;
}
.textlink::after { content: "→"; transition: transform .5s var(--ease); }
.textlink:hover::after { transform: translateX(.3rem); }

.button {
  display: inline-block; text-decoration: none;
  font-size: .8rem; font-weight: 400; letter-spacing: .06em; color: var(--scene-bg); background: var(--ink);
  border: 1px solid var(--ink); border-radius: 999px; padding: .8rem 1.6rem; white-space: nowrap;
  transition: background .3s, color .3s;
}
.button:hover { background: transparent; color: var(--ink); }
.button--icon { display: inline-flex; align-items: center; gap: .6rem; padding-left: 1.3rem; }
.button__icon { flex: none; margin-top: -1px; transition: transform .5s var(--ease); }
.button--icon:hover .button__icon { transform: translateY(-1px) rotate(-6deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding: 8rem var(--gutter) 5rem var(--edge);
}
/* velo dietro al testo d'apertura, così le dune restano sullo sfondo */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 48% 42% at 30% 55%, var(--scene-bg) 45%, color-mix(in oklab, var(--scene-bg) 0%, transparent));
  opacity: .92;
}
.hero__title {
  font-size: clamp(2.1rem, 1.2rem + 3.2vw, 4.4rem); line-height: 1.1; font-weight: 400;
  max-width: 17ch; letter-spacing: -.02em; margin-bottom: 1.8rem;
}
.hero__lead { font-size: clamp(.95rem, .9rem + .2vw, 1.05rem); max-width: 42ch; color: var(--ink-soft); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 2.2rem; margin-top: 1.6rem; }

.scroll-cue {
  display: inline-flex; align-items: center; gap: 1rem; width: fit-content;
  text-decoration: none; font-size: .82rem; letter-spacing: .06em; color: var(--ink-soft);
}
.scroll-cue__line { width: 1px; height: 3rem; background: var(--rule); position: relative; overflow: hidden; }
.scroll-cue__line::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ink);
  animation: drip 2.4s var(--ease) infinite;
}
@keyframes drip { to { top: 110%; } }

/* ---------- Sezioni ---------- */

.chapter { min-height: 170vh; padding: 0 var(--gutter); display: flex; align-items: flex-start; }
.chapter .panel {
  /* si ferma subito sotto l'intestazione: l'etichetta cade alla stessa altezza in tutte le sezioni */
  position: sticky; top: 7rem;
  width: min(30rem, 100%);
  margin-left: calc(var(--edge) - var(--gutter));
  padding: 2rem 0;
}
.chapter--right { justify-content: flex-end; }
.chapter--right .panel { margin-left: 0; margin-right: calc(var(--edge) - var(--gutter) - 4rem); }
.chapter--center { justify-content: center; }
.chapter--center .panel { margin-left: 0; }

/* velo morbido dietro al testo: il paesaggio resta visibile ma non disturba la lettura */
.panel { position: relative; }
.panel::before {
  content: ""; position: absolute; inset: -2rem -3.5rem; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, var(--scene-bg) 55%, color-mix(in oklab, var(--scene-bg) 0%, transparent));
  opacity: .92; transform: scale(1.25);
}

.chapter--wide { min-height: auto; padding-block: 22vh; }
.chapter--wide .panel { position: relative; top: auto; }
.chapter .panel--wide { width: 100%; max-width: 64rem; margin: 0 0 0 calc(var(--edge) - var(--gutter)) !important; }
.panel--wide::before { inset: -4rem -6rem; }

.panel--solid::before {
  inset: -5rem -8rem; transform: none; border-radius: 0; opacity: .94;
  background: var(--scene-bg);
  /* il velo si dissolve ai bordi: nessun riquadro visibile */
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent);
  mask-image: radial-gradient(closest-side, #000 72%, transparent);
}

/* ---------- Interludi: una frase sola, sospesa sul paesaggio ---------- */

.interlude {
  min-height: 130vh; display: flex; align-items: center; justify-content: center;
  padding: 0 var(--gutter); text-align: center;
}
.interlude__line {
  font-family: var(--f-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.4rem, 1rem + 1.6vw, 2.3rem); line-height: 1.3; letter-spacing: -.01em;
  max-width: 24ch; margin: 0 auto; position: relative;
}
.interlude__line em { color: var(--ink-soft); }
.interlude__line--plain { font-style: normal; }
.interlude__line::before {
  content: ""; position: absolute; inset: -3rem -5rem; z-index: -1;
  background: radial-gradient(closest-side, var(--scene-bg) 40%, color-mix(in oklab, var(--scene-bg) 0%, transparent));
  opacity: .85;
}

/* ---------- Cosa faccio ---------- */

.doings { list-style: none; padding: 0; margin: 1.6rem 0 0; counter-reset: d; }
.doings li { padding: 1.3rem 0 1.2rem 3rem; position: relative; counter-increment: d; }
.doings li + li { background: var(--fade-line) top / 100% 1px no-repeat; }
.doings li:first-child { padding-top: .4rem; }
.doings li::before {
  content: "0" counter(d); position: absolute; left: 0; top: 1.5rem;
  font-family: var(--f-display); font-style: italic; font-size: .85rem; color: var(--ink-soft);
}
.doings h3 { margin-bottom: .4rem; }
.doings p { margin: 0; font-size: .88rem; color: var(--ink-soft); }

/* ---------- Eventi ---------- */

.events { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: stretch; }
.events__intro { display: flex; flex-direction: column; align-items: flex-start; }
.events__intro .button { margin-top: auto; }
.events__intro p { color: var(--ink-soft); }

/* i tre blocchi occupano tutta l'altezza della colonna sinistra: stesso inizio, stessa fine */
.events__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; justify-content: space-between; }
.events__list li { display: grid; grid-template-columns: 2.6rem 1fr; column-gap: .4rem; padding: 1.5rem 0; }
.events__list li + li { background: var(--fade-line) top / 100% 1px no-repeat; }
.events__list li:first-child { padding-top: 0; }
.events__list li:last-child { padding-bottom: 0; }
.events__n { grid-row: span 2; font-family: var(--f-display); font-style: italic; font-size: .85rem; color: var(--ink-soft); padding-top: .2rem; }
.events__list h3 { font-family: var(--f-display); font-size: 1.2rem; font-weight: 400; margin-bottom: .35rem; }
.events__list p { margin: 0; color: var(--ink-soft); font-size: .88rem; }

.events__foot {
  margin-top: 4rem; padding-top: 2rem; background: var(--fade-line) top / 100% 1px no-repeat;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 3rem; align-items: baseline;
}
.events__next { text-decoration: none; font-family: var(--f-display); font-size: 1.1rem; line-height: 1.4; }
.events__next span {
  display: block; font-family: var(--f-body); font-size: .64rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: .3rem;
}
.events__next em { font-size: .85rem; color: var(--ink-soft); }
.events__next:hover { text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; }

/* ---------- Contatti ---------- */

.closing { min-height: 110vh; align-items: center; justify-content: flex-start; padding-block: 14vh; }
.closing .panel { position: relative; top: auto; }
.closing__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 4rem; }

.contact { display: flex; flex-direction: column; gap: .4rem; margin-top: 1.6rem; max-width: 32rem; }
.contact input, .contact textarea {
  width: 100%; font: inherit; color: var(--ink); resize: vertical;
  background: linear-gradient(90deg, var(--rule) 60%, transparent) bottom / 100% 1px no-repeat;
  border: 0; padding: .8rem 0;
}
.contact input::placeholder, .contact textarea::placeholder { color: var(--ink-soft); opacity: .8; }
.contact input:focus, .contact textarea:focus { outline: none; background-image: linear-gradient(90deg, var(--ink) 60%, transparent); }
.contact button {
  align-self: flex-start; margin-top: 1rem;
  font: inherit; font-size: .8rem; font-weight: 400; letter-spacing: .06em; cursor: pointer;
  color: var(--scene-bg); background: var(--ink); border: 1px solid var(--ink); border-radius: 999px; padding: .8rem 1.8rem;
  transition: background .3s, color .3s;
}
.contact button:hover { background: transparent; color: var(--ink); }
.contact__msg { font-size: .88rem; color: var(--ink); min-height: 1.4em; margin: .3rem 0 0; }

.social { list-style: none; padding: 0; margin: 0; }
.social a {
  display: flex; justify-content: space-between; padding: .9rem 0;
  text-decoration: none; font-family: var(--f-display); font-size: 1.12rem;
}
.social li + li a { background: var(--fade-line) top / 100% 1px no-repeat; }
.social li:first-child a { padding-top: 0; }
.social a::after { content: "↗"; font-family: var(--f-body); font-size: 1rem; transition: transform .4s var(--ease); }
.social a:hover::after { transform: translate(3px, -3px); }

.motto {
  font-family: var(--f-display); font-weight: 400; font-style: italic;
  font-size: clamp(1.5rem, 1rem + 1.8vw, 2.6rem); line-height: 1.25; letter-spacing: -.01em;
  max-width: 26ch; margin: 5rem 0 0;
}

/* ---------- Profilo in "Chi sono": come l'intestazione di un profilo social ---------- */

.profile {
  display: inline-flex; align-items: center; gap: 1rem; margin: 0 0 1.8rem;
  text-decoration: none; color: inherit;
}
.profile__img {
  width: 4.25rem; height: 4.25rem; border-radius: 50%; object-fit: cover; flex: none;
  /* anello sottile staccato dalla foto, come nelle storie */
  padding: 3px; background: var(--scene-bg);
  box-shadow: 0 0 0 1px var(--rule);
  /* in bianco e nero come il resto del sito; il colore arriva al passaggio */
  filter: grayscale(1) contrast(1.04);
  transition: box-shadow .5s var(--ease), transform .6s var(--ease), filter .8s var(--ease);
}
.profile:hover .profile__img, .profile:focus-visible .profile__img { box-shadow: 0 0 0 1px var(--ink); transform: scale(1.04); filter: grayscale(0) contrast(1); }
.profile--contact { margin-bottom: 2.4rem; }
.profile__text { display: flex; flex-direction: column; line-height: 1.35; }
.profile__name { font-family: var(--f-display); font-size: 1.05rem; }
.profile__handle { font-size: .78rem; color: var(--ink-soft); letter-spacing: .02em; transition: color .3s; }
.profile:hover .profile__handle { color: var(--ink); }

/* ---------- Collaborazioni: loghi ridisegnati in un'unica tinta ---------- */

.logos {
  list-style: none; margin: 2.6rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
}
.logos li { display: flex; }
.logos li:nth-child(n+5) { background: var(--fade-line) top / 100% 1px no-repeat; }
.logos a {
  flex: 1; display: grid; place-items: center; min-height: 7.5rem; padding: 1.5rem 1rem;
  text-decoration: none; color: var(--ink);
}
.logos img, .logos__word {
  height: var(--h, 2rem); width: auto; max-width: 100%;
  opacity: .62; filter: grayscale(1);
  transition: opacity .5s var(--ease), transform .6s var(--ease);
}
.logos__word {
  height: auto; font-family: var(--f-body); font-weight: 500; font-size: 1.15rem;
  font-size: 1.4rem; letter-spacing: .12em; text-transform: uppercase; line-height: 1;
}
.logos a:hover img, .logos a:hover .logos__word,
.logos a:focus-visible img, .logos a:focus-visible .logos__word { opacity: 1; transform: translateY(-2px); }

@media (max-width: 760px) {
  .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logos li:nth-child(n+3) { background: var(--fade-line) top / 100% 1px no-repeat; }
  .logos a { min-height: 6rem; }
}

/* ---------- Velo per i passaggi dal menu ---------- */

.veil {
  position: fixed; inset: 0; z-index: 15; pointer-events: none;
  background: var(--scene-bg); opacity: 0; transition: opacity .45s var(--ease);
}
.veil.is-on { opacity: 1; }

/* ---------- Finestra eventi ---------- */

.modal {
  /* palette propria: resta chiara anche quando il sito è in notturna */
  --ink: #222326; --ink-soft: #55575D; --scene-bg: #FAFAF8;
  --rule: color-mix(in oklab, #222326 16%, transparent);
  --fade-line: linear-gradient(90deg, transparent, var(--rule) 22%, var(--rule) 78%, transparent);
  /* nessun riquadro: la finestra è un velo a tutta pagina sopra il sito sfocato */
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink);
  opacity: 0; transition: opacity .6s var(--ease);
  overflow: hidden;
}
.modal.is-open { opacity: 1; }
.modal::backdrop {
  background: rgba(247, 247, 245, 0); backdrop-filter: blur(0);
  transition: background .6s var(--ease), backdrop-filter .6s var(--ease);
}
/* velo chiaro e pieno: anche sopra la notte del souk resta bianco, non grigio */
.modal.is-open::backdrop { background: rgba(247, 247, 245, .9); backdrop-filter: blur(18px) saturate(.6); }

.modal__inner {
  height: 100%; overflow-y: auto; overscroll-behavior: contain;
  padding: 14vh max(var(--gutter), calc((100vw - 56rem) / 2)) 16vh;
  /* il contenuto sfuma in alto e in basso mentre scorre */
  -webkit-mask-image: linear-gradient(transparent, #000 10vh, #000 calc(100% - 10vh), transparent);
  mask-image: linear-gradient(transparent, #000 10vh, #000 calc(100% - 10vh), transparent);
  transform: translateY(14px); transition: transform .7s var(--ease);
}
.modal.is-open .modal__inner { transform: none; }
.modal__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.modal__head h2 { margin-bottom: 1.2rem; }
.modal__close {
  position: fixed; top: 1.2rem; right: var(--gutter); z-index: 2;
  display: grid; place-items: center; width: 2.8rem; height: 2.8rem;
  background: none; border: 0; border-radius: 50%; color: var(--ink); cursor: pointer; transition: background .3s;
}
.modal__close:hover { background: color-mix(in oklab, var(--ink) 7%, transparent); }

.modal__tabs { display: inline-flex; gap: .25rem; padding: .25rem; border-radius: 999px; background: color-mix(in oklab, var(--ink) 6%, transparent); }
.modal__tabs button {
  font: inherit; font-size: .8rem; font-weight: 400; letter-spacing: .03em; cursor: pointer;
  padding: .55rem 1.1rem; border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft);
  transition: background .3s, color .3s;
}
.modal__tabs button[aria-selected="true"] { background: var(--ink); color: var(--scene-bg); }

.modal__view { opacity: 0; transform: translateY(8px); transition: opacity .45s var(--ease), transform .5s var(--ease); }
.modal__view.is-in { opacity: 1; transform: none; }
.modal__intro { margin: 1.6rem 0 1rem; color: var(--ink-soft); font-size: .9rem; }

.slots { list-style: none; margin: 0; padding: 0; }
.slot { display: grid; grid-template-columns: 4.2rem 1fr auto; gap: 1.4rem; align-items: center; padding: 1.3rem 0; }
.slot + .slot { background: var(--fade-line) top / 100% 1px no-repeat; }
.slot--tour { grid-template-columns: 1fr auto; }
.slots__empty { padding: 2.4rem 0 1rem; }
.slots__empty .kicker { margin-bottom: .9rem; }
.slots__empty p:not(.kicker) { color: var(--ink-soft); font-size: .92rem; margin-bottom: 1.4rem; }
.slot__date { text-align: center; line-height: 1; }
.slot__day { display: block; font-family: var(--f-display); font-size: 2rem; }
.slot__month { display: block; margin-top: .3rem; font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }
.slot__meta { margin: 0 0 .2rem; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.slot__title { font-family: var(--f-display); font-weight: 400; font-size: 1.2rem; margin: 0; }
.slot__route { margin: .15rem 0 0; font-size: .85rem; font-style: italic; font-family: var(--f-display); color: var(--ink-soft); }
.slot__note { margin: .25rem 0 0; font-size: .84rem; color: var(--ink-soft); }
.slot__side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; }
.slot__seats { margin: 0; font-size: .75rem; color: var(--ink-soft); }
.slot__seats.is-few { color: var(--ink); font-weight: 500; }
.slot__price { margin: 0 0 .5rem; font-size: .78rem; color: var(--ink-soft); }
.slot__btn {
  font: inherit; font-size: .78rem; font-weight: 400; letter-spacing: .05em; cursor: pointer; text-decoration: none; white-space: nowrap;
  padding: .6rem 1.2rem; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--scene-bg);
  transition: background .3s, color .3s;
}
.slot__btn:hover { background: transparent; color: var(--ink); }
.slot__btn--ghost { background: transparent; color: var(--ink); }
.slot__btn:disabled { cursor: default; background: transparent; color: var(--ink-soft); border-color: var(--rule); }
.slot.is-full .slot__title, .slot.is-full .slot__date { opacity: .45; }

.modal__back {
  font: inherit; font-size: .8rem; color: var(--ink-soft); background: none; border: 0; padding: 0; margin: 1.6rem 0 1.4rem; cursor: pointer;
}
.modal__back:hover { color: var(--ink); }
.booking__grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.booking__summary h3 { font-family: var(--f-display); font-weight: 400; font-size: 1.5rem; margin-bottom: .5rem; }
.booking__summary p:last-child { color: var(--ink-soft); font-size: .88rem; }
.booking { display: flex; flex-direction: column; gap: .9rem; }
.booking label { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.booking label span { text-transform: none; letter-spacing: 0; }
.booking input, .booking select, .booking textarea {
  font: inherit; font-size: .95rem; text-transform: none; letter-spacing: 0; color: var(--ink);
  display: block; width: 100%; margin-top: .15rem;
  border: 0; padding: .5rem 0; resize: vertical; appearance: none; border-radius: 0;
  background: linear-gradient(90deg, var(--rule) 60%, transparent) bottom / 100% 1px no-repeat;
}
.booking select { cursor: pointer; }
.booking input:focus, .booking select:focus, .booking textarea:focus { outline: none; background-image: linear-gradient(90deg, var(--ink) 60%, transparent); }
.booking .button { align-self: flex-start; margin-top: .6rem; cursor: pointer; font-family: inherit; }
.booking__msg { margin: 0; min-height: 1.2em; font-size: .85rem; }
.booking__hint { margin: 0; font-size: .78rem; color: var(--ink-soft); }

.modal__done { padding: 2.5rem 0 1rem; }
.modal__done h3 { font-family: var(--f-display); font-weight: 400; font-size: 1.8rem; margin-bottom: 1rem; }
.modal__done p { color: var(--ink-soft); }
.button--ghost { background: transparent; color: var(--ink); cursor: pointer; font-family: inherit; }
.button--ghost:hover { background: var(--ink); color: var(--scene-bg); }

@media (max-width: 640px) {
  .modal__inner { padding-top: 10vh; }
  .slot { grid-template-columns: 3.2rem 1fr; gap: .9rem 1rem; }
  .slot--tour { grid-template-columns: 1fr; }
  .slot__side { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; text-align: left; }
  .slot:not(.slot--tour) .slot__side { grid-column: 2; }
  .slot__price { margin: 0; }
  .booking__grid { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */

.foot {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 2rem var(--gutter) 3rem; font-size: .72rem; color: var(--ink-soft);
  background: var(--fade-line) top / 100% 1px no-repeat, var(--scene-bg);
}
.foot [lang="ar"] { font-family: var(--f-arabic); font-size: 1.05rem; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .events { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .menu-toggle { display: inline-block; }
  .menu {
    position: absolute; top: 100%; right: var(--gutter); flex-direction: column; align-items: flex-end;
    gap: .8rem; padding: 1.2rem 1.4rem; border-radius: 1rem;
    background: color-mix(in oklab, var(--scene-bg) 94%, transparent);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    opacity: 0; visibility: hidden; transform: translateY(-.5rem);
    transition: opacity .3s, transform .3s var(--ease), visibility .3s;
  }
  .menu.is-open { opacity: 1; visibility: visible; transform: none; }
  .brand__ar { display: none; }

  .hero { padding: 7rem var(--gutter) 4rem; }
  .chapter .panel, .chapter--right .panel, .panel--wide { margin: 0 !important; }
  .panel::before { inset: -1.5rem -1rem; transform: none; }
  .chapter--wide { padding-block: 14vh; }
  .closing__grid { grid-template-columns: 1fr; gap: 3rem; }
  .panel--solid::before { inset: -3rem -2rem; }
  .interlude__line::before { inset: -2rem -1rem; }
  .motto { margin-top: 4rem; }
}

/* schermi bassi: il pannello non deve restare tagliato mentre è "incollato" */
@media (max-height: 820px), (max-width: 760px) {
  .chapter:not(.chapter--wide):not(.closing) { min-height: 150vh; }
  .chapter:not(.chapter--wide):not(.closing) .panel { position: relative; top: auto; margin-top: 30vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ==========================================================================
   WordPress
   ========================================================================== */

/* barra di amministrazione (quando si è collegati): l'intestazione fissa scende sotto di lei */
body.admin-bar .top { top: 32px; }
@media (max-width: 782px) { body.admin-bar .top { top: 46px; } }

/* campo trappola antispam: fuori dallo schermo, invisibile a chi usa il sito */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* consenso privacy nel modulo contatti */
.contact__privacy {
  display: flex; gap: .7rem; align-items: flex-start; margin-top: .9rem;
  font-size: .78rem; line-height: 1.55; color: var(--ink-soft); cursor: pointer;
}
.contact__privacy input {
  flex: none; width: 1rem; height: 1rem; margin: .15rem 0 0; padding: 0;
  accent-color: var(--ink); background: none;
}
.contact__privacy a { color: var(--ink); }
.contact button:disabled { opacity: .5; cursor: default; }

/* ---------- Pagine interne (privacy, articoli, archivi, 404) ---------- */

main.sheet { position: relative; z-index: 2; }
.sheet {
  min-height: 70vh; padding: 10rem var(--gutter) 6rem var(--edge);
  max-width: calc(46rem + var(--edge));
}
.sheet__head { margin-bottom: 2.4rem; }
.sheet__title { font-size: clamp(2rem, 1.4rem + 2vw, 3.2rem); line-height: 1.12; text-wrap: balance; }
.sheet__title em { color: var(--ink-soft); }
.sheet__cover { margin: 0 0 2.4rem; }
.sheet__cover img { width: 100%; height: auto; display: block; border-radius: .6rem; }
.sheet__content { font-size: 1rem; }
.sheet__content > * { max-width: 62ch; }
.sheet__content h2 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.9rem); margin: 2.6rem 0 1rem; }
.sheet__content h3 { margin: 2rem 0 .8rem; }
.sheet__content a:not(.button) { color: var(--ink); text-underline-offset: .2em; text-decoration-thickness: 1px; }
.sheet__content ul, .sheet__content ol { padding-left: 1.2rem; margin: 0 0 1.1em; }
.sheet__content img { max-width: 100%; height: auto; }
.sheet__content blockquote { margin: 2rem 0; padding-left: 1.2rem; border-left: 1px solid var(--rule); font-family: var(--f-display); font-style: italic; font-size: 1.2rem; }
.sheet__list { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.sheet__list li + li { background: var(--fade-line) top / 100% 1px no-repeat; }
.sheet__list a { display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; text-decoration: none; }
.sheet__list-title { font-family: var(--f-display); font-size: 1.2rem; }
.sheet__list-date { font-size: .78rem; color: var(--ink-soft); white-space: nowrap; }
.sheet__nav { margin-top: 2rem; font-size: .9rem; }
.sheet__nav .page-numbers { padding: .3rem .6rem; text-decoration: none; }
.sheet__nav .current { border-bottom: 1px solid var(--ink); }
.sheet__empty { color: var(--ink-soft); }
@media (max-width: 760px) { .sheet { padding: 8rem var(--gutter) 4rem; } }

/* ==========================================================================
   Mobile rifinito: testi più grandi e leggibili, sezioni compatte, meno vuoti
   ========================================================================== */
@media (max-width: 760px) {
  /* più aria ai lati: i testi non toccano i bordi dello schermo */
  :root { --gutter: 1.9rem; }
  body { font-size: 1.05rem; line-height: 1.72; font-weight: 400; }
  p { max-width: none; }

  /* nome del sito: l'arabo resta, sotto l'italiano */
  .brand { flex-direction: column; align-items: flex-start; gap: .2rem; }
  .brand__it { font-size: 1.12rem; }
  .brand__ar { display: inline; font-size: .9rem; line-height: 1; }

  /* apertura */
  .hero { justify-content: flex-start; padding: 9.6rem var(--gutter) 3rem; }
  .eyebrow { font-size: .6rem; letter-spacing: .13em; margin-bottom: 1.1rem; }
  .hero__title { font-size: clamp(2.3rem, 9.4vw, 2.9rem); line-height: 1.12; margin-bottom: 1.1rem; }
  .hero__lead { font-size: 1.1rem; line-height: 1.6; color: var(--ink); max-width: 26ch; }
  .hero__actions { margin-top: 1.3rem; }
  .scroll-cue { display: none; }

  /* titoli ed etichette */
  .kicker { font-size: .68rem; letter-spacing: .18em; margin-bottom: 1rem; }
  h2 { font-size: clamp(1.9rem, 7.6vw, 2.25rem); margin-bottom: 1rem; }
  h3 { font-size: 1.22rem; }
  .doings p, .events__list p { font-size: 1rem; }
  .events__list h3 { font-size: 1.35rem; }
  .doings li { padding-left: 2.4rem; }
  .doings li::before { top: 1.45rem; }

  /* sezioni compatte: il testo arriva subito, poco paesaggio vuoto tra un blocco e l'altro */
  .chapter:not(.chapter--wide):not(.closing) { min-height: auto; padding-block: 16vh 10vh; }
  .chapter:not(.chapter--wide):not(.closing) .panel { position: relative; top: auto; margin-top: 0 !important; }
  .chapter--wide { padding-block: 9vh; }
  .interlude { min-height: 58vh; }
  .interlude__line { font-size: 1.8rem; line-height: 1.25; }
  .closing { min-height: auto; padding-block: 9vh 7vh; }
  .motto { font-size: 1.75rem; margin-top: 3rem; }

  /* velo pieno e morbido dietro ai testi: si leggono anche sopra le linee del paesaggio */
  .panel::before { inset: -1.6rem -1.3rem; transform: none; opacity: .8; background: var(--scene-bg); filter: blur(16px); }

  /* collaborazioni e contatti */
  .logos { margin-top: 1.6rem; }
  .logos a { min-height: 5.5rem; padding: 1rem .6rem; }
  .contact input, .contact textarea { font-size: 1rem; }
  .social a { font-size: 1.25rem; }
  .foot { justify-content: center; text-align: center; gap: .6rem 1.2rem; padding-bottom: 2.4rem; }
}

/* "Scorri per continuare": suggerimento discreto nelle zone di solo paesaggio */
.idle-hint {
  position: fixed; left: 50%; bottom: 2.2rem; z-index: 12; transform: translate(-50%, 6px);
  display: flex; flex-direction: column; align-items: center; gap: .7rem;
  font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft);
  opacity: 0; pointer-events: none; transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}
.idle-hint.is-on { opacity: .85; transform: translate(-50%, 0); }
.idle-hint__line { width: 1px; height: 2.4rem; background: var(--rule); position: relative; overflow: hidden; order: 2; }
.idle-hint__line::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ink-soft);
  animation: drip 2.4s var(--ease) infinite;
}

/* Invito a scorrere nella prima schermata: solo su mobile, in fondo, sotto "Scopri gli eventi" */
.hero__scroll { display: none; }
@media (max-width: 760px) {
  .hero__scroll {
    position: absolute; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: .65rem;
    font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft);
    text-decoration: none; white-space: nowrap;
    opacity: 0; animation: heroScrollIn 1.2s var(--ease) 2.2s forwards;
  }
  .hero__scroll-line { width: 1px; height: 2.4rem; background: var(--rule); position: relative; overflow: hidden; }
  .hero__scroll-line::after {
    content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ink-soft);
    animation: drip 2.4s var(--ease) infinite;
  }
}
@keyframes heroScrollIn { to { opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .hero__scroll { opacity: .9; } }

/* Firma nel piè di pagina: riga a sé, centrata, discreta */
.foot__credit {
  flex-basis: 100%; display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  margin-top: .4rem; padding-top: 1rem; font-size: .7rem; letter-spacing: .04em; color: var(--ink-soft);
  background: var(--fade-line) top / 100% 1px no-repeat;
}
.foot__credit svg { flex: none; opacity: .8; transition: opacity .3s; }
.foot__credit:hover { color: var(--ink); }
.foot__credit:hover svg { opacity: 1; }
