/* ---------- Font (self-hosted) ---------- */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/Barlow-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/Barlow-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/BarlowCondensed-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 700; font-display: swap; src: url(fonts/BarlowCondensed-700-italic.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 800; font-display: swap; src: url(fonts/BarlowCondensed-800-italic.woff2) format("woff2"); }

/* ---------- Colori ---------- */
:root {
  --red: #dc4840;
  --red-dark: #b8352e;
  --black: #221e1f;     /* stesso nero del logo */
  --ink: #141112;
  --yellow: #f2e64a;
  --white: #ffffff;
  --paper: #f4f1ec;
  --muted: #b9b2b0;
  --text: #221e1f;
  --header-h: 72px;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-style: italic; font-weight: 800; line-height: 1; margin: 0 0 .5em; text-transform: uppercase; letter-spacing: .01em; }
h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h3 { font-size: 1.5rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }

.tag {
  display: inline-block;
  font-family: var(--display); font-weight: 600; font-style: normal;
  text-transform: uppercase; letter-spacing: .3em; font-size: .85rem;
  color: var(--red); margin-bottom: 1rem;
}
.section--dark .tag, .hero .tag { color: var(--yellow); }
.tag--dark { color: var(--black) !important; }
.hl { color: var(--red); font-weight: 600; }
.section--dark .hl { color: var(--yellow); }
.lead { font-size: 1.15rem; max-width: 760px; color: var(--muted); }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-block; padding: .85em 1.8em;
  font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.15rem;
  text-transform: uppercase; letter-spacing: .05em; text-decoration: none;
  transform: skewX(-10deg); transition: background .2s, color .2s, transform .2s;
}
.btn--red { background: var(--red); color: var(--white); }
.btn--red:hover { background: var(--yellow); color: var(--black); }
.btn--ghost { border: 2px solid var(--white); color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--black); }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  background: transparent; transition: background .3s, box-shadow .3s;
}
.header.is-scrolled, .header.is-open { background: var(--black); box-shadow: 0 2px 0 var(--red); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; width: min(1300px, 100% - 32px); margin-inline: auto; }
.header__brand img { height: 40px; width: auto; }
.nav { display: flex; gap: 1.6rem; align-items: center; }
.nav a {
  font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--white); text-decoration: none; font-size: 1.02rem; position: relative;
}
.nav a:not(.nav__cta)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 2px; background: var(--yellow); transition: right .25s; }
.nav a:not(.nav__cta):hover::after { right: 0; }
.nav__cta { background: var(--red); padding: .45em 1em; transform: skewX(-10deg); }
.nav__cta:hover { background: var(--yellow); color: var(--black) !important; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--white); margin: 5px 0; transition: transform .25s, opacity .25s; }
.header.is-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.header.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.header.is-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: var(--white); overflow: hidden; background: var(--black); }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,17,18,.55) 0%, rgba(20,17,18,0) 30%, rgba(20,17,18,.2) 55%, rgba(20,17,18,.92) 100%); }
.hero__content { position: relative; width: min(1200px, 100% - 32px); margin: 0 auto; padding-bottom: 12vh; }
.hero h1 { font-size: clamp(3rem, 10vw, 8rem); margin-bottom: .15em; }
.hero h1 span { color: var(--red); }
.hero__motto { font-family: var(--display); font-style: italic; font-weight: 700; font-size: clamp(1.2rem, 2.6vw, 1.9rem); letter-spacing: .25em; text-transform: uppercase; margin-bottom: 2rem; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__badge { position: absolute; right: max(16px, calc((100% - 1200px) / 2)); top: calc(var(--header-h) + 24px); width: clamp(90px, 11vw, 160px); box-shadow: 0 10px 40px rgba(0,0,0,.5); }

/* ---------- Numeri ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--red); color: var(--white); }
.stats__item { padding: 2rem 1rem; text-align: center; border-right: 1px solid rgba(255,255,255,.25); }
.stats__item:last-child { border-right: 0; }
.stats strong { display: block; font-family: var(--display); font-style: italic; font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1; }
.stats span { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .15em; font-size: .9rem; }

/* ---------- Sezioni ---------- */
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.section--dark { background: var(--black); color: var(--white); }
.section--red { background: var(--red); color: var(--white); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split--reverse .split__media { order: -1; }
.split__media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; clip-path: polygon(6% 0, 100% 0, 94% 100%, 0 100%); }

.media-duo { display: grid; gap: 1rem; }
.split__media .media-duo__trial { object-position: 50% 25%; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: clamp(3rem, 6vw, 5rem); }
.feature { background: var(--white); padding: 1.8rem 1.5rem; border-top: 4px solid var(--red); }
.feature h3 { font-size: 1.4rem; }
.feature p { margin: 0; font-size: .98rem; color: #4a4445; }

/* ---------- Risultati ---------- */
.results { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 4rem); margin-top: 2.5rem; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--red); }
.timeline li { position: relative; padding: 0 0 2rem 2rem; }
.timeline li::before { content: ""; position: absolute; left: -10px; top: .35rem; width: 17px; height: 17px; background: var(--yellow); transform: skewX(-10deg); }
.timeline__year { display: block; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 2.2rem; line-height: 1; color: var(--red); margin-bottom: .3rem; }
.timeline p { margin: 0; color: #ddd6d4; }
.timeline strong { color: var(--white); }
.timeline__next .timeline__year { color: var(--yellow); }
.timeline__next::before { animation: pulse 1.4s ease-in-out infinite; }
.loading { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 1.5rem; text-transform: uppercase; letter-spacing: .15em; color: var(--white) !important; }
.loading span { animation: blink 1.4s infinite both; }
.loading span:nth-child(2) { animation-delay: .2s; }
.loading span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0; } 40% { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .loading span, .timeline__next::before { animation: none; } }

