/* ============================================================
   Digital Dreams — variabili e font condivisi da TUTTO il sito
   Font: Britti Sans (variabile, locale in assets/fonts/).
   Per cambiarlo, sostituisci il file e/o modifica --font-primary.
   ============================================================ */

@font-face {
  font-family: "Britti Sans";
  src: url("../assets/fonts/britti-sans-variable.ttf") format("truetype");
  font-weight: 200 800; /* asse di peso del font variabile */
  font-style: normal;
  font-display: swap;
}

:root {
  --font-primary: "Britti Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --color-accent: rgb(255, 223, 0);
}

/* L'attributo hidden deve sempre nascondere, anche su elementi con
   display:flex (gate admin, overlay del player). Senza questo, un overlay
   "chiuso" resterebbe sopra la pagina e bloccherebbe i click. */
[hidden] { display: none !important; }

/* ============================================================
   Navbar a pillola — condivisa da tutte le pagine
   ============================================================ */

.pill-nav {
  position: fixed;
  top: max(1.8vh, env(safe-area-inset-top, 0px) + 14px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.6vw, 2.2rem);
  max-width: calc(100vw - 2rem);
  padding: 0.45rem 1.7rem 0.45rem 0.8rem;
  background: rgba(18, 18, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.pill-logo {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.2rem;
}
.pill-logo img {
  display: block;
  width: clamp(38px, 5vw, 46px);
  height: auto;
}

.pill-link {
  background: transparent;
  border: none;
  font-family: inherit;
  cursor: pointer;
  color: #f4f4f6;
  text-decoration: none;
  font-size: clamp(0.76rem, 1.2vw, 0.9rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.45rem 0.25rem;
  opacity: 0.82;
  white-space: nowrap;
  transition: opacity 0.25s ease;
}
.pill-link:hover,
.pill-link:focus-visible {
  opacity: 1;
}
.pill-link.is-current {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

@media (max-width: 520px) {
  .pill-nav { gap: 0.9rem; padding: 0.4rem 1rem 0.4rem 0.55rem; }
  .pill-logo img { width: 32px; }
  .pill-link { font-size: 0.8rem; padding: 0.4rem 0.15rem; }
}

/* ============================================================
   Player video modale — condiviso (Commissioned / Originals)
   ============================================================ */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(6, 6, 6, 0.94);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.video-modal.open { opacity: 1; }

.video-frame {
  position: relative;
  width: min(92vw, 1120px);
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-close {
  position: absolute;
  top: clamp(1rem, 3vw, 1.8rem);
  right: clamp(1rem, 3vw, 1.8rem);
  z-index: 81;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(237, 237, 237, 0.3);
  border-radius: 50%;
  background: transparent;
  color: #ededed;
  font-family: var(--font-primary);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.video-close:hover {
  background: #ededed;
  color: #000;
  border-color: #ededed;
}

/* ============================================================
   Loghi clienti (marquee) — condiviso (landing + Studio)
   ============================================================ */

.trust-strip {
  width: min(88vw, 620px);
  overflow: hidden;
  /* i bordi sfumano nel nulla (edge fade) */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%);
}

.trust-track {
  display: flex;
  width: max-content;
  animation: trust-scroll 30s linear infinite;
}

.trust-group {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 5vw, 3.2rem);
  padding-right: clamp(2rem, 5vw, 3.2rem); /* = gap: stacco costante al giro */
  flex: none;
}

.trust-logo {
  height: clamp(18px, 4vw, 26px);
  width: auto;
  flex: none;
  /* ogni logo diventa bianco uniforme qualunque sia il colore originale */
  filter: brightness(0) invert(1) drop-shadow(0 1px 5px rgba(0, 0, 0, 0.55));
  opacity: 0.9;
}

@keyframes trust-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .trust-track { animation: none; }
}
