/*
 * Waadget — sito pubblico.
 * Stessa palette e stessi caratteri dell'app (tema "Habitat"): navy scuro di
 * default, variante chiara con prefers-color-scheme. Nessuna risorsa esterna:
 * i font sono sottoinsiemi latini serviti da qui (vedi apps/web/README.md).
 */

@font-face {
  font-family: 'Baloo 2';
  src: url('/fonts/baloo2-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Baloo 2';
  src: url('/fonts/baloo2-800.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark light;

  --bg: #0a1020;
  --bg-raised: #111a30;
  --card: rgba(255, 255, 255, 0.045);
  --card-border: rgba(255, 255, 255, 0.09);
  --text: #eaf0ff;
  --text-muted: #a3aec9;
  --text-faint: #7d88a6;
  --teal: #63e6be;
  --teal-text: #63e6be;
  --gold: #ffd43b;
  --blue: #4dabf7;
  --violet: #b197fc;
  --on-accent: #0a1020;
  --accent-fill: #63e6be;
  --aurora-1: rgba(99, 230, 190, 0.16);
  --aurora-2: rgba(77, 171, 247, 0.14);
  --aurora-3: rgba(177, 151, 252, 0.12);
  --focus: #ffd43b;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);

  --font-display: 'Baloo 2', ui-rounded, system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 20px;
  --max: 1120px;
  --gutter: 20px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6fb;
    --bg-raised: #ffffff;
    --card: #ffffff;
    --card-border: rgba(16, 23, 42, 0.1);
    --text: #10172a;
    --text-muted: #48536e;
    --text-faint: #5d6782;
    --teal-text: #0b7a68;
    --gold: #a97a06;
    --blue: #1c6fb8;
    --violet: #6a4fc8;
    --on-accent: #ffffff;
    --accent-fill: #0b7a68;
    --aurora-1: rgba(99, 230, 190, 0.22);
    --aurora-2: rgba(77, 171, 247, 0.16);
    --aurora-3: rgba(177, 151, 252, 0.14);
    --focus: #1c6fb8;
    --shadow: 0 20px 50px rgba(16, 23, 42, 0.12);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
/* Le ancore non devono finire sotto la testata fissa. */
[id] {
  scroll-margin-top: 80px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Aurora: tre macchie di colore sul fondo, come in app. Pastello e tenue: non
   devono togliere contrasto al testo sopra. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vw 40vw at 85% -5%, var(--aurora-1), transparent 70%),
    radial-gradient(50vw 35vw at 5% 10%, var(--aurora-2), transparent 70%),
    radial-gradient(50vw 40vw at 60% 105%, var(--aurora-3), transparent 70%);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--teal-text);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 {
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  font-weight: 800;
}
h2 {
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  font-weight: 800;
}
h3 {
  font-size: 1.3rem;
  font-weight: 700;
}
p {
  margin: 0 0 1em;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.narrow {
  max-width: 760px;
}
/* Colonna di lettura allineata a sinistra come le altre sezioni della home. */
.measure > * {
  max-width: 760px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 10;
  background: var(--bg-raised);
  padding: 8px 14px;
  border-radius: 10px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--card-border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.45rem;
  margin-right: auto;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 10px;
  border-radius: 10px;
}
.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--text);
}
.site-nav .nav-cta {
  color: var(--on-accent);
  background: var(--accent-fill);
  margin-left: 6px;
  padding: 8px 14px;
}
.site-nav .nav-cta:hover {
  color: var(--on-accent);
}
@media (max-width: 640px) {
  .site-nav .nav-hide-sm {
    display: none;
  }
}

/* ---------- Bottoni ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent-fill);
  color: var(--on-accent);
}
.btn-primary:hover {
  filter: brightness(1.06);
}
.btn-ghost {
  color: var(--text);
  border-color: var(--card-border);
  background: var(--card);
}

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

.hero {
  padding: 56px 0 40px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 40px;
}
.eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-text);
  margin-bottom: 14px;
}
.hero h1 .accent {
  color: var(--teal-text);
}
.lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 34em;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 22px;
}
.pills {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pills li {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--card);
  border: 1px solid var(--card-border);
  padding: 6px 12px;
  border-radius: 999px;
}
.pills li::before {
  content: '✓';
  color: var(--teal-text);
  margin-right: 6px;
  font-weight: 800;
}
.hero-art {
  justify-self: center;
  width: min(100%, 360px);
}
.hero-art img {
  width: 100%;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.35));
}
@media (max-width: 820px) {
  .hero {
    padding-top: 32px;
  }
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .hero-art {
    order: -1;
    width: 200px;
  }
}

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

.section {
  padding: 64px 0;
}
.section-head {
  max-width: 720px;
  margin-bottom: 36px;
}
.section-head p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
}
.card p:last-child {
  margin-bottom: 0;
}
.card p {
  color: var(--text-muted);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 960px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  background: color-mix(in srgb, var(--teal) 18%, transparent);
  color: var(--teal-text);
  margin-bottom: 14px;
}

/* Il gioco: due colonne, la mascotte a lato. */
.game {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 40px;
  align-items: start;
}
.game-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.game-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
}
.game-list strong {
  display: block;
  font-size: 1.05rem;
}
.game-list span {
  color: var(--text-muted);
}
.ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 1.3rem;
  background: var(--card);
  border: 1px solid var(--card-border);
}
.game-side {
  position: sticky;
  top: 96px;
  text-align: center;
}
.game-side img {
  width: 200px;
  margin: 0 auto 14px;
}
.note {
  border-left: 3px solid var(--gold);
  padding: 14px 18px;
  background: var(--card);
  border-radius: 0 14px 14px 0;
  margin-top: 26px;
  color: var(--text-muted);
}
.note strong {
  color: var(--text);
}
@media (max-width: 820px) {
  .game {
    grid-template-columns: 1fr;
  }
  .game-side {
    position: static;
    order: -1;
  }
  .game-side img {
    width: 150px;
  }
}