.results__media { display: grid; gap: 1.5rem; align-content: start; position: sticky; top: calc(var(--header-h) + 24px); }
.results__media img { width: 100%; object-fit: cover; }
.results__media img:first-child { aspect-ratio: 16/10; }
.results__media img:last-child { aspect-ratio: 4/5; }

/* ---------- Rider ---------- */
.riders { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.rider { background: var(--black); color: var(--white); display: flex; flex-direction: column; }
.rider__photo { background: radial-gradient(circle at 50% 35%, #3a3334 0%, #0d0b0b 75%); display: flex; justify-content: center; padding-top: 1.5rem; border-bottom: 4px solid var(--red); }
.rider__photo img { height: 380px; width: auto; object-fit: contain; }
.rider__body { padding: 1.5rem; }
.rider h3 { font-size: 1.9rem; }
.rider ul { list-style: none; margin: 0; padding: 0; }
.rider li { padding: .45rem 0; border-top: 1px solid rgba(255,255,255,.12); font-size: .96rem; color: #ddd6d4; }
.rider li b { color: var(--yellow); font-family: var(--display); font-style: italic; font-size: 1.1rem; margin-right: .3rem; }

.roster { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 3rem; }
.roster__group h3 { color: var(--red); font-size: 1.3rem; border-bottom: 3px solid var(--black); padding-bottom: .4rem; }
.roster ul { list-style: none; margin: 0; padding: 0; }
.roster li { font-family: var(--display); font-weight: 600; text-transform: uppercase; font-size: 1.15rem; letter-spacing: .03em; padding: .25rem 0; }
.roster small { color: var(--red); font-size: .8em; }

/* ---------- Gare ---------- */
.races { list-style: none; margin: 1.5rem 0; padding: 0; }
.races li { font-family: var(--display); font-style: italic; font-weight: 700; font-size: clamp(1.2rem, 2.2vw, 1.55rem); text-transform: uppercase; padding: .55rem 0 .55rem 1.6rem; border-bottom: 1px solid rgba(255,255,255,.35); position: relative; }
.races li::before { content: ""; position: absolute; left: 0; top: 50%; width: 12px; height: 12px; margin-top: -6px; background: var(--black); transform: skewX(-10deg); }
.note { font-size: .95rem; opacity: .85; }

/* ---------- Sponsor ---------- */
.assets { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2.5rem; }
.asset { margin: 0; background: var(--ink); }
.asset--wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr 1fr; }
.asset img { width: 100%; object-fit: cover; aspect-ratio: 16/10; }
.asset--wide img { height: 100%; }
.asset figcaption { padding: 1.6rem; }
.asset--wide figcaption { display: flex; flex-direction: column; justify-content: center; padding: 2.5rem; }
.asset h3 { color: var(--yellow); }
.asset p { margin: 0; color: #ddd6d4; }

.reach { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 1.5rem; }
.reach__item { border: 1px solid rgba(255,255,255,.15); border-left: 4px solid var(--red); padding: 1.6rem; }
.reach__item p { margin: 0; color: #ddd6d4; }
.reach a { color: var(--yellow); }

.partners { margin-top: 4rem; text-align: center; }
.partners img { width: 100%; margin: 1rem auto; }
.partners__thanks { color: var(--muted); }

.cta { margin-top: 3.5rem; background: var(--red); padding: clamp(2rem, 5vw, 3.5rem); text-align: center; clip-path: polygon(2% 0, 100% 0, 98% 100%, 0 100%); }
.cta h3 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; }
.cta p { margin-bottom: 1.8rem; }
.cta .btn--red { background: var(--black); }
.cta .btn--red:hover { background: var(--yellow); }

/* ---------- Galleria ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-flow: dense; gap: 8px; margin-top: 2.5rem; }
.gallery a { display: block; overflow: hidden; background: var(--black); }
.gallery img { width: 100%; aspect-ratio: 3/2; object-fit: cover; transition: transform .4s, opacity .3s; }
.gallery a:hover img { transform: scale(1.06); opacity: .9; }
.gallery a:nth-child(1), .gallery a:nth-child(10) { grid-column: span 2; grid-row: span 2; }
.gallery a:nth-child(1) img, .gallery a:nth-child(10) img { height: 100%; }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10,8,8,.95); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 88vh; width: auto; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--white); font-size: 3rem; cursor: pointer; line-height: 1; padding: .5rem 1rem; }
.lightbox button:hover { color: var(--yellow); }
.lightbox__close { top: 10px; right: 10px; }
.lightbox__prev { left: 6px; }
.lightbox__next { right: 6px; }

/* ---------- FAQ ---------- */
.faq__list { margin-top: 2rem; max-width: 900px; }
.faq details { background: var(--white); border-left: 4px solid var(--red); margin-bottom: .75rem; }
.faq summary { cursor: pointer; list-style: none; padding: 1.2rem 3rem 1.2rem 1.5rem; position: relative; font-family: var(--display); font-weight: 700; font-style: italic; text-transform: uppercase; font-size: 1.25rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.3rem; top: 50%; transform: translateY(-50%); font-size: 1.8rem; color: var(--red); font-style: normal; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 1.5rem 1.3rem; margin: 0; color: #4a4445; }
.faq a { color: var(--red); }

/* ---------- Contatti ---------- */
.contact { border-top: 4px solid var(--red); }
.contact__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; }
.contact__links { display: grid; gap: 1rem; }
.contact__link { display: flex; align-items: center; gap: 1.2rem; padding: 1.3rem 1.5rem; background: var(--ink); text-decoration: none; border-left: 4px solid var(--red); transition: background .2s, border-color .2s; }
.contact__link:hover { background: #2e2829; border-color: var(--yellow); }
.contact__link svg { width: 30px; height: 30px; color: var(--yellow); flex: none; }
.contact__link span { font-family: var(--display); font-weight: 600; font-size: clamp(1.15rem, 2.4vw, 1.5rem); word-break: break-word; }
.contact__link small { display: block; font-size: .75rem; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--muted); padding: 2.5rem 0; font-size: .92rem; }
.footer__inner { display: flex; align-items: center; gap: 1.5rem; }
.footer img { width: 64px; }
.footer p { margin: 0 0 .2rem; }
.footer strong { color: var(--white); }

/* ---------- Animazione entrata ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .roster { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
    flex-direction: column; justify-content: center; gap: 1.6rem;
    background: var(--black); transform: translateX(100%); transition: transform .3s;
  }
  .nav a { font-size: 1.6rem; }
  .header.is-open .nav { transform: none; }
  .split, .results, .contact__inner { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }  .results__media { position: static; grid-template-columns: 1.6fr 1fr; }
  .results__media img:first-child, .results__media img:last-child { aspect-ratio: auto; height: 100%; }
  .riders { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .assets, .asset--wide, .reach { grid-template-columns: 1fr; }
  .asset--wide figcaption { padding: 1.6rem; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  :root { --header-h: 64px; }
  .header__brand img { height: 32px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats__item:nth-child(2) { border-right: 0; }
  .stats__item:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.25); }
  .features { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .hero__content { padding-bottom: 8vh; }
  .hero__badge { width: 72px; }
  .rider__photo img { height: 320px; }
  .results__media { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; text-align: center; }
}
