/* GymLab — sito vetrina
   Token identici al design system dell'app mobile (apps/mobile/src/theme/tokens.ts). */

:root {
  --bg: #0a0a0a;
  --card: #131211;
  --card-border: rgba(255, 255, 255, 0.07);
  --card-elevated: #1c1a18;
  --text: #f4f2ee;
  --text-2: rgba(244, 242, 238, 0.5);
  --text-label: rgba(244, 242, 238, 0.4);
  --text-hint: rgba(244, 242, 238, 0.3);
  --hair: rgba(255, 255, 255, 0.08);
  --accent: #c98b5e;
  --accent-hover: #e0a878;
  --on-accent: #141008;
  --positive: #8fb996;
  --pending: #d9a84a;
  --negative: #e0806a;
  --bronze: #b08968;
  --silver: #b8bcc4;
  --gold: #d9a84a;
  --platinum: #8fa39a;

  --r-card: 22px;
  --r-card-sm: 18px;
  --r-field: 17px;
  --r-pill: 999px;

  --font: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --measure: 62ch;
  --gutter: clamp(20px, 5vw, 48px);
  --wrap: 1120px;
  --ps: 0.72; /* scala dei telefoni (390×844 → --ps) */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
/* l'attributo hidden vince sempre, anche sugli elementi con display flex/grid */
[hidden] { display: none !important; }

html { color-scheme: dark; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.03em; font-weight: 500; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }

.wrap {
  width: min(var(--wrap), 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- alone decorativo (uno solo per pagina, come nell'app) ---------- */
.halo {
  position: absolute;
  top: -260px;
  left: 50%;
  width: 720px;
  height: 720px;
  margin-left: -360px;
  border-radius: 999px;
  background: radial-gradient(closest-side, rgba(201, 139, 94, 0.14), rgba(201, 139, 94, 0));
  pointer-events: none;
}

/* ---------- reveal allo scroll ----------
   Senza JS tutto è visibile. Con JS gli elementi entrano quando arrivano in viewport. */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.8s var(--ease-out);
  transition-delay: var(--d, 0s);
}
html.js [data-reveal].in { opacity: 1; transform: none; }

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 10, 10, 0);
  border-bottom: 1px solid rgba(255, 255, 255, 0);
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}
.site-header.scrolled {
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 17px;
  font-weight: 600;
  transition: transform 0.35s var(--ease-out);
}
.brand:hover .brand-mark { transform: rotate(-12deg) scale(1.06); }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav .nav-link {
  position: relative;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  padding-block: 4px;
}
.site-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.site-nav .nav-link:hover, .site-nav .nav-link.is-active { color: var(--text); }
.site-nav .nav-link:hover::after, .site-nav .nav-link.is-active::after { transform: scaleX(1); }

/* pulsante ☰ (solo mobile) */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 999px;
  background: var(--text);
  transition: transform 0.3s var(--ease-out), opacity 0.2s ease;
}
.site-header.is-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.site-header.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.is-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .site-header.is-open {
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom-color: rgba(255, 255, 255, 0.06);
  }
  /* pannello a tendina sotto la barra */
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px var(--gutter) 20px;
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid var(--hair);
    box-shadow: 0 30px 50px -20px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.3s var(--ease-out);
  }
  .site-header.is-open .site-nav { opacity: 1; transform: none; pointer-events: auto; }
  .site-nav .nav-link { display: block; padding: 15px 0; font-size: 17px; color: var(--text); border-bottom: 1px solid var(--hair); }
  .site-nav .nav-link::after { display: none; }
  .site-nav .nav-link.is-active { color: var(--accent); }
  .site-nav .btn { margin-top: 16px; height: 50px; font-size: 15px; }
}

/* ---------- pulsanti (54px rame, come il primario dell'app) ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 54px;
  padding: 0 26px;
  border-radius: var(--r-pill);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  overflow: hidden;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); transition-duration: 0.08s; }
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 16px 32px -14px rgba(201, 139, 94, 0.7);
}
.btn-primary::before {
  /* riflesso che scorre al passaggio del mouse */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease-out);
  pointer-events: none;
}
.btn-primary:hover { color: var(--on-accent); box-shadow: 0 22px 40px -14px rgba(201, 139, 94, 0.85); }
.btn-primary:hover::before { transform: translateX(120%); }
.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 13px; }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: default; }
.btn[aria-disabled="true"]:hover { transform: none; }

/* ---------- tipografia ricorrente ---------- */
.eyebrow {
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-label);
}
.eyebrow.accent { color: var(--accent); }
.lede { font-size: 17px; color: var(--text-2); max-width: var(--measure); }
.section-title { font-size: clamp(30px, 4.2vw, 44px); line-height: 1.1; max-width: 18ch; }
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 48px; }

section { padding-block: clamp(64px, 9vw, 120px); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(48px, 7vw, 96px) 0; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 22px; padding-bottom: clamp(48px, 7vw, 96px); }
.hero-copy > * { animation: rise 0.9s var(--ease-out) both; }
.hero-copy > :nth-child(1) { animation-delay: 0.05s; }
.hero-copy > :nth-child(2) { animation-delay: 0.15s; }
.hero-copy > :nth-child(3) { animation-delay: 0.28s; }
.hero-copy > :nth-child(4) { animation-delay: 0.4s; }
.hero-copy > :nth-child(5) { animation-delay: 0.52s; }
.hero h1 {
  font-size: clamp(38px, 5.6vw, 64px);
  line-height: 1.04;
  max-width: 14ch;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--text-2);
}
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 24px;
  min-height: 560px;
  overflow: hidden;
  mask-image: linear-gradient(180deg, #000 82%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent);
}
.hero-visual .phone-frame { --ps: 0.8; animation: rise 1.1s var(--ease-out) both; animation-delay: 0.35s; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 0; }
  .hero-visual { min-height: 480px; }
  .hero-visual .phone-frame { --ps: 0.68; }
}

/* ---------- seduta in 3D che segue lo scroll ----------
   La sezione è alta 560vh; lo "stage" resta fermo (sticky) e il telefono ruota
   mentre lo schermo si compone un passo alla volta. Senza JS: tutto visibile. */
