/*
 * nexTOp — CSS del sito pubblico (pagina "coming soon"): base comune allo
 * stile dell'app e parte specifica della pagina.
 */

@font-face {
  font-family: "Nx04b30";
  src: url("../fonts/04b30.ttf") format("truetype");
  font-display: swap;
}

/* Lineicons Free (MIT): stessi glifi dell'app. */
@font-face {
  font-family: "Lineicons";
  src: url("../fonts/lineicons.ttf") format("truetype");
  font-display: block;
}

:root {
  color-scheme: light dark;
  --blue: #0a5aff;
  --yellow: #fdd600;
  --accent: #0a5aff;
  --on-accent: #ffffff;
  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface-high: #e9e9ee;
  --text: #000000;
  --text-2: #6c6c70;
  --outline: #8e8e93;
  --separator: rgba(60, 60, 67, 0.16);
  --warning: #b25e00;
  --danger: #ff3b30;
  --success: #1f9d48;
  --danger-text: #c4251c;
  --success-text: #187a38;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-rim: rgba(255, 255, 255, 0.7);
  --chrome-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
  --radius: 16px;
  --radius-lg: 26px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #4d8dff;
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-high: #2c2c2e;
    --text: #ffffff;
    --text-2: #aeaeb2;
    --outline: #8e8e93;
    --separator: rgba(84, 84, 88, 0.6);
    --warning: #ffb340;
    --success: #30d158;
    --danger-text: #ff6961;
    --success-text: #30d158;
    --glass: rgba(44, 44, 46, 0.55);
    --glass-strong: rgba(44, 44, 46, 0.82);
    --glass-rim: rgba(255, 255, 255, 0.12);
    --chrome-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  }
}

:root[data-theme="dark"] {
  --accent: #4d8dff;
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-high: #2c2c2e;
  --text: #ffffff;
  --text-2: #aeaeb2;
  --outline: #8e8e93;
  --separator: rgba(84, 84, 88, 0.6);
  --warning: #ffb340;
  --success: #30d158;
  --danger-text: #ff6961;
  --success-text: #30d158;
  --glass: rgba(44, 44, 46, 0.55);
  --glass-strong: rgba(44, 44, 46, 0.82);
  --glass-rim: rgba(255, 255, 255, 0.12);
  --chrome-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

img {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
}

/* Icone Lineicons via codepoint: <i class="lni" data-i="&#xeb53;"></i> */
.lni {
  font-family: "Lineicons";
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  display: inline-block;
  speak: never;
}

/* Logo: "NEXTOP" nel font pixel, "TO" nell'accento. */
.nx-logo {
  font-family: "Nx04b30", var(--font-display);
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
}

.nx-logo b {
  font-weight: normal;
  color: var(--accent);
}

/* Logo animato nella barra in alto, come la splash e il tocco sul logo
   dell'app: le lettere saltano una dopo l'altra e "TO" cresce e torna
   com'era. Un giro ogni 5 s (il salto occupa i primi ~0,35 s del ciclo);
   a ogni giro "TO" prende il colore d'accento successivo dei temi dell'app.
   Lettere in <span class="nx-l"> create da front.js. */
.nx-logo-anim .nx-l {
  display: inline-block;
  animation: nx-hop 5s infinite;
  animation-delay: calc(0.6s + var(--i) * 0.055s);
}

.nx-logo-anim b {
  display: inline-block;
  /* Colore d'accento del giro (front.js), con passaggio morbido. */
  transition: color 0.45s ease;
  animation: nx-to 5s infinite;
  animation-delay: 0.6s;
}

@keyframes nx-hop {
  0% { transform: translateY(0); animation-timing-function: ease-out; }
  2.72% { transform: translateY(-0.42em); animation-timing-function: ease-in; }
  4.64% { transform: translateY(0); animation-timing-function: ease-out; }
  5.6% { transform: translateY(-0.08em); animation-timing-function: ease-in; }
  6.8%, 100% { transform: translateY(0); }
}

@keyframes nx-to {
  0%, 4.8% { transform: scale(1); margin: 0; }
  9.6% { transform: scale(1.28); margin: 0 0.14em; }
  16%, 100% { transform: scale(1); margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .nx-logo-anim .nx-l,
  .nx-logo-anim b {
    animation: none;
  }
}

/* Vetro: solo chrome. */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  box-shadow: var(--chrome-shadow), inset 0 0 0 0.5px var(--glass-rim), inset 0 1px 0 var(--glass-rim);
}

@media (prefers-reduced-transparency: reduce) {
  .glass {
    background: var(--glass-strong);
  }
}

/* Riquadri a gruppo, come le liste dell'app. */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}

.group-title {
  margin: 28px 16px 8px;
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-2);
}

.group-note {
  margin: 8px 16px 0;
  font-size: 13px;
  color: var(--text-2);
}

