/* Trainova — stile "Light Studio" del sito, allineato alle app.
   Usato da index.html e beta.html. Le pagine più vecchie usano theme-light.css. */

@font-face { font-family: 'Syne'; font-weight: 700; font-display: swap; src: url('/assets/fonts/syne-700.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 400; font-display: swap; src: url('/assets/fonts/dm-sans-400.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 500; font-display: swap; src: url('/assets/fonts/dm-sans-500.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 700; font-display: swap; src: url('/assets/fonts/dm-sans-700.woff2') format('woff2'); }
/* Le etichette scritte con «DM Mono» nelle pagine usano DM Sans, come il resto del sito */
@font-face { font-family: 'DM Mono'; font-weight: 400 500; font-display: swap; src: url('/assets/fonts/dm-sans-500.woff2') format('woff2'); }
@font-face { font-family: 'DM Mono'; font-weight: 600 800; font-display: swap; src: url('/assets/fonts/dm-sans-700.woff2') format('woff2'); }

:root {
  --bg: #F5F5F2;
  --surface: #FFFFFF;
  --surface2: #EDEDE8;
  --border: #E4E4DE;
  --ink: #0A0A0A;
  --text2: #3A3A3A;
  --muted: #6B6B6B;
  --acid: #C8FF00;   /* solo riempimenti e accenti, mai testo su chiaro */
  --on-dark: #CFCFC9;
  --danger: #B42318;
  --radius: 28px;
  --wrap: 1200px;
  --display: 'Syne', 'Arial Black', sans-serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); }
a:hover { color: var(--text2); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 0 0 88px; }
h1, h2, .display { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(40px, 5.6vw, 72px); line-height: 1.02; }
h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -0.01em; }
h3 { font-size: 20px; line-height: 1.25; margin: 0; }
p { margin: 0; }
.lead { font-size: 20px; color: var(--text2); max-width: 540px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.pill { display: inline-block; background: var(--acid); color: var(--ink); border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.note { font-size: 14px; color: var(--muted); }

/* Pulsanti */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px; border-radius: 999px; font-family: var(--sans); font-size: 17px; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #262626; color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn svg { flex-shrink: 0; }

/* Navigazione */
.site-nav { position: sticky; top: 0; z-index: 50; background: rgba(245, 245, 242, 0.88); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; }
.site-nav.scrolled { border-bottom-color: var(--border); }
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 26px; text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; gap: 3px; letter-spacing: -0.02em; }
.brand::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--acid); border: 2px solid var(--ink); margin-top: 8px; }
.nav-menu { display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 500; }
.nav-menu a { text-decoration: none; }
.nav-menu .soon { color: var(--muted); }
.nav-menu .btn { min-height: 44px; padding: 0 22px; font-size: 15px; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--surface); align-items: center; justify-content: center; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu { display: none; position: absolute; left: 12px; right: 12px; top: 68px; flex-direction: column; align-items: stretch; gap: 4px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 24px; padding: 12px; box-shadow: 0 20px 40px rgba(10,10,10,0.08); }
  .nav-menu.open { display: flex; }
  .nav-menu a:not(.btn) { padding: 12px 14px; border-radius: 14px; }
  .nav-menu a:not(.btn):hover { background: var(--bg); }
  .nav-menu .btn { margin-top: 6px; }
}