.scrolly { position: relative; height: 560vh; padding-block: 0; }
.scrolly-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
}
.scrolly-inner {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  width: min(var(--wrap), 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
/* sfondo generato: palestra buia con luce rame, sotto a tutto.
   Specchiato: la luce e i manubri finiscono a destra, dietro il telefono; il testo a sinistra
   resta sulla parte scura. La velatura (::after) garantisce la leggibilità a ogni larghezza. */
.scrolly-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  transform: scaleX(-1);
  z-index: -1;
  opacity: 0.8;
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
  pointer-events: none;
}
.scrolly-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(10, 10, 10, 0.92) 0%, rgba(10, 10, 10, 0.78) 28%, rgba(10, 10, 10, 0.35) 52%, rgba(10, 10, 10, 0) 72%);
}
.scrolly .cap p { color: rgba(244, 242, 238, 0.74); }
.scrolly-copy { position: relative; display: flex; flex-direction: column; gap: 22px; }
.captions { position: relative; min-height: 240px; }
html.js .cap {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.55s var(--ease-out);
  pointer-events: none;
}
html.js .cap.on { opacity: 1; transform: none; pointer-events: auto; }
html:not(.js) .cap { margin-bottom: 28px; }
.cap { display: flex; flex-direction: column; gap: 12px; }
.cap h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.08; max-width: 16ch; }
.cap p { color: var(--text-2); max-width: 44ch; font-size: 16.5px; }
.dots { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.dots li {
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.3s ease, width 0.3s var(--ease-out);
}
.dots li.on { background: var(--accent); width: 34px; }

.scrolly-phone {
  perspective: 1400px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.phone3d {
  position: relative;
  display: inline-block;
  transform-style: preserve-3d;
  transform: rotateY(var(--ry, -34deg)) rotateX(var(--rx, 10deg)) translateY(var(--ty, 0px)) scale(var(--s, 1));
  will-change: transform;
}
/* spessore del telefono: due piastre dietro lo schermo */
.phone3d::before, .phone3d::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 46px;
  pointer-events: none;
}
.phone3d::before {
  background: #121212;
  transform: translateZ(-18px);
  box-shadow: 0 90px 120px -50px rgba(0, 0, 0, 1);
}
.phone3d::after {
  background: linear-gradient(90deg, #3a3a3a, #101010 18%, #101010 82%, #3a3a3a);
  transform: translateZ(-9px);
}
.phone3d .phone { position: relative; z-index: 1; transform: scale(var(--ps)) translateZ(0); }
.phone .glare {
  position: absolute;
  inset: 0;
  z-index: 6;
  border-radius: inherit;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 28%, transparent 52%);
  opacity: var(--glare, 0.9);
  pointer-events: none;
  transition: opacity 0.2s linear;
}

/* elementi dello schermo che compaiono a passi */
html.js .scrolly [data-step] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.5s var(--ease-out);
  transition-delay: var(--d, 0s);
}
html.js .scrolly [data-step].on { opacity: 1; transform: none; }
.scr {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 68px 24px 34px;
}
html.js .scr {
  opacity: 0;
  transform: translateY(6%);
  transition: opacity 0.5s ease, transform 0.6s var(--ease-out);
  pointer-events: none;
}
html.js .scr.on { opacity: 1; transform: none; }
html:not(.js) .scr { display: none; }
.scr .halo { z-index: -1; }

/* schermata recupero (ClienteRecupero.dc.html) */
.scr-recovery { align-items: center; gap: 28px; text-align: center; }
.scr-recovery .ttl { font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-label); margin-top: 8px; }
.ring-wrap { position: relative; width: 250px; height: 250px; margin-top: 12px; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-wrap .bg { fill: none; stroke: rgba(255, 255, 255, 0.07); stroke-width: 10; }
.ring-wrap .fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 691;
  stroke-dashoffset: var(--off, 0);
  transition: stroke-dashoffset 0.15s linear;
}
.ring-wrap .num {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.ring-wrap .num b { font-size: 56px; font-weight: 300; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.ring-wrap .num span { font-size: 13px; color: var(--text-2); }
.pm { display: flex; gap: 12px; }
.pm span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.scr-recovery .next-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--r-card-sm);
  background: var(--card);
  border: 1px solid var(--card-border);
  text-align: left;
}
.scr-recovery .next-card .l { display: flex; flex-direction: column; gap: 4px; }
.scr-recovery .next-card .lbl { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-label); font-weight: 500; }
.scr-recovery .next-card .n { font-size: 15px; font-weight: 500; }
.scr-recovery .skip { margin-top: auto; font-size: 14px; font-weight: 500; color: var(--text-2); }

/* schermata completato (ClienteCompletato.dc.html) */
.scr-done { gap: 22px; }
.scr-done .ttl { display: flex; flex-direction: column; gap: 8px; }
.scr-done h2 { font-size: 30px; line-height: 1.1; }
.scr-done .score { display: flex; align-items: center; gap: 20px; padding: 20px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--card-border); }
.scr-done .score svg { width: 92px; height: 92px; transform: rotate(-90deg); flex-shrink: 0; }
.scr-done .score .bg { fill: none; stroke: rgba(255, 255, 255, 0.07); stroke-width: 6; }
.scr-done .score .fg { fill: none; stroke: var(--positive); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 251; stroke-dashoffset: 35; }
.scr-done .score .txt { display: flex; flex-direction: column; gap: 4px; }
.scr-done .score .txt b { font-size: 34px; font-weight: 300; letter-spacing: -0.03em; line-height: 1; }
.scr-done .score .txt span { font-size: 13px; color: var(--text-2); }
.scr-done .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.scr-done .stats div { display: flex; flex-direction: column; gap: 4px; padding: 14px 12px; border-radius: var(--r-card-sm); background: var(--card); border: 1px solid var(--card-border); }
.scr-done .stats b { font-size: 22px; font-weight: 300; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.scr-done .stats span { font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-label); }
.scr-done .record { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: rgba(217, 168, 74, 0.08); border: 1px solid rgba(217, 168, 74, 0.3); font-size: 13.5px; }
.scr-done .record .g { color: var(--gold); flex-shrink: 0; }
.scr-done .record b { font-weight: 500; }
.scr-done .sent { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--positive); }

@media (max-width: 900px) {
  .scrolly { height: 520vh; }
  .scrolly-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    align-content: start;
    gap: 16px;
    padding-top: 84px;
  }
  .scrolly-phone { perspective: 1000px; align-items: flex-start; }
  .scrolly .phone3d { --ps: 0.5; }
  .scrolly-stage::after { background: linear-gradient(180deg, rgba(10, 10, 10, 0.9) 0%, rgba(10, 10, 10, 0.7) 38%, rgba(10, 10, 10, 0.15) 62%, rgba(10, 10, 10, 0) 80%); }
  .captions { min-height: 170px; }
  .cap h2 { font-size: 24px; }
  .cap p { font-size: 15px; }
}

