/* ==========================================================================
   PartyGames — sito pubblico
   Design language "Pop Toy": crema calda, bordi e ombre in inchiostro,
   accenti pieni, nessun gradiente / glow / blur. Font Fredoka.
   Palette allineata a apps/mobile/lib/src/theme/palette.dart
   ========================================================================== */

@font-face {
  font-family: 'Fredoka';
  src: url('fonts/Fredoka-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fredoka';
  src: url('fonts/Fredoka-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fredoka';
  src: url('fonts/Fredoka-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fff6e9;
  --bg-alt: #fbf0df;
  --surface: #ffffff;
  --ink: #2b2440;
  --muted: #625850;
  --faint: #685e57;
  --line: #e8dcc8;
  --border-soft: #d8c9b2;

  --coral: #ff5470;
  --yellow: #ffc93c;
  --violet: #7655f7;
  --teal: #00c2b2;
  --green: #2fbf71;
  --pink: #ff7ac6;
  --orange: #ff9f1c;

  --coral-text: #9e1835;
  --violet-text: #6542e0;
  --teal-text: #005b55;
  --green-text: #0e6333;
  --pink-text: #8d1f61;
  --yellow-text: #594300;

  --violet-tint: #ede6ff;
  --yellow-tint: #fff1c9;
  --green-tint: #d2f5df;
  --coral-tint: #ffd3dc;
  --teal-tint: #c9f2ec;

  --radius: 20px;
  --radius-sm: 14px;
  --bw: 2.5px;
  --drop: 5px;
  --wrap: 1120px;

  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Fredoka', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.3rem, 6vw, 3.6rem);
}
h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
}
h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 16px;
}

a {
  color: var(--violet-text);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

img,
svg {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  z-index: 100;
}
.skip-link:focus {
  left: 16px;
}

/* --------------------------------------------------------------------------
   Sticker primitives
   -------------------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: var(--bw) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 var(--drop) 0 var(--ink);
  padding: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  padding: 15px 26px;
  border: var(--bw) solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--ink);
}

.btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--ink);
}

.btn--primary {
  background: var(--coral);
  color: #fff;
}
.btn--yellow {
  background: var(--yellow);
  color: var(--ink);
}
.btn--violet {
  background: var(--violet);
  color: #fff;
}
.btn--big {
  font-size: 1.2rem;
  padding: 18px 34px;
}
.btn--xl {
  font-size: 1.45rem;
  padding: 22px 46px;
  box-shadow: 0 6px 0 var(--ink);
}
.btn--xl:hover {
  box-shadow: 0 7px 0 var(--ink);
}
.btn--xl:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 var(--ink);
}
.btn--ghost {
  background: transparent;
  box-shadow: 0 4px 0 var(--ink);
}

.section-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--surface);
}

.marker {
  display: inline-block;
  background: var(--yellow);
  border: var(--bw) solid var(--ink);
  border-radius: 14px;
  padding: 0 12px;
  transform: rotate(-2deg);
  box-shadow: 0 4px 0 var(--ink);
}

.sticker {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: var(--bw) solid var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  font-size: 1.5rem;
  background: var(--yellow);
  flex: none;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: var(--bw) solid var(--ink);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 74px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.2rem;
  margin-right: auto;
}
.brand:hover {
  text-decoration: none;
}

/* Icona reale dell'app (dado), da apps/mobile/web/icons/Icon-192.png.
   Nessun contenitore: il dado ha già il suo contorno in inchiostro. */
.brand__mark {
  width: 54px;
  height: 54px;
  flex: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  color: var(--ink);
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 999px;
  border: 2px solid transparent;
}

.nav a:hover {
  text-decoration: none;
  background: var(--surface);
  border-color: var(--ink);
}

.nav a[aria-current='page'] {
  background: var(--yellow-tint);
  border-color: var(--ink);
}

/* Selettore di lingua: sempre visibile, la scelta manuale vince sul browser. */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 6px;
  padding: 8px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
}

.lang-switch:hover {
  text-decoration: none;
  background: var(--yellow-tint);
}

.nav .btn {
  padding: 11px 20px;
  font-size: 0.98rem;
  margin-left: 8px;
}
.nav .btn:hover {
  background: var(--coral);
  border-color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  font-size: 1.3rem;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 16px 20px 22px;
    background: var(--bg);
    border-bottom: var(--bw) solid var(--ink);
  }

  .nav[hidden] {
    display: none;
  }

  .nav a {
    padding: 12px 14px;
  }

  .lang-switch {
    justify-content: center;
    margin: 6px 0 0;
    padding: 12px 14px;
  }

  .nav .btn {
    margin: 6px 0 0;
    padding: 14px 20px;
  }
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 7vw, 80px) 0 clamp(48px, 8vw, 90px);
  border-bottom: var(--bw) solid var(--ink);
  background: var(--bg);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero p.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 46ch;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 30px 0 16px;
}

