/* Home pubblica di Vimolio.

   ⚠️ Deliberatamente costruita con la stessa sobrieta' del tema "mono": stesso
   carattere monospace, nessuna decorazione, molto respiro. Non e' pigrizia — se
   la home promette un portfolio curato e poi si presenta come un modello SaaS
   con gradienti e bottoni arrotondati, la promessa e' gia' rotta prima che il
   visitatore clicchi. La home e' la dimostrazione del prodotto. */

:root {
  color-scheme: light;
  --fg: #111111;
  --bg: #ffffff;
  --muted: #767676;
  --rule: #e5e5e5;
  --font: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* Due varianti scure: la media query vale per chi non ha scelto, l'attributo
   per chi ha scelto — e vince, perche' e' una decisione esplicita. Il `:not`
   serve a non riportare al buio chi ha chiesto il chiaro su un sistema scuro. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  color-scheme: dark;
  --fg: #ededed;
  --bg: #0c0c0c;
  --muted: #8a8a8a;
  --rule: #262626;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --fg: #ededed;
  --bg: #0c0c0c;
  --muted: #8a8a8a;
  --rule: #262626;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 13px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 62rem; margin: 0 auto; padding: 0 1.5rem; }

section { padding: 4.5rem 0; border-top: 1px solid var(--rule); }
section:first-of-type { border-top: 0; }

h1, h2, h3 { font-weight: 400; letter-spacing: -.01em; }
h2 { font-size: 1rem; margin: 0 0 2rem; color: var(--muted); }
h3 { font-size: 1rem; margin: 0 0 .5rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }

/* ---- Testata ---- */

.top { display: flex; justify-content: space-between; align-items: baseline;
       padding: 1.5rem 0; }
.top .name { letter-spacing: .12em; text-transform: uppercase; }
.top a { color: var(--muted); text-decoration: none; }
.top a:hover { color: var(--fg); }
.top .right { display: flex; align-items: center; gap: 1rem; }

/* Comando chiaro/scuro: discreto, perche' non e' il motivo per cui si e'
   arrivati sulla pagina. */
.appearance { display: inline-flex; gap: .3rem; }
.appearance button {
  font: inherit; cursor: pointer; background: none;
  border: 1px solid var(--rule); color: var(--muted); padding: .1rem .45rem;
}
.appearance button[aria-pressed="true"] { color: var(--fg); border-color: currentColor; }

.hero { padding: 5rem 0 4.5rem; }
.hero h1 {
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
  line-height: 1.25;
  margin: 0 0 1.5rem;
  max-width: 22ch;
}
.hero p { max-width: 46ch; color: var(--muted); margin-bottom: 2.5rem; }

.cta {
  display: inline-block;
  padding: .7rem 1.2rem;
  border: 1px solid currentColor;
  color: inherit;
  text-decoration: none;
}
.cta:hover { background: var(--fg); color: var(--bg); }
.under-cta { margin-top: .9rem; font-size: .92em; color: var(--muted); }

/* ---- Griglie di contenuto ---- */

.cols { display: grid; gap: 2.5rem; grid-template-columns: repeat(3, 1fr); }
.cols-2 { display: grid; gap: 2.5rem; grid-template-columns: repeat(2, 1fr); }
.step .num { color: var(--muted); display: block; margin-bottom: .6rem; }
.cols p, .cols-2 p { color: var(--muted); margin: 0; }

/* ---- Listino ---- */

/* ⚠️ Ogni riquadro ha il suo bordo, invece del trucco "griglia con sfondo e
   gap di 1px": quello disegna le cuciture in modo piu' pulito ma **colora
   anche le celle che restano vuote** quando i livelli vanno a capo, e con
   quattro livelli capita a quasi tutte le larghezze. Un blocco grigio vuoto
   accanto al listino e' peggio di una cucitura doppia. */
.tiers { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.tier { border: 1px solid var(--rule); padding: 1.6rem 1.4rem;
        display: flex; flex-direction: column; }
.tier h3 { margin-bottom: .8rem; }
.tier .blurb { color: var(--muted); min-height: 3.2em; }
.price { margin: 1.2rem 0; }
.price div { display: flex; justify-content: space-between; gap: 1rem; }
.price .label { color: var(--muted); }
.tier ul { list-style: none; padding: 0; margin: 0 0 1.6rem; }
/* Un indirizzo lungo come "vimolio.com/u/iltuonome" non ha spazi dove andare
   a capo, e in una colonna stretta esce dal riquadro. */
.tier li { padding-left: 1.1rem; position: relative; color: var(--muted); margin: .3rem 0;
           overflow-wrap: anywhere; }
.tier li::before { content: "—"; position: absolute; left: 0; }
.tier .foot { margin-top: auto; }
.tier .foot a { color: inherit; }

/* ---- Chiusura ---- */

footer { border-top: 1px solid var(--rule); padding: 2.5rem 0 4rem; color: var(--muted); }
footer a { color: inherit; }

@media (max-width: 46rem) {
  .cols, .cols-2 { grid-template-columns: 1fr; gap: 2rem; }
  section { padding: 3.2rem 0; }
  .hero { padding: 3rem 0; }
}

/* Interruttore di lingua: stesso idioma del chiaro/scuro. */
.language { display: inline-flex; gap: .3rem; }
.language form { margin: 0; }
.language button {
  font: inherit; cursor: pointer; background: none; text-transform: uppercase;
  border: 1px solid var(--rule); color: var(--muted); padding: .1rem .45rem;
}
.language button[aria-pressed="true"] { color: var(--fg); border-color: currentColor; }