/* ---------- striscia scorrevole (catalogo esercizi) ---------- */
.marquee {
  position: relative;
  padding-block: 18px;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: marquee 48s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track ul { display: flex; gap: 0; }
.marquee-track li {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding-inline: 11px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
  white-space: nowrap;
}
.marquee-track li::after { content: ""; width: 5px; height: 5px; border-radius: 999px; background: var(--accent); opacity: 0.8; }
.marquee-track li strong { color: var(--text); font-weight: 500; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- fascia fotografica a tutta larghezza ---------- */
.band {
  position: relative;
  min-height: clamp(420px, 60vh, 640px);
  display: grid;
  align-items: end;
  overflow: hidden;
  padding-block: 0;
  isolation: isolate;
}
.band img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  z-index: -2;
  animation: kenburns 26s ease-in-out infinite alternate;
  will-change: transform;
}
.band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(10, 10, 10, 0.15) 30%, rgba(10, 10, 10, 0.35) 70%, var(--bg) 100%),
    linear-gradient(90deg, rgba(10, 10, 10, 0.75) 0%, rgba(10, 10, 10, 0.1) 38%, rgba(10, 10, 10, 0.1) 62%, rgba(10, 10, 10, 0.7) 100%);
}
.band .wrap { padding-block: clamp(48px, 8vw, 96px); display: grid; grid-template-columns: 1fr; gap: 18px; }
.band-copy { display: flex; flex-direction: column; gap: 18px; }
.band h2 { font-size: clamp(30px, 4.6vw, 54px); line-height: 1.05; max-width: 16ch; }
.band p { color: rgba(244, 242, 238, 0.72); max-width: 48ch; font-size: 17px; }
/* da 1100px: titolo a sinistra, paragrafo a destra, l'atleta in mezzo */
@media (min-width: 1100px) {
  .band .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 0.8fr); align-items: end; gap: 24px; }
  .band-copy { grid-column: 1; }
  .band p { grid-column: 3; justify-self: end; max-width: 32ch; padding-bottom: 8px; }
}
@media (min-width: 1440px) {
  .band { min-height: clamp(520px, 64vh, 720px); }
}
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }

/* ---------- foto "editoriali" ---------- */
.photo {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-card);
  background: var(--card);
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out), filter 0.6s ease;
  filter: saturate(0.85) contrast(1.02);
}
.photo::after {
  /* velatura in basso per far posare il testo e uniformare le foto */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0) 55%, rgba(10, 10, 10, 0.55));
  pointer-events: none;
}
.photo:hover img { transform: scale(1.04); filter: saturate(1) contrast(1.02); }
.photo .tag {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 1;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244, 242, 238, 0.85);
}

/* ---------- ruoli: due colonne fotografiche, senza riquadri ---------- */
.roles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto auto auto auto;
  gap: 20px clamp(28px, 4vw, 56px);
}
.role { display: grid; grid-template-rows: subgrid; grid-row: span 4; gap: 20px; align-items: start; }
.role .photo { aspect-ratio: 4 / 5; width: 100%; }
@media (min-width: 1100px) { .role .photo { aspect-ratio: 1 / 1; } }
.role h3 { font-size: clamp(22px, 2.4vw, 28px); max-width: 30ch; }
.role p { color: var(--text-2); max-width: 46ch; }
.role .tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  font-size: 13px;
  color: rgba(244, 242, 238, 0.7);
  padding-top: 14px;
  border-top: 1px solid var(--hair);
}
.role .tabs span + span::before { content: "·"; margin-inline: 10px; color: var(--accent); }
@media (max-width: 720px) {
  .roles { grid-template-columns: 1fr; grid-template-rows: none; }
  .role { display: flex; flex-direction: column; }
  .role .photo { aspect-ratio: 16 / 10; }
}

/* ---------- liste funzioni (senza riquadri) ---------- */
.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.feature-layout.flip { grid-template-columns: auto minmax(0, 1fr); }
.feature-layout .phone-col { position: sticky; top: 96px; }
.features { display: flex; flex-direction: column; }
.feature {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 18px;
  padding-block: 26px;
  border-top: 1px solid var(--hair);
}
.feature:first-child { border-top: 0; padding-top: 0; }
.feature .ico {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 3px;
  color: var(--text-label);
  transition: color 0.3s ease, transform 0.4s var(--ease-out);
}
.feature:hover .ico { color: var(--accent); transform: translateX(3px); }
.feature h3 { font-size: 19px; margin-bottom: 6px; transition: color 0.25s ease; }
.feature:hover h3 { color: var(--accent-hover); }
.feature p { color: var(--text-2); font-size: 15px; max-width: var(--measure); }
.feature p + p { margin-top: 6px; }
.feature .kv { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.feature .kv span {
  font-size: 12px;
  color: rgba(244, 242, 238, 0.7);
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 900px) {
  .feature-layout, .feature-layout.flip { grid-template-columns: 1fr; }
  .feature-layout .phone-col { position: static; display: flex; justify-content: center; order: -1; }
}

/* telefono del trainer, da solo, centrato nella metà destra */
.phone-on-photo { display: flex; justify-content: center; }
.phone-on-photo .phone-frame { flex-shrink: 0; }

/* ---------- come funziona: righe con demo animata, niente card ---------- */
.ledger { display: flex; flex-direction: column; border-top: 1px solid var(--hair); }
.ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  padding-block: clamp(36px, 5vw, 56px);
  border-bottom: 1px solid var(--hair);
}
.ledger-row h3 { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 12px; }
.ledger-row p { color: var(--text-2); max-width: 50ch; }
.demo {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.demo .line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-block: 10px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}
.demo .line:last-child { border-bottom: 0; }
.demo .line .k { color: var(--text-2); }
.demo .line .v { font-weight: 500; transition: color 0.3s ease; }
.demo .line .v.copper { color: var(--accent); font-size: 22px; font-weight: 300; letter-spacing: -0.02em; }
.demo .swap { display: inline-block; animation: swapIn 0.45s var(--ease-out); }
@keyframes swapIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.rot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rot span {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13.5px;
  color: rgba(244, 242, 238, 0.7);
  transition: background 0.4s ease, border-color 0.4s ease, color 0.4s ease, transform 0.4s var(--ease-out);
}
.rot span.on {
  background: rgba(201, 139, 94, 0.14);
  border-color: rgba(201, 139, 94, 0.5);
  color: var(--accent);
  transform: translateY(-2px);
}
.rot span.done { color: var(--positive); border-color: rgba(143, 185, 150, 0.4); }
.rot i { color: var(--text-hint); font-style: normal; }