/* Hero */
.hero { padding: 48px 0 80px; }
.hero .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.hero-copy { flex: 1 1 460px; min-width: 0; }
.hero-copy h1 { margin-top: 24px; }
.hero-copy .lead { margin-top: 24px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-copy .note { margin-top: 18px; }
.hero-visual { flex: 1 1 440px; min-width: 0; display: flex; justify-content: center; align-items: flex-end; gap: 20px; position: relative; }
.phone { flex: 0 1 46%; min-width: 0; max-width: 250px; background: var(--ink); border-radius: 40px; padding: 9px; }
.phone img { width: 100%; border-radius: 32px; }
.phone.raised { margin-bottom: 48px; }
.toast { position: absolute; left: 0; bottom: 24px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 18px; padding: 12px 16px; display: flex; align-items: center; gap: 10px; box-shadow: 0 10px 30px rgba(10,10,10,0.08); font-size: 14px; line-height: 1.3; }
/* Due strade nel primo schermo: PT (beta) e tester Android */
.paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-top: 28px; max-width: 580px; }
.path { display: flex; flex-direction: column; gap: 4px; min-height: 44px; padding: 18px 20px; border-radius: 22px; text-decoration: none; transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.path:active { transform: scale(0.98); }
.path-k { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.path-t { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; line-height: 1.25; }
.path-t svg { flex-shrink: 0; }
.path-n { font-size: 14px; }
.path-pt { background: var(--ink); color: #fff; }
.path-pt:hover { background: #262626; color: #fff; }
.path-pt .path-k { color: var(--acid); }
.path-pt .path-n { color: var(--on-dark); }
.path-tester { background: var(--surface); color: var(--ink); border: 1.5px solid var(--border); }
.path-tester:hover { border-color: var(--ink); color: var(--ink); }
.path-tester .path-k, .path-tester .path-n { color: var(--muted); }

/* Schermate dell'app che si alternano nel telefono del primo schermo */
.slides { position: relative; }
.slides img + img { position: absolute; top: 9px; left: 9px; width: calc(100% - 18px); opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .slides img { animation: tn-slide 16s infinite; }
  .slides img:nth-child(1) { animation-delay: 0s; }
  .slides img:nth-child(2) { animation-delay: 4s; }
  .slides img:nth-child(3) { animation-delay: 8s; }
  .slides img:nth-child(4) { animation-delay: 12s; }
  .slides img:first-child { opacity: 1; }
}
@keyframes tn-slide { 0% { opacity: 0; } 4%, 25% { opacity: 1; } 29%, 100% { opacity: 0; } }

/* Sul telefono: titolo più corto e una sola schermata, che si vede subito */
@media (max-width: 640px) {
  .hero { padding: 24px 0 56px; }
  .hero .wrap { gap: 32px; }
  .hero-copy h1 { font-size: 31px; line-height: 1.08; margin-top: 16px; }
  .hero-copy .lead { font-size: 17px; margin-top: 14px; }
  .paths { margin-top: 22px; }
  .path { padding: 16px 18px; }
  .phone.second { display: none; }
  .phone.raised { margin-bottom: 0; max-width: 240px; flex-basis: 64%; }
  .toast { display: none; }
}

/* Pulsante fisso in basso sul telefono (compare dopo il primo schermo) */
.sticky-cta { display: none; }
@media (max-width: 640px) {
  .sticky-cta:not([hidden]) { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(245,245,242,0.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--border); }
  .sticky-cta .btn { width: 100%; min-height: 52px; }
  body.has-sticky .site-footer { padding-bottom: 96px; }
  body.tn-cookie-open .sticky-cta { display: none; }
}

.toast .dot { width: 34px; height: 34px; border-radius: 50%; background: var(--acid); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Card e griglie */
.grid { display: grid; gap: 16px; margin-top: 36px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: var(--surface); border: 1.5px solid var(--border); border-radius: 24px; padding: 28px; }
.card h3 { margin: 18px 0 8px; }
.card p { color: var(--text2); font-size: 16px; }
.step { border-radius: var(--radius); display: flex; flex-direction: column; gap: 18px; }
.step h3 { margin: 0; }
.step-head { display: flex; align-items: center; gap: 12px; }
.num { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--acid); font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.shot { background: var(--surface2); border-radius: 22px; padding: 18px 18px 0; height: 300px; overflow: hidden; display: flex; justify-content: center; }
.shot img { width: 200px; border-radius: 22px 22px 0 0; align-self: flex-start; }

.dark-panel { background: var(--ink); color: #fff; border-radius: 40px; padding: clamp(32px, 5vw, 64px); }
.dark-panel .eyebrow { color: var(--acid); }
.dark-panel h2 { margin-top: 12px; max-width: 720px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px 32px; margin-top: 44px; }
.features h3 { font-size: 18px; color: var(--acid); margin-bottom: 6px; }
.features p { font-size: 15px; color: var(--on-dark); }

/* Prezzi */
.price { position: relative; border-radius: var(--radius); padding: 32px; }
.price .amount { font-family: var(--display); font-weight: 700; font-size: 48px; }
.price ul { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.price li { display: flex; gap: 10px; }
.price li::before { content: ''; width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; border-radius: 50%; background: var(--acid) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A0A0A' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 11px no-repeat; }
.price.featured { background: var(--ink); color: #fff; border: 0; }
.price.featured li { color: #E6E6E1; }
.price .per { color: var(--muted); }
.price.featured .per { color: #B5B5AF; }
.badge { position: absolute; top: 24px; right: 24px; background: var(--acid); color: var(--ink); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700; }
.soon-tag { color: var(--muted); }

/* FAQ */
.faq { max-width: 900px; }
.faq details { background: var(--surface); border: 1.5px solid var(--border); border-radius: 18px; padding: 0 24px; margin-bottom: 10px; }
.faq summary { padding: 20px 0; font-weight: 700; font-size: 17px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 24px; line-height: 1; font-weight: 500; }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--text2); margin: -8px 0 20px; }

.cta-band { background: var(--acid); border-radius: 40px; padding: clamp(32px, 5vw, 64px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.cta-band h2 { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.02; }
.cta-band p { font-size: 18px; margin-top: 14px; }

.site-footer { padding: 8px 0 48px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--muted); }

/* Modulo beta */
.form-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: 32px; padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 700; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select { height: 52px; border: 1.5px solid var(--border); border-radius: 14px; padding: 0 16px; font-size: 16px; background: var(--bg); color: var(--ink); font-family: var(--sans); width: 100%; }
.field input:focus, .field select:focus { outline: none; border-color: var(--ink); background: #fff; }
.field-row { display: flex; flex-wrap: wrap; gap: 14px; }
.field-row .field { flex: 1 1 160px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text2); }
.check { min-height: 44px; padding: 4px 0; cursor: pointer; }
.check a { display: inline-block; padding: 10px 0; margin: -10px 0; }
.check input { width: 24px; height: 24px; margin: 0; flex-shrink: 0; accent-color: var(--ink); }
.form-error { color: var(--danger); font-size: 14px; font-weight: 500; min-height: 1em; }
.form-ok { background: var(--acid); border-radius: 20px; padding: 22px; }
.form-ok strong { font-size: 18px; }
.hp { position: absolute; left: -9999px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, .path { transition: none; } }
