/* ResilKi — v3 (Light/Dark + ultra-clean header) */

/* ========== THEME TOKENS ========== */
/* Default: LIGHT */
:root{
  --bg:#fbfbfc;
  --bg2:#f3f4f6;
  --surface:#ffffff;
  --surface2:#ffffff;
  --line:rgba(0,0,0,.10);
  --text:rgba(0,0,0,.92);
  --muted:rgba(0,0,0,.70);
  --soft:rgba(0,0,0,.56);

  --accent:#d02b2b;
  --accent2:#ff3b30;

  --radius:22px;
  --shadow:0 18px 40px rgba(0,0,0,.14);

  --max:1120px;
  --pad:clamp(18px, 2.2vw, 28px);

  --h1:clamp(40px, 5vw, 64px);
  --h2:clamp(26px, 3.2vw, 40px);
  --h3:18px;

  --header-bg: rgba(255,255,255,.38);   /* more “invisible” */
  --header-line: rgba(0,0,0,.08);
  --header-blur: 14px;
}
/* LIGHT THEME */
[data-theme="light"]{
  --bg: #ffffff;
  --bg2: #f7f7f7;


  --text: #111111;        /* ← TESTO PRINCIPALE NERO */
  --muted: #444444;       /* ← TESTO SECONDARIO */
  --soft: #666666;

  --line: rgba(0,0,0,.08);
}

/* Headings */
h1, h2, h3{
  color: var(--text);
}

/* DARK override */
html[data-theme="dark"]{
  --bg:#050607;
  --bg2:#0b0d10;
  --surface:#0b0d10;
  --surface2:rgba(255,255,255,.03);
  --line:rgba(255,255,255,.10);
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.72);
  --soft:rgba(255,255,255,.58);

  --shadow:0 18px 40px rgba(0,0,0,.45);

  --header-bg: rgba(5,6,7,.22);         /* even more “invisible” */
  --header-line: rgba(255,255,255,.06);
}

/* ========== BASE ========== */
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background:
    radial-gradient(1200px 700px at 20% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%),
    radial-gradient(900px 600px at 80% 0%, color-mix(in srgb, var(--accent2) 8%, transparent), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 45%, var(--bg2) 100%);
  color:var(--text);
  letter-spacing:.2px;
}
/* LIGHT: remove pink/red glow from the whole page background */
html[data-theme="light"] body{
  background:
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 45%, var(--bg2) 100%);
}

a{color:inherit; text-decoration:none}
a:hover{opacity:.92}
small{color:var(--soft)}

.container{max-width:var(--max); margin:0 auto; padding:0 var(--pad)}
.section{padding: clamp(56px, 6vw, 92px) 0; border-top:1px solid var(--header-line)}
.section:first-of-type{border-top:none}

/* Headings — consistent in both themes */
h1,h2,h3{color:var(--text)}
.hero h1{font-size:var(--h1)}
.h2{font-size:var(--h2); margin:0 0 16px; letter-spacing:-.01em}
.card h3{font-size:var(--h3)}

/* ========== KICKER ========== */
.kicker{
  display:inline-flex; align-items:center; gap:10px;
  color:var(--muted);
  font-size:12px; letter-spacing:.22em; text-transform:uppercase;
  padding:8px 12px; border:1px solid var(--line);
  border-radius:999px;
  background:color-mix(in srgb, var(--surface) 70%, transparent);
}
.kicker .dot{
  width:8px; height:8px; border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 18px color-mix(in srgb, var(--accent) 45%, transparent);
}

/* ========== HEADER (optical centering + invisible) ========== */
.header{
  position:sticky; top:0; z-index:40;
  backdrop-filter:saturate(140%) blur(var(--header-blur));
  -webkit-backdrop-filter:saturate(140%) blur(var(--header-blur));
  background:var(--header-bg);
  border-bottom:1px solid var(--header-line);
}
.header-inner{
min-height:88px;   /* aumenta lo spazio verticale */
  align-items:center;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
  transform: translateY(1px); /* micro allineamento ottico */
}
.brand{
  display:flex;
  align-items:center;
  height:100%;
}

.brand-logo{
  height:88px;     /* aumenta qui: prova 72 / 88  */
  width:auto;
  display:block;
}
/* Nav split: centered links + right controls */
.nav{
  display:grid;
  grid-template-columns: 1fr auto;
  align-items:center;
  gap:14px;
  min-width:0;
}
.nav-links{
  display:flex;
  align-items:center;
  justify-content:center;      /* optical centering */
  gap:14px;
  color:var(--muted);
  font-size:14px;
}
.nav-links a{
  padding:8px 10px;
  border-radius:10px
}
.nav-links a:hover{
  background:color-mix(in srgb, var(--text) 6%, transparent);
  color:var(--text)
}

.nav-controls{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
}

.pill{
  display:inline-flex; align-items:center; gap:10px;
  padding:8px 12px;
  border:1px solid var(--line);
  background:color-mix(in srgb, var(--surface) 62%, transparent);
  border-radius:999px;
}
.lang a{padding:0 6px}
.lang a.active{color:var(--text); font-weight:700}
.lang .sep{opacity:.45}

/* Theme toggle */
.theme-toggle{
  display:inline-flex; align-items:center; gap:10px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:color-mix(in srgb, var(--surface) 62%, transparent);
  color:var(--muted);
  font-size:13px;
  font-weight:600;
  cursor:pointer;
}
.theme-toggle:hover{
  color:var(--text);
  background:color-mix(in srgb, var(--text) 6%, transparent);
}
.theme-dot{
  width:10px; height:10px; border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 14px color-mix(in srgb, var(--accent) 45%, transparent);
}
html[data-theme="dark"] .theme-dot{
  background:var(--accent2);
}