.group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(201, 139, 94, 0.45);
  transition: border-color 0.4s ease;
}
.group .g { font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.group .line { padding-block: 6px; }
.group .line.joins { animation: swapIn 0.5s var(--ease-out); }
.group .line .drag { display: inline-flex; gap: 3px; margin-right: 10px; vertical-align: middle; opacity: 0.35; }
.group .line .drag i { width: 3px; height: 3px; border-radius: 999px; background: currentColor; }
.group-hint { font-size: 13px; color: var(--text-label); display: flex; align-items: center; gap: 8px; }
.group-hint .plus { color: var(--accent); font-weight: 500; }
@media (max-width: 760px) { .ledger-row { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- trofei: mensola di anelli, senza riquadri ---------- */
.shelf {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--hair);
}
.medal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 8px 8px;
  text-align: center;
}
.medal svg { width: 72px; height: 72px; overflow: visible; }
.medal .ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 2.5; }
.medal .ring-fg {
  fill: none;
  stroke: var(--tier);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 201;
  stroke-dashoffset: 201;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 1.4s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.medal.in .ring-fg { stroke-dashoffset: 0; }
.medal .glyph { color: var(--tier); }
.medal .n { font-size: 14px; font-weight: 500; }
.medal .t { font-size: 11px; color: var(--text-label); text-transform: uppercase; letter-spacing: 0.05em; }
@media (max-width: 900px) { .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- come si inizia: linea del tempo + foto ---------- */
.start-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.start-layout .photo { aspect-ratio: 4 / 5; position: sticky; top: 96px; }
.timeline { position: relative; display: flex; flex-direction: column; padding-left: 52px; counter-reset: step; }
.timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 16px;
  bottom: 16px;
  width: 1px;
  background: linear-gradient(180deg, var(--accent), rgba(201, 139, 94, 0.15));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.4s var(--ease-out);
}
.timeline.in::before { transform: scaleY(1); }
.step {
  position: relative;
  padding-block: 22px;
  counter-increment: step;
}
.step::before {
  content: counter(step);
  position: absolute;
  left: -52px;
  top: 20px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid rgba(201, 139, 94, 0.6);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.3s ease, color 0.3s ease, transform 0.4s var(--ease-out);
}
.step:hover::before { background: var(--accent); color: var(--on-accent); transform: scale(1.08); }
.step h3 { font-size: 20px; margin-bottom: 6px; }
.step p { color: var(--text-2); font-size: 15px; max-width: 46ch; }
@media (max-width: 800px) {
  .start-layout { grid-template-columns: 1fr; }
  .start-layout .photo { position: static; aspect-ratio: 16 / 9; order: -1; }
}

/* ---------- faq ---------- */
.faq-layout { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 1100px) {
  .faq-layout { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 96px); align-items: start; }
  .faq-layout .section-head { margin-bottom: 0; position: sticky; top: 96px; }
}
.faq { display: flex; flex-direction: column; max-width: 820px; }
.faq details { border-top: 1px solid var(--hair); }
.faq details:last-child { border-bottom: 1px solid var(--hair); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
  font-size: 17px;
  font-weight: 500;
  transition: color 0.2s ease;
}
.faq summary:hover { color: var(--accent-hover); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 300;
  color: var(--accent);
  transition: transform 0.3s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding-bottom: 22px; color: var(--text-2); max-width: var(--measure); }
.faq details[open] .a { animation: swapIn 0.4s var(--ease-out); }

/* ---------- chiusura fotografica ---------- */
.cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(96px, 14vw, 180px);
}
.cta img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  z-index: -2;
  animation: kenburns 30s ease-in-out infinite alternate-reverse;
}
.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, var(--bg), rgba(10, 10, 10, 0.3) 25%, rgba(10, 10, 10, 0.45) 75%, var(--bg)),
    linear-gradient(90deg, rgba(10, 10, 10, 0.8), rgba(10, 10, 10, 0.2));
}
.cta .wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.cta h2 { font-size: clamp(30px, 4.6vw, 52px); max-width: 18ch; line-height: 1.05; }
.cta p { color: rgba(244, 242, 238, 0.7); max-width: 48ch; font-size: 17px; }

/* ---------- footer: brand, contatti, azienda, legale ---------- */
.site-footer { border-top: 1px solid var(--hair); padding-block: 56px 32px; font-size: 14px; color: var(--text-2); }
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 32px clamp(24px, 4vw, 64px);
  padding-bottom: 36px;
  border-bottom: 1px solid var(--hair);
}
.foot-brand { display: flex; flex-direction: column; gap: 14px; }
.foot-brand p { max-width: 32ch; }
.foot-brand p a { color: var(--text); }
.foot-brand p a:hover { color: var(--accent-hover); }
.foot-col { display: flex; flex-direction: column; gap: 10px; }
.foot-col .eyebrow { margin-bottom: 4px; }
.foot-col a { color: var(--text-2); }
.foot-col a:hover { color: var(--text); }
.foot-col span:not(.eyebrow) { color: var(--text-2); }
.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 22px;
  font-size: 13px;
  color: var(--text-label);
}
.foot-top { color: var(--text-2); }
.foot-top:hover { color: var(--text); }
@media (max-width: 800px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 440px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- avviso cookie (informativo: il sito non ne imposta) ---------- */
.cookie-note {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  width: min(760px, calc(100% - 32px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px 14px 20px;
  border-radius: 20px;
  background: rgba(28, 26, 24, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.9);
  animation: rise 0.6s var(--ease-out) both;
  animation-delay: 0.8s;
}
.cookie-note p { flex: 1; font-size: 13.5px; color: rgba(244, 242, 238, 0.75); }
.cookie-note .btn { flex-shrink: 0; }
@media (max-width: 560px) { .cookie-note { flex-direction: column; align-items: stretch; text-align: center; } }

/* ---------- pagine documento (privacy, supporto) ---------- */
.doc { position: relative; overflow: hidden; padding-block: clamp(48px, 7vw, 88px); }
.doc-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 44px; max-width: 760px; }
.doc-head > * { animation: rise 0.9s var(--ease-out) both; }
.doc-head > :nth-child(2) { animation-delay: 0.1s; }
.doc-head > :nth-child(3) { animation-delay: 0.2s; }
.doc-head > :nth-child(4) { animation-delay: 0.3s; }
.doc-head h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.06; }
.doc-body { max-width: 760px; display: flex; flex-direction: column; gap: 36px; }
.doc-body h2 { font-size: 22px; margin-bottom: 12px; }
.doc-body h3 { font-size: 17px; margin: 18px 0 6px; }
.doc-body p, .doc-body li { color: rgba(244, 242, 238, 0.72); font-size: 15.5px; max-width: var(--measure); }
.doc-body p + p { margin-top: 10px; }
.doc-body ul { list-style: disc; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.doc-body table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin-top: 12px; }
.doc-body th, .doc-body td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--hair); vertical-align: top; color: rgba(244, 242, 238, 0.72); }
.doc-body th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-label); font-weight: 500; }
.doc-body .table-wrap { overflow-x: auto; }
.callout {
  padding: 18px 20px;
  border-radius: var(--r-card-sm);
  background: rgba(201, 139, 94, 0.07);
  border: 1px solid rgba(201, 139, 94, 0.25);
  color: rgba(244, 242, 238, 0.8);
  font-size: 15px;
}
.qa { display: flex; flex-direction: column; border-top: 1px solid var(--hair); }
.qa > div {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: 8px 32px;
  padding-block: 22px;
  border-bottom: 1px solid var(--hair);
}
.qa h3 { font-size: 17px; margin: 0; }
.qa p { font-size: 14.5px; }
@media (max-width: 640px) { .qa > div { grid-template-columns: 1fr; } }

/* ---------- momenti: una sola riga di frammenti di interfaccia, didascalia sotto ----------
   Sotto i 1400px la riga scorre in orizzontale (snap); da 1400px in su è una griglia a 4 colonne
   con le card allineate in basso e le didascalie sulla stessa linea (subgrid). */