/* Note di rassicurazione: testo piccolo, niente riquadri, non competono col CTA. */
.hero__facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 0.92rem;
  color: var(--muted);
}

.hero__facts li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hero__facts li::before {
  content: '✓';
  font-weight: 700;
  color: var(--green-text);
}

/* Badge ufficiali degli store (immagini dei brand kit: non vanno alterate). */
.stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}

.stores--center {
  justify-content: center;
  margin-top: 26px;
}

.stores__note {
  width: 100%;
  margin: 0 0 2px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.cta-band .stores__note {
  color: rgba(255, 255, 255, 0.9);
}

.store-badge {
  display: inline-flex;
}

.store-badge img {
  display: block;
  width: auto;
}

/* Il PNG di Google ha 29px di margine trasparente sopra e sotto (il badge
   occupa il 76,8% dell'altezza): lo compenso perché i due badge risultino
   della stessa altezza ottica. Orizzontalmente non ha margini. */
.store-badge--google img {
  height: 57px;
  margin: -7px 0;
}

.store-badge--apple img {
  height: 44px;
}

a.hero__art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 540px;
}

/* Telefono disegnato in CSS: proporzioni ~1:2, come uno smartphone vero. */
.phone {
  width: 246px;
  background: var(--surface);
  border: var(--bw) solid var(--ink);
  border-radius: 38px;
  box-shadow: 0 8px 0 var(--ink);
  padding: 14px 12px 10px;
  transform: rotate(-3deg);
}

.phone__notch {
  width: 74px;
  height: 8px;
  border-radius: 999px;
  background: var(--ink);
  margin: 4px auto 12px;
}

.phone__screen {
  background: var(--bg);
  border: 2px solid var(--ink);
  border-radius: 26px;
  padding: 14px 12px 16px;
}

.phone__head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0 2px 12px;
  margin-bottom: 12px;
  border-bottom: 2px dashed var(--border-soft);
}

.phone__head img {
  flex: none;
}

.phone__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phone__row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 11px 10px;
  background: var(--surface);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 3px 0 var(--ink);
}

.phone__dot {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  flex: none;
}

.phone__cta {
  margin-top: 26px;
  text-align: center;
  background: var(--coral);
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 12px;
  font-weight: 700;
  box-shadow: 0 3px 0 var(--ink);
  font-size: 0.92rem;
}

.phone__bar {
  width: 92px;
  height: 5px;
  border-radius: 999px;
  background: var(--border-soft);
  margin: 12px auto 4px;
}

.float {
  position: absolute;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  border: var(--bw) solid var(--ink);
  box-shadow: 0 5px 0 var(--ink);
  font-size: 1.7rem;
  background: var(--surface);
}

.float--a {
  top: 6%;
  right: 4%;
  background: var(--yellow);
  transform: rotate(9deg);
}
.float--b {
  bottom: 12%;
  left: 0;
  background: var(--teal);
  transform: rotate(-11deg);
}
.float--c {
  bottom: 2%;
  right: 12%;
  background: var(--pink);
  transform: rotate(6deg);
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .hero__art {
    min-height: 520px;
  }
  .float--b {
    left: 4%;
  }
}

@media (max-width: 560px) {
  .float {
    width: 52px;
    height: 52px;
    font-size: 1.4rem;
  }
  .float--a {
    top: 0;
    right: 0;
  }
  .float--b {
    bottom: 8%;
    left: 0;
  }
  .float--c {
    display: none;
  }
}

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

.section {
  padding: clamp(48px, 7vw, 86px) 0;
  border-bottom: var(--bw) solid var(--ink);
}

.section--alt {
  background: var(--bg-alt);
}