/* Pillole: azione principale piena d'accento, le altre neutre. */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font: 600 16px/1 var(--font);
  cursor: pointer;
  background: var(--surface-high);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.pill:hover {
  text-decoration: none;
  filter: brightness(1.04);
}

.pill:active {
  transform: scale(0.97);
}

.pill.primary {
  background: var(--accent);
  color: var(--on-accent);
}

.pill.danger {
  background: var(--danger);
  color: #fff;
}

.pill.small {
  min-height: 34px;
  padding: 0 14px;
  font-size: 14px;
}

.pill[disabled] {
  opacity: 0.45;
  cursor: default;
}

/* Badge TEMPO REALE / PROGRAMMATO dell'app. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--success) 14%, transparent);
  color: var(--success);
}

.badge.scheduled {
  background: color-mix(in srgb, var(--outline) 16%, transparent);
  color: var(--text-2);
}

.badge.warning {
  background: color-mix(in srgb, var(--warning) 16%, transparent);
  color: var(--warning);
}

.badge.danger {
  background: color-mix(in srgb, var(--danger) 14%, transparent);
  color: var(--danger);
}

.badge.accent {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.badge.yellow {
  background: var(--yellow);
  color: #1c1c1e;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.badge .dot {
  animation: nx-pulse 1.6s ease-in-out infinite;
}

@keyframes nx-pulse {
  50% {
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Banner nello stile dell'avviso di rete dell'app. */
.nx-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius);
  --tone: var(--accent);
  background: color-mix(in srgb, var(--surface) 86%, var(--tone));
}

.nx-banner.warning {
  --tone: var(--warning);
}

.nx-banner.critical {
  --tone: var(--danger);
}

.nx-banner .lni,
.nx-banner .fa-solid {
  font-size: 22px;
  color: var(--tone);
  margin-top: 1px;
}

.nx-banner .fa-solid {
  font-size: 20px;
}

.nx-banner-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.nx-banner-body {
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-2);
  white-space: pre-line;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Menu a tendina (lingua, tema): pulsante a pillola ed elenco di vetro. */
.nx-dropdown {
  position: relative;
}

.dd-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 7%, transparent);
  color: var(--text);
  font: 600 14px/1 var(--font);
  cursor: pointer;
}

.dd-toggle .lni {
  font-size: 17px;
}

.dd-toggle .dd-chev {
  font-size: 11px;
  color: var(--text-2);
  transition: transform 0.2s ease;
}

.nx-dropdown.open .dd-chev {
  transform: rotate(180deg);
}

.dd-toggle.icon-only {
  width: 38px;
  padding: 0;
  justify-content: center;
}

.dd-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  min-width: 190px;
  padding: 6px;
  border-radius: 20px;
  /* Quasi coprente: dentro una barra di vetro la sfocatura del browser non
     agisce, e il contenuto dietro si vedrebbe attraverso l'elenco. */
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22), inset 0 0 0 0.5px var(--separator);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}

.nx-dropdown.open .dd-list {
  opacity: 1;
  transform: none;
  visibility: visible;
  pointer-events: auto;
}

.dd-list [role="menuitemradio"] {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font: 500 15px/1.2 var(--font);
  text-align: left;
  text-decoration: none;
  box-sizing: border-box;
  cursor: pointer;
}

.dd-list [role="menuitemradio"]:hover,
.dd-list [role="menuitemradio"]:focus-visible {
  background: color-mix(in srgb, var(--text) 7%, transparent);
  outline: none;
}

.dd-list [role="menuitemradio"] .lni {
  width: 20px;
  font-size: 17px;
  text-align: center;
  color: var(--text-2);
}

/* Spunta sulla voce scelta. */
.dd-list [role="menuitemradio"]::after {
  content: "\ea78";
  font-family: "Lineicons";
  margin-left: auto;
  color: var(--accent);
  opacity: 0;
}

.dd-list [role="menuitemradio"][aria-checked="true"]::after {
  opacity: 1;
}

.dd-list [role="menuitemradio"][aria-checked="true"] {
  font-weight: 600;
}

/* ===== Pagina pubblica ===== */

body {
  min-height: 100vh;
  overflow-x: hidden;
}

/* Sfondo: macchie sfocate nei colori dell'icona (blu → giallo). */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: drift 26s ease-in-out infinite alternate;
}

