/* =========================
   THE WALK · MAPA (Mapa.css)
   afinado: más ligero en desktop/tablet
   ========================= */

:root{
  --bg: #dadada10;
  --ink: #000200;

  /* borde/forma */
  --line: rgba(3, 0, 0, 0.55);
  --stroke: 2px;
  --radius: 14px;

  /* layout */
  --pad: 18px;
  --gap: 18px;
  --maxw: 1200px;
  --frame-margin: 0px;          /* margen exterior del mapa */

  /* tipografía */
  --font: Ubuntu, "Helvetica Neue", system-ui, -apple-system, Segoe UI, Roboto, Cantarell, Arial, sans-serif;
  --label-size: 1.5rem;

  /* poemas */
  --poema-minh: 60px;
  --poema-font: 2.5rem;

  /* partituras */
  --partitura-size: 56px;
  --partitura-number: 2.0rem;  /* tamaño del número */

  /* placeholder */
  --ph-minh: 38svh;
  --h1-size: 1.7rem;
  --text-size: 1.5rem;

  /* Vídeo */
  --veil: .2;          /* 0.20–0.70 */
  --video-opacity: 0.66; /* 0.08–0.30 */
}

/* ---------- Reset base ---------- */
*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  font-family: var(--font);
  color: var(--ink);

  /* Fondo textura */
  background-image: url("../graficos/Ruido_1.jpg");
  background-repeat:repeat;
  background-size: 1419px 1419px;
  background-position: center;
  background-color: rgba(70, 236, 4, 0.1);
  background-blend-mode: normal;
}

/* Tipografía del subtítulo "Begin" (si lo usas) */
#partituras-title{
  font-family: var(--font);
  font-size: 2.5rem;
  font-weight: 300;
}

/* ---------- Marco principal ---------- */
.mapa__frame{ position: relative; }

.mapa__topology{
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.mapa__poemas,
.mapa__partituras,
.mapa__placeholder{
  position: relative;
  z-index: 2;
}


.partituras{
  position: relative;
  z-index: 2;
}

.mapa__frame{
  width: min(100%, var(--maxw));
  margin: var(--frame-margin) auto;
  margin-top: 0px;
  padding: var(--pad);
  min-height: 100svh;

  border-left: var(--stroke) solid var(--line);
  border-right: var(--stroke) solid var(--line);

  display: grid;
  gap: var(--gap);
  grid-template-rows: auto auto 1fr;
}

/* Labels */
.mapa__label{
  margin: 0px;
  color: #69aa5d;
  letter-spacing: 0.75rem;
  text-transform: uppercase;
  font-weight: 300;
  opacity: .85;
}
#partituras-title{
  font-size: 2.5rem ;
}
#poemas-title{
  font-size: 2.0rem;
  color: #030f00;
}

/* ---------- Anti-astillado ---------- */
.poema,
.partitura,
.placeholder__box{
  border-radius: var(--radius);
  overflow: hidden;
  background-clip: padding-box;
  isolation: isolate;
  transform: translateZ(0);
}

/* =========================
   POEMAS
   ========================= */
.poemas__grid{
  display: grid;
  gap: 12px;
  align-items: stretch;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* móvil */
}