/* ========== HERO ========== */
.hero{
  padding: clamp(52px, 7vw, 98px) 0 clamp(54px, 6vw, 88px);
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(26px, 4vw, 54px);
  align-items:center;
}
.hero h1{
  margin:16px 0 14px;
  line-height:1.05;
  letter-spacing:-.02em;
}
.hero p{
  margin:0;
  font-size:clamp(16px, 1.15vw + 12px, 19px);
  color:var(--muted);
  line-height:1.6;
}
.hero .human{margin-top:14px; color:color-mix(in srgb, var(--text) 78%, transparent)}
.hero .bridge{
  margin-top:18px;
  padding-left:14px;
  border-left:2px solid color-mix(in srgb, var(--accent) 50%, transparent);
  color:color-mix(in srgb, var(--text) 78%, transparent);
}

/* Buttons */
.cta-row{display:flex; gap:12px; flex-wrap:wrap; margin-top:26px}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:10px;
  padding:12px 16px;
  border-radius:999px;
  border:1px solid var(--line);
  font-weight:700;
  font-size:14px;
  letter-spacing:.01em;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.btn:hover{transform: translateY(-1px)}
.btn-primary{
  background:linear-gradient(180deg, color-mix(in srgb, var(--accent) 92%, transparent), color-mix(in srgb, #b01a1a 92%, transparent));
  border-color:color-mix(in srgb, var(--line) 50%, transparent);
  box-shadow:0 12px 28px color-mix(in srgb, var(--accent) 20%, transparent);
  color:#fff;
}
.btn-primary:hover{box-shadow:0 16px 38px color-mix(in srgb, var(--accent) 26%, transparent)}
.btn-ghost{
  background:color-mix(in srgb, var(--surface) 70%, transparent);
}
.btn-ghost:hover{background:color-mix(in srgb, var(--text) 6%, transparent)}
.btn .arrow{width:18px; height:18px; display:inline-block}

/* Cards */
.hero-card{
  background:
    radial-gradient(800px 520px at 40% 10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, transparent), color-mix(in srgb, var(--surface) 78%, transparent));
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:22px 22px 18px;
}
/* LIGHT: remove pink/red glow on "In sintesi" hero card */
html[data-theme="light"] .hero-card{
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface) 96%, transparent),
    color-mix(in srgb, var(--surface) 90%, transparent)
  );
}
.hero-card h3{margin:0 0 10px; font-size:16px; color:var(--text)}
.hero-card ul{margin:0; padding-left:18px; color:var(--muted); line-height:1.7}
.hero-card li{margin:6px 0}

.grid-2{display:grid; grid-template-columns:1fr 1fr; gap:18px}
.grid-3{display:grid; grid-template-columns:repeat(3,1fr); gap:18px}

.card{
  background:linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--surface) 86%, transparent));
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:22px;
  box-shadow:0 10px 26px rgba(0,0,0,.14);
}
html[data-theme="dark"] .card{
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow:0 10px 26px rgba(0,0,0,.25);
}
.card h3{margin:0 0 10px; color:var(--text)}
.card p{margin:0; color:var(--muted); line-height:1.65}

.lead{color:var(--muted); line-height:1.65; max-width:74ch}
.list{
  margin:14px 0 0;
  padding-left:18px;
  color:var(--muted);
  line-height:1.75;
}

.steps{display:grid; gap:12px}
.step{
  display:flex; gap:14px;
  padding:16px 18px;
  border-radius:18px;
  border:1px solid var(--line);
  background:color-mix(in srgb, var(--surface) 78%, transparent);
}
html[data-theme="dark"] .step{background:rgba(255,255,255,.02)}
.step .n{
  width:34px; height:34px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  background:color-mix(in srgb, var(--accent) 12%, transparent);
  border:1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  box-shadow:0 0 24px color-mix(in srgb, var(--accent) 14%, transparent);
  color:var(--text);
  font-weight:800;
}
.step p{margin:0; color:var(--muted); line-height:1.6}

.quote{
  margin-top:18px;
  padding:18px 18px 18px 16px;
  border-left:2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background:color-mix(in srgb, var(--surface) 78%, transparent);
  border-radius:18px;
  color:color-mix(in srgb, var(--text) 78%, transparent);
}
html[data-theme="dark"] .quote{background:rgba(255,255,255,.02)}

.microcopy{display:flex; flex-wrap:wrap; gap:10px; margin-top:14px}
.tag{
  display:inline-flex; align-items:center;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:color-mix(in srgb, var(--surface) 78%, transparent);
  color:var(--muted);
  font-size:13px;
}
html[data-theme="dark"] .tag{background:rgba(255,255,255,.02)}

/* Footer */
.footer{
  padding:28px 0 34px;
  border-top:1px solid var(--header-line);
  color:color-mix(in srgb, var(--text) 68%, transparent);
  font-size:13px;
}
.footer a{opacity:.9}
.footer a:hover{opacity:1}

/* Responsive */
@media (max-width: 900px){
  .brand-logo{ height:64px; }
}
@media (max-width: 520px){
  .brand-logo{ height:56px; }
}
/* Progetto finanziato – Neuro Sport Link */
.funding-card {
  display: grid;
  gap: 24px;
  text-align: center;
}

.funding-logos-wrap {
  width: 100%;
  box-sizing: border-box;
  padding: clamp(14px, 2.5vw, 26px);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 6px);
}

.funding-logos {
  display: block;
  width: 100%;
  max-width: 980px;
  height: auto;
  margin: 0 auto;
}

.funding-content {
  max-width: 820px;
  margin: 0 auto;
}

.funding-label {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.funding-program {
  margin: 0 auto;
}