/* ================================================================
   THE NIGHT — Maori Group
   Stesso linguaggio visivo della pagina prenotazioni (tema 3).
   ================================================================ */

:root {
  --bg:          #0a2530;
  --card:        #ffffff;
  --ink:         #14323b;
  --ink-soft:    #5a7780;
  --accent:      #1f9fb8;
  --accent-deep: #157d92;
  --gold:        #e0a24a;
  --hero-ink:    #f3fbfd;
  --hero-soft:   #cfe6ec;
  --line:        rgba(255,255,255,.14);
  --glass:       rgba(0,0,0,.22);
  --radius:      18px;
  --err:         #d1574f;
  --ok:          #4fbf8b;
}

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

/* Deve battere qualsiasi `display` dichiarato più sotto: senza questo il
   lightbox e i pannelli nascosti resterebbero sopra la pagina. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--hero-ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

img, video { max-width: 100%; display: block; }

button { font-family: inherit; cursor: pointer; }

/* Niente salvataggio con pressione prolungata / trascinamento */
.nodl {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* ===================== SFONDO ===================== */
.bg-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 80% -10%, #0f3c4c 0%, transparent 60%),
    radial-gradient(900px 600px at 0% 100%, #08303c 0%, transparent 55%),
    var(--bg);
}
.bg-video video {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.bg-video video.on { opacity: 1; }
.bg-video__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,30,38,.55) 0%, rgba(8,30,38,.82) 60%, rgba(8,30,38,.95) 100%);
}

/* ===================== TOPBAR ===================== */
.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
}
/* Il logo è scuro: come nella pagina prenotazioni sta su una placca bianca. */
.topbar__logo {
  height: 40px;
  width: auto;
  background: #fff;
  padding: 6px 12px;
  border-radius: 12px;
  box-shadow: 0 8px 20px -12px rgba(0,0,0,.5);
}
.topbar__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--hero-soft);
  background: var(--glass);
  border: 1px solid var(--line);
  padding: 7px 13px;
  border-radius: 999px;
  white-space: nowrap;
}
.topbar__meta span:not(.live-dot) { font-weight: 600; color: var(--hero-ink); }
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(79,191,139,.6);
  animation: pulse-dot 2.2s infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(79,191,139,.55); }
  70%  { box-shadow: 0 0 0 8px rgba(79,191,139,0); }
  100% { box-shadow: 0 0 0 0 rgba(79,191,139,0); }
}

/* ===================== HERO ===================== */
main { position: relative; z-index: 1; }

.hero {
  padding: 18px 20px 8px;
  max-width: 1180px;
  margin: 0 auto;
}
.hero-copy { text-align: center; margin-bottom: 26px; }
.eyebrow {
  letter-spacing: .32em;
  text-transform: uppercase;
  font-size: .66rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 12px;
}
.hero-copy h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: clamp(2.3rem, 9vw, 3.6rem);
  line-height: 1.04;
  margin-bottom: 14px;
}
.hero-copy h1 em { color: var(--gold); font-style: italic; }
.divider {
  width: 64px; height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin-bottom: 16px;
}
.divider--center,
.hero-copy .divider { margin-left: auto; margin-right: auto; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.hero-copy p {
  color: var(--hero-soft);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 44ch;
  margin: 0 auto;
}
.hero-copy strong { color: var(--gold); font-weight: 600; }

/* ===================== CARD UPLOAD ===================== */
.cta-card {
  position: relative;
  max-width: 460px;
  margin: 0 auto;
}
.cta-card__glow {
  position: absolute;
  inset: -18px;
  border-radius: 32px;
  background: radial-gradient(ellipse at center, var(--accent) 0%, transparent 70%);
  opacity: .16;
  animation: pulse-glow 3.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pulse-glow {
  0%,100% { opacity: .14; transform: scale(1); }
  50%     { opacity: .24; transform: scale(1.03); }
}
.cta-card__inner {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px 22px 22px;
  box-shadow: 0 32px 64px -26px rgba(0,0,0,.55);
}
.cta-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.cta-sub {
  font-size: .92rem;
  color: var(--hero-soft);
  line-height: 1.55;
  margin-bottom: 18px;
}
.field { display: block; margin-bottom: 16px; }
.field__lbl {
  display: block;
  font-size: .78rem;
  color: var(--hero-soft);
  margin-bottom: 7px;
  letter-spacing: .04em;
}
.field__lbl em { opacity: .7; font-style: normal; }
.field input {
  width: 100%;
  padding: 13px 15px;
  font-size: 1rem;
  color: #fff;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 13px;
  font-family: inherit;
  transition: border-color .2s, background .2s;
}
.field input::placeholder { color: rgba(255,255,255,.35); }
.field input:focus {
  outline: none;
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.5);
}

.actions { display: flex; flex-direction: column; gap: 10px; }
.btn {
  width: 100%;
  padding: 16px 18px;
  border: none;
  border-radius: 14px;
  font-size: 1.02rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform .12s, box-shadow .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  box-shadow: 0 12px 30px -12px var(--accent-deep);
  position: relative;
  overflow: hidden;
}
.btn--primary::after {
  content: "";
  position: absolute;
  top: -50%; left: -60%;
  width: 40%; height: 200%;
  background: rgba(255,255,255,.2);
  transform: skewX(-20deg);
  animation: shimmer 3.4s ease-in-out infinite;
}
@keyframes shimmer { 0% { left: -60%; } 60%,100% { left: 130%; } }
.btn--ghost {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22);
  color: var(--hero-ink);
}
.btn:active { transform: scale(.985); }