.carousel { --card-w: min(84vw, 420px); }
.moments {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 24px 0 12px;
  margin-inline: calc(-1 * var(--gutter));
  -webkit-overflow-scrolling: touch;
}
.moments::-webkit-scrollbar { display: none; }
/* spaziatori reali ai due capi: così la prima e l'ultima card possono stare al centro in ogni browser */
.moments::before, .moments::after {
  content: "";
  flex: 0 0 calc(50% - var(--card-w) / 2 - 24px);
  min-width: 0;
}
.moment {
  flex: 0 0 var(--card-w);
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  scroll-snap-align: center;
}
.moment-visual { position: relative; display: flex; justify-content: center; align-items: stretch; order: -1; height: var(--card-h, auto); }
.moment-visual::before {
  /* alone rame dietro il frammento, come nell'app */
  content: "";
  position: absolute;
  left: 50%;
  bottom: -40px;
  width: 320px;
  height: 320px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: radial-gradient(closest-side, rgba(201, 139, 94, 0.11), rgba(201, 139, 94, 0));
  pointer-events: none;
}
.moment-copy { display: flex; flex-direction: column; gap: 10px; }
.moment-copy h3 { font-size: 22px; line-height: 1.15; }
.moment-copy p { color: var(--text-2); font-size: 14.5px; }
.frag { position: relative; width: 100%; height: 100%; font-size: 14px; line-height: 1.3; }
/* tutte le card di una sezione hanno la stessa altezza: le più corte si stendono, la Home si centra */
.frag > .s-card, .frag > .sheet { height: 100%; overflow: hidden; }
.frag-home .s-card { justify-content: center; }
#cliente .carousel { --card-h: 372px; }
#trainer .carousel { --card-h: 492px; }
.tnote { display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 1px solid var(--hair); font-size: 13px; line-height: 1.4; color: rgba(244, 242, 238, 0.75); }

@media (min-width: 1400px) {
  .moments {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px 24px;
    overflow: visible;
    padding: 24px 0 0;
    margin-inline: 0;
    scroll-snap-type: none;
  }
  .moments::before, .moments::after { display: none; }
  .moment { display: grid; grid-template-rows: subgrid; grid-row: span 2; }
  .moment-visual { grid-row: 1; order: 0; }
  .moment-copy { grid-row: 2; }
}
.frag .s-card { box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9); }
.sheet {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 14px 22px 24px;
  border-radius: 28px;
  background: #141312;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9);
}
.sheet .handle { width: 36px; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); align-self: center; }
.sheet .meta { font-size: 14px; color: var(--text-2); margin-top: -8px; }
.sheet-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head .st-ok { position: absolute; right: 0; top: 0; opacity: 0; }

@keyframes tap {
  0% { transform: scale(1); }
  40% { transform: scale(0.95); filter: brightness(0.85); }
  100% { transform: scale(1); }
}
@keyframes fadeOut { to { opacity: 0; } }
@keyframes hold { from { opacity: 1; } to { opacity: 1; } }

/* 1. home: il pulsante "Inizia" riceve un tocco */
.moment.in .frag-home .s-btn { animation: tap 0.5s 1.1s both; }

/* 2. lezione: tocco su "Confermo" e la pillola passa a Confermata */
.moment.in .frag-lesson .s-btn { animation: tap 0.5s 1.4s both; }
.moment.in .frag-lesson .st-pending { animation: fadeOut 0.3s 1.8s both; }
.moment.in .frag-lesson .st-ok { animation: swapIn 0.4s 1.85s both; }

/* 3. progressi: selettore a pillola, tre numeri, barre che crescono */
.pillsel {
  display: flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--card-elevated);
  border: 1px solid rgba(255, 255, 255, 0.06);
  align-self: flex-start;
}
.pillsel span { padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 500; color: rgba(244, 242, 238, 0.6); }
.pillsel span.on {
  color: #111;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(236, 232, 226, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 8px 18px -8px rgba(0, 0, 0, 0.6);
}
.nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.nums div { display: flex; flex-direction: column; gap: 4px; }
.nums b { font-size: 26px; font-weight: 300; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.nums span { font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-label); }
.bars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; height: 120px; align-items: end; padding-top: 22px; }
.bars i {
  position: relative;
  display: block;
  height: calc(var(--h) * 100%);
  border-radius: 8px 8px 4px 4px;
  background: rgba(255, 255, 255, 0.1);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.9s var(--ease-out);
  transition-delay: calc(var(--i) * 0.09s + 0.3s);
}
.bars i.on { background: var(--accent); }
.bars i b {
  position: absolute;
  left: 50%;
  top: -22px;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
  opacity: 0;
  font-variant-numeric: tabular-nums;
}
.moment.in .bars i { transform: scaleY(1); }
.moment.in .bars i b { animation: swapIn 0.4s 1.2s both; }
.weeks { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; text-align: center; font-size: 11px; color: var(--text-label); font-variant-numeric: tabular-nums; }
.weeks span.on { color: var(--accent); }

/* 4. nota: un chip si seleziona, il testo si scrive */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 500;
  color: rgba(244, 242, 238, 0.7);
}
@keyframes chipSel {
  to { background: rgba(201, 139, 94, 0.16); border-color: rgba(201, 139, 94, 0.55); color: var(--accent); }
}
.moment.in .chips span.sel { animation: chipSel 0.35s 1.1s both; }
.ta {
  overflow: hidden;
  min-height: 84px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--card-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  line-height: 1.5;
}
.ta .typed {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
  border-right: 1px solid var(--accent);
}
@keyframes typing { from { max-width: 0; } to { max-width: 100%; } }
.moment.in .ta .typed { animation: typing 1.6s steps(42) 1.7s both, caret 1s steps(2, start) infinite; }
html:not(.js) .ta .typed { max-width: none; border-right: 0; }
html:not(.js) .sheet-head .st-ok { display: none; }


/* ---------- trainer: apertura con telefono sulla foto, poi cinque momenti ---------- */
.trainer-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  margin-bottom: clamp(64px, 9vw, 128px);
}
.trainer-intro .section-head { margin-bottom: 0; }
.trainer-intro .phone-col { display: flex; justify-content: center; }
@media (max-width: 900px) {
  .trainer-intro { grid-template-columns: 1fr; }
  .trainer-intro .phone-col { order: -1; }
  .trainer-intro .phone-frame { --ps: 0.6; }
}

/* testo che si sostituisce (a → b) */
.swap2 { position: relative; display: block; }
.swap2 .b { position: absolute; left: 0; top: 0; opacity: 0; white-space: nowrap; }

