/*
 * Sport Passport — sito di presentazione.
 *
 * Identità presa dall'app ("Pista"): carta calda, inchiostro, argilla da pista di atletica, sigillo oro per i dati
 * firmati. Titoli in Big Shoulders Display, testo in Instrument Sans (entrambi OFL, serviti da /fonts per la CSP).
 * Chiaro e scuro seguono il sistema; nessuno stile o script inline in tutto il sito.
 */

@font-face { font-family: "Big Shoulders Display"; font-weight: 800; font-display: swap; src: url("/fonts/BigShouldersDisplay-ExtraBold.ttf") format("truetype"); }
@font-face { font-family: "Big Shoulders Display"; font-weight: 900; font-display: swap; src: url("/fonts/BigShouldersDisplay-Black.ttf") format("truetype"); }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url("/fonts/InstrumentSans-Regular.ttf") format("truetype"); }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-display: swap; src: url("/fonts/InstrumentSans-Medium.ttf") format("truetype"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url("/fonts/InstrumentSans-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Instrument Sans"; font-weight: 700; font-display: swap; src: url("/fonts/InstrumentSans-Bold.ttf") format("truetype"); }

:root {
  color-scheme: light dark;

  --bg: #f6f1e7;
  --surface: #fffcf6;
  --surface-2: #efe8da;
  --ink: #111716;
  --muted: #5b625f;
  --line: #ddd5c4;
  --line-strong: #b9b09c;

  --clay: #ff5a2c;
  --clay-edge: #c93c14;
  --clay-ink: #c93c14;
  --clay-soft: rgba(255, 90, 44, 0.14);
  --on-clay: #0a0e0d;

  --gold: #e8b52a;
  --gold-ink: #8a6a0a;
  --seal-ink: #2b2000;

  --bezel: #0a0e0d;
  --track: rgba(255, 90, 44, 0.32);
  --shadow: 0 30px 60px rgba(17, 23, 22, 0.22);
  --shadow-soft: 0 10px 28px rgba(17, 23, 22, 0.1);

  --display: "Big Shoulders Display", "Arial Narrow", Impact, "Helvetica Neue", sans-serif;
  --text: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --maxw: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0e0d;
    --surface: #141a18;
    --surface-2: #18201e;
    --ink: #f6f1e7;
    --muted: #a6aca8;
    --line: #222c29;
    --line-strong: #3a4743;
    --clay-ink: #ff7f55;
    --clay-soft: rgba(255, 127, 85, 0.16);
    --track: rgba(255, 90, 44, 0.3);
    --shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
    --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--clay-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--clay); color: var(--on-clay); }
/* Titoli a interlinea stretta: niente sfondo (le righe si sovrapporrebbero), solo colore e sottolineatura */
.display::selection, .display *::selection, h1::selection, h1 *::selection, h2::selection, h2 *::selection { background: transparent; color: var(--clay-ink); text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .1em; }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; border-radius: 6px; }

.wrap { position: relative; max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

.display {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: 0.005em;
  margin: 0;
  text-wrap: balance;
}
/* Titoli con lettere accentate: l'accento maiuscolo non deve toccare la riga sopra */
.display.acc { line-height: 1.08; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 700; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 22px; height: 5px; border-radius: 3px; background: var(--clay); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--muted); max-width: 36rem; margin: 1.25rem 0 0; }

/* ── Lane motif ─────────────────────────────────────────────────────────── */
.lanes { position: absolute; pointer-events: none; color: var(--track); }
.lanes svg { display: block; width: 100%; height: auto; }

