/* Pizarra de Cristal — sistema visual compartido de ktrox-portal.
   Fondo de cristal negro, texto en tiza y cinco colores de rotulador.
   Los tokens llevan prefijo --pz- para no chocar con los de cada herramienta mientras migran. */

:root{
  color-scheme: dark;

  /* superficies */
  --pz-glass:   #0d0f12;
  --pz-glass-2: #14181d;
  --pz-glass-3: #1b2127;
  --pz-line:    #262d35;
  --pz-line-strong: #3a434d;

  /* tiza */
  --pz-chalk:       #eceae4;
  --pz-chalk-dim:   #a3aab1;
  --pz-chalk-faint: #838b93;

  /* rotuladores: un color por rol de LoL (top, jungla, mid, ADC, support).
     DECISIÓN PENDIENTE: el home hoy reutiliza estos mismos tonos con otro significado
     (identidad de herramienta: pool cian, scrims lima, clases violeta; y rol de cuenta:
     staff cian, analista lima, jugador violeta). Antes de que las herramientas adopten
     estos colores para los roles de LoL hay que separar esos usos. */
  --pz-top: #ff7a59;
  --pz-jg:  #9be564;
  --pz-mid: #4cc9f0;
  --pz-adc: #ffd34d;
  --pz-sup: #d38bff;

  /* estados */
  --pz-focus:  var(--pz-adc);
  --pz-danger: var(--pz-top);
  --pz-ok:     var(--pz-jg);

  /* tipografía */
  --pz-font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;

  --pz-radius: 8px;
  --pz-radius-lg: 12px;
  --pz-ease: cubic-bezier(.16, 1, .3, 1);
}

*{ box-sizing: border-box; }
[hidden]{ display: none !important; }

html{ background: var(--pz-glass); }
body{
  margin: 0;
  min-height: 100vh;
  background: var(--pz-glass);
  color: var(--pz-chalk);
  font-family: var(--pz-font);
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

/* ---------- superficies del navegador, temadas ---------- */
::selection{ background: var(--pz-adc); color: var(--pz-glass); }
input, textarea, select{ caret-color: var(--pz-adc); }
:focus-visible{ outline: 2px solid var(--pz-focus); outline-offset: 2px; }
*{ scrollbar-width: thin; scrollbar-color: var(--pz-line-strong) transparent; }
::-webkit-scrollbar{ width: 10px; height: 10px; }
::-webkit-scrollbar-thumb{ background: var(--pz-line-strong); border-radius: 10px; border: 2px solid var(--pz-glass); }
::-webkit-scrollbar-track{ background: transparent; }

/* ---------- tipografía ---------- */
.pz-display{
  font-family: var(--pz-font);
  font-stretch: 75%;
  font-weight: 700;
  letter-spacing: .005em;
  line-height: 1.05;
  text-wrap: balance;
}

/* ---------- el trazo de rotulador (movimiento firma) ----------
   Se dibuja de izquierda a derecha. Colorea con --pz-stroke. */
.pz-stroke{ position: relative; display: inline-block; }
.pz-stroke::after{
  content: "";
  position: absolute; left: -2px; right: -2px; bottom: -8px; height: 8px;
  background: var(--pz-stroke, var(--pz-adc));
  -webkit-mask: var(--pz-stroke-mask) 0 0 / 100% 100% no-repeat;
          mask: var(--pz-stroke-mask) 0 0 / 100% 100% no-repeat;
  clip-path: inset(0 100% 0 0);
  transition: clip-path .5s var(--pz-ease);
  pointer-events: none;
}
.pz-stroke.is-drawn::after,
a:hover .pz-stroke::after,
a:focus-visible .pz-stroke::after,
.pz-stroke:hover::after{ clip-path: inset(0 0 0 0); }
:root{
  --pz-stroke-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5.2C38 2 76 7 118 4s60-1.5 80 .8' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
}

/* ---------- botones ---------- */
.pz-btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 14px/1 var(--pz-font);
  padding: 11px 16px;
  border-radius: var(--pz-radius);
  border: 1px solid var(--pz-line-strong);
  background: transparent;
  color: var(--pz-chalk);
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.pz-btn:hover{ background: var(--pz-glass-3); border-color: var(--pz-chalk-faint); }
.pz-btn:disabled{ opacity: .45; cursor: not-allowed; }
.pz-btn--primary{ background: var(--pz-chalk); color: var(--pz-glass); border-color: var(--pz-chalk); }
.pz-btn--primary:hover{ background: #fff; border-color: #fff; }
.pz-btn--block{ width: 100%; }

/* ---------- campos ---------- */
.pz-field{ display: flex; flex-direction: column; gap: 6px; text-align: left; }
.pz-field label, .pz-label{ font-size: 13px; font-weight: 600; color: var(--pz-chalk-dim); }
.pz-input, .pz-select{
  width: 100%;
  font: 400 15px/1.3 var(--pz-font);
  color: var(--pz-chalk);
  background: var(--pz-glass);
  border: 1px solid var(--pz-line-strong);
  border-radius: var(--pz-radius);
  padding: 11px 12px;
  transition: border-color .15s;
}
.pz-input::placeholder{ color: var(--pz-chalk-faint); }
.pz-input:hover, .pz-select:hover{ border-color: var(--pz-chalk-faint); }
.pz-input:focus-visible, .pz-select:focus-visible{ outline: 2px solid var(--pz-focus); outline-offset: 1px; border-color: var(--pz-focus); }
.pz-select{ appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23a3aab1' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }

/* ---------- mensajes de estado ---------- */
.pz-msg{ font-size: 14px; min-height: 20px; color: var(--pz-chalk-dim); }
.pz-msg--error{ color: var(--pz-danger); }
.pz-msg--ok{ color: var(--pz-ok); }

/* ---------- pastillas de rol de cuenta: marca + texto ---------- */
.pz-role{ display: inline-flex; align-items: center; vertical-align: middle; line-height: 1.2; gap: 8px; font-size: 13px; font-weight: 600; color: var(--pz-chalk); }
.pz-role::before{ content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--pz-role-color, var(--pz-chalk-faint)); }
.pz-role[data-role="admin"]{   --pz-role-color: var(--pz-adc); }
.pz-role[data-role="member"]{  --pz-role-color: var(--pz-mid); }
.pz-role[data-role="analyst"]{ --pz-role-color: var(--pz-jg); }
.pz-role[data-role="player"]{  --pz-role-color: var(--pz-sup); }

/* ---------- marca: cinco trazos de rotulador + wordmark ---------- */
.pz-mark{ display: inline-flex; align-items: center; gap: 12px; }
.pz-mark__strokes{ display: inline-flex; gap: 4px; align-items: flex-end; }
.pz-mark__strokes i{ display: block; width: 6px; height: 22px; border-radius: 2px; transform-origin: bottom; }
.pz-mark__strokes i:nth-child(1){ background: var(--pz-top); }
.pz-mark__strokes i:nth-child(2){ background: var(--pz-jg); }
.pz-mark__strokes i:nth-child(3){ background: var(--pz-mid); }
.pz-mark__strokes i:nth-child(4){ background: var(--pz-adc); }
.pz-mark__strokes i:nth-child(5){ background: var(--pz-sup); }
.pz-mark__word{ font-stretch: 62%; font-weight: 800; font-size: 28px; letter-spacing: .03em; line-height: 1; }

@media (prefers-reduced-motion: reduce){
  .pz-stroke::after{ transition: none; }
  *{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
