/* Páginas de tops de CrazyBiker. Paleta y estilo de docs/marca.md */
@font-face { font-family: "Russo One"; src: url("fuentes/RussoOne-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Poppins"; font-weight: 800; src: url("fuentes/Poppins-ExtraBold.ttf") format("truetype"); font-display: swap; }

:root {
  --negro: #0D0D0D;
  --carbon: #1E1E1E;
  --amarillo: #F5A81C;
  --dorado: #FFC61A;
  --blanco: #FFFFFF;
  --gris: #B5B5B5;
  --rojo: #D9261C;
  --inclinar: skewX(-12deg);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--negro) repeating-linear-gradient(-60deg, transparent 0 60px, #161616 60px 82px);
  color: var(--blanco);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
main { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

h1, h2, .etiqueta, .marca span, .apodo, .datos dd {
  font-family: "Russo One", sans-serif;
  text-transform: uppercase;
  font-style: oblique 12deg;
  letter-spacing: .01em;
}

/* barra superior */
.barra {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1120px; margin: 0 auto; padding: 12px 16px;
}
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.marca img { width: 56px; height: 56px; }
.marca span { font-size: 1.3rem; color: var(--blanco); }
.enlace { color: var(--amarillo); font-weight: 700; text-decoration: none; }
.enlace:hover { text-decoration: underline; }

/* letrero amarillo con lados en diagonal */
.etiqueta {
  display: inline-block;
  background: var(--amarillo); color: var(--negro);
  padding: .35em 1.1em;
  font-size: 1.05rem;
  clip-path: polygon(.6em 0, 100% 0, calc(100% - .6em) 100%, 0 100%);
}
.etiqueta.chica { font-size: .8rem; }

/* hero del top */
.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
  padding: 24px 0 48px;
}
.foto { position: relative; margin: 0; }
.foto > img:first-child {
  width: 100%; aspect-ratio: 5 / 4; object-fit: cover;
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
}
.foto.recorte::before {
  content: ""; position: absolute; inset: 0; background: var(--carbon);
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
}
.foto.recorte > img:first-child {
  position: relative; object-fit: contain; clip-path: none; padding: 4% 10%;
  filter: drop-shadow(0 0 22px rgba(245, 168, 28, .35));
}
.medalla { position: absolute; left: -30px; bottom: -44px; width: 190px; }

.periodo { margin: 10px 0 0; color: var(--gris); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; }
h1 {
  margin: 4px 0 0; font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.02; font-weight: 400;
  text-shadow: .05em .05em 0 var(--rojo);
}
.apodo { margin: 6px 0 0; color: var(--amarillo); font-size: 1.6rem; }
.moto { margin: 10px 0 0; color: var(--gris); font-family: "Poppins", sans-serif; font-weight: 800; font-size: 1.1rem; }
blockquote {
  margin: 22px 0 0; padding: 4px 0 4px 16px;
  border-left: 4px solid var(--amarillo);
  font-size: 1.15rem; font-style: italic;
}
.datos { display: flex; gap: 14px; margin: 24px 0 0; }
.datos div { background: var(--carbon); padding: 10px 18px; min-width: 130px; }
.datos dt { color: var(--gris); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.datos dd { margin: 2px 0 0; color: var(--amarillo); font-size: 1.8rem; }

/* botones */
.compartir { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.boton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px;
  background: var(--carbon); color: var(--blanco);
  border: 2px solid #3a3a3a; font: inherit; font-weight: 700; cursor: pointer;
  text-decoration: none; transform: var(--inclinar);
}
.boton:hover { border-color: var(--amarillo); }
.boton.principal { background: var(--amarillo); color: var(--negro); border-color: var(--amarillo); }
.boton.principal:hover { background: var(--dorado); }
.boton.grande { min-height: 54px; padding: 0 32px; font-size: 1.1rem; }
.boton:focus-visible { outline: 3px solid var(--dorado); outline-offset: 3px; }

/* llamada a la acción */
.cta {
  background: var(--carbon); padding: 36px 28px; margin: 0 0 48px; text-align: center;
  border-top: 4px solid var(--amarillo);
}
.cta h2 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 400; color: var(--amarillo); }
.cta p { margin: 8px 0 18px; color: var(--gris); }
.servicios { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.servicios li { border: 1px solid #3a3a3a; padding: 6px 14px; font-weight: 700; font-size: .9rem; }

/* salón de la fama */
.intro { padding: 24px 0 32px; }
.intro p { color: var(--gris); max-width: 560px; }
.rejilla { list-style: none; padding: 0; margin: 0 0 56px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.tarjeta { display: flex; flex-direction: column; gap: 8px; text-decoration: none; background: var(--carbon); padding: 0 0 18px; border-bottom: 4px solid transparent; }
.tarjeta:hover { border-color: var(--amarillo); }
.tarjeta img { width: 100%; }
.tarjeta .etiqueta, .tarjeta strong, .tarjeta .moto { margin-left: 16px; margin-right: 16px; }
.tarjeta .etiqueta { align-self: flex-start; margin-top: 6px; }
.tarjeta strong { font-size: 1.25rem; }
.tarjeta .moto { margin-top: 0; font-size: .95rem; }

/* pie con bandera a cuadros */
.pie { text-align: center; padding: 0 16px 40px; color: var(--gris); }
.pie img { width: 96px; margin: 24px auto 8px; }
.cuadros {
  height: 28px;
  background: repeating-conic-gradient(var(--blanco) 0 25%, var(--negro) 0 50%) 0 0 / 28px 28px;
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent);
          mask-image: linear-gradient(to bottom, #000 40%, transparent);
}

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 8px; }
  .medalla { width: 140px; left: -14px; bottom: -32px; }
  .marca span { display: none; }
  .datos div { flex: 1; min-width: 0; }
  .compartir .boton { flex: 1 1 auto; }
}

/* ---------- animaciones (lo que ve el cliente al abrir su página) ---------- */

/* la moto entra derrapando desde la derecha, la medalla cae y el texto sube en cascada */
.hero .foto > img:first-child { animation: entra-moto .9s cubic-bezier(.2, .9, .25, 1.1) both; }
.medalla { animation: cae-medalla .8s cubic-bezier(.3, 1.6, .5, 1) .9s both, flota 3.5s ease-in-out 1.8s infinite; }
.info > * { animation: sube .6s ease-out both; }
.info > :nth-child(1) { animation-delay: .25s; }
.info > :nth-child(2) { animation-delay: .35s; }
.info > :nth-child(3) { animation-delay: .45s; }
.info > :nth-child(4) { animation-delay: .55s; }
.info > :nth-child(5) { animation-delay: .65s; }
.info > :nth-child(6) { animation-delay: .75s; }
.info > :nth-child(7) { animation-delay: .85s; }
.info > :nth-child(8) { animation-delay: .95s; }

/* estela de velocidad que cruza detrás de la moto al entrar */
.foto { isolation: isolate; }
.estela { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.estela i {
  position: absolute; right: 0; height: 6px; width: 70%;
  background: linear-gradient(to left, var(--amarillo), transparent);
  transform: var(--inclinar) translateX(110%); opacity: 0;
  animation: estela 1.1s ease-out both;
}
.estela i:nth-child(1) { top: 30%; animation-delay: .05s; }
.estela i:nth-child(2) { top: 50%; width: 50%; background: linear-gradient(to left, var(--blanco), transparent); animation-delay: .15s; }
.estela i:nth-child(3) { top: 70%; animation-delay: .25s; }

/* la moto "acelera" (tiembla un poco) al pasarle el mouse */
.foto:hover > img:first-child { animation: motor .12s linear infinite; }

/* destello que cruza el letrero del puesto */
.etiqueta { position: relative; overflow: hidden; }
.hero .etiqueta::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .7) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: destello 3.2s ease-in-out 1.6s infinite;
}

/* el nombre con su sombra roja "frenando" */
.hero h1 { animation: sube .6s ease-out .45s both, frena 1s ease-out .45s both; }

/* el botón de compartir late para invitar a hacer clic */
.compartir .boton.principal { animation: latido 2.2s ease-out 2s infinite; }

/* tarjetas del salón de la fama */
.rejilla li { animation: sube .6s ease-out both; }
.rejilla li:nth-child(2) { animation-delay: .1s; }
.rejilla li:nth-child(3) { animation-delay: .2s; }
.rejilla li:nth-child(4) { animation-delay: .3s; }
.rejilla li:nth-child(n+5) { animation-delay: .4s; }
.tarjeta { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.tarjeta img { transition: transform .4s ease; }
.tarjeta:hover { transform: translateY(-6px); box-shadow: 0 14px 30px rgba(245, 168, 28, .18); }
.tarjeta:hover img { transform: scale(1.03); }
.tarjeta { overflow: hidden; }

.boton { transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.boton:hover { transform: var(--inclinar) translateY(-2px); }


@keyframes entra-moto {
  from { opacity: 0; transform: translateX(60%) skewX(-18deg); }
  70% { opacity: 1; transform: translateX(-3%) skewX(4deg); }
  to { transform: none; }
}
@keyframes estela {
  0% { opacity: 0; transform: var(--inclinar) translateX(110%); }
  30% { opacity: .9; }
  100% { opacity: 0; transform: var(--inclinar) translateX(-160%); }
}
@keyframes cae-medalla {
  from { opacity: 0; transform: translateY(-120px) rotate(-25deg) scale(.6); }
  to { opacity: 1; transform: none; }
}
@keyframes flota {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-8px) rotate(3deg); }
}
@keyframes sube {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes frena {
  from { text-shadow: .6em .05em 0 transparent; letter-spacing: .12em; }
  to { text-shadow: .05em .05em 0 var(--rojo); letter-spacing: .01em; }
}
@keyframes destello {
  0%, 55% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}
@keyframes latido {
  0% { box-shadow: 0 0 0 0 rgba(245, 168, 28, .6); }
  70%, 100% { box-shadow: 0 0 0 14px rgba(245, 168, 28, 0); }
}
@keyframes motor {
  0% { transform: translate(0, 0); }
  25% { transform: translate(1px, -1px); }
  50% { transform: translate(-1px, 1px); }
  75% { transform: translate(1px, 1px); }
  100% { transform: translate(0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .estela { display: none; }
}
