/* =========================================================
   LOS MICHIS — style.css
   ========================================================= */

:root {
  --ink: #12161d;
  --ink-2: #1b212b;
  --ink-3: #232b37;
  --line: rgba(237, 227, 207, 0.14);

  --paper: #ede3cf;
  --paper-2: #e2d6ba;
  --paper-dim: #cdbf9c;

  --amber: #c68a34;
  --amber-bright: #e2a94f;
  --stamp-red: #a8402f;
  --moss: #5c6f52;
  --slate: #6b7280;
  --pure-red: #cd0505;

  --text-hi: #f4ecd8;
  --text-body: #cdc3ab;
  --text-dim: #8d846f;
  --text-on-paper: #221c12;
  --text-on-paper-dim: #5c5136;

  --f-display: "Fraunces", Georgia, serif;
  --f-mono: "Space Mono", "Courier New", monospace;
  --f-body: "Inter", system-ui, sans-serif;

  --radius: 6px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --ease: cubic-bezier(0.22, 0.68, 0, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text-body);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--text-hi);
  font-family: var(--f-display);
  font-weight: 600;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--amber-bright);
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.topbar {
  position: fixed; z-index: 50;
  top: 0; right: 0; left: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  background: rgba(18, 22, 29, 0.55);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.topbar__brand {
  color: var(--text-hi);
  font-family: var(--f-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.topbar__dot { color: var(--amber); }
.topbar__sub { color: var(--text-dim); letter-spacing: 0.1em; text-transform: lowercase; }

.topbar__nav {
  display: flex; gap: clamp(1rem, 3vw, 2rem);
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar__nav a {
  padding-bottom: 2px;
  color: var(--text-body);
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.topbar__nav a:hover { color: var(--amber-bright); border-color: var(--amber-bright); }

.hero {
  position: relative;
  display: flex; align-items: flex-end;
  min-height: 100svh;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 6vw, 4rem) clamp(3rem, 8vw, 5rem);
  background-color: var(--ink);
  background-image:
    linear-gradient(180deg, rgba(18, 22, 29, 0.25) 0%, rgba(18, 22, 29, 0.55) 55%, rgba(15, 18, 24, 0.97) 100%),
    url("assets/grupo-los-michis.jpg");
  background-position: center 35%;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero__inner { max-width: 46rem; }

.hero__title {
  margin-bottom: 1rem;
  font-size: clamp(2.8rem, 9vw, 5.4rem);
  font-style: italic;
  font-weight: 600;
  line-height: 0.95;
}

.hero__subtitle {
  max-width: 38ch;
  margin-bottom: 1.6rem;
  color: var(--text-body);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
}

.hero__cta {
  display: inline-block;
  padding: 0.75rem 1.3rem;
  color: var(--ink);
  background: var(--amber-bright);
  border-radius: var(--radius);
  font-family: var(--f-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

.hero__cta:hover { background: var(--paper); transform: translateY(-2px); }

.indice, .expedientes {
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.25rem, 6vw, 4rem);
}

.expedientes {
  background: var(--ink-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section__head { max-width: 40rem; margin-bottom: 2.5rem; }

.section__head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-style: italic;
}

.section__lead {
  margin-top: 0.6rem;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.grid-fichas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
}

.ficha {
  padding: 1.1rem 1.2rem 1.3rem;
  color: var(--text-on-paper);
  text-align: left;
  background: var(--paper);
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.ficha:hover, .ficha:focus-visible {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.ficha__top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.9rem;
}

.ficha__numero {
  color: var(--text-on-paper-dim);
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.ficha__avatar {
  display: flex; align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem;
  color: var(--paper);
  background-color: var(--ink);
  border-radius: 50%;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  font-weight: 700;
}

.ficha__avatar--foto, .expediente__avatar--foto {
  background-position: center;
  background-size: cover;
}

.ficha__nombre {
  padding-top: 0.7rem;
  margin-bottom: 0.4rem;
  border-top: 1px dashed var(--paper-dim);
  font-size: 1.15rem;
  font-weight: 600;
}

.ficha__meta {
  color: var(--text-on-paper-dim);
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.acordeon { display: flex; flex-direction: column; gap: 0.8rem; }

.expediente {
  overflow: hidden;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  scroll-margin-top: 5.5rem;
}

.expediente__header {
  display: flex; align-items: center; gap: 0.9rem;
  width: 100%; padding: 1rem 1.2rem;
  color: var(--text-hi); text-align: left;
  background: transparent; border: none;
  font-family: inherit;
  cursor: pointer;
}

.expediente__numero {
  width: 1.6rem;
  color: var(--text-dim);
  font-family: var(--f-mono);
  font-size: 0.75rem;
}

.expediente__avatar {
  display: flex; flex-shrink: 0;
  align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem;
  color: var(--ink);
  background-color: var(--amber);
  border-radius: 50%;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  font-weight: 700;
}

.expediente__nombre {
  flex: 1;
  font-family: var(--f-display);
  font-size: 1.15rem;
}

.expediente__chevron {
  flex-shrink: 0;
  color: var(--text-dim);
  transition: transform 0.25s var(--ease), color 0.25s var(--ease);
}

.expediente.is-open .expediente__chevron {
  color: var(--amber-bright);
  transform: rotate(180deg);
}

.expediente__panel {
  padding: 1.4rem 1.3rem 1.6rem;
  color: var(--text-on-paper);
  background: var(--paper);
  border-top: 1px solid var(--paper-dim);
}

.expediente__label {
  margin-bottom: 0.4rem;
  color: var(--text-on-paper-dim);
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.expediente__label--items {
  padding-top: 1.2rem;
  margin-top: 1.3rem;
  border-top: 1px dashed var(--paper-dim);
}

.expediente__descripcion { max-width: 60ch; font-size: 0.98rem; }

.vacio {
  padding: 1rem 1.1rem;
  color: var(--text-on-paper-dim);
  border: 1px dashed var(--paper-dim);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.items {
  display: flex; flex-direction: column; gap: 0.7rem;
  padding: 0; margin: 0; list-style: none;
}

.item {
  display: flex; align-items: flex-start; gap: 0.9rem;
  min-width: 0; padding: 0.85rem 0.9rem;
  background: var(--paper-2);
  border-radius: var(--radius);
}

.item__imagen {
  flex-shrink: 0;
  width: 110px; height: 75px;
  overflow: hidden;
  background: var(--ink-3);
  border-radius: var(--radius);
}

.item__imagen img { width: 100%; height: 100%; object-fit: cover; }

.stamp {
  flex-shrink: 0;
  padding: 0.3rem 0.5rem;
  color: var(--paper);
  border-radius: 3px;
  font-family: var(--f-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.tipo-video { background: var(--stamp-red); }
.tipo-juego { background: var(--moss); }
.tipo-web { color: var(--text-on-paper); background: var(--amber); }
.tipo-otro { background: var(--slate); }
.tipo-canal { background: var(--pure-red); }

.item__body { flex: 1; min-width: 0; }

.item__titulo {
  margin-bottom: 0.2rem;
  font-size: 1rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.item__descripcion {
  color: var(--text-on-paper-dim);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.item__link {
  flex-shrink: 0;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--text-on-paper);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.item__link:hover { color: var(--paper); background: var(--text-on-paper); }

.footer {
  padding: 2.2rem clamp(1.25rem, 6vw, 4rem);
  color: var(--text-dim);
  text-align: center;
  font-family: var(--f-mono);
  font-size: 0.75rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-visible { opacity: 1; transform: none; }

.hero__inner > .reveal:nth-child(1) { transition-delay: 0.05s; }
.hero__inner > .reveal:nth-child(2) { transition-delay: 0.15s; }
.hero__inner > .reveal:nth-child(3) { transition-delay: 0.25s; }
.hero__inner > .reveal:nth-child(4) { transition-delay: 0.35s; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--amber-bright);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

@media (min-width: 641px) and (max-width: 1000px) {
  .item { gap: 0.7rem; }
  .item__imagen { width: 90px; height: 65px; }
  .stamp { padding: 0.28rem 0.4rem; font-size: 0.6rem; }
  .item__titulo { font-size: 0.92rem; }
  .item__descripcion { font-size: 0.82rem; }
  .item__link { padding: 0.3rem 0.55rem; font-size: 0.65rem; }
}

@media (max-width: 640px) {
  .topbar__sub { display: none; }
  .item { flex-direction: column; align-items: stretch; gap: 0.6rem; padding: 0.8rem; }
  .item__imagen { width: 100%; height: clamp(140px, 42vw, 210px); }
  .stamp { align-self: flex-start; }
  .item__body { width: 100%; }
  .item__titulo { font-size: 1rem; line-height: 1.3; }
  .item__descripcion { font-size: 0.84rem; line-height: 1.55; }
  .item__link { align-self: stretch; width: 100%; padding: 0.65rem 0.75rem; text-align: center; }
}

@media (max-width: 380px) {
  .item { padding: 0.7rem; }
  .item__imagen { height: 150px; }
  .item__titulo { font-size: 0.95rem; }
  .item__descripcion { font-size: 0.8rem; }
  .item__link { font-size: 0.65rem; }
}

/* =========================================================
   MINIJUEGO DEL FOOTER (CON CONTADOR)
   ========================================================= */

.michi-game-section {
  max-width: 1000px;
  padding: 25px;
  margin: 60px auto 20px;
  text-align: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
}

.michi-game-header h3 { margin: 0 0 5px; font-size: 1.3rem; }

.michi-game-header p {
  margin: 0 0 10px;
  opacity: 0.8;
  font-size: 0.9rem;
}

.michi-stats {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.michi-score-board,
.michi-time-board {
  display: inline-block;
  padding: 6px 18px;
  color: #fff;
  border-radius: 20px;
  font-size: 1.15rem;
  font-weight: bold;
  background: #ff5722;
}

.michi-time-board {
  font-family: "Space Mono", monospace;
}

.michi-game-area {
  position: relative;
  width: 100%;
  height: 400px;
  margin-top: 15px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.michi-target {
  position: absolute;
  width: 64px; height: 64px;
  background-position: center;
  background-size: cover;
  border: 2px solid #2196f3;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.3s ease;
  animation: popIn 0.25s ease;
}

.michi-target:hover { transform: scale(1.15); }

.michi-game-over {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.michi-game-over p {
  padding: 0 15px;
  margin-bottom: 15px;
  color: #ff5252;
  font-size: 1.1rem;
  font-weight: bold;
  text-align: center;
}

.michi-retry-btn {
  padding: 10px 20px;
  color: #fff;
  background: #ff5722;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.michi-retry-btn:hover { background: #e64a19; }

@keyframes popIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}
/* =========================================================
   BANNER MAURIPROD GAME JAM
   ========================================================= */

.gamejam {
  position: relative;
  padding: clamp(3rem, 7vw, 5rem) clamp(1.25rem, 6vw, 4rem);

  background: var(--ink-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);

  text-align: center;

  overflow: hidden;
}

/* Degradado sutil rojo ↔ verde de fondo */
.gamejam::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 50%, rgba(168, 64, 47, 0.18) 0%, transparent 55%),
    radial-gradient(circle at 85% 50%, rgba(92, 111, 82, 0.18) 0%, transparent 55%);
  pointer-events: none;
}

.gamejam__inner {
  position: relative;
  max-width: 46rem;
  margin: 0 auto;
}

.gamejam__eyebrow {
  color: #e2a94f;
}

.gamejam__title {
  margin: 0.4rem 0 1rem;
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1.05;

  background: linear-gradient(
    90deg,
    #a8402f 0%,
    #cd0505 40%,
    #5c6f52 60%,
    #7fa36d 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gamejam__emoji {
  -webkit-text-fill-color: initial;
}

.gamejam__versus {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  margin: 1.2rem 0 1.4rem;
  padding: 0.6rem 1.4rem;

  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: 999px;

  font-family: var(--f-mono);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.gamejam__versus-side--agro {
  color: #7fa36d;
  text-shadow: 0 0 12px rgba(127, 163, 109, 0.4);
}

.gamejam__versus-side--robotica {
  color: #e06555;
  text-shadow: 0 0 12px rgba(205, 5, 5, 0.4);
}

.gamejam__versus-vs {
  color: var(--amber-bright);
  font-size: 0.85rem;
  text-transform: lowercase;
  opacity: 0.8;
}

.gamejam__desc {
  max-width: 50ch;
  margin: 0 auto 1.8rem;

  color: var(--text-body);
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  line-height: 1.6;
}

.gamejam__desc strong {
  color: var(--text-hi);
}

.gamejam__desc em {
  color: var(--amber-bright);
  font-style: normal;
  font-weight: 500;
}

.gamejam__cta {
  display: inline-block;

  padding: 0.8rem 1.6rem;

  color: var(--paper);
  background: linear-gradient(135deg, #cd0505 0%, #7fa36d 100%);
  background-size: 200% 200%;
  background-position: 0% 50%;
  border-radius: var(--radius);

  font-family: var(--f-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  transition:
    background-position 0.4s var(--ease),
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);

  box-shadow: 0 6px 20px rgba(205, 5, 5, 0.25);
}

.gamejam__cta:hover {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(92, 111, 82, 0.35);
}

@media (max-width: 640px) {
  .gamejam__versus {
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
  }
}