.feature h3 {
  font-size: 1.12rem;
  margin-bottom: 6px;
}
.feature .ico {
  margin-bottom: 14px;
}
.feature p {
  font-size: 0.98rem;
}

/* Schermate: scorrimento orizzontale con aggancio. */
.shots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px var(--gutter) 18px;
  margin: 0 calc(-1 * var(--gutter));
  scrollbar-width: thin;
}
.shots figure {
  flex: 0 0 auto;
  width: 240px;
  margin: 0;
  scroll-snap-align: start;
}
.shots img {
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--card-border);
}
.shots figcaption {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 10px;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.check-list li {
  padding-left: 30px;
  position: relative;
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 800;
  color: var(--teal-text);
}
.cross-list li::before {
  content: '✕';
  color: var(--text-faint);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 760px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.card .price,
.price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.6rem;
  line-height: 1;
  margin: 4px 0 10px;
  color: var(--teal-text);
}

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--card-border);
  padding: 4px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.08rem;
  padding: 16px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--teal-text);
}
.faq details[open] summary::after {
  content: '–';
}
.faq details p {
  color: var(--text-muted);
}

/* Scarica */
.download {
  text-align: center;
  border-radius: 28px;
  padding: 48px 24px;
  background:
    radial-gradient(80% 120% at 50% 0%, color-mix(in srgb, var(--teal) 16%, transparent), transparent 70%),
    var(--card);
  border: 1px solid var(--card-border);
}
.download img {
  width: 120px;
  margin: 0 auto 18px;
}
.download p {
  color: var(--text-muted);
  max-width: 34em;
  margin-left: auto;
  margin-right: auto;
}
.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}
.store {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 190px;
  padding: 10px 20px;
  border-radius: 14px;
  background: var(--bg-raised);
  border: 1px solid var(--card-border);
  color: var(--text);
  text-decoration: none;
  line-height: 1.25;
}
.store small {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.store b {
  font-family: var(--font-display);
  font-size: 1.25rem;
}
.store[aria-disabled='true'] small {
  color: var(--gold);
  font-weight: 700;
}

/* ---------- Pagine di testo ---------- */

.page-head {
  padding: 48px 0 8px;
}
.prose h2 {
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  margin-top: 1.8em;
}
.prose h3 {
  margin-top: 1.4em;
}
.prose ul {
  padding-left: 1.2em;
}
.prose li {
  margin-bottom: 0.4em;
}
.prose p,
.prose li {
  color: var(--text-muted);
}
.prose strong {
  color: var(--text);
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 24px;
  margin: 0;
}
.facts dt {
  font-weight: 700;
}
.facts dd {
  margin: 0;
  color: var(--text-muted);
}
@media (max-width: 520px) {
  .facts {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .facts dd {
    margin-bottom: 10px;
  }
}

.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.swatch {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  font-size: 0.9rem;
}
.swatch i {
  display: block;
  height: 64px;
}
.swatch span {
  display: block;
  padding: 8px 12px;
}
.sw-navy {
  background: #0a1020;
}
.sw-teal {
  background: #63e6be;
}
.sw-gold {
  background: #ffd43b;
}
.sw-blue {
  background: #4dabf7;
}
.sw-text {
  background: #eaf0ff;
}
.sw-grad {
  background: linear-gradient(180deg, #78e6b0, #4fb1c2);
}

.downloads,
.swatches {
  margin: 8px 0 28px;
}
.downloads {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.downloads a {
  display: block;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}
.downloads img {
  border-radius: 14px;
  border: 1px solid var(--card-border);
  margin-bottom: 8px;
  /* Navy fisso: la mascotte è trasparente e col ventre bianco sparirebbe su
     una card chiara. */
  background: #0a1020;
}
.downloads small {
  display: block;
  color: var(--text-faint);
  font-weight: 400;
}

/* ---------- Piede ---------- */

.site-footer {
  margin-top: 48px;
  padding: 40px 0 48px;
  border-top: 1px solid var(--card-border);
  font-size: 0.95rem;
  color: var(--text-muted);
}
.site-footer .wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}
.site-footer h2 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 10px;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
.site-footer a {
  color: var(--text-muted);
}
.site-footer a:hover {
  color: var(--text);
}
@media (max-width: 760px) {
  .site-footer .wrap {
    grid-template-columns: 1fr 1fr;
  }
  .site-footer .footer-about {
    grid-column: 1 / -1;
  }
}

/* 404 */
.not-found {
  text-align: center;
  padding: 72px 0 24px;
}
.not-found img {
  width: 180px;
  margin: 0 auto 20px;
}