/* 1. invito: il codice compare, poi la riga passa da "In attesa" ad "Attiva" */
.code {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  border-radius: var(--r-field);
  border: 1px dashed rgba(201, 139, 94, 0.5);
  background: rgba(201, 139, 94, 0.06);
  text-align: center;
}
.code b { font-size: 30px; font-weight: 300; letter-spacing: 0.12em; color: var(--accent); font-variant-numeric: tabular-nums; }
.code span { font-size: 12px; color: var(--text-label); }
.inv-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--hair);
  white-space: nowrap;
}
.inv-row .who { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.inv-row .who .n { font-size: 15px; font-weight: 500; }
.inv-row .who .s { font-size: 12.5px; color: var(--text-2); }
.inv-av { border-style: dashed; }
.inv-ok { position: absolute; right: 0; opacity: 0; }
@keyframes avOn { to { border-style: solid; border-color: rgba(201, 139, 94, 0.45); color: var(--accent); } }
.moment.in .frag-invite .code b { animation: swapIn 0.5s 0.5s both; }
.moment.in .frag-invite .s-btn { animation: tap 0.5s 1.2s both; }
.moment.in .frag-invite .swap2 .a { animation: fadeOut 0.3s 2.2s both; }
.moment.in .frag-invite .swap2 .b { animation: swapIn 0.4s 2.3s both; }
.moment.in .frag-invite .inv-wait { animation: fadeOut 0.3s 2.2s both; }
.moment.in .frag-invite .inv-ok { animation: swapIn 0.4s 2.3s both; }
.moment.in .frag-invite .inv-av { animation: avOn 0.4s 2.3s both; }

/* 2. editor scheda: le righe entrano una alla volta, poi Assegna e il toast */
.ed { position: relative; gap: 10px; overflow: hidden; }
.ed-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.ed-name { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.ed .meta { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.ed-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--card-elevated);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.ed-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ed-row .n { font-size: 14.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-row .s { font-size: 12px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ed-row .drag { display: grid; grid-template-columns: repeat(2, 3px); gap: 3px; opacity: 0.35; flex-shrink: 0; }
.ed-row .drag i { width: 3px; height: 3px; border-radius: 999px; background: currentColor; }
.ed-group { gap: 8px; padding: 12px; }
.ed-group .ed-row { background: rgba(255, 255, 255, 0.03); }
.ed-add {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: 14px;
  border: 1px dashed rgba(244, 242, 238, 0.22);
  color: rgba(244, 242, 238, 0.6);
  font-size: 13.5px;
  font-weight: 500;
}
.ed .s-btn { margin-top: 6px; }
.toast {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(28, 26, 24, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--positive);
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-12px);
}
@keyframes toastIn {
  0% { opacity: 0; transform: translateY(-12px); }
  15% { opacity: 1; transform: none; }
  85% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-12px); }
}
html.js .ed > .ed-row, html.js .ed > .ed-group, html.js .ed > .ed-add {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.5s var(--ease-out);
  transition-delay: calc(var(--i) * 0.18s + 0.2s);
}
.moment.in .ed > .ed-row, .moment.in .ed > .ed-group, .moment.in .ed > .ed-add { opacity: 1; transform: none; }
.moment.in .frag-editor .s-btn { animation: tap 0.5s 1.6s both; }
.moment.in .frag-editor .toast { animation: toastIn 3.2s 1.9s both; }

/* 3. agenda: striscia giorni, card lezione con barra colorata, una conferma arriva */
.ag { gap: 16px; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.days span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  border-radius: 12px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--text-label);
}
.days span b { font-size: 15px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.days span.on { background: var(--card-elevated); border: 1px solid rgba(201, 139, 94, 0.4); }
.days span.on b { color: var(--accent); }
.lessons { display: flex; flex-direction: column; gap: 8px; }
.lesson {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 66px;
  padding: 0 14px 0 12px;
  border-radius: var(--r-card-sm);
  background: var(--card-elevated);
  border: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}
.lesson i { width: 3px; height: 30px; border-radius: 999px; flex-shrink: 0; }
.lesson.ok i { background: var(--positive); }
.lesson.next i { background: var(--accent); }
.lesson.wait i { background: var(--pending); }
.lesson.no i { background: var(--negative); }
.lesson .who { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.lesson .who .n { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.lesson .who .s { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.lesson .ls-ok { position: absolute; right: 14px; opacity: 0; }
@keyframes barOk { to { background: var(--positive); } }
html.js .lesson {
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.45s ease, transform 0.5s var(--ease-out);
  transition-delay: calc(var(--i) * 0.14s + 0.2s);
}
.moment.in .lesson { opacity: 1; transform: none; }
.moment.in .lesson.wait .ls-wait { animation: fadeOut 0.3s 2s both; }
.moment.in .lesson.wait .ls-ok { animation: swapIn 0.4s 2.1s both; }
.moment.in .lesson.wait i { animation: barOk 0.4s 2.1s both; }

/* 4. dettaglio cliente: la seduta si apre e mostra le serie, il record, la nota */
.rp { gap: 14px; }
.rp-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--hair); }
.rp .who { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.rp .who .n { font-size: 15px; font-weight: 500; }
.rp .who .s { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.sess { border-radius: var(--r-card-sm); background: var(--card-elevated); border: 1px solid rgba(255, 255, 255, 0.06); overflow: hidden; }
.sess-top, .sess.mini { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.sess-chev { transition: transform 0.4s var(--ease-out); }
.sess-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 14px;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.7s var(--ease-out), opacity 0.5s ease, padding 0.4s ease;
}
.sess-body .ex { display: flex; flex-direction: column; gap: 3px; }
.sess-body .ex .n { font-size: 13.5px; font-weight: 500; }
.sets-line { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.sets-line .rec { font-weight: 500; color: var(--text-2); transition: color 0.4s ease; }
.note-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12.5px;
  color: rgba(244, 242, 238, 0.75);
  opacity: 0;
}
.moment.in .sess-body { max-height: 240px; opacity: 1; padding: 4px 14px 14px; transition-delay: 0.6s; }
.moment.in .sess-chev { transform: rotate(180deg); transition-delay: 0.6s; }
.moment.in .sets-line .rec { color: var(--gold); transition-delay: 1.5s; }
.moment.in .note-line { animation: swapIn 0.45s 1.9s both; }

/* 5. statistiche: anelli di aderenza che si riempiono */
.st { gap: 16px; }
.adh { display: flex; flex-direction: column; }
.adh-row { display: flex; align-items: center; gap: 12px; height: 52px; border-top: 1px solid var(--hair); }
.adh-row svg { width: 36px; height: 36px; transform: rotate(-90deg); flex-shrink: 0; }
.adh-row .bg { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 3; }
.adh-row .fg {
  fill: none;
  stroke: var(--c);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 88;
  stroke-dashoffset: 88;
  transition: stroke-dashoffset 1.2s var(--ease-out);
  transition-delay: calc(var(--i) * 0.15s + 0.3s);
}
.moment.in .adh-row .fg { stroke-dashoffset: calc(88 - 88 * var(--p)); }
.adh-row .n { flex: 1; font-size: 14.5px; font-weight: 500; }
.adh-row b { font-size: 15px; font-weight: 300; color: var(--c); font-variant-numeric: tabular-nums; }

html:not(.js) .inv-ok, html:not(.js) .ls-ok, html:not(.js) .toast { display: none; }
html:not(.js) .sess-body, html:not(.js) .note-line { max-height: none; opacity: 1; padding-bottom: 14px; }

/* ---------- schermi larghi (iMac, MacBook 15/16, monitor esterni) ---------- */
@media (min-width: 1440px) {
  :root { --wrap: min(100%, 1400px); --gutter: clamp(40px, 4vw, 72px); }
  .hero-visual .phone-frame { --ps: 0.9; }
  .scrolly .phone3d { --ps: 0.8; }
  .phone-on-photo { --ps: 0.8; }
  .cap h2 { font-size: 44px; }
  .cap p { font-size: 17.5px; }
}
@media (min-width: 1800px) {
  :root { --wrap: min(100%, 1480px); }
  body { font-size: 17px; }
  .hero h1 { font-size: 78px; }
  .lede { font-size: 19px; }
  .section-title { font-size: 52px; }
  .band h2 { font-size: 60px; }
  .cta h2 { font-size: 58px; }
  .ledger-row h3 { font-size: 34px; }
  .ledger-row p, .demo { font-size: 17px; }
  .feature h3 { font-size: 21px; }
  .hero-visual .phone-frame { --ps: 0.95; }
  .hero-visual { min-height: 720px; }
  .hero .halo { width: 1400px; height: 900px; margin-left: -700px; top: -420px; }
  .scrolly .phone3d { --ps: 0.88; }
  .phone-on-photo { --ps: 0.86; }
  .cap h2 { font-size: 48px; }
  .captions { min-height: 280px; }
  .medal svg { width: 84px; height: 84px; }
}

/* ---------- titolo di una fila di card ---------- */
.row-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.row-head h3 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; max-width: 30ch; }

/* ---------- carosello: snap orizzontale, frecce, puntini, card a fuoco ----------
   Si attiva solo quando il contenuto non sta nella riga (classe .is-scrollable messa dal JS). */
.carousel { position: relative; }
.carousel-nav { display: none; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; }
.carousel.is-scrollable .carousel-nav { display: flex; }
.carousel-dots { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.carousel-dots button {
  display: block;
  width: 22px;
  height: 14px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.carousel-dots button::before {
  content: "";
  display: block;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 0.3s ease, transform 0.3s var(--ease-out);
}
.carousel-dots li.on button::before { background: var(--accent); }
.carousel-dots li.on button { width: 34px; }
.carousel-arrows { display: flex; gap: 8px; }
.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.25s var(--ease-out), opacity 0.2s ease;
}
.carousel-btn:hover { background: rgba(201, 139, 94, 0.16); border-color: rgba(201, 139, 94, 0.5); color: var(--accent); }
.carousel-btn.prev:hover { transform: translateX(-2px); }
.carousel-btn.next:hover { transform: translateX(2px); }
.carousel-btn:active { transform: scale(0.94); }
.carousel-btn:disabled { opacity: 0.3; cursor: default; transform: none; background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.1); color: var(--text); }
/* la card a fuoco è piena; quelle ai lati un filo più scure e piccole (--focus 0–1 dal JS) */
.carousel.is-scrollable .moment-visual {
  opacity: calc(0.55 + 0.45 * var(--focus, 1));
}
.carousel.is-scrollable .moment-copy { opacity: calc(0.5 + 0.5 * var(--focus, 1)); }
.carousel.is-scrollable .medal {
  opacity: calc(0.45 + 0.55 * var(--focus, 1));
  transform: scale(calc(0.94 + 0.06 * var(--focus, 1)));
}
/* sfumatura sul bordo verso cui si può ancora scorrere */
.carousel-viewport { position: relative; }
.carousel-viewport::before, .carousel-viewport::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
/* momenti: tutto ciò che sta fuori dalla card centrale sfuma nel nero della pagina */
.carousel.is-scrollable .carousel-viewport:has(.moments)::before {
  left: calc(-1 * var(--gutter));
  width: calc(50% + var(--gutter) - var(--card-w) / 2 + 12px);
  background: linear-gradient(90deg, var(--bg) 0%, var(--bg) calc(100% - 60px), rgba(10, 10, 10, 0) 100%);
  opacity: 1;
}
.carousel.is-scrollable .carousel-viewport:has(.moments)::after {
  right: calc(-1 * var(--gutter));
  width: calc(50% + var(--gutter) - var(--card-w) / 2 + 12px);
  background: linear-gradient(270deg, var(--bg) 0%, var(--bg) calc(100% - 60px), rgba(10, 10, 10, 0) 100%);
  opacity: 1;
}
/* trofei: sfuma solo il bordo verso cui si può ancora scorrere */
.carousel-viewport:has(.shelf)::before { left: calc(-1 * var(--gutter)); width: 56px; background: linear-gradient(90deg, var(--bg), rgba(10, 10, 10, 0)); }
.carousel-viewport:has(.shelf)::after { right: calc(-1 * var(--gutter)); width: 72px; background: linear-gradient(270deg, var(--bg), rgba(10, 10, 10, 0)); }
.carousel.is-scrollable:not([data-edge="start"]) .carousel-viewport:has(.shelf)::before { opacity: 1; }
.carousel.is-scrollable:not([data-edge="end"]) .carousel-viewport:has(.shelf)::after { opacity: 1; }
/* frecce e puntini centrati sotto la card */
.carousel-viewport:has(.moments) + .carousel-nav { justify-content: center; gap: 18px; padding-top: 14px; }
.carousel-viewport:has(.moments) + .carousel-nav .carousel-arrows { display: contents; }
.carousel-viewport:has(.moments) + .carousel-nav .carousel-btn.prev { order: -1; }
.carousel-viewport:has(.moments) + .carousel-nav .carousel-btn.next { order: 1; }
@media (prefers-reduced-motion: reduce) {
  .carousel.is-scrollable .moment-visual, .carousel.is-scrollable .moment-copy, .carousel.is-scrollable .medal { opacity: 1; transform: none; }
}
/* trofei: sotto i 900px la mensola diventa un carosello */
@media (max-width: 900px) {
  .shelf {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, 42%);
    grid-template-columns: none;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
    padding: 8px var(--gutter) 12px;
    margin-inline: calc(-1 * var(--gutter));
    border-top: 0;
  }
  .shelf::-webkit-scrollbar { display: none; }
  .medal { scroll-snap-align: start; }
}

/* ==========================================================================
   Schermate dell'app ricostruite in CSS (valori dei mockup, 390×844)
   ========================================================================== */
.phone-frame, .phone3d {
  width: calc(390px * var(--ps));
  height: calc(844px * var(--ps));
  flex-shrink: 0;
}
.phone {
  position: relative;
  width: 390px;
  height: 844px;
  flex-shrink: 0;
  transform: scale(var(--ps));
  transform-origin: top left;
  border-radius: 52px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 10px #0d0d0d,
    0 0 0 11px rgba(255, 255, 255, 0.08),
    0 60px 100px -40px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  font-size: 14px;
  line-height: 1.3;
}
.phone::before {
  /* dynamic island */
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  width: 120px;
  height: 34px;
  margin-left: -60px;
  border-radius: 999px;
  background: #000;
  z-index: 7;
}
.phone .halo { top: -200px; width: 480px; height: 480px; margin-left: -240px; }
.screen {
  position: absolute;
  inset: 0 0 110px 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 68px 24px 0 24px;
}
.screen.tight { gap: 16px; bottom: 130px; }

.s-head { display: flex; align-items: center; justify-content: space-between; }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #171614;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(244, 242, 238, 0.85);
  flex-shrink: 0;
}
.avatar.lg { width: 44px; height: 44px; }
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(244, 242, 238, 0.85);
  position: relative;
}
.icon-btn .dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}
.icon-btn .dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  animation: ping 2.4s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(2.2); opacity: 0; } }
.s-greet { display: flex; flex-direction: column; gap: 8px; }
.s-greet .sub { font-size: 13px; color: rgba(244, 242, 238, 0.45); letter-spacing: 0.02em; }
.s-greet h1, .s-title {
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.s-greet h1 span, .copper { color: var(--accent); }

.s-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px;
  border-radius: var(--r-card);
  background: var(--card);
  border: 1px solid var(--card-border);
}
.s-card.sm { padding: 20px 18px 18px; gap: 24px; justify-content: space-between; }
.s-card .lbl { font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-label); }
.s-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.s-row .name { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; }
.s-row .meta { font-size: 14px; color: var(--text-2); }
.s-row .stack { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.big {
  font-size: 36px;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.big small { font-size: 14px; font-weight: 400; color: rgba(244, 242, 238, 0.45); }
.big.plain { color: var(--text); font-size: 30px; letter-spacing: -0.04em; }
.s-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 500;
}
.s-btn.tall { height: 54px; font-size: 15px; box-shadow: 0 16px 32px -14px rgba(201, 139, 94, 0.7); }
.s-link { text-align: center; font-size: 13px; font-weight: 500; color: var(--text-2); margin-top: -8px; }
.s-pillbtn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 500;
}
.s-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.s-baseline { display: flex; align-items: baseline; gap: 6px; }
.s-baseline .u { font-size: 13px; color: rgba(244, 242, 238, 0.45); }
.s-card.sm .stack { display: flex; flex-direction: column; gap: 14px; }

