/* Public homepage. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px max(16px, calc((100vw - 1180px) / 2));
  padding-top: calc(12px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px);
}
.site-nav { display: flex; gap: 4px; margin-left: 12px; }
.site-nav a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; text-decoration: none; }
.site-nav a:hover { color: var(--ink); background: var(--accent-soft); }
.header-actions { display: flex; gap: 8px; margin-left: auto; }

main { overflow-x: clip; }

/* ---------------------------------------------------------------- hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 16px 72px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); flex: none; }
.hero h1 { margin: 0 0 20px; font-size: clamp(2.5rem, 5.6vw, 4.1rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.04; }
.lead { margin: 0 0 28px; max-width: 34em; font-size: 1.12rem; color: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 24px 0 0; padding: 0; list-style: none; color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.hero-facts span { background: var(--holo); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------------------------------------------------------- value board */
.board {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.board::before { /* foil edge */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--holo);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  pointer-events: none;
}
.board-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 12px; }
.board-head strong { font-size: 1.08rem; margin-right: 10px; }
.board-head .faint { font-size: 0.85rem; }
.board-clock { font-size: 1.3rem; font-weight: 700; color: var(--gold); letter-spacing: 0.04em; }
.board-cols, .board-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 82px 92px; gap: 10px; align-items: center; }
.board-cols { padding: 8px 20px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.board-rows { margin: 0; padding: 4px 0; list-style: none; }
.board-row { padding: 9px 20px; border-bottom: 1px solid var(--line-soft); animation: row-in 0.5s ease-out both; }
.board-row:last-child { border-bottom: 0; }
.board-item { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mini-cover { width: 30px; height: 42px; flex: none; border-radius: 5px; background: linear-gradient(150deg, var(--c1), var(--c2)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); position: relative; overflow: hidden; }
.mini-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255, 255, 255, 0.45), transparent 45%); }
.board-title { min-width: 0; }
.board-title b { display: block; font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-title small { color: var(--faint); font-size: 0.74rem; }
.board-src { font-size: 0.76rem; color: var(--muted); }
.board-val { font-size: 0.92rem; font-weight: 700; color: var(--gold); }
.chip { display: inline-flex; justify-content: center; padding: 3px 8px; border-radius: 7px; font-family: var(--mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; white-space: nowrap; }
.chip.up { color: var(--ok); background: var(--ok-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 45%, transparent); }
.chip.down { color: var(--danger); background: var(--danger-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 45%, transparent); }
.chip.info { color: var(--cyan); background: rgba(109, 220, 255, 0.12); box-shadow: inset 0 0 0 1px rgba(109, 220, 255, 0.4); }
.chip.gold { color: var(--gold); background: var(--gold-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 45%, transparent); }
.board-foot { display: flex; align-items: center; gap: 10px; padding: 12px 20px 16px; font-size: 0.7rem; color: var(--faint); letter-spacing: 0.06em; border-top: 1px solid var(--line-soft); }
@keyframes row-in { from { opacity: 0; transform: translateY(-6px); } }

/* ---------------------------------------------------------------- sections */
.section { max-width: 1180px; margin: 0 auto; padding: 72px 16px; }
.section.narrow { max-width: 820px; }
.section h2 { margin: 10px 0 14px; font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
.section-lead { margin: 0 0 30px; max-width: 40em; color: var(--muted); font-size: 1.05rem; }
#come-funziona h2, #privacy h2 { margin-bottom: 30px; }

/* "graded slab" cards */
.slabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.slab {
  position: relative;
  padding: 0 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.slab:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent-2) 60%, var(--line)); box-shadow: var(--shadow-lift); }
.slab-label {
  display: flex;
  justify-content: space-between;
  margin: 0 -20px 20px;
  padding: 9px 20px;
  background: var(--holo-soft);
  border-bottom: 1px solid var(--line);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.slab-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 14px; border-radius: 12px; background: var(--holo); color: #10122a; font-size: 1.35rem; font-weight: 800; box-shadow: 0 10px 22px -12px rgba(255, 111, 181, 0.8); }
.slab h3 { margin: 0 0 8px; font-size: 1.08rem; }
.slab p { margin: 0; color: var(--muted); font-size: 0.93rem; }

.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tile {
  position: relative;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--tile); }
.tile::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(color-mix(in srgb, var(--tile) 30%, transparent), transparent 70%); }
.tile-icon { font-size: 1.7rem; }
.tile h3 { margin: 10px 0 6px; font-size: 1.05rem; }
.tile p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* phone mockup */
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; align-items: center; }
.checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 34px; color: var(--muted); }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--ok-soft); color: var(--ok); font-weight: 800; font-size: 0.8rem; }
.checks strong { color: var(--ink); }
.phone { justify-self: center; width: 270px; padding: 12px; border-radius: 42px; background: linear-gradient(160deg, #2a3350, #0c1120); box-shadow: var(--shadow-lift), inset 0 0 0 1px rgba(255, 255, 255, 0.08); transform: rotate(3deg); }
.phone-screen { height: 520px; padding: 16px 14px; border-radius: 32px; background: #0a0e1a; display: flex; flex-direction: column; gap: 12px; overflow: hidden; color: #eef1fb; }
.ph-top { display: flex; justify-content: space-between; align-items: center; }
.ph-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--holo); }
.ph-search { padding: 10px 12px; border-radius: 12px; background: #161e33; border: 1px solid #222c46; color: #717a9c; font-size: 0.78rem; }
.ph-chips { display: flex; gap: 6px; }
.ph-chips span { padding: 5px 10px; border-radius: 999px; background: #161e33; font-size: 0.68rem; font-weight: 700; color: #aeb6d4; }
.ph-chips .on { background: linear-gradient(120deg, #027aff, #8b5cf6); color: #fff; }
.ph-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 1; }
.ph-card { position: relative; border-radius: 12px; background: linear-gradient(150deg, var(--c1), var(--c2)); overflow: hidden; }
.ph-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255, 255, 255, 0.4), transparent 40%); }
.ph-card b { position: absolute; left: 8px; bottom: 8px; z-index: 1; padding: 2px 6px; border-radius: 6px; background: rgba(10, 14, 26, 0.75); font-family: var(--mono); font-size: 0.68rem; }
.ph-missing { background: repeating-linear-gradient(135deg, #161e33 0 8px, #111728 8px 16px); box-shadow: inset 0 0 0 1.5px #ff6fb5; }
.ph-missing::after { display: none; }
.ph-missing small { position: absolute; right: 8px; top: 8px; color: #ff6fb5; font-family: var(--mono); font-size: 0.62rem; font-weight: 700; text-transform: uppercase; }
.ph-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px 6px 2px; border-top: 1px solid #222c46; }
.ph-nav span { height: 6px; border-radius: 6px; background: #222c46; }
.ph-nav .on { background: var(--holo); }

.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.trio article { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.trio h3 { margin: 0 0 8px; font-size: 1.08rem; }
.trio p { margin: 0; color: var(--muted); }

details { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); margin-bottom: 10px; }
summary { padding: 16px 18px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); color: var(--faint); font-size: 1.1rem; }
details[open] summary::after { content: "–"; }
details p { margin: 0; padding: 0 18px 18px; color: var(--muted); }

.cta-band { padding: 40px 16px 88px; }
.cta-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 24px;
  border-radius: 24px;
  text-align: center;
  background: radial-gradient(600px 240px at 50% 0%, rgba(139, 108, 255, 0.25), transparent 70%), var(--panel);
  overflow: hidden;
}
.cta-inner::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: var(--holo); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.cta-inner h2 { margin: 0 0 12px; font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; }
.cta-inner p { margin: 0 0 26px; }
.cta-inner .hero-cta { justify-content: center; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 16px calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-soft);
}
.site-footer p { margin: 0; font-size: 0.9rem; }
.site-footer .logo img { height: 22px; }
.site-footer .logo span { font-size: 1rem; }
.footer-nav { display: flex; gap: 16px; margin-left: auto; }
.footer-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.9rem; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1020px) {
  .site-nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 44px; }
  .slabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .phone { transform: none; }
}

@media (max-width: 640px) {
  .site-header { gap: 10px; }
  .header-actions .btn.ghost { padding: 0 10px; }
  .logo span { font-size: 1.12rem; }
  .logo img { height: 26px; }
  .hero { padding: 32px 16px 48px; }
  .pill { font-size: 0.62rem; letter-spacing: 0.04em; }
  .lead { font-size: 1.02rem; }
  .hero-cta .btn { flex: 1 1 100%; }
  .board-cols, .board-row { grid-template-columns: minmax(0, 1fr) 66px 78px; gap: 8px; }
  .board-title b { white-space: normal; font-size: 0.74rem; line-height: 1.25; }
  .board-item { gap: 9px; }
  .mini-cover { width: 26px; height: 37px; }
  .board-cols span:nth-child(2), .board-src { display: none; }
  .board-row, .board-cols, .board-head, .board-foot { padding-left: 14px; padding-right: 14px; }
  .section { padding: 52px 16px; }
  .slabs, .trio { grid-template-columns: 1fr; }
  .footer-nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .board-row { animation: none; }
  .slab { transition: none; }
}
