/* Davide Benazzi — Mental Coach
   Palette dalla pista d'atletica: blu pista, linee di corsia, giallo ostacolo. */
:root {
  --ink: #14213F;        /* blu notte, pista sotto i riflettori */
  --lane: #2B4FB8;       /* blu tartan */
  --lane-soft: #DCE3F5;
  --chalk: #EEF1F4;      /* bianco gesso, fondo chiaro */
  --line: #FFFFFF;       /* linee di corsia */
  --hurdle: #F4C430;     /* giallo ostacolo */
  --text: #1A2233;
  --muted: #56607A;
  --rule: #CBD3E3;

  --f: "Archivo", system-ui, sans-serif;
  --w: min(1180px, 100% - 40px);
  --r: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--f);
  font-variation-settings: "wdth" 100;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--hurdle); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--hurdle); color: var(--ink); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: var(--w); margin-inline: auto; }

/* ---------- Type ---------- */
.h2 {
  font-stretch: 70%;
  font-variation-settings: "wdth" 70;
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.9rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  max-width: 18ch;
  text-wrap: balance;
}
.lead { font-size: 1.2rem; color: var(--muted); max-width: 58ch; margin: 0 0 2.2rem; }
h3 { font-weight: 700; font-size: 1.25rem; line-height: 1.25; margin: 0 0 .4rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5em;
  background: var(--hurdle); color: var(--ink);
  font: inherit; font-weight: 700;
  padding: 0.95em 1.5em;
  border: 0; border-radius: var(--r);
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: #FFD54A; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-small { padding: .6em 1em; font-size: .95rem; }
.link { font-weight: 700; color: var(--lane); text-underline-offset: 4px; }
.link-light { font-weight: 600; color: #fff; text-underline-offset: 5px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px max(20px, (100% - 1180px) / 2);
  background: rgba(20, 33, 63, .94);
  backdrop-filter: blur(8px);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-variation-settings: "wdth" 80; font-size: 1.2rem; }
.brand svg { width: 34px; height: 34px; color: #fff; }
.nav nav { display: flex; align-items: center; gap: 28px; }
.nav nav a:not(.btn) { text-decoration: none; font-weight: 500; opacity: .85; }
.nav nav a:not(.btn):hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.4); color: #fff; font: inherit; padding: 6px 14px; border-radius: var(--r); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); padding: 8px 20px 20px;
    display: none;
  }
  .nav nav.open { display: flex; }
  .nav nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .nav nav .btn { margin-top: 14px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 85% 10%, #26408A 0%, var(--ink) 55%);
  color: #fff;
  padding: clamp(48px, 8vw, 110px) 0 120px;
}
.hero-track { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner {
  position: relative;
  width: var(--w); margin-inline: auto;
  display: grid; grid-template-columns: 1.35fr 0.65fr; gap: clamp(28px, 5vw, 72px); align-items: center;
}
.hero-kicker { margin: 0 0 1.2rem; font-weight: 500; color: #C9D3EE; }
.hero-title {
  margin: 0 0 1.6rem;
  font-variation-settings: "wdth" 62;
  font-weight: 900;
  font-size: clamp(3.4rem, min(9.5vw, 11vh), 8.4rem);
  line-height: .86;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}
.hero-title span { display: block; }
.hero-title .hl {
  font-style: italic;
  color: var(--ink);
  background: var(--hurdle);
  display: inline-block;
  padding: .04em .18em .0em .1em;
  margin-top: .08em;
  transform: skewX(-6deg);
}
.hero-lead { font-size: 1.25rem; max-width: 46ch; color: #E3E8F6; margin: 0 0 2rem; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }

.hero-photo { margin: 0; position: relative; }
.hero-photo img {
  width: 100%; aspect-ratio: 3 / 4.2; object-fit: cover; object-position: 50% 20%;
  border-radius: var(--r);
  box-shadow: 0 30px 70px rgba(0,0,0,.35);
}
.hero-photo::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--r);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
  background: linear-gradient(180deg, rgba(20,33,63,0) 62%, rgba(20,33,63,.75));
  z-index: 1; pointer-events: none;
}
.hero-photo figcaption { position: absolute; left: 0; right: 0; bottom: 16px; z-index: 2; display: flex; justify-content: center; }
.bib {
  background: #fff; color: var(--ink);
  font-weight: 800; font-variation-settings: "wdth" 75;
  padding: 6px 12px; border-radius: 3px; font-size: .95rem;
  box-shadow: 0 0 0 3px var(--ink), 0 0 0 4px rgba(255,255,255,.5);
}

.hero-facts {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--lane); border-top: 3px solid var(--line);
}
.hero-facts div { padding: 14px 20px; border-right: 3px solid var(--line); }
.hero-facts div:last-child { border-right: 0; }
.hero-facts dt { font-size: .85rem; color: #C9D6F7; }
.hero-facts dd { margin: 0; font-weight: 900; font-variation-settings: "wdth" 70; font-size: 1.5rem; line-height: 1.1; color: #fff; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-photo { max-width: 360px; }
  .hero-photo img { aspect-ratio: 4 / 5; object-position: 50% 15%; }
  .hero { padding-bottom: 190px; }
  .hero-facts { grid-template-columns: 1fr 1fr; }
  .hero-facts div:nth-child(2) { border-right: 0; }
  .hero-facts div:nth-child(-n+2) { border-bottom: 3px solid var(--line); }
  .hero-facts dd { font-size: 1.25rem; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-ink { background: var(--ink); color: #fff; }
.section-ink .lead { color: #BFC9E4; }
.section-chalk { background: var(--chalk); }

/* Fascia fotografica */
.banner { margin: 0 0 48px; position: relative; }
.banner img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; object-position: 50% 30%; border-radius: var(--r); }
.banner figcaption { margin-top: 10px; color: var(--muted); font-size: .95rem; }
@media (max-width: 700px) { .banner img { aspect-ratio: 4 / 3; } }

/* Per chi: corsie */
.lanes { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink); }
.lanes li {
  display: grid; grid-template-columns: minmax(200px, 1fr) 1.6fr; gap: 12px 48px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}
.lanes h3 { font-size: 1.45rem; font-variation-settings: "wdth" 85; }
.lanes p { margin: 0; color: var(--muted); max-width: 60ch; }
@media (max-width: 700px) { .lanes li { grid-template-columns: 1fr; } }

/* Metodo: giro di pista */
.lap { position: relative; display: grid; grid-template-columns: 1fr; gap: 40px; }
.lap-svg { width: 100%; max-width: 980px; margin-inline: auto; overflow: visible; }
.lap-lane { fill: none; stroke: rgba(255,255,255,.18); stroke-width: 2; }
.lap-inner { fill: rgba(43,79,184,.18); }
.lap-run {
  fill: none; stroke: var(--hurdle); stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 400; stroke-dashoffset: 400;
  transition: stroke-dashoffset 2.6s cubic-bezier(.45,.05,.2,1);
}
.lap.run .lap-run { stroke-dashoffset: 0; }
.lap-marks circle { fill: var(--ink); stroke: #fff; stroke-width: 3; transition: fill .3s ease; }
.lap.run .lap-marks circle { fill: var(--hurdle); }
.lap.run .lap-marks circle:nth-child(1) { transition-delay: .55s; }
.lap.run .lap-marks circle:nth-child(2) { transition-delay: 1.2s; }
.lap.run .lap-marks circle:nth-child(3) { transition-delay: 1.9s; }
.lap.run .lap-marks circle:nth-child(4) { transition-delay: 2.55s; }
@media (prefers-reduced-motion: reduce) {
  .lap-run { transition: none; stroke-dashoffset: 0; }
  .lap-marks circle { fill: var(--hurdle); }
}

.lap-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.lap-steps li { border-top: 3px solid #fff; padding-top: 18px; }
.lap-steps .meter {
  display: block; font-weight: 900; font-variation-settings: "wdth" 62;
  font-size: 2.6rem; line-height: 1; color: var(--hurdle); margin-bottom: 10px;
}
.lap-steps h3 { font-size: 1.35rem; }
.lap-steps p { margin: 0; color: #C9D2EA; font-size: 1rem; }
@media (max-width: 900px) { .lap-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .lap-steps { grid-template-columns: 1fr; } .lap-svg { display: none; } }

/* Percorsi */
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.split > div:first-child { position: sticky; top: 110px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split > div:first-child { position: static; } }
.modules details { border-top: 1px solid var(--rule); }
.modules details:last-child { border-bottom: 1px solid var(--rule); }
.modules summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 24px 0;
}
.modules summary::-webkit-details-marker { display: none; }
.modules summary h3 { margin: 0; font-size: 1.5rem; font-variation-settings: "wdth" 85; }
.modules summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--lane-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath d='M9 14h10M14 9v10' stroke='%2314213F' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/100% no-repeat;
  transition: transform .2s ease;
}
.modules details[open] summary::after { transform: rotate(45deg); background-color: var(--hurdle); }
.modules details p { margin: 0 0 12px; max-width: 56ch; color: var(--muted); }
.modules details .tags { color: var(--lane); font-weight: 600; font-size: .95rem; padding-bottom: 20px; }

/* Video */
.video-wrap { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.phone-frame {
  width: min(340px, 80vw); aspect-ratio: 9 / 16;
  border-radius: 34px; padding: 10px; background: #050914;
  box-shadow: 0 0 0 2px #3A4A78, 0 30px 80px rgba(0,0,0,.45);
}
.phone-frame video { width: 100%; height: 100%; object-fit: cover; border-radius: 26px; background: #000; }
@media (max-width: 860px) { .video-wrap { grid-template-columns: 1fr; justify-items: center; text-align: left; } }

/* Chi sono */
.about { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.about-photos { position: relative; aspect-ratio: 4 / 5; }
.about-photos img { position: absolute; object-fit: cover; border-radius: var(--r); }
.about-photos .p1 { width: 66%; height: 86%; left: 0; top: 0; object-position: 50% 20%; }
.about-photos .p2 { width: 50%; height: 56%; right: 0; bottom: 0; object-position: 50% 15%; border: 8px solid #fff; box-shadow: 0 20px 50px rgba(20,33,63,.2); }
.about-copy p { max-width: 58ch; }
blockquote { margin: 2rem 0; padding: 0 0 0 22px; border-left: 4px solid var(--hurdle); }
blockquote p { font-size: 1.45rem; line-height: 1.35; font-weight: 600; font-style: italic; color: var(--ink); margin: 0; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 2rem 0 0; border-top: 1px solid var(--rule); padding-top: 20px; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; font-weight: 700; color: var(--ink); }
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .about-photos { max-width: 460px; }
  .facts { grid-template-columns: 1fr; }
}

/* Pillole */
.row-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.row-head .h2 { margin: 0; }
.reels { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.reels a { display: block; border-radius: var(--r); overflow: hidden; }
.reels img { width: 100%; aspect-ratio: 9 / 14; object-fit: cover; transition: transform .35s ease; }
.reels a:hover img { transform: scale(1.04); }
@media (max-width: 760px) { .reels { grid-template-columns: repeat(2, 1fr); } }

/* Contatti */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.steps { margin: 0 0 2rem; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 22px 56px; color: #C9D2EA; max-width: 50ch; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -4px;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--hurdle); color: var(--hurdle);
  font-weight: 800;
}
.steps strong { color: #fff; }
.direct { display: grid; gap: 8px; }
.direct a { color: #fff; font-weight: 600; text-underline-offset: 5px; }

.form { background: #fff; color: var(--text); padding: clamp(24px, 4vw, 40px); border-radius: 8px; display: grid; gap: 16px; }
.form h3 { font-size: 1.6rem; font-variation-settings: "wdth" 80; margin-bottom: 4px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.form input, .form textarea {
  font: inherit; font-weight: 400;
  padding: 12px 14px; border: 1.5px solid var(--rule); border-radius: var(--r);
  background: #fff; color: var(--text);
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--lane); box-shadow: 0 0 0 3px var(--lane-soft); }
.form .invalid { border-color: #C0392B; }
.form-note { margin: 0; font-size: .9rem; color: var(--muted); }
.form-note.err { color: #B03A2E; font-weight: 600; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

/* Footer */
.footer { background: #0D1630; color: #AEB8D4; padding: 32px 0; font-size: .95rem; }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot p { margin: 0; }
.foot strong { color: #fff; }
.foot a { color: #fff; margin-left: 18px; }
.foot a:first-child { margin-left: 0; }

/* ---------- Test ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.test { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.checks { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks label {
  display: flex; gap: 14px; align-items: flex-start; cursor: pointer;
  padding: 16px 18px; border: 1.5px solid var(--rule); border-radius: var(--r);
  font-weight: 500; transition: border-color .15s ease, background .15s ease;
}
.checks label:hover { border-color: var(--lane); }
.checks input { appearance: none; flex: none; width: 24px; height: 24px; margin: 1px 0 0; border: 2px solid var(--ink); border-radius: 3px; display: grid; place-items: center; cursor: pointer; }
.checks input:checked { background: var(--hurdle); }
.checks input:checked::after { content: ""; width: 12px; height: 7px; border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(-45deg) translate(1px, -1px); }
.checks label:has(input:checked) { border-color: var(--ink); background: #FFF8DC; }
.test-result { border-left: 4px solid var(--hurdle); padding-left: 22px; }
.test-score { margin: 0; font-weight: 900; font-variation-settings: "wdth" 62; font-size: 3.4rem; line-height: 1; color: var(--ink); }
.test-result p:not(.test-score) { margin: 8px 0 18px; max-width: 46ch; color: var(--muted); }
@media (max-width: 860px) { .test { grid-template-columns: 1fr; } }

/* ---------- Respiro ---------- */
.breathe { display: grid; grid-template-columns: 1fr auto; gap: clamp(32px, 6vw, 96px); align-items: center; }
.breath-box { width: min(360px, 80vw); text-align: center; }
.breath-circle {
  width: 100%; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle, var(--lane) 0%, var(--ink) 100%);
  color: #fff; font-weight: 800; font-variation-settings: "wdth" 75; font-size: 1.7rem;
  transform: scale(.6); transition: transform 4s cubic-bezier(.4, 0, .6, 1);
  box-shadow: 0 0 0 10px var(--lane-soft);
}
.breath-circle.big { transform: scale(1); }
.breath-count { margin: 18px 0 0; color: var(--muted); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .breath-circle { transition: none; } }
@media (max-width: 860px) { .breathe { grid-template-columns: 1fr; justify-items: center; } .breathe > div:first-child { justify-self: start; } }

/* ---------- Varie ---------- */
.section-chalk .modules details, .section-chalk .lanes li { border-color: #BFC8DB; }
.video-wrap .btn { margin-top: 4px; }
.about-copy .link { display: inline-block; margin-top: 8px; }
.sticky-cta { display: none; }
@media (max-width: 860px) {
  .sticky-cta { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; box-shadow: 0 10px 30px rgba(0,0,0,.35); transform: translateY(140%); transition: transform .25s ease; }
  .sticky-cta.show { transform: none; }
  .footer { padding-bottom: 96px; }
}
