/* ============================================================================
   TRACE-ABILITY — stile condiviso (home, manifesto, schede prodotto)
   Nessuna risorsa esterna: font di sistema, nessun CDN, nessun tracker.
   → zero cookie → nessun banner di consenso da gestire.
   Palette ombrello: navy profondo + oro "filo di Arianna".
   Ogni app ha un colore-firma esposto come --app / --app-soft / --app-dark.
   ============================================================================ */

:root {
  /* ── Brand ombrello Trace-Ability ─────────────────────────────────────── */
  --brand-50:  #EAEEF7;
  --brand-100: #D6DEEE;
  --brand-200: #A9B8DA;
  --brand-300: #6E86C0;
  --brand-500: #2A4C8C;   /* blu-indaco principale */
  --brand-600: #22406F;
  --brand-700: #1A2E52;   /* navy scuro — sezioni scure / heading */
  --brand-800: #121F3A;
  --brand-900: #0C1526;   /* quasi nero navy */

  /* Oro — il filo di Arianna (accento) */
  --gold-50:   #FBF3D9;
  --gold-100:  #F3E7C4;
  --gold-500:  #C9A227;
  --gold-600:  #A8851A;
  --gold-700:  #806413;

  /* ── Neutri ───────────────────────────────────────────────────────────── */
  --ink:     #16181D;
  --ink-700: #33373F;
  --ink-500: #646973;
  --ink-400: #8A8F99;

  --line:    #E5E7EC;
  --bg:      #FFFFFF;
  --bg-soft: #F8F9FB;
  --bg-warm: #F2F1EE;

  --radius:  14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(12,21,38,.05), 0 8px 24px rgba(12,21,38,.07);
  --shadow-lg: 0 2px 4px rgba(12,21,38,.06), 0 24px 60px rgba(12,21,38,.14);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --wrap: 1140px;

  /* Colore-firma di default (Trace-Ability). Le schede prodotto lo ridefiniscono. */
  --app:      var(--brand-500);
  --app-dark: var(--brand-700);
  --app-soft: var(--brand-50);
}

