body{margin:0;background:#1c1a1a}
a{color:#d8ee5f}a:hover{color:#ecfa9e}
.navlink{color:#f4f4ef;text-decoration:none;font-weight:600}
.navlink:hover{color:#d8ee5f}
.cta{display:inline-flex;align-items:center;justify-content:center;gap:10px;background:#d8ee5f;color:#1c1a1a;text-decoration:none;font-family:'Barlow Condensed',sans-serif;font-weight:800;font-size:20px;letter-spacing:.04em;text-transform:uppercase;padding:16px 30px;min-height:44px;box-sizing:border-box;border:0;cursor:pointer}
.cta:hover{background:#ecfa9e;color:#1c1a1a}
.ghost{display:inline-flex;align-items:center;min-height:44px;padding:0 26px;border:2px solid #f4f4ef;color:#f4f4ef;text-decoration:none;font-family:'Barlow Condensed',sans-serif;font-weight:700;font-size:20px;letter-spacing:.04em;text-transform:uppercase;box-sizing:border-box}
.ghost:hover{border-color:#d8ee5f;color:#d8ee5f}
.field{width:100%;box-sizing:border-box;min-height:48px;padding:12px 14px;background:#fff;border:2px solid #d9d9d3;border-radius:2px;font:400 16px 'Open Sans',sans-serif;color:#1c1a1a}
.field:focus{outline:none;border-color:#1c1a1a;box-shadow:0 0 0 3px #d8ee5f}
.torn{clip-path:polygon(0 3%,6% 0,14% 2%,23% 0,31% 3%,40% 1%,49% 3%,58% 0,67% 2%,76% 0,85% 3%,93% 1%,100% 2%,99% 30%,100% 62%,98% 97%,90% 100%,81% 98%,72% 100%,63% 97%,54% 100%,45% 98%,36% 100%,27% 97%,18% 100%,9% 98%,0 100%,1% 68%,0 35%)}
details summary{list-style:none;cursor:pointer}
details summary::-webkit-details-marker{display:none}
details[open] .plus{transform:rotate(45deg)}
.plus{transition:transform .2s}
section{scroll-margin-top:72px}
@media (max-width:700px){.navlink{display:none}}

/* ===== Afegits de Colbai sobre la landing de Juanma ===== */
:root { --neo: #d8ee5f; --carboni: #1c1a1a; --panell: #3a3434; --gris: #aaa49f; --blanc: #f4f4ef; --kerb: #e3342b; --linia: rgba(244,244,239,.14); --rapid: cubic-bezier(.2,.9,.1,1); }
html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; }

/* Compte enrere (hero) */
.compte__titol { margin: 0 0 8px; font-size: 14px; color: #cfcfc8; }
.compte__xifres { display: flex; gap: 6px; }
.compte__xifres span { display: grid; background: rgba(20,18,18,.8); border-left: 3px solid var(--neo); padding: 6px 12px 6px 10px; min-width: 70px; }
.compte__xifres span:first-child { min-width: 96px; }
.compte__xifres b { font: 800 clamp(34px, 5vw, 52px)/.95 'Barlow Condensed', sans-serif; color: var(--neo); font-variant-numeric: tabular-nums; }
.compte__xifres span:last-child b { color: var(--blanc); }
.compte__xifres i { font-style: normal; font-size: 13px; color: var(--gris); }

/* Formulari */
.fila { display: flex; flex-wrap: wrap; gap: 18px; }
.lab { flex: 1 1 220px; display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 15px; min-width: 0; }
.checks { display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.5; color: #3c3a3a; padding-top: 4px; }
.checks label { display: flex; gap: 10px; align-items: flex-start; }
.checks input { width: 20px; height: 20px; margin: 1px 0 0; flex: 0 0 auto; accent-color: #1c1a1a; }
.checks a { color: #1c1a1a; }
.error { color: #b3261e; font-weight: 600; font-size: 13px; }
.field[aria-invalid="true"] { border-color: #b3261e; }
.cta--fosc { align-self: flex-start; background: #1c1a1a; color: var(--neo); margin-top: 6px; }
.cta--fosc:hover { background: #333; color: #ecfa9e; }
.cta:disabled { opacity: .6; cursor: wait; }
.missatge { margin: 0; font-weight: 600; }
.missatge--error { color: #b3261e; }
.enviat { display: flex; flex-direction: column; gap: 18px; padding: 24px 0; }
.enviat[hidden] { display: none; }
.enviat__marca { width: 64px; height: 64px; background: var(--neo); display: flex; align-items: center; justify-content: center; }
.enviat h3 { margin: 0; font: 800 46px/1 'Barlow Condensed', sans-serif; text-transform: uppercase; }
.enviat p { margin: 0; font-size: 18px; line-height: 1.6; }
.enviat .enviat__nota { font-size: 16px; color: #3c3a3a; }
.enviat .enviat__id { font: 800 26px/1 'Barlow Condensed', sans-serif; letter-spacing: .06em; }
.altra { min-height: 44px; padding: 0 20px; background: transparent; border: 2px solid #1c1a1a; font: 700 16px 'Open Sans', sans-serif; color: #1c1a1a; cursor: pointer; }

/* La moto: l'escàner que la construeix */
.moto-sec { background: #2c2a2a; color: var(--blanc); padding: 110px 24px; }
.moto { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.etiq { color: var(--neo); font: 700 20px 'Barlow Condensed', sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.etiq--gris { color: #3c3a3a; }
.moto__text h2 { margin: 12px 0 18px; font: 800 clamp(40px, 5vw, 64px)/1 'Barlow Condensed', sans-serif; text-transform: uppercase; }
.moto__text p { margin: 0; font-size: 18px; line-height: 1.65; color: #d8d3cd; }
.passos { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 4px; }
.passos li { display: grid; grid-template-columns: 56px 1fr; column-gap: 14px; align-items: baseline; padding: 12px 16px; border-left: 3px solid var(--panell); transition: border-color .3s, background .3s, opacity .3s; }
.passos li::before { content: attr(data-n); grid-row: span 2; font: 800 36px/1 'Barlow Condensed', sans-serif; color: var(--gris); transition: color .3s; }
.passos b { font-weight: 700; font-size: 18px; }
.passos span { color: var(--gris); font-size: 15px; }
.js .passos li { opacity: .7; }
.js .passos li.fet { opacity: .85; }
.js .passos li.actiu { opacity: 1; background: var(--panell); border-left-color: var(--neo); }
.passos li.actiu::before, .passos li.fet::before { color: var(--neo); }
.muntatge { margin: 0; position: relative; justify-self: center; isolation: isolate; width: min(100%, calc(min(78vh, 720px) * .75)); aspect-ratio: 3 / 4; }
.muntatge::before { content: ''; position: absolute; inset: -18px; z-index: -1; background-image: linear-gradient(var(--linia) 1px, transparent 1px), linear-gradient(90deg, var(--linia) 1px, transparent 1px); background-size: 24px 24px; }
.muntatge img { width: 100%; height: 100%; object-fit: cover; display: block; }
.muntatge__plano { position: absolute; inset: 0; filter: url(#vores); opacity: 0; }
.js .muntatge__plano { opacity: 1; }
.muntatge__foto { position: relative; }
.js .muntatge__foto { clip-path: inset(0 0 calc((1 - var(--munta, 0)) * 100%) 0); }
.muntatge__escaner { position: absolute; left: -18px; right: -18px; height: min(22%, calc(var(--munta, 0) * 100%)); pointer-events: none; top: calc(var(--munta, 0) * 100%); transform: translateY(-100%); opacity: 0; transition: opacity .3s; background: linear-gradient(180deg, transparent, rgba(216,238,95,.06) 40%, rgba(216,238,95,.3)); }
.muntatge__escaner::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: #f6ffc2; box-shadow: 0 0 6px 2px var(--neo), 0 0 26px 6px rgba(216,238,95,.55); }
.muntatge.escanejant .muntatge__escaner { opacity: 1; }
.muntatge__cotes { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cota circle { fill: var(--carboni); stroke: var(--neo); stroke-width: 3; }
.cota path { fill: none; stroke: var(--neo); stroke-width: 2; }
.cota text { fill: var(--blanc); font: 700 22px 'Open Sans', sans-serif; paint-order: stroke; stroke: var(--carboni); stroke-width: 6px; }
.cota text.dreta { text-anchor: end; }
.js .cota path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .cota text, .js .cota circle { opacity: 0; }
.vist .cota path { stroke-dashoffset: 0; transition: stroke-dashoffset .6s var(--rapid) calc(.1s + var(--i) * .2s); }
.vist .cota circle { opacity: 1; transition: opacity .2s calc(var(--i) * .2s); }
.vist .cota text { opacity: 1; transition: opacity .4s calc(.4s + var(--i) * .2s); }
.muntatge__estat { position: absolute; right: 0; top: max(0px, calc(var(--munta, 0) * 100% - 2.6em)); margin: 0; padding: 2px 10px; font: 800 italic 16px/1.5 'Barlow Condensed', sans-serif; color: var(--carboni); background: var(--neo); transition: opacity .3s; text-transform: uppercase; }
.muntatge__estat span { font-size: 22px; }
.muntatge.llesta .muntatge__estat, .quiet .muntatge__estat { opacity: 0; }
html:not(.js) .muntatge__estat { display: none; }
.muntatge__segell { position: absolute; right: -6%; bottom: 8%; margin: 0; padding: 10px 18px; background: var(--neo); color: var(--carboni); font: 800 italic clamp(20px, 2.4vw, 28px)/1 'Barlow Condensed', sans-serif; text-transform: uppercase; transform: rotate(-8deg) scale(2.4); opacity: 0; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }
.muntatge.llesta .muntatge__segell { opacity: 1; transform: rotate(-8deg) scale(1); transition: transform .35s cubic-bezier(.3,1.6,.5,1), opacity .15s; }
.muntatge.llesta .muntatge__foto { animation: motor-viu .09s linear 6; }
@keyframes motor-viu { 50% { transform: translate(1px, -1px); } }
.quiet .passos li { opacity: 1 !important; }
.quiet .muntatge__plano { display: none; }
.quiet .muntatge__foto { clip-path: none; }
.xifres { max-width: 1200px; margin: 72px auto 0; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 2px; background: #1c1a1a; border: 2px solid #1c1a1a; }
.xifres div { background: #2c2a2a; padding: 22px; display: flex; flex-direction: column-reverse; gap: 4px; }
.xifres dd { margin: 0; font: 800 48px/1 'Barlow Condensed', sans-serif; color: var(--neo); }
.xifres dt { font-size: 15px; color: #d8d3cd; }

/* Patrocinadors */
.spons { background: #f4f4ef; color: #1c1a1a; padding: 80px 24px; }
.spons__in { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; align-items: center; text-align: center; }
.spons__graella { position: relative; width: min(100%, 900px); line-height: 0; }
.spons__logos { display: block; width: 100%; height: auto; }
/* En unitats de la imatge (1950 × 1118): el logo visible fa 180 d'alt, centrat a x 320 i y 1010. */
.spons__graella-colbai { position: absolute; left: 11.04%; top: 81.4%; width: 11.11%; height: auto; }
.spons__colbai { display: flex; align-items: center; gap: 18px; text-align: left; background: #1c1a1a; color: #f4f4ef; padding: 14px 22px; }
.spons__colbai img { width: 64px; height: auto; }
.spons__colbai p { margin: 0; font-size: 15px; }
.spons__nota { font-size: 13px; color: #6b6868; }
.priv { max-width: 1200px; margin: 28px auto 0; color: #aaa49f; font-size: 13px; line-height: 1.6; border-top: 1px solid #3a3737; padding-top: 22px; }
.priv h2 { margin: 0 0 6px; font: 700 18px 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: .08em; color: #f4f4ef; }
.priv p { margin: 0; max-width: 90ch; }
.priv h3 { margin: 14px 0 2px; font-size: 13px; font-weight: 700; color: #e6e6e0; }
.priv .priv__estat { font-style: italic; }
.priv + .priv { margin-top: 18px; }

/* Acompanyants: nom i correu de cadascun (reunió del 20/11) */
.acomps { display: flex; flex-direction: column; gap: 14px; }
.acomps[hidden], .acomp[hidden] { display: none; }
.acomps__nota { margin: 0; font-size: 14px; line-height: 1.5; color: #3c3a3a; }
.acomp { margin: 0; padding: 14px 16px 16px; border: 2px solid #d9d9d3; min-width: 0; }
.acomp legend { padding: 0 6px; font: 800 18px 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: .04em; }
.tancat { display: flex; flex-direction: column; gap: 12px; padding: 24px 0; }
.tancat[hidden] { display: none; }
.tancat h3 { margin: 0; font: 800 40px/1 'Barlow Condensed', sans-serif; text-transform: uppercase; }
.tancat p { margin: 0; font-size: 17px; line-height: 1.6; }
.tancat a { color: #1c1a1a; }

/* So del motor */
.so { position: fixed; right: 16px; bottom: 16px; z-index: 85; display: inline-flex; align-items: center; gap: 8px; font: 700 15px 'Open Sans', sans-serif; color: #f4f4ef; background: rgba(20,18,18,.92); border: 1px solid #3a3434; border-left: 3px solid var(--neo); padding: 9px 14px; min-height: 44px; cursor: pointer; }
.so svg { width: 20px; height: 20px; fill: none; stroke: var(--neo); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.so__altaveu { fill: var(--neo); }
.so__creu { display: none; }
.so[aria-pressed="false"] .so__ones { display: none; }
.so[aria-pressed="false"] .so__creu { display: inline; stroke: var(--kerb); }
.so[aria-pressed="false"] { border-left-color: var(--gris); }
.so.espera { animation: crida 1.6s ease-in-out infinite; }
@keyframes crida { 50% { box-shadow: 0 0 0 6px rgba(216,238,95,.25); } }

/* Mòbil */
@media (max-width: 860px) {
  .moto { grid-template-columns: 1fr; gap: 56px; }
  .muntatge { width: min(100% - 36px, calc(min(70vh, 620px) * .75)); }
  .xifres { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 700px) {
  #inscripcio div[style*="padding: 48px"] { padding: 28px 20px !important; }
  section[id]:not(#inici), .moto-sec, .spons { padding-left: 16px !important; padding-right: 16px !important; }
  section[id]:not(#inici) { padding-top: 72px !important; padding-bottom: 72px !important; }
  .compte__xifres span, .compte__xifres span:first-child { min-width: 0; flex: 1; padding: 6px 8px; }
  .cta { width: 100%; }
  .cta--fosc { align-self: stretch; }
  .so { font-size: 13px; padding: 7px 10px; right: 8px; bottom: 8px; }
  .spons__colbai { flex-direction: column; text-align: center; }
  .enviat h3 { font-size: 38px; }
}
@media print { .muntatge__foto { clip-path: none !important; } .so, .muntatge__plano, .muntatge__escaner, .muntatge__estat { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
}

form[hidden] { display: none !important; }
.xifres dd { order: -1; }
.xifres div { flex-direction: column !important; }

.so[hidden] { display: none; }

/* Comptarevolucions fix (de la v5): puja amb el desplaçament, igual que el so */
.taco {
  position: fixed; left: 16px; bottom: 16px; z-index: 80; width: 150px; padding: 8px 10px 10px;
  background: rgba(20,18,18,.9); border: 1px solid #3a3434; font-family: 'Barlow Condensed', sans-serif;
  opacity: 0; transform: translateY(20px); transition: opacity .4s, transform .4s var(--rapid);
  pointer-events: none;
}
.taco.actiu { opacity: 1; transform: none; }
.taco svg { width: 100%; height: auto; display: block; }
.taco path { fill: none; stroke-width: 12; }
.taco__fons { stroke: #3a3434; }
.taco__valor { stroke: var(--neo); stroke-dasharray: 1; stroke-dashoffset: 1; }
.taco__leds { display: flex; justify-content: center; gap: 5px; margin-bottom: 4px; }
.taco__leds i { width: 10px; height: 10px; border-radius: 50%; background: #2b2626; }
.taco__leds i.on { background: var(--neo); box-shadow: 0 0 8px var(--neo); }
.taco__leds i.on:nth-child(n+5) { background: #ffb020; box-shadow: 0 0 8px #ffb020; }
.taco__leds i.on:nth-child(n+7) { background: var(--kerb); box-shadow: 0 0 8px var(--kerb); }
.taco.limit .taco__leds i { animation: parpelleig .18s steps(2) infinite; }
@keyframes parpelleig { 50% { opacity: .15; } }
.taco__marxa { position: absolute; left: 0; right: 0; top: 46px; margin: 0; text-align: center; line-height: 1; }
.taco__marxa b { display: block; font-style: italic; font-weight: 800; font-size: 2.6rem; color: var(--blanc); }
.taco__marxa span, .taco__rpm span { font-size: .7rem; color: var(--gris); }
.taco__rpm { margin: 2px 0 0; text-align: center; line-height: 1; }
.taco__rpm b { font-weight: 800; font-size: 1.2rem; color: var(--neo); margin-right: 4px; }
@media (max-width: 1599px) {
  .taco { width: 96px; padding: 5px 6px 6px; left: 8px; bottom: 8px; }
  .taco__leds { gap: 3px; margin-bottom: 2px; }
  .taco__leds i { width: 7px; height: 7px; }
  .taco__marxa { top: 27px; }
  .taco__marxa b { font-size: 1.6rem; }
  .taco__marxa span, .taco__rpm span { display: none; }
  .taco__rpm b { font-size: .95rem; }
}
@media (max-width: 640px), (max-height: 480px) {
  .taco { width: 72px; padding: 4px 5px 5px; }
  .taco__leds { display: none; }
  .taco__marxa { top: 15px; }
  .taco__marxa b { font-size: 1.3rem; }
  .taco__rpm { display: none; }
}
@media print { .taco { display: none !important; } }

/* Línia de meta i temps de la volta (de la v5): el temps que has tardat a baixar fins aquí */
.volta { position: fixed; inset: 0 0 auto; height: 3px; z-index: 90; pointer-events: none; }
.volta span { display: block; height: 100%; width: 100%; background: var(--neo); transform-origin: 0 50%; transform: scaleX(0); }
.meta-sec { background: #1c1a1a; padding: 0 24px 80px; }
.meta { height: 28px; margin: 0 -24px 72px; background: conic-gradient(#f4f4ef 25%, #141212 0 50%, #f4f4ef 0 75%, #141212 0) 0 0 / 28px 28px; animation: bandera 3s linear infinite; }
@keyframes bandera { to { background-position: 56px 0; } }
.podi { position: relative; max-width: 900px; margin: 0 auto; padding: 36px clamp(20px, 4vw, 40px) 30px; text-align: center; background: #141212; border: 1px solid #3a3434; overflow: hidden; }
.podi::before { content: ''; position: absolute; inset: 0 0 auto; height: 10px; background: conic-gradient(var(--neo) 25%, #141212 0 50%, var(--neo) 0 75%, #141212 0) 0 0 / 10px 10px; }
.podi__titol { margin: 6px 0 0; font: 800 italic 28px/1.1 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--neo); }
.podi__temps { margin: 0; font: 800 clamp(64px, 14vw, 128px)/1 'Barlow Condensed', sans-serif; font-variant-numeric: tabular-nums; }
.podi__dades { margin: 10px auto 18px; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 36px; }
.podi__dades dt { font-size: 13px; color: var(--gris); }
.podi__dades dd { margin: 0; font: 800 24px 'Barlow Condensed', sans-serif; }
.podi__text { margin: 0 auto; font-size: 18px; font-weight: 600; }
.js .podi { opacity: 0; transform: scale(.94); }
.js .podi.arribat { opacity: 1; transform: none; transition: opacity .3s, transform .6s cubic-bezier(.3,1.5,.5,1); }
.podi.arribat .podi__temps { animation: flaix .9s steps(2) 3; }
@keyframes flaix { 50% { color: var(--neo); } }
.podi.rec::after { content: 'Rècord'; position: absolute; top: 22px; right: -38px; transform: rotate(35deg); background: var(--kerb); color: var(--blanc); font-weight: 800; padding: 4px 44px; font-size: 14px; }
.podi .cta { margin-top: 22px; }
@media (max-width: 700px) { .meta-sec { padding: 0 16px 56px; } .meta { margin: 0 -16px 48px; } }
@media print { .volta, .meta-sec { display: none !important; } }
