/*
 * Watch Time — stylesheet condiviso del sito (landing IT / EN).
 * Palette presa da hooks/useTheme.tsx: stessa lingua visiva dell'app
 * (light warm-paper + dark slate), così il sito non sembra un'altra app.
 * Nessuna dipendenza esterna, nessuna immagine: tutto CSS + /icon.png.
 */

/* ── token ─────────────────────────────────────────────────────────────── */
:root {
  color-scheme: light dark;

  --bg: #f2ede4;
  --surface: #faf7f0;
  --surface-2: #ebe5d9;
  --elevated: #ffffff;
  --text: #1c1917;
  --text-2: #57534e;
  --text-3: #a8a29e;
  --border: #d6d3d0;

  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --secondary: #7c3aed;
  --accent: #d97706;
  --success: #16a34a;

  --ring: rgba(37, 99, 235, 0.35);
  --shadow-sm: 0 2px 8px rgba(80, 60, 40, 0.08);
  --shadow: 0 12px 32px rgba(80, 60, 40, 0.12);
  --gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);

  --radius: 20px;
  --radius-sm: 12px;
  /* Allineato al cap maxWidth:1120 di Esplora/impostazioni in app. */
  --maxw: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-2: #334155;
    --elevated: #1e293b;
    --text: #f8fafc;
    --text-2: #cbd5e1;
    --text-3: #64748b;
    --border: #475569;

    --primary: #3b82f6;
    --primary-2: #60a5fa;
    --secondary: #a78bfa;
    --accent: #fb923c;
    --success: #4ade80;

    --ring: rgba(59, 130, 246, 0.45);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
    --gradient: linear-gradient(135deg, #3b82f6 0%, #a78bfa 100%);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800;
}

h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 750;
  margin-top: 56px;
}

h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

p {
  margin: 0 0 14px;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--primary-2);
}

img {
  max-width: 100%;
}

ul {
  padding-left: 20px;
  margin: 0 0 14px;
}

li {
  margin-bottom: 6px;
}

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 12px 0;
  z-index: 20;
}

.skip:focus {
  left: 0;
}

.small {
  font-size: 14px;
  color: var(--text-2);
}

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

/* ── topbar ────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  /* Fallback solido per browser senza color-mix, poi la variante traslucida. */
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
}

.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  font-size: 15px;
}

.links a {
  color: var(--text-2);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.links a:hover,
.links a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--primary);
}

.links a.nav-cta {
  color: #fff;
  background: var(--gradient);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 650;
  border-bottom: 0;
  box-shadow: var(--shadow-sm);
}

.links a.nav-cta:hover {
  filter: brightness(1.06);
}

/* ── hero ──────────────────────────────────────────────────────────────── */
.breadcrumb {
  font-size: 13px;
  color: var(--text-3);
  margin: 18px 0 0;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
  padding: 32px 0 8px;
}

@media (min-width: 880px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
    padding: 56px 0 24px;
  }
}

.hero-logo {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.tagline {
  font-size: clamp(17px, 2.4vw, 20px);
  color: var(--text-2);
  max-width: 46ch;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 22px;
}

.badge {
  font-size: 13px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: 999px;
  padding: 5px 13px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border-radius: 999px;
  padding: 13px 24px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--gradient);
  color: #fff !important;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  filter: brightness(1.07);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text) !important;
  border-color: var(--border);
}

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

.btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

/* alias legacy usati dalle altre pagine del sito */
.cta {
  display: inline-block;
  background: var(--gradient);
  color: #fff !important;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
  margin: 14px 6px 0;
  font-weight: 700;
}

.cta.secondary {
  background: var(--surface);
  color: var(--text) !important;
  border: 1px solid var(--border);
}

/* ── mockup telefono (solo CSS) ────────────────────────────────────────── */
.phone-wrap {
  display: flex;
  justify-content: center;
}

.phone {
  width: min(290px, 78vw);
  aspect-ratio: 9 / 18.5;
  background: var(--surface);
  border: 10px solid var(--elevated);
  border-radius: 38px;
  box-shadow: var(--shadow);
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.phone::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 180px;
  background: var(--gradient);
  opacity: 0.16;
  pointer-events: none;
}