/* navbar liquid glass */
.s-nav { position: absolute; left: 20px; right: 20px; bottom: 28px; height: 64px; }
.s-nav .glass {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04) 45%, rgba(255, 255, 255, 0.07));
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), inset 0 -1px 1px rgba(255, 255, 255, 0.1), 0 24px 48px -16px rgba(0, 0, 0, 0.9);
}
.s-nav .shine {
  position: absolute;
  top: 2px;
  left: 16%;
  right: 16%;
  height: 42%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
}
.s-nav .items {
  position: absolute;
  inset: 6px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
}
.s-nav .items > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 999px;
  color: rgba(244, 242, 238, 0.7);
  font-size: 10px;
  font-weight: 400;
}
.s-nav .items > div.on {
  color: #111;
  font-weight: 500;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(236, 232, 226, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 8px 18px -8px rgba(0, 0, 0, 0.6);
}

/* schermata allenamento */
.seg { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.seg span { height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }
.seg .done { background: var(--positive); }
.seg .now { background: var(--accent); animation: breathe 2.2s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.ex-title { display: flex; flex-direction: column; gap: 8px; }
.ex-title h2 { font-size: 28px; line-height: 1.1; }
.ex-title .meta { font-size: 14px; color: var(--text-2); }
.coach {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(201, 139, 94, 0.07);
  border: 1px solid rgba(201, 139, 94, 0.25);
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(244, 242, 238, 0.75);
}
.coach::before { content: ""; width: 3px; border-radius: 999px; background: var(--accent); flex-shrink: 0; }
.sets { display: flex; flex-direction: column; gap: 8px; }
.set {
  display: grid;
  grid-template-columns: 44px 1fr 1fr 44px;
  gap: 10px;
  align-items: center;
  height: 50px;
  padding: 0 12px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-variant-numeric: tabular-nums;
}
.set.hdr { height: auto; background: none; border: 0; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(244, 242, 238, 0.35); }
.set .n { font-size: 14px; font-weight: 500; }
.set .v { font-size: 16px; text-align: center; }
.set.done { opacity: 0.6; }
.set.active { height: 60px; border-color: rgba(201, 139, 94, 0.5); }
.set.active .n { color: var(--accent); }
.set.pending .n { color: var(--text-2); }
.set.pending .v { color: var(--text-hint); }
.check {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--positive);
}
.check.empty { background: none; border: 1.5px solid rgba(244, 242, 238, 0.3); }
.check.faint { background: none; border: 1.5px solid rgba(244, 242, 238, 0.15); }
.field {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 500;
}
.field.kg { background: rgba(201, 139, 94, 0.1); border: 1px solid rgba(201, 139, 94, 0.35); color: var(--accent); }
.field.kg .tag {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--on-accent);
  white-space: nowrap;
}
.field.reps { background: var(--card-elevated); border: 1px solid var(--accent); }
.field.reps::after { content: ""; width: 1px; height: 18px; background: var(--accent); margin-left: 2px; animation: caret 1.1s steps(2, start) infinite; }
@keyframes caret { to { opacity: 0; } }
.hint { font-size: 12px; color: var(--text-label); padding: 2px 12px 0; }
.note-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px dashed rgba(244, 242, 238, 0.22);
  color: rgba(244, 242, 238, 0.6);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}