.section--violet {
  background: var(--violet-tint);
}

.section__head {
  max-width: 62ch;
  margin-bottom: 34px;
}

.section__head p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Passi numerati: il numero vive dentro la card, in linea con il titolo. */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}

.step__top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--line);
}

.step__num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--yellow-tint);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.05rem;
  flex: none;
}

.step--teal .step__num {
  background: var(--teal-tint);
}

.step--coral .step__num {
  background: var(--coral-tint);
}

.step h3 {
  margin: 0;
  font-size: 1.15rem;
}

.step p {
  margin: 0;
  color: var(--muted);
}

/* Modalità */
.mode {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mode__top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mode ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.mode li {
  margin-bottom: 6px;
}

/* Feature */
.feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.feature h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
}

/* FAQ */
.faq {
  display: grid;
  gap: 14px;
  max-width: 820px;
}

details.qa {
  background: var(--surface);
  border: var(--bw) solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 0 var(--ink);
  padding: 4px 18px;
}

details.qa summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 30px 14px 0;
  list-style: none;
  position: relative;
}

details.qa summary::-webkit-details-marker {
  display: none;
}

details.qa summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 700;
}

details.qa[open] summary::after {
  content: '–';
}

details.qa p {
  color: var(--muted);
  margin: 0 0 16px;
}

/* Banda CTA */
.cta-band {
  background: var(--coral);
  color: #fff;
  text-align: center;
  padding: clamp(48px, 7vw, 80px) 0;
  border-bottom: var(--bw) solid var(--ink);
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  max-width: 52ch;
  margin: 0 auto 26px;
  font-size: 1.08rem;
}

/* --------------------------------------------------------------------------
   Pagine di testo (privacy, termini, supporto)
   -------------------------------------------------------------------------- */

.page-head {
  padding: clamp(36px, 6vw, 66px) 0 clamp(28px, 4vw, 44px);
  border-bottom: var(--bw) solid var(--ink);
  background: var(--yellow-tint);
}

.page-head p {
  color: var(--muted);
  max-width: 60ch;
  margin: 0;
  font-size: 1.06rem;
}

.page-head .updated {
  margin-top: 16px;
}

.legal {
  padding: clamp(36px, 6vw, 70px) 0 clamp(48px, 7vw, 90px);
}

.legal__layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 44px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 100px;
  background: var(--surface);
  border: var(--bw) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 4px 0 var(--ink);
  padding: 18px;
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  font-size: 0.94rem;
}

.toc li {
  margin-bottom: 7px;
}

.toc a {
  color: var(--ink);
  font-weight: 600;
}

.prose {
  max-width: 74ch;
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: 42px;
  padding-top: 6px;
}

.prose h2:first-of-type {
  margin-top: 0;
}

.prose h3 {
  font-size: 1.12rem;
  margin-top: 26px;
}

.prose ul,
.prose ol {
  padding-left: 22px;
  color: var(--muted);
}

.prose li {
  margin-bottom: 8px;
}

.prose p {
  color: var(--muted);
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  border: var(--bw) solid var(--ink);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 18px 0 24px;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  border: 2px solid var(--ink);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--yellow-tint);
  font-weight: 600;
}

.prose td {
  color: var(--muted);
  background: var(--surface);
}

.table-scroll {
  overflow-x: auto;
}

.note {
  border: var(--bw) dashed var(--ink);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  padding: 16px 18px;
  margin: 0 0 28px;
}

.note p:last-child {
  margin-bottom: 0;
}

.note--draft {
  background: var(--coral-tint);
  border-style: dashed;
}

@media (max-width: 900px) {
  .legal__layout {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .toc {
    position: static;
  }
}

/* Supporto */
.support-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.support-card h3 {
  margin: 0;
}

.support-card p {
  margin: 0;
  color: var(--muted);
}

.support-card .btn {
  align-self: flex-start;
  margin-top: auto;
}

.mail {
  font-weight: 700;
  font-size: 1.05rem;
  word-break: break-all;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--bg-alt);
  padding: 48px 0 34px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.site-footer h4 {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 12px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 9px;
}

.site-footer a {
  color: var(--ink);
}

.site-footer p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 40ch;
}

.site-footer__bottom {
  border-top: 2px solid var(--border-soft);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  color: var(--faint);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