/* ── Buttons: the key press of the app ──────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 58px; padding: 0 1.7rem; border: 0; border-radius: 18px; cursor: pointer;
  font: 700 1rem/1 var(--text); text-decoration: none; white-space: nowrap;
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease), background 0.2s;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-primary { background: var(--clay); color: var(--on-clay); box-shadow: 0 4px 0 var(--clay-edge); }
.btn-primary:hover { background: #ff6a3f; }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--clay-edge); }
.btn-secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong), 0 4px 0 var(--line-strong); }
.btn-secondary:active { transform: translateY(3px); box-shadow: inset 0 0 0 1.5px var(--line-strong), 0 1px 0 var(--line-strong); }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.7rem; padding-bottom: 0.7rem; max-width: 1320px; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand span { font: 900 1.55rem/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; }
.main-nav { display: flex; align-items: center; gap: 1.6rem; }
.main-nav a:not(.btn) { color: var(--ink); font-weight: 600; font-size: 0.95rem; text-decoration: none; position: relative; white-space: nowrap; }
.main-nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 3px; border-radius: 2px; background: var(--clay); transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease); }
.main-nav a:not(.btn):hover::after { transform: scaleX(1); }
.main-nav .btn { min-height: 44px; padding: 0 1.2rem; font-size: 0.92rem; border-radius: 14px; }
.nav-toggle { display: none; width: 46px; height: 46px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle { transition: transform 0.12s var(--ease); }
.nav-toggle:active { transform: scale(0.92); }

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem 1.5rem 1.4rem; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .main-nav.open { display: flex; }
  .main-nav a:not(.btn) { padding: 0.95rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .main-nav a:not(.btn)::after { display: none; }
  .main-nav .btn { margin-top: 1rem; min-height: 54px; }
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 7vw, 6.5rem) 0 clamp(3.5rem, 7vw, 6rem); }
.hero .lanes { top: -9%; right: -16%; width: min(1100px, 95vw); }
.hero .wrap { display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 2rem; align-items: center; }
.hero h1 { font-size: clamp(3.3rem, 7.4vw, 7.2rem); margin-top: 1.4rem; }
.hero h1 em { font-style: normal; color: var(--clay); }
.pill-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2rem; }
.pill { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.95rem; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 0.88rem; font-weight: 600; }
.pill svg { width: 1.05em; height: 1.05em; color: var(--clay-ink); }
.soon { margin: 1.3rem 0 0; font-size: 0.92rem; color: var(--muted); }
.soon strong { color: var(--ink); }

/* ── Phones ─────────────────────────────────────────────────────────────── */
.phone { position: relative; margin: 0; width: var(--w, 280px); border-radius: 12.5% / 5.75%; overflow: hidden; background: var(--bezel); border: clamp(4px, 0.55vw, 7px) solid var(--bezel); box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.12); }
.phone img { width: 100%; height: auto; }
.phones { position: relative; width: min(540px, 100%); margin-inline: auto; aspect-ratio: 1 / 1.16; }
.phones .phone { position: absolute; }
.phones .p-front { --w: 57%; left: 2%; top: 3%; transform: rotate(-4deg); z-index: 2; }
.phones .p-back { --w: 49%; right: 0; top: 19%; transform: rotate(6deg); }
.glow { position: absolute; inset: 8% 4% 4%; border-radius: 50%; background: radial-gradient(closest-side, var(--clay-soft), transparent 70%); filter: blur(10px); z-index: 0; }

/* Su tablet l'hero resta su due colonne; solo sui telefoni i telefoni scendono sotto il testo. */
@media (max-width: 940px) {
  .hero h1 { font-size: clamp(3rem, 7.6vw, 4.4rem); }
  .hero .lanes { top: 0; right: -30%; width: 140vw; }
}
@media (max-width: 680px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(3rem, 15vw, 4.6rem); }
  .phones { width: min(430px, 92%); margin-top: 1rem; }
}

/* ── Sections ───────────────────────────────────────────────────────────── */
section { position: relative; }
.section { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 4rem); }
.section-head h2 { font-size: clamp(2.6rem, 6vw, 5.2rem); margin-top: 1rem; }
.section-head p { color: var(--muted); font-size: 1.15rem; margin: 1.2rem 0 0; max-width: 38rem; }
.alt { background: var(--surface-2); }

