/* Palette ricavata dalla copertina del video: blu notte #173044, avorio, argento */
:root {
  --navy: #173044;
  --navy-deep: #0F2231;
  --ivory: #F1EEE6;
  --silver: #B9C2CC;
  --line: rgba(241, 238, 230, 0.45);
  --serif: "Cormorant Garamond", "Garamond", Georgia, serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html, body { height: 100%; }

body {
  background: var(--navy);
  color: var(--ivory);
  font-family: var(--sans);
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

[hidden] { display: none !important; }

/* ---------- Ingresso ---------- */
.ingresso {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.25rem, 4vh, 2.25rem);
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
           max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: var(--navy); /* piatto: coincide con lo sfondo della copertina, senza bordo visibile */
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.ingresso.esce { opacity: 0; visibility: hidden; }

.cover {
  display: block;
  width: min(100%, 1100px);
  height: auto;
  max-height: 62dvh;
  object-fit: contain;
  animation: entra-in 1.1s ease-out both;
}

.entra {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3.2vw, 1.6rem);
  font-weight: 500;
  letter-spacing: 0.42em;
  text-indent: 0.42em; /* compensa lo spazio finale per centrare otticamente */
  text-transform: uppercase;
  color: var(--ivory);
  background: transparent;
  border: 1px solid var(--line);
  padding: 0.85em 2.6em;
  min-height: 48px;
  cursor: pointer;
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
  animation: entra-in 1.1s ease-out 0.25s both;
}

.entra:hover { background: var(--ivory); color: var(--navy); border-color: var(--ivory); }
.entra:focus-visible { outline: 2px solid var(--ivory); outline-offset: 4px; }

.nota {
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--silver);
  animation: entra-in 1.1s ease-out 0.5s both;
}

/* ---------- Player ---------- */
.player {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--navy-deep);
  animation: video-in 0.8s ease both;
}

.player video {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  background: #000;
  object-fit: contain;
}

.barra {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 2.5rem;
  width: 100%;
  padding: 0.6rem 1rem max(0.6rem, env(safe-area-inset-bottom));
  background: var(--navy);
}

.siti {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.75rem;
}

.qualita { display: flex; gap: 0.25rem; }

.qualita button {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--silver);
  background: transparent;
  border: 1px solid transparent;
  padding: 0.7rem 0.9rem;
  min-height: 44px;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.qualita button:hover { color: var(--ivory); }
.qualita button[aria-pressed="true"] { color: var(--ivory); border-color: var(--line); }
.qualita button:focus-visible { outline: 2px solid var(--ivory); outline-offset: 2px; }

.siti a {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--silver);
  text-decoration: none;
  padding: 0.35rem 0.25rem;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.siti a:hover, .siti a:focus-visible { color: var(--ivory); border-bottom-color: var(--line); outline: none; }

.noscript {
  position: fixed;
  inset: auto 0 1rem 0;
  text-align: center;
  color: var(--silver);
}

@keyframes entra-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

@keyframes video-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ingresso, .cover, .entra, .nota, .player { animation: none !important; transition: none !important; }
}
