/* MatchAnalyzer — sito copertina.
   Palette "Carta" ripresa da src/theme/variables.scss dell'app: grafite, verde campo
   e i colori della scala di pericolosità, che qui come nell'app sono legenda e non
   decorazione. Nessun font o script esterno: la pagina si serve da sola. */

:root {
  --graphite: #1f242e;
  --graphite-soft: #333944;
  --green: #2f8a37;
  --red: #dc2626;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e3e8ef;
  --paper: #f6f8fa;
  --card: #ffffff;

  /* Scala di pericolosità xG — identica a xgColor() nel motore */
  --xg-alta: #e53935;
  --xg-buona: #fb8c00;
  --xg-discreta: #f2b90c;
  --xg-difficile: #29b6f6;
  --xg-improbabile: #9e9e9e;
  --assist: #7e57c2;

  --radius: 12px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
a { color: var(--green); }

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

/* ---------- Header ---------- */

.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.6) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand svg, .brand img { width: 32px; height: 32px; }
.brand b { font-size: 18px; font-weight: 650; letter-spacing: -0.2px; }
.brand b span { color: var(--muted); font-weight: 400; }
.site-nav { display: flex; gap: 22px; font-size: 15px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--ink); }

/* ---------- Hero ---------- */

.hero {
  background: var(--graphite);
  color: #fff;
  padding: 72px 0 0;
  overflow: hidden;
}
.hero .wrap { display: grid; grid-template-columns: 1fr 320px; gap: 56px; align-items: end; }
.hero-copy { padding-bottom: 72px; }
.tag {
  display: inline-block; font-size: 12px; letter-spacing: 2.4px; text-transform: uppercase;
  color: #94a3b8; border: 1px solid #3c4452; border-radius: 999px; padding: 5px 12px;
  margin-bottom: 24px;
}
.hero h1 {
  margin: 0 0 18px; font-size: clamp(34px, 5.2vw, 52px); line-height: 1.1;
  letter-spacing: -1.2px; font-weight: 700;
}
.hero h1 em { font-style: normal; color: #7dd88a; }
.hero p { margin: 0 0 28px; font-size: 19px; color: #c3cbd7; max-width: 34em; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  font-size: 13px; color: #cbd5e1; background: #2a303b; border: 1px solid #3c4452;
  border-radius: 999px; padding: 6px 14px;
}
.pill.live { color: #7dd88a; border-color: #2f5c39; }

/* ---------- Sezioni ---------- */

section { padding: 80px 0; }
section.alt { background: #fff; border-block: 1px solid var(--line); }
.sec-head { max-width: 46em; margin-bottom: 44px; }
.sec-head h2 {
  margin: 0 0 12px; font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.6px;
  font-weight: 700;
}
.sec-head p { margin: 0; color: var(--muted); font-size: 18px; }
.kicker {
  font-size: 12px; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--green); font-weight: 600; margin-bottom: 10px;
}

/* ---------- Griglia di caratteristiche ---------- */

.feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.feat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px;
}
section.alt .feat { background: var(--paper); }
.feat h3 { margin: 0 0 8px; font-size: 17px; font-weight: 650; }
.feat p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.55; }
.feat .ico {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  margin-bottom: 14px; background: #eef2f6;
}
.feat .ico svg { width: 20px; height: 20px; }

/* ---------- Schermate ---------- */

.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.shot-col { text-align: center; }
.shot-col .cap { margin-top: 16px; font-size: 14px; color: var(--muted); }
.shot-col .cap b { display: block; color: var(--ink); font-size: 15px; font-weight: 650; }

/* Telefono */
.phone {
  width: 288px; margin: 0 auto; background: #0d1117; border-radius: 34px;
  padding: 9px; box-shadow: 0 22px 50px rgba(15, 23, 42, 0.22), 0 2px 6px rgba(15, 23, 42, 0.1);
}
.hero .phone { box-shadow: 0 -8px 60px rgba(0, 0, 0, 0.5); margin-bottom: -40px; }
.screen {
  background: var(--paper); border-radius: 26px; overflow: hidden;
  font-size: 11px; line-height: 1.35; text-align: left; color: var(--ink);
}
.status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 16px 3px; font-size: 10px; font-weight: 600; color: var(--ink);
}
.tbar {
  display: flex; align-items: center; gap: 8px; background: #fff; padding: 11px 12px;
  border-bottom: 1px solid var(--line); font-weight: 600; font-size: 12px;
}
.tbar .sp { margin-left: auto; }
.tbar .ic { color: var(--muted); font-weight: 400; font-size: 14px; }
.tbar .vs { color: var(--muted); font-weight: 400; }
.body { padding: 10px 12px 14px; }

/* Scoreboard live e hero del report */
.score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  background: #fff; border-bottom: 1px solid var(--line); padding: 12px 10px; text-align: center; }
.score .nm { font-size: 11px; font-weight: 650; }
.score .ipo { font-size: 30px; font-weight: 800; line-height: 1.05; letter-spacing: -1px; }
.score .sub { font-size: 9px; color: var(--muted); }
.score .mid { font-size: 9px; letter-spacing: 2px; color: var(--muted); padding: 0 6px; }
.home { color: var(--graphite); }
.away { color: var(--red); }

/* Segment Ionic */
.seg { display: flex; background: #eaedf1; border-radius: 8px; padding: 3px; margin: 10px 0; }
.seg span { flex: 1; text-align: center; padding: 5px 4px; border-radius: 6px;
  font-size: 10px; font-weight: 600; color: var(--muted); }
.seg span.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12); }

.lbl { font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin: 12px 0 6px; }
.note { font-size: 9.5px; color: var(--muted); text-align: center; margin-top: 6px; }