.cta-note {
  margin-top: 16px;
  font-size: .8rem;
  line-height: 1.5;
  color: var(--hero-soft);
  text-align: center;
  padding: 10px 12px;
  border: 1px dashed rgba(224,162,74,.5);
  border-radius: 12px;
  background: rgba(224,162,74,.07);
}

.hidden-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: -9999px; }

/* ===================== CODA UPLOAD ===================== */
.queue {
  max-width: 460px;
  margin: 18px auto 0;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.queue__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  font-size: .88rem;
}
.queue__head strong { font-weight: 600; }
.queue__head span { color: var(--hero-soft); font-size: .8rem; }
.queue__list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.qitem { display: flex; gap: 11px; align-items: center; }
.qitem__thumb {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(255,255,255,.1);
  object-fit: cover;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  overflow: hidden;
}
.qitem__body { flex: 1; min-width: 0; }
.qitem__name {
  font-size: .8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--hero-ink);
  margin-bottom: 5px;
}
.qitem__bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  overflow: hidden;
}
.qitem__fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width .25s ease;
}
.qitem__state { font-size: .72rem; color: var(--hero-soft); margin-top: 4px; }
.qitem--done .qitem__state { color: var(--ok); }
.qitem--err  .qitem__state { color: #ffb1ab; }
.qitem__retry {
  background: none;
  border: 1px solid rgba(255,255,255,.3);
  color: var(--hero-ink);
  border-radius: 8px;
  font-size: .72rem;
  padding: 4px 9px;
  margin-left: 8px;
}

/* ===================== GALLERIA ===================== */
.gallery {
  padding: 34px 14px 10px;
  max-width: 1400px;
  margin: 0 auto;
}
.gallery__head { text-align: center; margin-bottom: 18px; }
.gallery__head h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.7rem, 6.5vw, 2.4rem);
  font-weight: 600;
}
.gallery__head p { font-size: .86rem; color: var(--hero-soft); }

.newpill {
  display: block;
  margin: 0 auto 16px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid rgba(224,162,74,.55);
  background: rgba(224,162,74,.16);
  color: var(--gold);
  font-weight: 600;
  font-size: .88rem;
  backdrop-filter: blur(8px);
  animation: drop-in .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes drop-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
@media (min-width: 700px)  { .grid { gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); } }

.tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  padding: 0;
  display: block;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
  animation: tile-in .4s ease both;
}
@keyframes tile-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.tile:active img { transform: scale(1.04); }
.tile__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 6px;
  color: var(--hero-soft);
  font-size: 1.5rem;
  background: linear-gradient(100deg, rgba(255,255,255,.05) 30%, rgba(255,255,255,.12) 50%, rgba(255,255,255,.05) 70%);
  background-size: 220% 100%;
  animation: sweep 1.5s linear infinite;
}
@keyframes sweep { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.tile__badge {
  position: absolute;
  bottom: 7px; left: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.tile__badge svg { width: 11px; height: 11px; }
.tile__who {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 8px 9px 16px;
  font-size: .7rem;
  color: #fff;
  text-align: left;
  background: linear-gradient(180deg, rgba(0,0,0,.5), transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile__wait {
  position: absolute;
  inset: auto 0 0 0;
  padding: 5px;
  font-size: .66rem;
  text-align: center;
  background: rgba(224,162,74,.85);
  color: #2a1a05;
  font-weight: 600;
}

.grid-empty {
  text-align: center;
  padding: 46px 20px;
  color: var(--hero-soft);
  line-height: 1.6;
}
.grid-empty__ico { font-size: 2.6rem; margin-bottom: 12px; }

.grid-more {
  text-align: center;
  padding: 22px;
  color: var(--hero-soft);
  font-size: .84rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.spin {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.25);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.sentinel { height: 10px; }

/* ===================== FOOTER ===================== */
.foot {
  text-align: center;
  padding: 40px 20px 30px;
  color: var(--hero-soft);
  font-size: .82rem;
  line-height: 1.6;
}
.foot img {
  height: 36px;
  width: auto;
  margin: 0 auto 16px;
  background: #fff;
  padding: 7px 14px;
  border-radius: 12px;
}
.foot__small { opacity: .6; font-size: .75rem; margin-top: 6px; }

/* ===================== DOCK (mobile) ===================== */
.dock {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  gap: 8px;
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
  background: rgba(6,24,31,.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.dock__btn {
  flex: 1;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  color: var(--hero-ink);
  border-radius: 14px;
  padding: 9px 6px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: .7rem;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.dock__btn svg { width: 21px; height: 21px; }
.dock__btn--main {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  border-color: transparent;
  box-shadow: 0 8px 22px -10px var(--accent-deep);
}
.dock__btn:active { transform: scale(.97); }

@media (min-width: 860px) {
  body { padding-bottom: 0; }
  .dock { display: none; }
  .hero { padding-top: 30px; }
  .hero-copy h1 { font-size: 3.4rem; }
}

/* ===================== LIGHTBOX ===================== */
.lb {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #04141a;   /* pieno: guardando una foto non deve trasparire la pagina */
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade .2s ease;
  touch-action: pan-y;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.lb__bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: linear-gradient(180deg, rgba(0,0,0,.6), transparent);
  z-index: 3;
}
.lb__who { font-size: .85rem; color: var(--hero-soft); }
.lb__close {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(0,0,0,.4);
  color: #fff;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.lb__stage {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 56px 8px calc(56px + env(safe-area-inset-bottom));
}
.lb__stage img,
.lb__stage video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
}
.lb__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 66px;
  border: none;
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  z-index: 3;
  border-radius: 10px;
}
.lb__nav--prev { left: 6px; }
.lb__nav--next { right: 6px; }
@media (max-width: 700px) {
  .lb__nav { opacity: .55; width: 38px; height: 56px; font-size: 1.6rem; }
}
.lb__hint {
  position: absolute;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 0; right: 0;
  text-align: center;
  font-size: .78rem;
  color: var(--hero-soft);
  padding: 0 20px;
  z-index: 3;
}
.lb__wait {
  text-align: center;
  color: var(--hero-soft);
  padding: 30px;
  line-height: 1.6;
  font-size: .92rem;
}
.lb__wait .spin { margin-bottom: 12px; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 200;
  background: rgba(6,24,31,.95);
  border: 1px solid var(--line);
  color: var(--hero-ink);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: .85rem;
  box-shadow: 0 16px 40px -16px rgba(0,0,0,.7);
  animation: drop-in .3s ease;
  max-width: 90vw;
  text-align: center;
}
@media (min-width: 860px) { .toast { bottom: 24px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::after { animation: none !important; transition: none !important; }
}
