/* Guarda.live — foglio di stile unico, mobile-first */

:root {
  --ink: #14233d;
  --muted: #4a5873;
  --border: #dde2ea;
  --border-strong: #c9d1de;
  --surface: #f2f3f6;
  --tint: #eef2f8;
  --blue: #0d4a9e;
  --blue-dark: #0a3c82;
  --pale: #e3eaf7;
  --red: #cc1f2b;
  --red-bright: #e5303a;
  --green: #3dbe5c;
  --error: #b3261e;

  --wrap: 1200px;
  --gutter: 20px;
  --radius: 16px;
  --radius-sm: 10px;

  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: Sora, var(--sans);
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

@media (min-width: 640px) {
  :root {
    --gutter: 32px;
  }
}

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

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

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}

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

a {
  color: var(--blue);
}

a:hover {
  color: var(--blue-dark);
}

:focus-visible {
  outline: 3px solid var(--red-bright);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.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: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: #fff;
  color: var(--blue);
  padding: 12px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

/* ---------- header ---------- */

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 14px var(--gutter);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

/* il logo ha il sottotitolo "Video Streaming Services": sotto questa altezza non si legge */
.logo__img {
  height: 56px;
  width: auto;
}

@media (min-width: 640px) {
  .logo__img {
    height: 64px;
  }
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  font-size: 15px;
  font-weight: 500;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav a:hover {
  background: var(--surface);
  color: var(--ink);
}

.nav a[aria-current="page"] {
  background: var(--tint);
  color: var(--blue);
  font-weight: 600;
}

/* ---------- bottoni ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn--primary {
  background: var(--blue);
  color: #fff;
}

.btn--primary:hover {
  background: var(--blue-dark);
  color: #fff;
}

.btn--ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border-strong);
  font-weight: 600;
}

.btn--ghost:hover {
  background: var(--surface);
  color: var(--ink);
}

.btn--block {
  width: 100%;
}

/* ---------- hero ---------- */

.hero {
  background: var(--blue);
  color: #fff;
}

.hero__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  padding: 56px var(--gutter);
}

.hero__text {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero h1 {
  font-size: clamp(34px, 7vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.hero__lead {
  color: var(--pale);
  font-size: clamp(16px, 2.2vw, 19px);
  max-width: 34em;
}

.badge-live {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pale);
  border: 1px solid #7b98d6;
  border-radius: 999px;
  padding: 6px 12px;
}

.badge-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

/* ---------- card codice ---------- */

.code-card {
  flex: 1 1 380px;
  max-width: 460px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
}

@media (min-width: 640px) {
  .code-card {
    padding: 32px;
  }
}

.code-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.code-card__head h2 {
  font-size: 21px;
}

.icon-box {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--tint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field > label {
  font-size: 14px;
  font-weight: 600;
}

.input-code {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.input-code::placeholder {
  color: #6b778c;
  letter-spacing: 0.12em;
}

.input-code[aria-invalid="true"] {
  border-color: var(--error);
}

.field__msg {
  font-size: 14px;
  color: var(--muted);
  min-height: 20px;
}

.field__msg[data-state="error"] {
  color: var(--error);
  font-weight: 500;
}

.center-link {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

/* ---------- sezioni ---------- */

.section {
  padding: 48px 0;
}

.section--surface {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.section--tight {
  padding: 28px 0;
}

@media (min-width: 900px) {
  .section {
    padding: 64px 0;
  }
}

/* La locandina contiene testo: si mostra sempre intera, mai ritagliata,
   nelle proporzioni del file (width/height nell'HTML).
   Su telefono sta sopra il testo a tutta larghezza, da tablet in su gli sta accanto. */
.event-card {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
}

.event-card__media-link {
  display: block;
  border-bottom: 1px solid var(--border);
}

.event-card__media {
  width: 100%;
  height: auto;
}

@media (min-width: 720px) {
  .event-card {
    flex-direction: row;
  }

  .event-card__media-link {
    flex: 0 0 44%;
    max-width: 520px;
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }
}

.event-card__body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

@media (min-width: 640px) {
  .event-card__body {
    padding: 32px;
  }
}

.tag {
  display: inline-flex;
  align-self: flex-start;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--blue);
  border-radius: 6px;
  padding: 5px 10px;
}

.event-card__body h2 {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.18;
}

.meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 15px;
}

.meta__when {
  font-weight: 600;
}

.logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 32px;
}

.logo-row__label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  flex: 0 0 auto;
}

.logo-row__items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.social-icon {
  width: auto;
  height: 60px;
}

/* su telefono sei icone in due file da tre, invece di 4 + 2 */
@media (max-width: 639px) {
  .social-row {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    gap: 16px 28px;
  }
}

@media (min-width: 640px) {
  .social-icon {
    height: 72px;
  }
}

/* ---------- canale: player ---------- */

.stage {
  position: relative;
  width: 100%;
  background: #000;
  aspect-ratio: 16 / 9;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.stage__panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px var(--gutter);
}

.stage__panel--lock {
  background: var(--blue);
  overflow-y: auto;
}

.stage__panel--dark {
  background: #0b0f18;
  color: #c3cad6;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}

.stage__panel[hidden] {
  display: none;
}

.stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.stage--locked {
  min-height: 600px;
}

/* su schermi bassi il blocco codice non deve restare schiacciato nel 16:9 */
@media (max-width: 760px) {
  .stage--locked {
    aspect-ratio: auto;
    min-height: 0;
  }

  .stage--locked .stage__panel--lock {
    position: static;
    inset: auto;
    padding: 32px var(--gutter);
  }
}

.lock-card {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
}

@media (min-width: 640px) {
  .lock-card {
    padding: 32px;
  }
}

.lock-card h1 {
  font-size: clamp(22px, 3.4vw, 28px);
  line-height: 1.15;
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid #2a3344;
  border-top-color: #8a94a6;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 3s;
  }
}

.channel-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.channel-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 32px var(--gutter) 40px;
}

.channel-bar__text {
  flex: 1 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.channel-bar__text h2 {
  font-size: clamp(22px, 3.2vw, 34px);
}

.channel-bar__eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}

.channel-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.channel-bar__actions .btn {
  min-height: 48px;
  font-size: 15px;
}

/* ---------- assistenza ---------- */

.page-head {
  background: var(--blue);
  color: #fff;
}

.page-head__inner {
  padding: 48px var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.page-head h1 {
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.page-head .eyebrow {
  color: var(--pale);
  font-weight: 600;
}

.page-head p {
  color: var(--pale);
  font-size: clamp(16px, 2.2vw, 18px);
  max-width: 38em;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.quick-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
}

.quick-card:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.quick-card__title {
  font-weight: 600;
  font-size: 18px;
}

.quick-card__note {
  color: var(--muted);
  font-size: 15px;
}

.faq-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 36px;
  padding: 48px var(--gutter) 56px;
}

.faq-main {
  flex: 999 1 540px;
  min-width: 0;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.faq-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-group h2 {
  font-size: 23px;
  letter-spacing: -0.01em;
}

.faq-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.faq {
  border-bottom: 1px solid var(--border);
  padding: 4px 0;
}

.faq > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  font-weight: 600;
  font-size: 17px;
  list-style: none;
  cursor: pointer;
}

.faq > summary::-webkit-details-marker {
  display: none;
}

.faq__chev {
  flex: 0 0 auto;
  font-size: 24px;
  line-height: 1;
  color: var(--blue);
  transition: transform 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  .faq__chev {
    transition: none;
  }
}

.faq[open] .faq__chev {
  transform: rotate(45deg);
}

.faq__body {
  margin: 0 0 18px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq__body ol {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--blue-dark);
  color: var(--pale);
  margin-top: auto;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 22px var(--gutter);
  font-size: 14px;
}

.site-footer a {
  color: var(--pale);
}

.site-footer a:hover {
  color: #fff;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- layout pagina ---------- */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
