/* SlothDesk — pagine informative */
:root {
  --bg: #10231f;
  --panel: #17332d;
  --panel-2: #1f5e52;
  --cream: #eee6d6;
  --muted: #96bab0;
  --accent: #ff8a3d;
  --line: #27473f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: #ffa869; }

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* --- testata --- */
.top {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #143029 0%, var(--bg) 100%);
  margin-bottom: 44px;
}

.top-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 34px 24px 30px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.top img { width: 62px; height: 62px; border-radius: 14px; }
.top h1 { margin: 0; font-size: 27px; letter-spacing: -0.4px; }
.top .claim { margin: 3px 0 0; color: var(--muted); font-size: 15px; }

nav { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

nav a {
  color: var(--cream);
  text-decoration: none;
  font-size: 14px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  white-space: nowrap;
}

nav a:hover { border-color: var(--accent); color: var(--accent); }
nav a[aria-current] { background: var(--panel-2); border-color: var(--panel-2); }

/* --- testo --- */
h2 {
  font-size: 21px;
  margin: 40px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
h3 { font-size: 17px; margin: 26px 0 8px; color: var(--cream); }
p, li { color: #d9d3c6; }
strong { color: var(--cream); }
ul { padding-left: 22px; }
li { margin: 7px 0; }

.lead { font-size: 18px; color: var(--cream); }

.nota {
  background: var(--panel);
  border-left: 3px solid var(--accent);
  padding: 15px 18px;
  border-radius: 0 10px 10px 0;
  margin: 22px 0;
}

.nota p:last-child { margin-bottom: 0; }
.nota p:first-child { margin-top: 0; }

.aggiornato { color: var(--muted); font-size: 14px; margin-top: 8px; }

.griglia {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 17px 19px;
}

.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0; font-size: 14.5px; color: var(--muted); }

/* --- Vetrina delle tre schermate ---------------------------------------
   Il pannello è verticale e stretto: affiancarne tre rende l'idea del
   prodotto meglio di una sola immagine grande. */

.vetrina {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 30px 0 34px;
}

.vetrina figure { margin: 0; }

.vetrina img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0d1117;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.vetrina figure:hover img {
  transform: translateY(-4px);
  border-color: var(--panel-2);
}

.vetrina figcaption {
  margin-top: 11px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.vetrina figcaption strong {
  display: block;
  color: var(--cream);
  font-size: 14.5px;
  margin-bottom: 2px;
}

@media (max-width: 720px) {
  .vetrina { grid-template-columns: 1fr; gap: 26px; }
  .vetrina img { max-width: 420px; margin: 0 auto; }
  .vetrina figcaption { text-align: center; max-width: 420px; margin-left: auto; margin-right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .vetrina img { transition: none; }
  .vetrina figure:hover img { transform: none; }
}

table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 14px; }

footer {
  border-top: 1px solid var(--line);
  margin-top: 60px;
  padding: 26px 24px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 620px) {
  .top-inner { padding: 26px 20px 24px; }
  nav { margin-left: 0; width: 100%; }
  .top h1 { font-size: 23px; }
}

/* --- Splash di avvio ------------------------------------------------------
   Il bradipo si sveglia con calma, poi si accorge che c'è gente che aspetta.
   La sparizione è in CSS: se lo script non parte, se ne va lo stesso. */

.splash {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 42%, #1b453c 0%, var(--bg) 68%);
  animation: splash-esce 0.5s ease 4.6s forwards;
}

.splash.via { animation: splash-esce 0.35s ease forwards; }

@keyframes splash-esce {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

.splash-inner { text-align: center; padding: 0 24px; }

/* --- La scena animata ---------------------------------------------------
   Tutto molto lento di proposito: è un bradipo, non un centralinista. */

.scena {
  width: min(340px, 78vw);
  height: auto;
  display: block;
  margin: 0 auto;
  animation: sveglia 0.9s ease-out;
}

@keyframes sveglia {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* la testa dondola: nove secondi per un giro completo */
.scena .testa {
  transform-origin: 140px 122px;
  animation: testa-dondola 9s ease-in-out infinite;
}

@keyframes testa-dondola {
  0%, 100% { transform: rotate(-2.6deg) translateY(0); }
  50%      { transform: rotate(2.6deg) translateY(-2px); }
}

/* respiro */
.scena .busto {
  transform-origin: 140px 175px;
  animation: respiro 5.5s ease-in-out infinite;
}

@keyframes respiro {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(1.035); }
}

/* le palpebre scendono con tutta calma e risalgono ancora più piano */
.scena .palpebra {
  transform-origin: center top;
  transform: scaleY(0);
  animation: palpebra 7s ease-in-out infinite;
}

@keyframes palpebra {
  0%, 62%  { transform: scaleY(0); }
  72%      { transform: scaleY(1); }
  82%      { transform: scaleY(1); }
  100%     { transform: scaleY(0); }
}

/* il braccio destro batte un tasto ogni otto secondi, senza entusiasmo */
.scena .braccio-dx {
  transform-origin: 176px 146px;
  animation: batti 8s ease-in-out infinite;
}

@keyframes batti {
  0%, 70%  { transform: rotate(0deg); }
  78%      { transform: rotate(4deg) translateY(3px); }
  86%      { transform: rotate(0deg); }
  100%     { transform: rotate(0deg); }
}

.scena .tasto { animation: tasto-premuto 8s ease-in-out infinite; }

@keyframes tasto-premuto {
  0%, 76%  { fill: #565b68; }
  80%      { fill: #ff8a3d; }
  88%, 100% { fill: #565b68; }
}

/* il monitor respira di luce */
.scena .bagliore { animation: luce 6s ease-in-out infinite; }

@keyframes luce {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 0.85; }
}

.scena .spia { animation: spia 3s ease-in-out infinite; }

@keyframes spia {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

/* il vapore del caffè sale e svanisce */
.scena .vapore {
  animation: vapore 5s ease-in-out infinite;
}

@keyframes vapore {
  0%   { opacity: 0; transform: translateY(6px); }
  40%  { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-10px); }
}

.splash-msg {
  margin: 22px 0 16px;
  color: var(--cream);
  font-size: 17px;
  min-height: 24px;
}

/* dissolvenza al cambio battuta: il testo entra invece di saltare */
.splash-msg.cambia { animation: msg-entra 0.4s ease; }

@keyframes msg-entra {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.splash-bar {
  width: 210px;
  height: 6px;
  margin: 0 auto;
  border-radius: 999px;
  background: #1c3c35;
  overflow: hidden;
}

/* 85% del tempo per fare un quinto della strada, poi si sveglia e scatta */
.splash-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--panel-2), var(--accent));
  animation: carica-con-calma 4.4s ease-out forwards;
}

@keyframes carica-con-calma {
  0%   { width: 0; }
  40%  { width: 12%; }
  72%  { width: 19%; }
  78%  { width: 23%; }
  100% { width: 100%; }
}

.splash-skip {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  opacity: 0;
  animation: appari 0.6s ease 1.8s forwards;
}

@keyframes appari { to { opacity: 0.75; } }

/* Chi ha chiesto meno animazioni non deve vedere niente di tutto questo */
@media (prefers-reduced-motion: reduce) {
  .splash { display: none; }
  .scena *, .scena { animation: none !important; }
}

/* --- Ingranditore delle schermate --------------------------------------- */

.lente {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  position: relative;
  border-radius: 10px;
}

.lente:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.zoom {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(13, 17, 23, 0.88);
  border: 1px solid var(--line);
  color: var(--cream);
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.lente:hover .zoom, .lente:focus-visible .zoom { opacity: 1; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  background: rgba(6, 14, 12, 0.94);
  cursor: zoom-out;
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: min(92vw, 760px);
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  cursor: default;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.lb-chiudi, .lb-nav {
  background: rgba(23, 51, 45, 0.9);
  border: 1px solid var(--line);
  color: var(--cream);
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lb-chiudi:hover, .lb-nav:hover { background: var(--panel-2); border-color: var(--accent); }

.lb-chiudi {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 42px;
  height: 42px;
  font-size: 26px;
}

.lb-nav {
  width: 46px;
  height: 46px;
  font-size: 30px;
  flex-shrink: 0;
}

.lb-txt {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  margin: 0;
  pointer-events: none;
}

@media (max-width: 620px) {
  .lightbox { padding: 12px; gap: 4px; }
  .lb-nav { width: 38px; height: 38px; font-size: 24px; }
  .lightbox img { max-width: 84vw; }
}

/* --- Invito all'installazione ------------------------------------------- */

.cta { margin: 26px 0 10px; }

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 15px 26px 15px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--panel-2) 0%, #17332d 100%);
  border: 1px solid #2e7d6c;
  text-decoration: none;
  color: var(--cream);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn-store:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
  color: var(--cream);
}

.btn-store-ico { font-size: 30px; line-height: 1; }
.btn-store strong { display: block; font-size: 16.5px; }

.btn-store em {
  display: block;
  font-style: normal;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.nav-store {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #17332d !important;
  font-weight: 600;
}

.nav-store:hover { background: #ffa869 !important; color: #17332d !important; }

@media (max-width: 480px) {
  .btn-store { width: 100%; }
}