.phone-bar {
  width: 74px;
  height: 5px;
  border-radius: 999px;
  background: var(--border);
  margin: 0 auto 4px;
  flex: 0 0 auto;
}

.phone-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.phone-head strong {
  font-size: 14px;
}

.phone-head span {
  font-size: 11px;
  color: var(--text-3);
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  overflow: hidden;
}

.poster {
  aspect-ratio: 2 / 3;
  border-radius: 9px;
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
}

.poster:nth-child(6n + 1) {
  background: linear-gradient(160deg, #2563eb, #7c3aed);
}

.poster:nth-child(6n + 2) {
  background: linear-gradient(160deg, #0ea5e9, #1d4ed8);
}

.poster:nth-child(6n + 3) {
  background: linear-gradient(160deg, #d97706, #b91c1c);
}

.poster:nth-child(6n + 4) {
  background: linear-gradient(160deg, #16a34a, #0f766e);
}

.poster:nth-child(6n + 5) {
  background: linear-gradient(160deg, #7c3aed, #db2777);
}

.poster:nth-child(6n + 6) {
  background: linear-gradient(160deg, #334155, #0f172a);
}

.tabbar {
  margin-top: auto;
  display: flex;
  justify-content: center;
  gap: 8px;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px;
  box-shadow: var(--shadow);
}

.tabbar span {
  width: 40px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--text-3);
}

.tabbar span i {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 4px;
  display: block;
}

.tabbar span.is-active {
  /* Fallback solido prima della variante color-mix (browser vecchi). */
  background: var(--surface-2);
  background: color-mix(in srgb, var(--primary) 20%, transparent);
  color: var(--primary);
}

/* ── sezioni e card ────────────────────────────────────────────────────── */
section {
  scroll-margin-top: 80px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
}

.card > :last-child {
  margin-bottom: 0;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 720px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 16px 0;
}

@media (min-width: 720px) {
  .features {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1000px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

/* Hover/lift solo dove esiste un puntatore: su touch niente stati appesi. */
@media (hover: hover) and (pointer: fine) {
  .feature:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
  }
}

.feature p {
  font-size: 15px;
  color: var(--text-2);
  margin: 0;
}

.icon-tile {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
  margin-bottom: 12px;
}

.icon-tile svg {
  width: 21px;
  height: 21px;
}

.icon-tile.alt {
  background: var(--surface-2);
  background: color-mix(in srgb, var(--secondary) 14%, transparent);
  color: var(--secondary);
}

.icon-tile.warm {
  background: var(--surface-2);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}

.icon-tile.ok {
  background: var(--surface-2);
  background: color-mix(in srgb, var(--success) 16%, transparent);
  color: var(--success);
}

/* ── strip statistica / trust ──────────────────────────────────────────── */
.strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 26px 0 0;
}

@media (min-width: 720px) {
  .strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text-2);
}

.stat strong {
  color: var(--text);
  display: block;
  font-size: 16px;
}

/* ── tabella scope ─────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  margin: 14px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-2);
  font-weight: 700;
}

code {
  background: var(--surface-2);
  padding: 2px 7px;
  border-radius: 7px;
  font-size: 0.92em;
}

/* ── FAQ ───────────────────────────────────────────────────────────────── */
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 10px 0;
}

.faq details[open] {
  border-color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}

.faq summary {
  font-weight: 650;
  cursor: pointer;
}

.faq summary::marker {
  color: var(--primary);
}

.faq p {
  margin: 10px 0 2px;
  color: var(--text-2);
}

/* ── band finale ───────────────────────────────────────────────────────── */
.band {
  margin: 56px 0 24px;
  border-radius: var(--radius);
  padding: 32px 26px;
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.band h2 {
  margin-top: 0;
  color: #fff;
}

.band p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
}

.band .btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.5);
}

.band .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.24);
}

.band .btn-primary {
  background: #fff;
  color: var(--primary-2) !important;
}

/* ── footer ────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 28px 0 44px;
  font-size: 14px;
  color: var(--text-2);
}

footer .foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 12px;
}

footer a {
  color: var(--text-2);
}

footer a:hover {
  color: var(--text);
}

/* ── linguetta lingua ──────────────────────────────────────────────────── */
.lang {
  font-size: 14px;
  color: var(--text-2);
}

/* ── accessibilità / motion ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