/* Colori-firma per app: applicare la classe su <body>. */
body.app-costrace   { --app:#2E74C9; --app-dark:#1B4A86; --app-soft:#E9F1FC; }
body.app-jobtrace   { --app:#0E8074; --app-dark:#0B5F57; --app-soft:#E1F5EE; }
body.app-eventtrace { --app:#7C3AED; --app-dark:#5B21B6; --app-soft:#F1EBFE; }
body.app-assotrace  { --app:#7C8500; --app-dark:#3A2510; --app-soft:#F4F2DE; }
body.app-clubtrace  { --app:#BE6F1B; --app-dark:#7A4715; --app-soft:#FBEEDD; }

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-700);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 820px; }

/* ─── Header ──────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px; gap: 20px;
}
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--ink-700); font-size: 14px; font-weight: 500; text-decoration: none; }
.nav a:hover { color: var(--brand-500); text-decoration: none; }

/* ─── Wordmark ────────────────────────────────────────────────────────────── */

.wordmark { display: inline-flex; align-items: center; gap: 11px; }
.wordmark svg { display: block; flex: none; }
.wordmark-logo { display: block; flex: none; object-fit: contain; }

/* Emblema grande (logo completo col labirinto) — usato nel manifesto */
.brand-emblem {
  width: min(220px, 58vw); height: auto; display: block;
  margin: 0 auto 28px; border-radius: 26px; box-shadow: var(--shadow-lg);
}
.wordmark-text {
  font-size: 20px; font-weight: 800; letter-spacing: -0.4px;
  color: var(--ink); white-space: nowrap;
}
.wordmark-text em { font-style: normal; color: var(--gold-600); }
.wordmark--lg .wordmark-text { font-size: 28px; }
.wordmark--inv .wordmark-text { color: #fff; }
.wordmark--inv .wordmark-text em { color: var(--gold-500); }

/* ─── Bottoni ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: 11px;
  font-size: 15px; font-weight: 600; line-height: 1;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand-500); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--brand-600); }
.btn-gold { background: var(--gold-500); color: var(--brand-900); box-shadow: var(--shadow); }
.btn-gold:hover { background: var(--gold-600); color:#fff; }
.btn-ghost { background: #fff; color: var(--ink-700); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-400); }
.btn-app { background: var(--app); color:#fff; box-shadow: var(--shadow); }
.btn-app:hover { background: var(--app-dark); }
.btn-lg { padding: 16px 26px; font-size: 16px; }

/* ─── Eyebrow / badge ─────────────────────────────────────────────────────── */

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase;
  color: var(--brand-600); background: var(--brand-50);
  padding: 7px 13px; border-radius: 100px; margin-bottom: 22px;
}
.eyebrow--app { color: var(--app-dark); background: var(--app-soft); }
.eyebrow--gold { color: var(--gold-700); background: var(--gold-50); }

.pill {
  display:inline-flex; align-items:center; gap:6px;
  font-size:12px; font-weight:700; letter-spacing:.3px;
  padding:5px 11px; border-radius:100px;
  background: var(--bg-warm); color: var(--ink-500); border:1px solid var(--line);
}
.pill--licenza { background: var(--gold-50); color: var(--gold-700); border-color: var(--gold-100); }
.pill--wip { background: var(--app-soft); color: var(--app-dark); border-color: var(--app-soft); }
.pill--wip .pill-dot { width:7px; height:7px; border-radius:100px; background: var(--app); }

/* ─── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 560px at 85% -12%, var(--brand-50) 0%, transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
  border-bottom: 1px solid var(--line);
}
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 56px; align-items: center;
  padding-top: 84px; padding-bottom: 84px;
}
.hero h1 {
  margin: 0 0 20px; color: var(--ink);
  font-size: clamp(34px, 4.6vw, 56px); font-weight: 800;
  line-height: 1.08; letter-spacing: -1.4px;
}
.hero h1 em { font-style: normal; color: var(--brand-500); }
.hero h1 em.gold { color: var(--gold-600); }
.hero .lead { font-size: 18px; color: var(--ink-500); margin: 0 0 30px; max-width: 50ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items:center; }
.hero-note { font-size: 13px; color: var(--ink-400); margin-top: 4px; }

/* Hero centrato (manifesto / pagine interne) */
.hero--center .wrap { grid-template-columns: 1fr; text-align:center; justify-items:center; }
.hero--center .lead { margin-inline:auto; }
.hero--app {
  background:
    radial-gradient(1000px 520px at 82% -12%, var(--app-soft) 0%, transparent 62%),
    linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
}
.hero--app h1 em { color: var(--app); }

/* ─── Motivo "filo" (thread) ──────────────────────────────────────────────── */

.thread { position:absolute; inset:0; pointer-events:none; opacity:.5; }
.thread path { fill:none; stroke:var(--gold-500); stroke-width:1.4; stroke-dasharray:2 7; }

/* ─── Mockup telefono ─────────────────────────────────────────────────────── */

.phone-stack { position: relative; display: flex; justify-content: center; }
.phone {
  width: 268px; aspect-ratio: 9 / 19.5;
  background: #111827; border-radius: 34px; padding: 4px;
  box-shadow: var(--shadow-lg); position: relative; flex: none;
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 31px; overflow: hidden;
  background: var(--bg-warm); position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
}
.phone-screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone--back {
  position: absolute; left: 50%; top: 26px;
  transform: translateX(-72%) rotate(-7deg) scale(.9);
  z-index: 0; opacity: .55; filter: blur(.4px);
}
.phone--front { z-index: 2; }

/* Screenshot reale: se il file esiste, copre la schermata finta sottostante.
   Se manca, l'attributo onerror lo rimuove e resta il .screen-demo di fallback. */
.shot-real {
  position: absolute; inset: 0; z-index: 4;
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Due screenshot affiancati (usato in jobtrace.html) */
.phone-duo { gap: 14px; flex-wrap: nowrap; }
.phone-duo .phone { width: min(204px, 44vw); }
.shot-ph {
  position: absolute; inset: 0; z-index: 1; display: flex;
  align-items: center; justify-content: center;
  background: var(--app-soft); color: var(--app-dark);
  font-weight: 700; font-size: 14px; letter-spacing: .02em;
}

/* Schermo "finto" costruito in CSS quando non c'è screenshot reale */
.screen-demo {
  width:100%; height:100%;
  background: linear-gradient(180deg, var(--app-soft), #fff 42%);
  display:flex; flex-direction:column;
}
.sd-bar { background: var(--app); color:#fff; padding:16px 16px 14px;
  font-weight:700; font-size:14.5px; display:flex; align-items:center; gap:8px; }
.sd-body { padding:14px; display:flex; flex-direction:column; gap:10px; flex:1; }
.sd-card { background:#fff; border:1px solid var(--line); border-radius:12px;
  padding:12px 13px; box-shadow:0 1px 2px rgba(12,21,38,.05); }
.sd-line { height:9px; border-radius:5px; background:var(--bg-warm); margin:6px 0; }
.sd-line.short { width:52%; }
.sd-line.mid { width:74%; }
.sd-chip { display:inline-block; font-size:10px; font-weight:700; color:var(--app-dark);
  background:var(--app-soft); border-radius:6px; padding:3px 8px; }
.sd-nav { margin-top:auto; background:#fff; border-top:1px solid var(--line);
  display:flex; justify-content:space-around; padding:10px 0; }
.sd-dot { width:22px; height:22px; border-radius:7px; background:var(--bg-warm); }
.sd-dot.on { background:var(--app); }

/* ─── Sezioni ─────────────────────────────────────────────────────────────── */

.section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section--dark {
  background: radial-gradient(900px 500px at 15% 0%, var(--brand-700) 0%, var(--brand-900) 70%);
  color: rgba(255,255,255,.82);
}
.section.section--dark h2, .section.section--dark h3 { color:#fff; }
.section.section--dark .sub { color: rgba(255,255,255,.66); }
.section-head { max-width: 660px; margin: 0 0 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section h2 {
  margin: 0 0 14px; color: var(--ink);
  font-size: clamp(26px, 3vw, 38px); font-weight: 800;
  letter-spacing: -.9px; line-height: 1.15;
}
.section .sub { font-size: 17px; color: var(--ink-500); margin: 0; }

/* ─── Suite: griglia app ──────────────────────────────────────────────────── */

.suite { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.app-card {
  position:relative; display:flex; flex-direction:column;
  background:#fff; border:1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  overflow:hidden;
}
.app-card::before {
  content:""; position:absolute; top:0; left:0; right:0; height:4px;
  background: var(--ac, var(--brand-500));
}
.app-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--ac, var(--brand-500)) 40%, var(--line)); text-decoration:none; }
.app-card__ico {
  width:46px; height:46px; border-radius:13px; margin-bottom:15px;
  background: var(--ac, var(--brand-500)); color:#fff;
  display:flex; align-items:center; justify-content:center;
}
.app-card__name { font-size:19px; font-weight:800; color:var(--ink); letter-spacing:-.4px; margin:0 0 3px; }
.app-card__name b { color: var(--ac, var(--brand-500)); font-weight:800; }
.app-card__tag { font-size:12.5px; font-weight:700; letter-spacing:.3px; text-transform:uppercase;
  color: var(--ink-400); margin:0 0 12px; }
.app-card__desc { font-size:14.5px; color:var(--ink-500); margin:0 0 18px; }
.app-card__more { margin-top:auto; font-size:14px; font-weight:700; color:var(--ac, var(--brand-500)); }
.app-card__more::after { content:" →"; }

/* ─── Passi ───────────────────────────────────────────────────────────────── */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.steps--4 { grid-template-columns: repeat(4, 1fr); }
.step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px 24px; box-shadow: var(--shadow);
}
.step-n {
  width: 38px; height: 38px; border-radius: 11px; margin-bottom: 16px;
  background: var(--app-soft); color: var(--app-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.step h3 { margin: 0 0 8px; font-size: 17px; color: var(--ink); font-weight: 700; }
.step p { margin: 0; font-size: 14.5px; color: var(--ink-500); }

/* ─── Feature ─────────────────────────────────────────────────────────────── */

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature { padding: 28px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); }
.section--dark .feature { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.12); }
.feature-ico {
  width: 42px; height: 42px; border-radius: 12px; margin-bottom: 15px;
  background: var(--app); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.feature h3 { margin: 0 0 7px; font-size: 16.5px; color: var(--ink); font-weight: 700; }
.section--dark .feature h3 { color:#fff; }
.feature p { margin: 0; font-size: 14.5px; color: var(--ink-500); }
.section--dark .feature p { color: rgba(255,255,255,.66); }

/* ─── Split (immagine + testo) ────────────────────────────────────────────── */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split--rev .split-media { order: 2; }

/* ─── Manifesto / racconto ────────────────────────────────────────────────── */

.prose { max-width: 720px; margin: 0 auto; }
.prose p { font-size: 17px; color: var(--ink-700); margin: 0 0 20px; }
.prose h2 { font-size: clamp(24px,2.6vw,32px); color:var(--ink); font-weight:800;
  letter-spacing:-.6px; margin: 48px 0 16px; }
.prose h3 { font-size: 19px; color:var(--ink); font-weight:700; margin: 32px 0 10px; }
.prose .lead-quote {
  font-size: clamp(21px,2.6vw,27px); line-height:1.4; font-weight:600;
  color: var(--brand-700); border-left:3px solid var(--gold-500);
  padding: 4px 0 4px 24px; margin: 34px 0; letter-spacing:-.3px;
}
.prose em { color: var(--gold-700); font-style: italic; }

/* Principi a icone */
.principles { display:grid; grid-template-columns: repeat(2,1fr); gap:20px; margin-top:8px; }
.principle { display:flex; gap:15px; align-items:flex-start;
  background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:20px 22px; }
.principle .p-ico { width:40px; height:40px; border-radius:11px; flex:none;
  background:var(--gold-50); color:var(--gold-700);
  display:flex; align-items:center; justify-content:center; }
.principle h4 { margin:0 0 5px; font-size:16px; color:var(--ink); font-weight:700; }
.principle p { margin:0; font-size:14.5px; color:var(--ink-500); }

/* ─── Fatti / numeri ──────────────────────────────────────────────────────── */

.facts { display:grid; grid-template-columns: repeat(3,1fr); gap:22px; }
.fact { text-align:center; padding:14px; }
.fact b { display:block; font-size: clamp(30px,4vw,44px); font-weight:800;
  color:#fff; letter-spacing:-1px; line-height:1; }
.fact span { display:block; margin-top:8px; font-size:14px; color:rgba(255,255,255,.6); }

/* ─── CTA band ────────────────────────────────────────────────────────────── */

.cta-band {
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-800) 100%);
  color: #fff; border-radius: var(--radius-lg); padding: 56px;
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center;
  position:relative; overflow:hidden;
}
.cta-band--app { background: linear-gradient(135deg, var(--app) 0%, var(--app-dark) 100%); }
.cta-band h2 { color: #fff; margin: 0 0 12px; font-size: clamp(24px, 2.6vw, 34px); }
.cta-band p { margin: 0; color: rgba(255,255,255,.86); font-size: 16.5px; }
.cta-band .btn-ghost { background: #fff; border-color: #fff; color: var(--brand-700); }
.cta-band--app .btn-ghost { color: var(--app-dark); }
.cta-actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }

/* ─── Avviso "su licenza" ─────────────────────────────────────────────────── */

.licenza-note {
  background: var(--gold-50); border: 1px solid var(--gold-100);
  border-radius: var(--radius); padding: 16px 20px; margin: 30px auto 0;
  font-size: 14.5px; color: var(--gold-700);
  display: flex; gap: 13px; align-items: flex-start;
}
.licenza-note svg { flex: none; margin-top: 2px; }
.licenza-note strong { color: var(--gold-700); }

/* ─── Footer ──────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--brand-900); color: rgba(255,255,255,.6);
  padding: 60px 0 34px; font-size: 14px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 36px;
  padding-bottom: 34px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.site-footer h4 {
  color: #fff; font-size: 12px; letter-spacing: .9px; text-transform: uppercase;
  margin: 0 0 16px; font-weight: 700;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: rgba(255,255,255,.6); }
.site-footer a:hover { color: #fff; }
.footer-legal {
  padding-top: 26px; font-size: 12.5px; color: rgba(255,255,255,.42);
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.footer-addr { font-style: normal; line-height: 1.85; }

/* ─── Pagine legali / testo lungo ─────────────────────────────────────────── */

.legal { padding: 60px 0 90px; }
.legal-wrap { max-width: 780px; margin: 0 auto; padding: 0 24px; }
.legal h1 { font-size: clamp(28px, 3.6vw, 40px); color: var(--ink); font-weight: 800;
  letter-spacing: -1px; margin: 0 0 10px; line-height: 1.15; }
.legal .meta { font-size: 13.5px; color: var(--ink-400); margin: 0 0 40px;
  padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.legal h2 { font-size: 22px; color: var(--ink); font-weight: 700; margin: 44px 0 14px; }
.legal p, .legal li { font-size: 15.5px; color: var(--ink-700); }

/* ─── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 940px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 46px; padding-top: 58px; padding-bottom: 58px; }
  .steps, .steps--4, .features, .suite, .principles, .facts { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 34px; }
  .split--rev .split-media { order: 0; }
  .cta-band { grid-template-columns: 1fr; padding: 38px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .nav { display: none; }
  .phone--back { display: none; }
}
@media (max-width: 560px) {
  .section { padding: 58px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .facts { gap: 30px; }
}