.note-row .r { margin-left: auto; font-size: 12px; color: rgba(244, 242, 238, 0.35); font-weight: 400; }
.s-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px 24px 34px;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0), #0a0a0a 40%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.s-next { display: flex; align-items: center; justify-content: center; gap: 6px; height: 44px; color: var(--text-2); font-size: 14px; font-weight: 500; }
.s-center { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.s-center .t { font-size: 15px; font-weight: 500; }
.s-center .timer { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(244, 242, 238, 0.45); font-variant-numeric: tabular-nums; }
.s-center .timer::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--positive); }

/* schermata trainer: clienti */
.s-list { display: flex; flex-direction: column; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--card-border); padding: 0 18px; }
.s-list .row {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 64px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}
.s-list .row:last-child { border-bottom: 0; }
.s-list .row .who { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.s-list .row .who .n { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.s-list .row .who .s { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; }
.status-dot { width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; }
.status-dot.ok { background: var(--positive); }
.status-dot.wait { background: var(--pending); }
.status-dot.off { background: rgba(244, 242, 238, 0.25); }
.pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.pill.ok { color: var(--positive); background: rgba(143, 185, 150, 0.14); border: 1px solid rgba(143, 185, 150, 0.3); }
.pill.wait { color: var(--pending); background: rgba(217, 168, 74, 0.14); border: 1px solid rgba(217, 168, 74, 0.3); }
.pill.next { color: var(--accent); background: rgba(201, 139, 94, 0.14); border: 1px solid rgba(201, 139, 94, 0.3); }
.pill.no { color: var(--negative); background: rgba(224, 128, 106, 0.14); border: 1px solid rgba(224, 128, 106, 0.3); }
.s-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 16px;
  border-radius: var(--r-field);
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text-hint);
  font-size: 14px;
}
.chev { margin-left: auto; color: rgba(244, 242, 238, 0.35); }