/* Feature rows: phone and text, alternating */
.feature { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; padding: clamp(2rem, 4vw, 3.5rem) 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature:nth-child(even) { grid-template-columns: 1.1fr 0.9fr; }
.feature:nth-child(even) .feature-media { order: 2; }
.feature-media { position: relative; display: flex; justify-content: center; }
.feature-media .phone { --w: min(300px, 74vw); }
.feature-media .duo { position: relative; width: min(430px, 90%); aspect-ratio: 1 / 1.12; }
.feature-media .duo .phone { position: absolute; }
.feature-media .duo .p-front { --w: 58%; left: 0; top: 0; transform: rotate(-3deg); z-index: 2; }
.feature-media .duo .p-back { --w: 50%; right: 0; top: 14%; transform: rotate(5deg); }
.feature-media .glow { inset: 10% 8%; }
.feature-num { font: 900 clamp(3.2rem, 7vw, 5.6rem)/0.9 var(--display); color: var(--clay); letter-spacing: 0.01em; }
.feature h3 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); margin: 0.4rem 0 0; }
.feature p { color: var(--muted); font-size: 1.1rem; margin: 1.1rem 0 0; max-width: 34rem; }
.ticks { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.ticks li { display: flex; gap: 0.75rem; align-items: flex-start; font-weight: 500; }
.ticks svg { flex: none; width: 1.35rem; height: 1.35rem; margin-top: 0.15rem; color: var(--clay-ink); }

@media (max-width: 860px) {
  .feature, .feature:nth-child(even) { grid-template-columns: 1fr; gap: 1.8rem; }
  .feature:nth-child(even) .feature-media { order: 0; }
}

/* Levels of verification */
.levels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.level { padding: 1.7rem; border-radius: 24px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.level .mark { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 1.1rem; border-radius: 18px; background: var(--clay-soft); color: var(--clay-ink); font: 900 1.9rem/1 var(--display); }
.level h3 { font: 900 1.9rem/1 var(--display); text-transform: uppercase; margin: 0; letter-spacing: 0.01em; }
.level p { color: var(--muted); margin: 0.7rem 0 0; font-size: 1rem; }
.note { margin: 1.6rem 0 0; color: var(--muted); font-size: 0.95rem; max-width: 46rem; }
@media (max-width: 860px) { .levels { grid-template-columns: 1fr; } }

/* Privacy: always ink, in light and dark */
.privacy { background: #0a0e0d; color: #f6f1e7; overflow: hidden; }
.privacy .lanes { left: -20%; bottom: -20%; width: 900px; color: rgba(255, 90, 44, 0.22); }
.privacy .eyebrow { color: #a6aca8; }
.privacy .section-head p { color: #a6aca8; }
.privacy-grid { position: relative; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.privacy-card { display: flex; gap: 1.1rem; align-items: flex-start; padding: 1.6rem; border-radius: 22px; background: #141a18; box-shadow: inset 0 0 0 1px #222c29; }
.privacy-card .ico { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--clay); color: #0a0e0d; }
.privacy-card .ico svg { width: 26px; height: 26px; }
.privacy-card h3 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.privacy-card p { margin: 0.4rem 0 0; color: #a6aca8; font-size: 0.98rem; }
.privacy .btn-secondary { background: #141a18; color: #f6f1e7; box-shadow: inset 0 0 0 1.5px #3a4743, 0 4px 0 #3a4743; }
.privacy .btn-secondary:active { box-shadow: inset 0 0 0 1.5px #3a4743, 0 1px 0 #3a4743; }
@media (max-width: 760px) { .privacy-grid { grid-template-columns: 1fr; } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; counter-reset: step; }
.step { padding: 1.8rem; border-radius: 24px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.step::before { counter-increment: step; content: "0" counter(step); display: block; font: 900 3.4rem/0.9 var(--display); color: var(--clay); }
.step h3 { margin: 0.8rem 0 0; font-size: 1.25rem; }
.step p { margin: 0.5rem 0 0; color: var(--muted); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 52rem; display: grid; gap: 0.8rem; }
.faq details { border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: 0 1.4rem; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 64px; font-weight: 700; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--clay-soft); color: var(--clay-ink); font-size: 1.4rem; line-height: 1; transition: transform 0.25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 1.3rem; color: var(--muted); }

/* Closing band */
.closing { position: relative; overflow: hidden; background: var(--clay); color: var(--on-clay); text-align: center; padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.closing .lanes { top: 50%; left: 50%; width: 1200px; max-width: 160vw; transform: translate(-50%, -50%); color: rgba(10, 14, 13, 0.16); }
.closing h2 { position: relative; font-size: clamp(2.8rem, 8vw, 7rem); }
.closing p { position: relative; margin: 1.2rem auto 0; max-width: 34rem; font-size: 1.15rem; font-weight: 500; }
.closing .cta-row { position: relative; justify-content: center; }
.closing .btn-primary { background: #0a0e0d; color: #f6f1e7; box-shadow: 0 4px 0 #000; }
.closing .btn-primary:active { box-shadow: 0 1px 0 #000; }
.closing .btn-secondary { background: transparent; color: #0a0e0d; box-shadow: inset 0 0 0 2px #0a0e0d, 0 4px 0 #0a0e0d; }
.closing .btn-secondary:active { box-shadow: inset 0 0 0 2px #0a0e0d, 0 1px 0 #0a0e0d; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 3rem 0 3.5rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.site-footer .legal-line { margin: 1rem 0 0; color: var(--muted); font-size: 0.9rem; max-width: 22rem; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 3rem; }
.site-footer h2 { margin: 0 0 0.8rem; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.5rem 0; font-size: 0.95rem; }
.site-footer li a { color: var(--ink); text-decoration: none; }
.site-footer li a:hover { color: var(--clay-ink); text-decoration: underline; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Inline SVG sprite: kept out of the layout */
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

@media (max-width: 520px) {
  .brand span { font-size: 1.3rem; white-space: nowrap; }
  .brand img { width: 34px; height: 34px; }
  .hero h1 { font-size: clamp(3rem, 15vw, 4.6rem); }
}

/* Keyboard users jump past the header. */
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: 0.8rem 1.2rem; border-radius: 12px; background: var(--ink); color: var(--bg); font-weight: 600; text-decoration: none; transition: top 0.2s; }
.skip:focus { top: 1rem; }

/* Touch targets: links get at least 44 px of height on phones and tablets. */
@media (hover: none), (max-width: 900px) {
  .brand { min-height: 44px; }
  .site-footer li { margin: 0; }
  .site-footer li a { display: inline-flex; align-items: center; min-height: 44px; }
}