.aurora span:nth-child(1) {
  width: 60vmax;
  height: 60vmax;
  left: -18vmax;
  top: -22vmax;
  background: radial-gradient(circle, #0a5aff 0%, transparent 65%);
}

.aurora span:nth-child(2) {
  width: 46vmax;
  height: 46vmax;
  right: -16vmax;
  top: 20vh;
  background: radial-gradient(circle, #3fd6ff 0%, transparent 65%);
  animation-delay: -8s;
  opacity: 0.35;
}

.aurora span:nth-child(3) {
  width: 52vmax;
  height: 52vmax;
  left: 10vw;
  bottom: -30vmax;
  background: radial-gradient(circle, #fdd600 0%, transparent 65%);
  animation-delay: -16s;
  opacity: 0.4;
}

@media (prefers-color-scheme: dark) {
  .aurora span {
    opacity: 0.28;
  }
}

@keyframes drift {
  to {
    transform: translate3d(6vmax, 4vmax, 0) scale(1.08);
  }
}

/* Barra in alto di vetro, sospesa come le capsule di iOS 26. */
.topbar {
  position: sticky;
  top: max(12px, env(safe-area-inset-top));
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1080px, calc(100% - 32px));
  margin: 12px auto 0;
  padding: 10px 10px 10px 22px;
  border-radius: 999px;
}

.topbar .nx-logo {
  font-size: 20px;
  text-decoration: none;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

main {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  padding: 72px 0 56px;
}

.hero h1 {
  margin: 18px 0 16px;
  font-family: var(--font-display);
  font-size: clamp(40px, 6.2vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.lead {
  margin: 0;
  max-width: 34em;
  font-size: 19px;
  color: var(--text-2);
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px 10px 16px;
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.1;
  opacity: 0.88;
  cursor: default;
}

a.store {
  opacity: 1;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease;
}

a.store:hover {
  transform: translateY(-1px);
}

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

.store .lni {
  font-size: 26px;
}

.store small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  opacity: 0.75;
}

/* Beta in anteprima, sotto i pulsanti degli store. */
.beta {
  margin-top: 28px;
  max-width: 34em;
  padding: 22px;
  border-radius: 22px;
  background: var(--surface);
}

.beta[hidden],
.beta [hidden] {
  display: none !important;
}

.beta h2 {
  margin: 0 0 6px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.beta > p {
  margin: 0 0 16px;
  color: var(--text-2);
}

.beta-form {
  display: grid;
  gap: 12px;
}

/* Chiuso finché non si tocca «Voglio provarla» (senza link: solo «In arrivo…»). */
.beta:not(.beta-open):not(.beta-none) .beta-form,
.beta-open .beta-toggle,
.beta-none .beta-toggle {
  display: none;
}

.beta-lead-soon,
.beta-none .beta-lead,
.beta-none .beta-form > :not(.beta-platforms) {
  display: none;
}

.beta-none .beta-lead-soon {
  display: block;
}

.beta-platforms {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface-high);
}

.beta-platforms label {
  flex: 1;
  cursor: pointer;
}

.beta-platforms input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.beta-platforms span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 9px;
  font-weight: 600;
  /* Un po' più scuro del grigio secondario: ≥ 4.5:1 sul fondo del selettore. */
  color: color-mix(in srgb, var(--text-2) 80%, var(--text));
}

.beta-platforms input:checked + span {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.beta-soon {
  display: none;
  font-size: 12px;
  font-weight: 500;
}

.beta-platforms .soon {
  cursor: default;
}

.beta-platforms .soon span {
  flex-wrap: wrap;
  gap: 0 6px;
  padding-block: 5px;
}

.beta-platforms .soon .beta-soon {
  display: block;
}

.beta-platforms input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
}

.beta-field {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 15px;
}

.beta-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--separator);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.3 var(--font);
}

.beta-field input:focus {
  outline: none;
  border-color: var(--accent);
}

.beta-hint {
  margin-top: -6px;
  color: var(--text-2);
  font-size: 14px;
}

.beta-hint:empty {
  display: none;
}

.beta-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.beta-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
}

.beta-consent input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.beta-send {
  justify-self: start;
  padding: 11px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: 600 16px/1.2 var(--font);
  cursor: pointer;
}

.beta-send:disabled {
  opacity: 0.6;
  cursor: default;
}

.beta-status {
  margin: 0;
  font-weight: 600;
}

.beta-status:empty {
  display: none;
}

.beta-status.success {
  color: var(--success-text);
}

.beta-status.error {
  color: var(--danger-text);
}

.beta-note {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
}

/* Anteprima: una scheda fermata come nell'app. */
.hero-demo {
  position: relative;
  justify-self: center;
  width: min(380px, 100%);
}

.app-icon {
  position: absolute;
  top: -48px;
  right: -28px;
  z-index: 2;
  width: 112px;
  height: 112px;
  border-radius: 26px;
  box-shadow: 0 18px 40px rgba(10, 90, 255, 0.28), 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: rotate(8deg);
}

.phone {
  position: relative;
  padding: 20px 16px 16px;
  border-radius: 34px;
  background: var(--bg);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.18), 0 0 0 1px var(--separator);
}

.phone-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 4px 6px 14px;
}

