/* =========================================================================
   AI Policy Assessment — Scroller
   Stile e font identici a scroller.it (Commissioner, #181818, #ee7d34).
   ========================================================================= */

:root {
  --bg: #181818;
  --bg2: #1f1f1f;
  --accent: #ee7d34;
  --accent2: #ed7d35;
  --text: #ffffff;
  --text2: #c8c8c8;
  --dim: #888888;
  --border: rgba(255, 255, 255, 0.08);
  --border2: rgba(255, 255, 255, 0.14);
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Commissioner', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

body { display: flex; flex-direction: column; min-height: 100vh; position: relative; overflow-x: hidden; }

/* ---------- Sfondo a gradiente (replica scroller.it: blob sfocati) ---------- */
.bg-shapes {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.bg-shapes .shape { position: absolute; border-radius: 50%; }
.bg-shapes .shape-1 {
  background: linear-gradient(180deg, rgba(221, 205, 61, 0.55) 0%, rgba(238, 125, 52, 0.55) 100%);
  width: 1100px; height: 1100px; right: -480px; bottom: -620px;
  filter: blur(320px);
}
.bg-shapes .shape-2 {
  background: linear-gradient(180deg, rgba(221, 205, 61, 0.42) 0%, rgba(238, 125, 52, 0.42) 100%);
  width: 620px; height: 760px; top: -360px; left: 42%;
  transform: rotate(90deg); filter: blur(240px);
}
.bg-shapes .shape-3 {
  background-color: rgba(26, 68, 59, 0.75);
  width: 760px; height: 560px; top: 24%; left: -300px;
  filter: blur(260px);
}
.bg-shapes .shape-4 {
  background-color: rgba(26, 68, 59, 0.6);
  width: 720px; height: 460px; bottom: 6%; right: 8%;
  filter: blur(260px);
}

#app { flex: 1; display: flex; position: relative; z-index: 1; }
.site-header, .site-footer { position: relative; z-index: 2; }

::selection { background: var(--accent); color: #fff; }

/* ---------- Layout schermata ---------- */
.screen {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 90px 24px;
}
.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}
.center { text-align: center; }

/* ---------- Eyebrow / label uppercase (stile scroller) ---------- */
.eyebrow {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 3px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 22px;
}

/* ---------- Titoli (scroller: 60px / 600) ---------- */
.hero-title {
  font-size: 54px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.5px;
  margin-bottom: 24px;
}
.hero-sub {
  font-size: 20px;
  color: var(--text2);
  max-width: 620px;
  margin-bottom: 40px;
}
.q-title {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.18;
  margin-bottom: 14px;
}
.q-hint {
  font-size: 16px;
  color: var(--dim);
  margin-bottom: 34px;
}

/* ---------- Pulsante firma scroller (bordo animato) ---------- */
.btn {
  color: #fff;
  font-family: 'Commissioner', sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 18px 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background-color: transparent;
  border: 1px solid var(--accent);
  border-top: 0;
  border-bottom: 0;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: color 0.3s ease, background-color 0.3s ease;
}
.btn::before, .btn::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background-color: var(--accent);
  transition: transform 0.35s ease;
}
.btn::before { top: 0; transform-origin: right; }
.btn::after { bottom: 0; transform-origin: left; }
.btn:hover { background-color: rgba(238, 125, 52, 0.12); }
.btn:hover::before, .btn:hover::after { transform: scaleX(0); }
.btn svg { flex: 0 0 auto; }
.btn:disabled { opacity: 0.55; cursor: default; }
.cta-main { margin-top: 34px; }

/* pulsante piccolo pieno (copia link) */
.btn-mini {
  font-family: 'Commissioner', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  background: var(--accent2);
  border: 0;
  padding: 0 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease;
}
.btn-mini:hover { background: var(--accent); }

/* ---------- Link indietro ---------- */
.link-back {
  background: none; border: 0; color: var(--dim);
  font-family: 'Commissioner', sans-serif; font-size: 13px;
  letter-spacing: 1px; cursor: pointer; margin-bottom: 26px;
  padding: 0; transition: color 0.2s ease;
}
.link-back:hover { color: var(--accent); }

/* ---------- Progress ---------- */
.qcount {
  text-transform: uppercase; font-size: 11px; letter-spacing: 3px;
  font-weight: 700; color: var(--dim); margin-bottom: 12px;
}
.pbar {
  height: 2px; background: var(--border2); margin-bottom: 36px; width: 100%;
}
.pbar span { display: block; height: 100%; background: var(--accent); transition: width 0.4s ease; }

/* ---------- Opzioni risposta ---------- */
.opts { display: flex; flex-direction: column; gap: 12px; }
.opt {
  width: 100%;
  text-align: left;
  font-family: 'Commissioner', sans-serif;
  font-size: 17px;
  font-weight: 400;
  color: var(--text);
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 20px 24px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.12s ease;
}
.opt:hover {
  border-color: var(--accent);
  background: #242424;
}
.opt:active { transform: translateY(1px); }
.opt.selected { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }

/* ---------- Loading ---------- */
.loading { min-height: 60vh; }
.spinner {
  width: 46px; height: 46px; margin: 0 auto 24px;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-txt { color: var(--text2); font-size: 16px; letter-spacing: 0.5px; }

/* ---------- Risultato ---------- */
.score-head {
  display: flex; align-items: center; gap: 28px;
  padding-bottom: 28px; margin-bottom: 30px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.score-num {
  font-size: 76px; font-weight: 700; line-height: 1;
}
.score-num span { font-size: 30px; font-weight: 400; color: var(--dim); }
.score-level {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; padding: 10px 18px; border: 1px solid;
}

.bars { display: flex; flex-direction: column; gap: 16px; margin-bottom: 38px; }
.bar-row { display: grid; grid-template-columns: 180px 1fr 44px; align-items: center; gap: 16px; }
.bar-lbl { font-size: 14px; color: var(--text2); }
.bar-row.weak .bar-lbl { color: var(--text); }
.weak-tag {
  display: inline-block; font-size: 9px; text-transform: uppercase; letter-spacing: 1.5px;
  font-weight: 700; color: var(--accent); border: 1px solid var(--accent);
  padding: 1px 6px; margin-left: 6px; vertical-align: middle;
}
.bar-track { height: 8px; background: var(--bg2); border: 1px solid var(--border); }
.bar-track span { display: block; height: 100%; transition: width 0.6s ease; }
.bar-val { font-size: 13px; color: var(--dim); text-align: right; font-weight: 600; }

.res-body { margin-bottom: 8px; }
.res-lead { font-size: 18px; color: var(--text2); line-height: 1.65; margin-bottom: 28px; }
.res-block { border-left: 2px solid var(--accent); padding: 4px 0 4px 22px; margin-bottom: 26px; }
.res-h {
  text-transform: uppercase; font-size: 11px; letter-spacing: 3px; font-weight: 700;
  color: var(--accent); margin-bottom: 10px;
}
.res-block p { font-size: 17px; color: var(--text); line-height: 1.6; }
.res-common { font-size: 15px; color: var(--dim); line-height: 1.6; margin-bottom: 20px; }
.res-reg {
  font-size: 14px; color: var(--text2); line-height: 1.6;
  background: var(--bg2); border: 1px solid var(--border); padding: 18px 20px; margin-bottom: 12px;
}

/* ---------- Condivisione / Grazie ---------- */
.share-box { margin-top: 34px; }
.res-form-box {
  margin-top: 40px;
  padding-top: 34px;
  border-top: 1px solid var(--border);
}
.res-form-box .res-h { margin-bottom: 6px; }
.res-form-box .q-hint { margin-bottom: 26px; }
.res-form-box .g-recaptcha { margin: 4px 0 2px; }
@media (max-width: 360px) {
  .res-form-box .g-recaptcha { transform: scale(0.9); transform-origin: 0 0; }
}
.share-row { display: flex; gap: 0; margin: 14px 0 0; max-width: 560px; }
.share-row input {
  flex: 1; font-family: 'Commissioner', sans-serif; font-size: 14px;
  color: var(--text2); background: var(--bg2); border: 1px solid var(--border);
  padding: 14px 16px; outline: none; min-width: 0;
}
.check {
  width: 64px; height: 64px; border: 2px solid #44bb66; color: #44bb66;
  display: flex; align-items: center; justify-content: center; font-size: 32px;
  border-radius: 50%; margin-bottom: 26px;
}

/* ---------- Form contatto ---------- */
.form { display: flex; flex-direction: column; gap: 20px; max-width: 520px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  text-transform: uppercase; font-size: 11px; letter-spacing: 2px;
  font-weight: 700; color: var(--dim);
}
.field input, .field select {
  font-family: 'Commissioner', sans-serif; font-size: 16px; color: var(--text);
  background: var(--bg2); border: 1px solid var(--border);
  padding: 15px 16px; outline: none; transition: border-color 0.2s ease;
}
.field input:focus, .field select:focus { border-color: var(--accent); }
.field select { appearance: none; cursor: pointer; }
.privacy { font-size: 12px; color: var(--dim); line-height: 1.5; }

/* ---------- Legal ---------- */
.legal {
  margin-top: 40px; font-size: 12px; color: var(--dim);
  letter-spacing: 0.3px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(20px);
  background: #2a2a2a; color: #fff; border: 1px solid var(--accent);
  padding: 14px 24px; font-size: 14px; letter-spacing: 0.3px;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
  .screen { padding: 64px 20px; }
  .hero-title { font-size: 34px; }
  .hero-sub { font-size: 17px; }
  .q-title { font-size: 26px; }
  .opt { font-size: 16px; padding: 18px 18px; }
  .score-num { font-size: 60px; }
  .bar-row { grid-template-columns: 1fr; gap: 6px; }
  .bar-val { text-align: left; }
  .btn { width: 100%; }
  .share-row { flex-direction: column; gap: 10px; }
  .btn-mini { padding: 14px; }
}

/* =========================================================================
   Header + Footer del sito (replica scroller.it)
   ========================================================================= */
.site-container {
  width: calc(100% - 100px);
  max-width: 1180px;
  margin: 0 auto;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(24, 24, 24, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .site-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.site-logo { display: inline-flex; }
.site-logo img { height: 30px; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a {
  color: #fff;
  font-family: 'Commissioner', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-decoration: none;
  opacity: 0.82;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.site-nav a:hover { color: var(--accent); opacity: 1; }

/* ---------- Footer ---------- */
.site-footer { background: #000; margin-top: auto; }
.site-footer .footer-top {
  padding: 34px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-logo { height: 26px; width: auto; display: block; }
.footer-tag {
  color: var(--text2);
  font-family: 'Commissioner', sans-serif;
  font-size: 14px;
  font-weight: 400;
}
.footer-divider { border-top: 1px solid rgba(255, 255, 255, 0.14); }
.site-footer .footer-bottom {
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-copy {
  color: rgba(235, 235, 235, 0.4);
  font-family: 'Commissioner', sans-serif;
  font-size: 13px;
  font-weight: 400;
  margin: 0;
}
.footer-links { display: flex; gap: 26px; }
.footer-links a {
  color: #fff;
  font-family: 'Commissioner', sans-serif;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  opacity: 0.75;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.footer-links a:hover { color: var(--accent); opacity: 1; }

@media (max-width: 768px) {
  .site-container { width: calc(100% - 40px); }
  .site-nav { gap: 18px; }
  .site-nav a { font-size: 13px; }
  .site-logo img { height: 26px; }
  .site-footer .footer-bottom { flex-direction: column; align-items: flex-start; }
}
