/* Il Battito di Bitcoin — simonecastellan.com/BDG2029 */

:root {
  --nero: #050506;
  --nero2: #0b0b0d;
  --nero3: #101013;
  --testo: #ede7dc;
  --testo-tenue: #a89f90;
  --ambra: #ffb25e;
  --caldo: #ffe8c8;
  --freddo: #eaf2ff;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--nero);
  color: var(--testo);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
}

a { color: var(--ambra); text-underline-offset: 3px; }

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

.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
}

#scena {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-alto {
  position: relative;
  padding-top: 4.5svh;
  text-align: center;
}

.occhiello {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--testo-tenue);
  margin-bottom: 0.9rem;
}

h1 {
  font-size: clamp(1.5rem, 4.5vw, 2.9rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 0 60px rgba(255, 178, 94, 0.3);
}

.sottotitolo {
  position: absolute;
  left: 0; right: 0;
  bottom: 9svh;
  text-align: center;
  padding: 0 1.2rem;
  color: var(--caldo);
  font-style: italic;
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.9);
}

.stato {
  position: absolute;
  left: 1.4rem;
  bottom: 1.3rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}
#badge { color: var(--testo-tenue); }
#badge[data-state="live"] { color: var(--ambra); }
#badge[data-state="sim"] { font-style: italic; }
.attesa-hero { color: var(--testo-tenue); }
#attesa-hero-n { color: var(--caldo); }

/* modalità focus (a schermo intero): solo l'installazione + didascalia centrata,
   frase e numero live come un'unica unità simmetrica in basso al centro */
.focus-attesa {
  position: absolute;
  left: 0; right: 0;
  bottom: 4.5svh;
  text-align: center;
  font-family: var(--mono);
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  letter-spacing: 0.1em;
  color: var(--testo-tenue);
  display: none;
}
#focus-n { color: var(--caldo); }

body.focus { overflow: hidden; }
/* in focus l'installazione si adatta esattamente al contenitore (es. la finestra anteprima),
   senza il minimo di 560px che altrimenti la fa eccedere e tagliare */
body.focus .hero { min-height: 0; }
body.focus main,
body.focus footer,
body.focus .hero-alto,
body.focus .stato,
body.focus .scroll-hint { display: none; }
body.focus .sottotitolo { bottom: 6svh; }
/* il numero live è ora nella frase-sottotitolo: niente riga «N in attesa» separata */
/* i controlli spariscono con l'immersione e riappaiono muovendo il mouse */
body.focus.idle .controlli { opacity: 0; pointer-events: none; }
.controlli { transition: opacity 0.5s ease; }

.controlli {
  position: absolute;
  right: 1.4rem;
  bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.controlli button {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 178, 94, 0.35);
  border-radius: 50%;
  background: rgba(5, 5, 6, 0.55);
  color: var(--testo-tenue);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.controlli button:hover,
.controlli button:focus-visible { color: var(--caldo); border-color: var(--ambra); }
#ascolta .onda { opacity: 0.25; transition: opacity 0.2s ease; }
#ascolta[aria-pressed="true"] { color: var(--ambra); border-color: var(--ambra); }
#ascolta[aria-pressed="true"] .onda { opacity: 1; }

#audio-hint {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--caldo);
  letter-spacing: 0.08em;
  animation: hint-pulse 2.2s ease-in-out infinite;
}
@keyframes hint-pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

.scroll-hint {
  position: absolute;
  bottom: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--testo-tenue);
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.6;
}

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

.sezione {
  max-width: 46rem;
  margin: 0 auto;
  padding: 5.5rem 1.4rem 1rem;
}

.sezione + .sezione { border-top: 1px solid rgba(255, 178, 94, 0.12); margin-top: 4rem; }

h2 {
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  font-weight: 500;
  margin-bottom: 1.6rem;
  text-wrap: balance;
}

p, li { text-wrap: pretty; }
h2::after {
  content: "";
  display: block;
  width: 2.2rem;
  height: 2.2rem;
  margin-top: 0.9rem;
  border: 2px solid var(--ambra);
  border-radius: 50%;
  border-left-color: transparent;
  opacity: 0.6;
}

h3 { font-weight: 600; font-size: 1.15rem; }

.sezione p + p { margin-top: 1rem; }

blockquote {
  margin: 2.2rem 0;
  padding-left: 1.4rem;
  border-left: 2px solid var(--ambra);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--caldo);
}
.nota-blockquote { font-size: 0.85rem; font-style: normal; color: var(--testo-tenue); }

.stato-progetto {
  margin-top: 2rem;
  padding: 1rem 1.2rem;
  background: var(--nero3);
  border-radius: 10px;
  font-size: 0.98rem;
  color: var(--testo-tenue);
}
.stato-progetto strong { color: var(--testo); }

/* ---------- glifi «cosa stai guardando» ---------- */

.glifi { list-style: none; margin: 1.6rem 0 0; display: grid; gap: 1.15rem; padding: 0; }
.glifi li { display: flex; gap: 1rem; align-items: baseline; }
.glifi strong { color: var(--caldo); }
.glifo {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c, var(--ambra));
  box-shadow: 0 0 12px var(--c, var(--ambra));
  position: relative;
  top: 1px;
}
.glifo-grad { background: linear-gradient(90deg, #b4d2ff, #ffe8c8, #ffb25e, #ff4530); box-shadow: 0 0 12px rgba(255, 178, 94, 0.6); }
.glifo-scia { width: 26px; height: 6px; border-radius: 999px; background: linear-gradient(90deg, transparent, #ffe8c8); box-shadow: 0 0 10px rgba(255, 232, 200, 0.45); top: -1px; }
.glifo-nube { width: 16px; height: 16px; background: radial-gradient(circle, rgba(180, 210, 255, 0.9), transparent 70%); box-shadow: 0 0 6px rgba(180, 210, 255, 0.4), 4px 3px 4px -2px rgba(180, 210, 255, 0.7), -4px -2px 4px -2px rgba(255, 232, 200, 0.6); top: 2px; }
#conto-attesa { font-family: var(--mono); font-size: 0.95em; color: var(--ambra); }
.glifo-big { width: 17px; height: 17px; top: 3px; }
.glifo-anello { background: transparent; border: 2.5px solid var(--ambra); box-shadow: 0 0 12px rgba(255, 178, 94, 0.7); }
.glifo-alone { box-shadow: 0 0 18px 6px rgba(255, 178, 94, 0.55); }
.glifo-live { animation: batte 2.2s ease-in-out infinite; }
@keyframes batte { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

.scala { margin-top: 1.6rem; font-family: var(--mono); font-size: 0.85rem; color: var(--ambra); letter-spacing: 0.04em; }

/* link di ritorno all'hub (in fondo alla pagina installazione) */
.torna-hub { display: inline-block; margin-top: 0.4rem; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; }

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

footer {
  max-width: 46rem;
  margin: 5rem auto 0;
  padding: 2.5rem 1.4rem 3.5rem;
  border-top: 1px solid rgba(255, 178, 94, 0.12);
  font-size: 0.85rem;
  color: var(--testo-tenue);
}
footer p + p { margin-top: 0.7rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #ascolta { transition: none; }
}