.stop-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stop-code {
  font-size: 13px;
  color: var(--text-2);
}

.star {
  font-size: 22px;
  color: var(--accent);
}

.demo-banner {
  margin-bottom: 12px;
}

.arrivals {
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.arrivals li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.arrivals li + li {
  box-shadow: inset 52px 0.5px 0 0 var(--surface), inset 0 0.5px 0 0 var(--separator);
}

.route {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

.route.tram {
  background: #e65100;
}

.route.metro {
  background: #e8202a;
}

.route.bus {
  background: #1565c0;
}

.dir {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-weight: 600;
  font-size: 16px;
}

.eta {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
}

.eta small {
  margin-left: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.eta.rolling {
  opacity: 0;
  transform: translateY(-10px);
  filter: blur(3px);
}

.eta.now {
  color: var(--success);
}

.getoff {
  position: absolute;
  left: 50%;
  bottom: -24px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 600;
  font-size: 15px;
}

.getoff .lni {
  font-size: 18px;
  color: #1c1c1e;
  background: var(--yellow);
  border-radius: 50%;
  padding: 6px;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 56px 0 24px;
}

.feature {
  padding: 22px;
  border-radius: 22px;
  background: var(--surface);
}

.feature .lni {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 22px;
  color: #fff;
  background: var(--c);
}

.feature h3 {
  margin: 16px 0 6px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.feature p {
  margin: 0;
  font-size: 15px;
  color: var(--text-2);
}

/* «Offrimi un caffè» in fondo alla home (Impostazioni del pannello): solo un
   link alla pagina di Buy Me a Coffee. */
.support {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin: 8px 0 24px;
  padding: 22px;
  border-radius: 22px;
  background: var(--surface);
}

.support > .lni {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 22px;
  color: #fff;
  background: #b26a00;
}

.support h2 {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.support p {
  margin: 0;
  font-size: 15px;
  color: var(--text-2);
}

.support-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .support {
    grid-template-columns: auto 1fr;
  }

  .support-button {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: center;
  }
}

.footer {
  width: min(1080px, calc(100% - 32px));
  margin: 32px auto 0;
  padding: 28px 0 calc(32px + env(safe-area-inset-bottom));
  border-top: 0.5px solid var(--separator);
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
}

.footer .nx-logo {
  font-size: 16px;
}

.footer p {
  margin: 8px 0 0;
}

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 72px;
    padding-top: 48px;
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Schede in numero dispari: l'ultima occupa tutta la riga. */
  .feature:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .features {
    grid-template-columns: 1fr;
  }

  .app-icon {
    width: 84px;
    height: 84px;
    border-radius: 20px;
    right: -6px;
    top: -40px;
  }

  .lead {
    font-size: 17px;
  }

  .getoff {
    font-size: 14px;
    padding: 10px 16px;
  }
}

/* Telefoni stretti: logo e menu nella stessa barra. */
@media (max-width: 380px) {
  .topbar {
    padding-left: 16px;
  }

  .topbar .nx-logo {
    font-size: 16px;
  }
}

/* Link nel piè di pagina (privacy, domande frequenti). */
.footer-links a {
  color: var(--text-2);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--text);
}

/* Icone dei profili social nel piè di pagina. */
.footer-social a {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-2);
  font-size: 18px;
}

.footer-social a:hover {
  color: var(--text);
}

/* Pagine dei testi dell'app (/privacy, /faq): colonna di lettura, schede
   come le card dell'app. */
.doc-page {
  width: min(760px, calc(100% - 32px));
  padding: 40px 0 8px;
}

.doc-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.doc-page h1 {
  margin: 20px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.doc-page .lead {
  margin: 0;
  color: var(--text-2);
}

.doc-updated {
  margin: 8px 0 24px;
  font-size: 14px;
  color: var(--text-2);
}

.doc-card {
  margin: 0 0 12px;
  padding: 20px 22px;
  border-radius: 22px;
  background: var(--surface);
}

.doc-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.doc-body p {
  margin: 0 0 10px;
}

.doc-body ul {
  margin: 0 0 10px;
  padding-left: 22px;
}

.doc-body li {
  margin: 4px 0;
}

.doc-body > :last-child {
  margin-bottom: 0;
}

.doc-body a {
  color: var(--accent);
}

.faq-list {
  padding: 4px 0;
}

.faq-item + .faq-item {
  border-top: 0.5px solid var(--separator);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

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

.faq-item summary .lni {
  flex: none;
  color: var(--text-2);
  transition: transform 0.2s ease;
}

.faq-item[open] summary .lni {
  transform: rotate(180deg);
}

.faq-item .doc-body {
  padding: 0 22px 18px;
  color: var(--text-2);
}

@media (prefers-reduced-motion: reduce) {
  .faq-item summary .lni {
    transition: none;
  }
}