/* Chip degli eventi */
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 5px 9px; font-size: 9.5px; color: var(--ink); white-space: nowrap; }
.chip.on { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.chip.quick b { color: var(--green); }

/* Legenda pericolosità — stessi colori del componente danger-legend */
.legend { display: flex; flex-wrap: wrap; gap: 4px 9px; justify-content: center;
  margin-top: 8px; font-size: 8.5px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 4px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.legend i.dash { width: 13px; height: 0; border-radius: 0; border-top: 2px dashed #94a3b8; }
.legend i.ball { background: #fff; border: 2px solid var(--graphite); }

/* Barre di confronto del report */
.cmp { margin: 10px 0 12px; }
.cmp-lbl { display: flex; justify-content: space-between; font-size: 9px;
  color: var(--muted); margin-bottom: 3px; }
.bar { display: flex; height: 7px; border-radius: 4px; overflow: hidden; margin-bottom: 9px; }
.bar i { display: block; height: 100%; }

/* Tessere numeriche */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tiles .t { background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 4px; text-align: center; }
.tiles .t .v { font-size: 16px; font-weight: 800; letter-spacing: -0.5px; }
.tiles .t .l { font-size: 8px; color: var(--muted); margin-top: 1px; }

/* Lista partite */
.list { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-top: 12px; }
.list .row { display: flex; align-items: center; gap: 8px; padding: 9px 11px;
  border-bottom: 1px solid var(--line); }
.list .row:last-child { border-bottom: 0; }
.list .row .t { font-size: 11px; font-weight: 600; }
.list .row .d { font-size: 9px; color: var(--muted); }
.list .row .r { margin-left: auto; font-size: 9px; color: var(--muted); }
.badge { margin-left: auto; background: var(--red); color: #fff; font-size: 8px;
  font-weight: 700; letter-spacing: 0.6px; border-radius: 4px; padding: 2px 5px; }

/* Bottoni Ionic */
.btn { display: block; text-align: center; background: var(--graphite); color: #fff;
  border-radius: 8px; padding: 9px; font-size: 11px; font-weight: 600; margin-top: 8px; }
.btn.ghost { background: transparent; color: var(--graphite); border: 1px solid var(--graphite); }

/* Tabella IPO a piena larghezza */
.ipo-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow-x: auto; }
table.ipo { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 460px; }
table.ipo th, table.ipo td { padding: 11px 16px; text-align: right; border-bottom: 1px solid var(--line); }
table.ipo th:first-child, table.ipo td:first-child { text-align: left; }
table.ipo thead th { font-size: 12px; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--muted); font-weight: 600; }
table.ipo tbody tr:last-child td { border-bottom: 0; }
table.ipo tr.tot td { font-weight: 700; background: var(--paper); }
table.ipo .w { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Campo a piena larghezza */
.pitch-block { display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px; align-items: center; }
.pitch-block .pitch-fig { border-radius: var(--radius); overflow: hidden; }
.pitch-block h3 { margin: 0 0 10px; font-size: 21px; font-weight: 650; }
.pitch-block p { margin: 0 0 14px; color: var(--muted); font-size: 16px; }
.scale { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.scale li { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.scale i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.scale b { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 400;
  margin-left: auto; font-size: 14px; }

/* ---------- Privacy in evidenza ---------- */

.privacy-band { background: var(--graphite); color: #fff; }
.privacy-band .sec-head h2 { color: #fff; }
.privacy-band .sec-head p { color: #c3cbd7; }
.privacy-band .kicker { color: #7dd88a; }
.pv { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.pv div { background: #272d38; border: 1px solid #3c4452; border-radius: var(--radius); padding: 20px; }
.pv h3 { margin: 0 0 6px; font-size: 16px; font-weight: 650; }
.pv p { margin: 0; font-size: 14.5px; color: #aab4c2; line-height: 1.55; }
.cta { display: inline-block; margin-top: 28px; background: #fff; color: var(--graphite);
  text-decoration: none; font-weight: 650; font-size: 15px; border-radius: 8px; padding: 12px 22px; }

/* ---------- Footer ---------- */

.site-foot { background: #fff; border-top: 1px solid var(--line); padding: 40px 0; font-size: 14px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  align-items: center; color: var(--muted); }
.site-foot nav { display: flex; gap: 20px; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }

/* ---------- Pagina privacy ---------- */

.doc { max-width: 720px; margin: 0 auto; padding: 64px 24px 88px; }
.doc h1 { font-size: clamp(30px, 4.4vw, 40px); letter-spacing: -0.9px; margin: 0 0 8px; }
.doc .upd { color: var(--muted); font-size: 15px; margin: 0 0 40px; }
.doc h2 { font-size: 21px; margin: 40px 0 12px; letter-spacing: -0.3px; }
.doc h3 { font-size: 17px; margin: 26px 0 8px; }
.doc p, .doc li { color: #334155; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 7px; }
.doc .box {
  background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--green);
  border-radius: var(--radius); padding: 20px 24px; margin: 28px 0;
}
.doc .box p:first-child { margin-top: 0; }
.doc .box p:last-child { margin-bottom: 0; }
.doc .todo { border-left-color: var(--xg-buona); background: #fffaf2; }
.doc dl { margin: 0; }
.doc dt { font-weight: 650; margin-top: 16px; }
.doc dd { margin: 4px 0 0; color: #334155; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 20px 0; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc thead th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }

/* ---------- Adattamento ---------- */

@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding-top: 56px; }
  .hero-copy { padding-bottom: 8px; }
  .hero .phone { margin-bottom: -60px; }
  .pitch-block { grid-template-columns: 1fr; gap: 28px; }
  section { padding: 64px 0; }
  .site-nav { display: none; }
}