@media (min-width: 700px){
  .poemas__grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1000px){
  .poemas__grid{ grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

.poema{
  min-height: var(--poema-minh);
  padding: 12px;

  display: grid;
  place-items: center;

  text-align: center;
  text-decoration: none;
  color: inherit;

  border: none;
  box-shadow: 0 0 0 var(--stroke) var(--line);

  background: rgba(233, 232, 232, 0.2);
  font-size: var(--poema-font);
}

.poema--wide{ grid-column: span 2; }
@media (min-width: 1000px){
  .poema--wide{ grid-column: span 3; }
}

.poema--dot{
  font-size: calc(var(--poema-font) + .5rem);
  letter-spacing: .2em;
}

.poema:hover{ background: rgba(43, 250, 2, 0.22); }

.poema.is-active{
  box-shadow: 0 0 0 calc(var(--stroke) + 0.5px) rgba(187, 186, 186, 0.95);
}

/* =========================
   PARTITURAS
   ========================= */
.partituras__row{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.partitura{
  width: var(--partitura-size);
  height: var(--partitura-size);

  display: grid;
  place-items: center;

  text-decoration: none;
  color: rgba(230, 122, 0, 0.65);   /* amortiguado */
  font-weight: 300;
  font-size: 1.5rem;
  line-height: 1;

  border-radius: 10px;
  border: none;
  box-shadow: 0 0 0 var(--stroke) rgba(189, 189, 189, 0.4);
  background: rgba(255,255,255,.10);
}

.partitura:hover{
  background: rgba(255,255,255,.35);
  color: rgba(189, 44, 0, .85);
}

/* Indicador del poema activo (debajo de "Empezar") */
.partituras__hint{
  display: block;              /* <-- antes estaba en none */
  margin: 10px 0 0 0;
  font-size: 1.05rem;
  font-weight: 300;
  letter-spacing: .08em;
  text-transform: uppercase;

  color: rgba(14, 83, 0, 0.95);
  opacity: .85;
}


/* =========================
   PLACEHOLDER
   ========================= */
.placeholder__box{
  border: none;
  box-shadow: 0 0 0 var(--stroke) var(--line);

  position: relative;
  padding: clamp(16px, 3vw, 28px);
  min-height: var(--ph-minh);

  display: grid;
  align-content: start;
  gap: 18px;

  background: rgba(255,255,255,.08);
}

/* Fondo vídeo reutilizable */
.placeholder__box.has-video .bgvideo{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;

  opacity: var(--video-opacity);
  filter: saturate(.9) contrast(.95);
  pointer-events: none;
  z-index: 0;
}

/* Velo */
.placeholder__box.has-video::before{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255, var(--veil));
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}

/* Contenido por encima */
.placeholder__box.has-video > *{
  position: relative;
  z-index: 2;
}

.placeholder__h1{
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: .5em;
  font-weight: 300;
  color:#042400;
}

.placeholder__text{
  margin: 0;
  line-height: 1.55;
  text-align: justify;
  font-size: var(--text-size);
  max-width: 70ch;
  opacity: .95;
  letter-spacing: .016em;
}

.placeholder__cta{
  justify-self: start;
  margin-top: 4px;

  display: inline-block;
  padding: 6px 10px;

  border: none;
  border-radius: 999px;
  box-shadow: 0 0 0 var(--stroke) var(--line);

  text-decoration: none;
  background: rgba(255, 94, 0, 0.2);
  color: #484848;
}

.placeholder__cta:hover{ background: rgba(255,255,255,.22); }
/* Reducir texto de placeholder_tex en móvil */

@media (max-width: 600px){
  .placeholder__text{
    font-size: 1.0rem;
    line-height: 1.5;
  }
}

/* =========================
   Responsive: aligerar en tablet/desktop
   ========================= */

/* Tablet: un poco más compacto que antes */
@media (min-width: 700px){
  :root{
    --maxw: 980px;           /* ↓ antes 1200/1400 */
    --frame-margin: 4vh;     /* aire alrededor del mapa */
    --pad: 16px;
    --gap: 16px;

    --stroke: 1.6px;         /* menos “gordo” */
    --radius: 12px;

    --label-size: 1.35rem;
    --poema-font: 1.15rem;
    --poema-minh: 52px;

    --partitura-size: 46px;
    --partitura-number: 1.15rem;

    --h1-size: 1.6rem;
    --text-size: 1.9rem;

    --ph-minh: 34svh;
  }
  

}

/* Desktop: todavía más fino, sin perder legibilidad */
@media (min-width: 1000px){
  :root{
    --maxw: 920px;           /* mapa más “objeto” y menos “pantalla” */
    --frame-margin: 5vh;
    --pad: 16px;
    --gap: 16px;

    --stroke: 1.4px;
    --radius: 12px;

    --label-size: 1.25rem;
    --poema-font: 1.05rem;
    --poema-minh: 50px;

    --partitura-size: 44px;
    --partitura-number: 1.05rem;

    --h1-size: 1.45rem;
    --text-size: 1.0rem;

    --ph-minh: 32svh;
  }

  .partituras__row{ gap: 12px; }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce){
  .placeholder__box.has-video .bgvideo{ display: none; }
}

/* =========================
   TOPOLOGÍA (base + puntos límite)
   capa de fondo viva, sin interacción
   ========================= */

.mapa__frame{
  position: relative;
  overflow: hidden; /* evita que la topología se salga en resize */
}

.mapa__frame > *{
  position: relative;
  z-index: 1;
}

.mapa__topology{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: .9;
}

.mapa__topology .topo__lines line{
  stroke: rgba(248, 10, 15, 0.13);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}

.mapa__topology .topo__nodes circle{
  fill: rgba(248, 10, 15, 0.22);
}

@media (max-width: 700px){
  .mapa__topology{
    opacity: .75;
  }
  .mapa__topology .topo__lines line{
    stroke-width: 1.1;
  }
}



