/* KYROS CLIPS · landing. Una partida vista a través del HUD de KYROS: carbón, ámbar como única señal, escuadras
   en las esquinas y chaflanes a 45° sacados de las palas del símbolo Umbral. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-wdth.woff2") format("woff2-variations"), url("/assets/fonts/archivo-wdth.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #0b0c0e;
  --carbon: #111315;
  --panel: #16181b;
  --raised: #22262b;
  --line: rgb(244 242 237 / 0.09);
  --line-strong: rgb(244 242 237 / 0.18);
  --bone: #f4f2ed;
  --mist: #b4b9c0;
  --dim: #8c939b;
  --amber: #ffb86b;
  --amber-deep: #f39a3f;
  --amber-soft: rgb(255 184 107 / 0.13);
  --amber-line: rgb(255 184 107 / 0.45);
  --rec: #ff6b78;
  --cyan: #7cc8ff;
  --font: "Archivo", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  /* Chaflán de las palas: esquinas superior izquierda e inferior derecha cortadas a 45°. */
  --cut: 10px;
  --chamfer: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  scrollbar-color: #3a3f45 var(--ground);
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--bone);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--amber);
  color: var(--carbon);
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--ground);
}

::-webkit-scrollbar-thumb {
  border: 3px solid var(--ground);
  border-radius: 8px;
  background: #3a3f45;
}

::-webkit-scrollbar-thumb:hover {
  background: #4b5158;
}

img,
svg,
canvas {
  display: block;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

h1,
h2 {
  margin: 0;
  font-stretch: 116%;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.98;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 3.5vw, 3.1rem);
}

p {
  margin: 0;
}

.num {
  font-variant-numeric: tabular-nums;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--amber);
  color: var(--carbon);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip:focus {
  transform: none;
}

.ico {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Botones: la pala ámbar ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px 0 20px;
  background: var(--amber);
  color: var(--carbon);
  font-stretch: 108%;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  clip-path: var(--chamfer);
  transition: background 0.18s var(--ease), transform 0.18s var(--ease);
}

.btn:hover {
  background: #ffc98a;
}

.btn:active {
  transform: translateY(1px);
}

.btn--sm {
  --cut: 7px;
  height: 36px;
  padding: 0 14px 0 12px;
  font-size: 14px;
}

.btn--sm .ico {
  width: 16px;
  height: 16px;
}

.btn--lg {
  --cut: 12px;
  height: 58px;
  padding: 0 28px 0 24px;
  font-size: 18px;
}

/* ---------- Barra superior del HUD ---------- */

.hud-top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
  padding: 0 var(--gutter);
  background: linear-gradient(rgb(11 12 14 / 0.86), rgb(11 12 14 / 0));
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.hud-top.is-solid {
  background: rgb(11 12 14 / 0.94);
  box-shadow: 0 1px 0 var(--line), 0 10px 30px rgb(0 0 0 / 0.35);
}

.brand img {
  width: 125px;
  height: auto;
}

.rec-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  background: rgb(17 19 21 / 0.7);
  font-stretch: 82%;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rec-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rec);
  box-shadow: 0 0 0 0 rgb(255 107 120 / 0.6);
  animation: breathe 2.4s ease-in-out infinite;
}

.rec-chip__label {
  color: var(--rec);
  font-weight: 800;
}

.rec-chip__game {
  color: var(--mist);
}

.rec-chip__buffer {
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
  color: var(--amber);
}

@keyframes breathe {
  50% {
    box-shadow: 0 0 0 5px rgb(255 107 120 / 0);
    opacity: 0.7;
  }
}

.hud-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.hud-nav a {
  padding: 8px 12px;
  color: var(--mist);
  font-stretch: 90%;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.hud-nav a:hover {
  color: var(--bone);
}

.hud-top__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang {
  height: 36px;
  min-width: 42px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--mist);
  font: inherit;
  font-stretch: 82%;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s;
}

.lang:hover {
  border-color: var(--amber-line);
  color: var(--bone);
}

/* ---------- La partida ---------- */

.arena {
  position: relative;
  min-height: max(100svh, 680px);
  overflow: hidden;
  background: #07080a;
  isolation: isolate;
}

.arena__scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

/* Lectura del titular sobre la escena: más oscuro a la izquierda y abajo. */
.arena__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgb(7 8 10 / 0.92) 0%, rgb(7 8 10 / 0.7) 34%, rgb(7 8 10 / 0) 64%),
    linear-gradient(0deg, rgb(7 8 10 / 0.9) 0%, rgb(7 8 10 / 0) 26%);
  pointer-events: none;
}

.arena.is-flash::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(255 238 214 / 0.18);
  animation: flash 0.5s var(--ease) forwards;
  pointer-events: none;
}

@keyframes flash {
  to {
    opacity: 0;
  }
}

.crosshair {
  position: absolute;
  top: 50%;
  left: 62%;
  width: 34px;
  height: 34px;
  translate: -50% -50%;
  opacity: 0.8;
  pointer-events: none;
}

.crosshair i {
  position: absolute;
  background: rgb(244 242 237 / 0.85);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.4);
}

.crosshair i:nth-child(1),
.crosshair i:nth-child(2) {
  top: 16px;
  width: 10px;
  height: 2px;
}

.crosshair i:nth-child(1) {
  left: 0;
}

.crosshair i:nth-child(2) {
  right: 0;
}

.crosshair i:nth-child(3),
.crosshair i:nth-child(4) {
  left: 16px;
  width: 2px;
  height: 10px;
}

.crosshair i:nth-child(3) {
  top: 0;
}

.crosshair i:nth-child(4) {
  bottom: 0;
}

.killfeed {
  position: absolute;
  top: 168px;
  right: var(--gutter);
  display: grid;
  justify-items: end;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-stretch: 88%;
  font-size: 14px;
  font-weight: 650;
  pointer-events: none;
}

.killfeed li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: rgb(7 8 10 / 0.62);
  box-shadow: inset 0 0 0 1px var(--line);
  animation: feed-in 0.36s var(--ease) both;
}

.killfeed li.is-you {
  box-shadow: inset 0 0 0 1px var(--amber-line);
}

.killfeed li.is-out {
  animation: feed-out 0.4s var(--ease) forwards;
}

.killfeed .you {
  color: var(--amber);
}

.killfeed .foe {
  color: #ff9aa3;
}

.killfeed svg {
  width: 15px;
  height: 15px;
  stroke: var(--mist);
  fill: none;
  stroke-width: 2;
}

.killfeed .tag {
  padding: 1px 6px;
  background: var(--amber);
  color: var(--carbon);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@keyframes feed-in {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
}

@keyframes feed-out {
  to {
    opacity: 0;
    transform: translateX(16px);
  }
}

.hero {
  position: relative;
  display: grid;
  align-content: center;
  gap: 26px;
  max-width: min(54rem, 100%);
  min-height: max(100svh, 680px);
  padding: 110px var(--gutter) 170px;
}

.hero__title {
  display: grid;
  font-size: clamp(2.7rem, 6.4vw, 5.6rem);
}

.hero__title span:first-child {
  color: var(--amber);
}

.hero__lede {
  max-width: 36em;
  color: #d6d9dd;
  font-size: clamp(17px, 1.5vw, 19px);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
}

.hero__meta,
.final__meta {
  color: var(--mist);
  font-stretch: 88%;
  font-size: 14px;
}

/* Tecla F8 de verdad: se hunde al pulsarla. */
.keycap {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--mist);
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}

.keycap__cap {
  display: inline-grid;
  place-items: center;
  min-width: 64px;
  height: 58px;
  padding: 0 16px 6px;
  border-radius: 9px;
  background: linear-gradient(#2a2f35, #1c2024);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.12),
    inset 0 -6px 0 #0d0f11,
    0 8px 18px rgb(0 0 0 / 0.45);
  color: var(--bone);
  font-family: var(--font);
  font-stretch: 100%;
  font-size: 20px;
  font-weight: 750;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.keycap:hover .keycap__cap {
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.12),
    inset 0 -6px 0 #0d0f11,
    0 0 0 1px var(--amber-line),
    0 8px 18px rgb(0 0 0 / 0.45);
}

.keycap.is-down .keycap__cap,
.keycap:active .keycap__cap {
  transform: translateY(4px);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.1),
    inset 0 -2px 0 #0d0f11,
    0 0 0 1px var(--amber),
    0 3px 8px rgb(0 0 0 / 0.4);
}

.keycap__label {
  max-width: 17em;
  line-height: 1.35;
}

/* Aviso de clip guardado: la tarjeta que la app pone encima del juego. */
.toast {
  position: fixed;
  top: 76px;
  right: var(--gutter);
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(340px, calc(100vw - 2 * var(--gutter)));
  padding: 12px 18px 12px 14px;
  border-radius: 14px;
  background: #16181b;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.07), 0 10px 26px rgb(0 0 0 / 0.5);
  opacity: 0;
  transform: translateX(18px);
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease);
  pointer-events: none;
}

.toast.is-in {
  opacity: 1;
  transform: none;
}

.toast__mark {
  flex: none;
  width: 34px;
  height: 34px;
  fill: var(--amber);
}

.toast .blade {
  transform-box: view-box;
}

.toast.is-in .blade--a {
  animation: blade-a 0.48s 0.06s var(--ease) both;
}

.toast.is-in .blade--b {
  animation: blade-b 0.48s 0.1s var(--ease) both;
}

@keyframes blade-a {
  from {
    transform: translate(-7px, -7px);
    opacity: 0.3;
  }
}

@keyframes blade-b {
  from {
    transform: translate(7px, 7px);
    opacity: 0.3;
  }
}

.toast__text {
  display: grid;
  min-width: 0;
}

.toast__text strong {
  font-size: 15px;
  font-weight: 700;
}

.toast__text span {
  overflow: hidden;
  color: var(--mist);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Barra inferior: búfer, consumo y los clips guardados. */
.hud-bottom {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  padding: 16px var(--gutter) 22px;
  font-stretch: 82%;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.meter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.meter__label,
.stat span,
.tray__label {
  color: var(--dim);
}

.meter__bar {
  position: relative;
  width: 148px;
  height: 8px;
  background: rgb(244 242 237 / 0.08);
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
}

.meter__bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: repeating-linear-gradient(90deg, var(--amber) 0 7px, transparent 7px 9px);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.meter__value {
  min-width: 3.5em;
  color: var(--amber);
}

.stat {
  display: flex;
  gap: 8px;
}

.stat b {
  color: var(--bone);
  font-weight: 700;
}

.tray {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.tray__clips {
  display: flex;
  gap: 8px;
  min-height: 46px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tray__clips li {
  position: relative;
  width: 82px;
  height: 46px;
  overflow: hidden;
  background: var(--panel) center / cover;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  animation: clip-land 0.6s var(--ease) both;
}

.tray__clips li span {
  position: absolute;
  right: 4px;
  bottom: 3px;
  padding: 0 4px;
  background: rgb(7 8 10 / 0.75);
  color: var(--bone);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.tray__clips li.is-auto::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 6px;
  height: 6px;
  background: var(--cyan);
  rotate: 45deg;
}

.tray__empty {
  align-self: center;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: none;
}

@keyframes clip-land {
  from {
    opacity: 0;
    transform: translateY(-40px) scale(1.6);
  }
}

.demo-tag {
  flex-basis: 100%;
  color: var(--mist);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

body.is-docked .hud-bottom {
  position: fixed;
  inset: auto var(--gutter) 16px auto;
  z-index: 45;
  flex-wrap: nowrap;
  gap: 16px;
  padding: 10px 12px 10px 14px;
  background: rgb(14 15 18 / 0.94);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 12px 30px rgb(0 0 0 / 0.45);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  animation: dock-in 0.32s var(--ease) both;
}

body.is-docked .hud-bottom .stat,
body.is-docked .hud-bottom .demo-tag,
body.is-docked .hud-bottom .tray__label {
  display: none;
}

body.is-docked .hud-bottom .meter__bar {
  width: 88px;
}

body.is-docked .hud-bottom .tray {
  margin-left: 0;
}

body.is-docked .hud-bottom .tray__clips li {
  width: 64px;
  height: 36px;
}

body.is-docked .hud-bottom .tray__clips {
  min-height: 36px;
}

@keyframes dock-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ---------- Paneles del HUD ---------- */

.panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(64px, 8vw, 112px) var(--gutter);
}

/* Auto-clip a lo ancho: el titular a un lado, la explicación al otro y la partida entera debajo. */
.panel--auto {
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}

.panel--auto .panel__copy {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px clamp(32px, 6vw, 96px);
  max-width: none;
  align-items: start;
}

.panel--auto .panel__copy h2 {
  grid-row: span 2;
}

.panel + .panel {
  border-top: 1px solid var(--line);
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--ground) center / cover no-repeat;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}

.backdrop.is-ready {
  opacity: 1;
}

/* Muy atenuada: se adivina la arena, el texto conserva su contraste. */
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgb(11 12 14 / 0.86), rgb(11 12 14 / 0.93));
}

body {
  background: transparent;
}

html {
  background: var(--ground);
}

/* Fondo del HUD bajo la partida: rejilla de puntos, como un radar (la partida la tapa arriba). */
main {
  background-image: radial-gradient(rgb(244 242 237 / 0.06) 1px, transparent 1.4px);
  background-size: 28px 28px;
  background-position: center top;
}

/* Marcas en los extremos de cada separador. */
.panel + .panel::before,
.specs::before {
  content: "";
  position: absolute;
  top: -4px;
  left: var(--gutter);
  width: 7px;
  height: 7px;
  background: var(--amber);
  rotate: 45deg;
}

.panel--editor,
.panel--local {
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
}

.panel--editor .panel__copy,
.panel--local .panel__copy {
  order: 2;
}

.panel__copy {
  display: grid;
  gap: 22px;
  max-width: 34rem;
}

.panel__copy p {
  color: #cfd3d8;
  font-size: 18px;
}

.facts {
  display: grid;
  gap: 10px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  color: var(--bone);
  font-weight: 550;
}

.facts li::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  translate: 0 -1px;
  background: var(--amber);
  clip-path: polygon(0 0, 100% 0, 100% 50%, 50% 100%, 0 100%);
}

.facts--cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
  font-size: 15px;
}

/* Marco de pantalla del HUD: escuadras ámbar en las esquinas. */
.match,
.editor,
.chat,
.files {
  position: relative;
  margin: 0;
  padding: 22px;
  background: linear-gradient(180deg, #121417, #0e0f12);
  box-shadow: inset 0 0 0 1px var(--line);
}

.match::before,
.editor::before,
.chat::before,
.files::before,
.match::after,
.editor::after,
.chat::after,
.files::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 0 solid var(--amber);
  pointer-events: none;
}

.match::before,
.editor::before,
.chat::before,
.files::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.match::after,
.editor::after,
.chat::after,
.files::after {
  right: -1px;
  bottom: -1px;
  border-width: 0 2px 2px 0;
}

/* Partida con eventos: las ventanas ámbar son lo que KYROS guarda solo. */
.match {
  display: grid;
  gap: 18px;
  padding: 26px 26px 22px;
}

.match__head {
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font-stretch: 82%;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.match__legend {
  display: flex;
  gap: 8px;
  align-items: center;
}

.match__legend i {
  width: 18px;
  height: 10px;
  background: var(--amber-soft);
  box-shadow: inset 0 0 0 1px var(--amber-line);
}

.match__track {
  position: relative;
  height: 120px;
  background:
    repeating-linear-gradient(90deg, rgb(244 242 237 / 0.06) 0 1px, transparent 1px 10%),
    linear-gradient(180deg, transparent 0 58%, rgb(244 242 237 / 0.04) 58% 100%);
  box-shadow: inset 0 0 0 1px var(--line);
}

.match__window {
  position: absolute;
  top: 54px;
  bottom: 0;
  left: var(--at);
  width: var(--w);
  background: var(--amber-soft);
  box-shadow: inset 0 0 0 1px var(--amber-line);
}

/* El rombo va en ::before para que la etiqueta no herede el giro y se pueda alinear. */
.match__event {
  position: absolute;
  top: 44px;
  left: var(--at);
  width: 12px;
  height: 12px;
  margin-left: -6px;
}

.match__event::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bone);
  rotate: 45deg;
}

.match__event::after {
  content: attr(data-label);
  position: absolute;
  bottom: 18px;
  left: 50%;
  translate: -50% 0;
  color: var(--mist);
  font-stretch: 82%;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.match__event--low::after {
  bottom: auto;
  top: 20px;
}

/* Al final de la pista la etiqueta se apoya a la izquierda del rombo: no se sale de la partida. */
.match__event--end::after {
  left: auto;
  right: -2px;
  translate: none;
}

.match__event--big {
  width: 16px;
  height: 16px;
  margin-left: -8px;
  top: 42px;
}

.match__event--big::before {
  background: var(--amber);
}

.match__event--big::after {
  color: var(--amber);
}

.match__scan {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--bone);
  box-shadow: 0 0 12px rgb(244 242 237 / 0.6);
  animation: scan 9s linear infinite;
}

@keyframes scan {
  to {
    left: 100%;
  }
}

.match__clips {
  display: flex;
  justify-content: space-around;
  color: var(--amber);
  font-size: 13px;
  font-weight: 700;
}

.match__games {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.match__games span {
  padding: 6px 12px;
  background: var(--raised);
  color: var(--bone);
  font-stretch: 92%;
  font-size: 14px;
  font-weight: 650;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

/* Editor: la misma línea de tiempo que la app, en pequeño. */
.editor {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.editor__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 650;
}

.editor__export {
  --cut: 6px;
  padding: 5px 12px;
  background: var(--amber);
  color: var(--carbon);
  font-size: 13px;
  font-weight: 750;
  clip-path: var(--chamfer);
}

.editor__preview {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #07080a;
}

.editor__preview canvas {
  width: 100%;
  height: 100%;
}

.editor__overlay-text {
  position: absolute;
  top: 18%;
  left: 50%;
  translate: -50% 0;
  background: linear-gradient(180deg, #ffe259, #ff7a18);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-stretch: 120%;
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 900;
  -webkit-text-stroke: 1.5px #120c06;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s var(--ease), transform 0.3s var(--ease);
}

.editor__overlay-text.is-on {
  opacity: 1;
  transform: none;
}

.editor__time {
  position: absolute;
  right: 10px;
  bottom: 8px;
  padding: 2px 6px;
  background: rgb(7 8 10 / 0.7);
  color: var(--bone);
  font-size: 12px;
}

.editor__timeline {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 10px 0 4px;
  border-top: 1px solid var(--line);
}

.lane {
  position: relative;
  height: 30px;
}

.lane--main {
  height: 44px;
}

.lane--audio {
  height: 22px;
}

.clip {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--x);
  width: calc(var(--w) - 2px);
  border-radius: 4px;
  overflow: hidden;
}

.clip--text {
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: #2c2620;
  box-shadow: inset 0 0 0 1px rgb(255 184 107 / 0.35);
  color: var(--bone);
  font-size: 12px;
  font-weight: 700;
}

.clip--a {
  background: repeating-linear-gradient(90deg, #2c3a52 0 26px, #1f2a3e 26px 28px);
}

.clip--b {
  background: repeating-linear-gradient(90deg, #3a2b45 0 26px, #2a1f33 26px 28px);
}

.clip--c {
  background: repeating-linear-gradient(90deg, #4a3222 0 26px, #342317 26px 28px);
  box-shadow: inset 0 0 0 2px var(--amber);
}

.clip--audio {
  background:
    radial-gradient(circle at 50% 50%, rgb(127 214 164 / 0.7) 0 1.5px, transparent 2px) 0 0 / 6px 100%,
    #15261d;
}

.kf {
  position: absolute;
  bottom: 4px;
  left: var(--k);
  width: 9px;
  height: 9px;
  background: var(--amber);
  rotate: 45deg;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.6);
}

.trans {
  position: absolute;
  top: 50%;
  left: var(--x);
  z-index: 1;
  width: 18px;
  height: 18px;
  translate: -3px -50%;
  border-radius: 4px;
  background: #e8e3da;
  box-shadow: 0 0 0 2px #0e0f12;
}

.trans::before {
  content: "";
  position: absolute;
  inset: 4px;
  background: linear-gradient(135deg, #0e0f12 0 50%, transparent 50%);
}

.playhead {
  position: absolute;
  top: 2px;
  bottom: 0;
  left: 0;
  z-index: 2;
  width: 2px;
  background: var(--bone);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.4);
}

.playhead::before {
  content: "";
  position: absolute;
  top: -6px;
  left: -5px;
  width: 12px;
  height: 12px;
  background: var(--bone);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* Discord: el clip pegado en un chat. */
.keys {
  display: flex;
  align-items: center;
  gap: 12px;
}

.keys__plus {
  color: var(--dim);
  font-size: 22px;
  font-weight: 700;
}

.chat {
  display: grid;
  gap: 18px;
  padding: 26px;
  background: linear-gradient(180deg, #1b1d22, #16181c);
}

.chat__msg {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.chat__avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #3a3348;
  color: var(--bone);
  font-weight: 800;
}

.chat__avatar--you {
  background: var(--amber);
  color: var(--carbon);
}

.chat__name {
  display: block;
  margin-bottom: 2px;
  font-weight: 700;
}

.chat__msg p {
  color: #d9dce0;
}

.chat__file {
  display: grid;
  gap: 10px;
  width: min(360px, 100%);
  margin-top: 6px;
  padding: 10px;
  border-radius: 8px;
  background: #0f1013;
  box-shadow: inset 0 0 0 1px var(--line);
}

.chat__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  background: #22262b center / cover;
}

.chat__thumb::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  translate: -50% -50%;
  border-radius: 50%;
  background:
    linear-gradient(#f4f2ed, #f4f2ed) 55% 50% / 0 0 no-repeat,
    rgb(7 8 10 / 0.6);
  box-shadow: inset 0 0 0 2px rgb(244 242 237 / 0.85);
  clip-path: circle(50%);
}

.chat__thumb::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 16px;
  height: 18px;
  translate: -35% -50%;
  background: var(--bone);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.chat__meta {
  display: grid;
  font-size: 14px;
}

.chat__meta span {
  color: var(--dim);
}

.chat__limit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-stretch: 88%;
  font-size: 14px;
}

.chat__limit .num {
  color: var(--bone);
  font-weight: 700;
}

.chat__limit .num:nth-of-type(2) {
  color: var(--amber);
}

.chat__limit .ico {
  width: 16px;
  height: 16px;
  color: var(--amber);
}

/* En tu PC: una carpeta de verdad. */
.files {
  display: grid;
  gap: 14px;
}

.files__path {
  padding: 10px 12px;
  background: var(--ground);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--mist);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.files__list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.files__list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 6px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.files__list li span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.files__list li span:last-child {
  color: var(--dim);
  font-size: 13px;
}

.files__ico {
  width: 18px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(135deg, #3a3f45 0 50%, #2c3035 50%);
}

.files__ico--dir {
  background: var(--amber);
  clip-path: polygon(0 0, 40% 0, 50% 18%, 100% 18%, 100% 100%, 0 100%);
}

.files__note {
  color: var(--dim);
  font-size: 12px;
}

.js-boot .match,
.js-boot .editor,
.js-boot .chat,
.js-boot .files {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.7s var(--ease);
}

.js-boot .is-booted {
  clip-path: inset(0 0 0 0);
}

/* ---------- Ficha técnica ---------- */

.specs {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 110px) var(--gutter);
  border-top: 1px solid var(--line);
}

.specs__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  box-shadow: inset 0 0 0 1px var(--line);
}

.specs__grid div {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 24px 26px 28px;
  box-shadow: 1px 1px 0 var(--line);
}

.specs__grid dt {
  color: var(--amber);
  font-stretch: 82%;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.specs__grid dd {
  margin: 0;
  color: #d6d9dd;
  font-size: 16px;
}

/* ---------- Preguntas ---------- */

.faq {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 0 clamp(32px, 6vw, 96px);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 110px) var(--gutter);
}

.faq h2 {
  grid-row: span 6;
  align-self: start;
  margin-bottom: 28px;
}

.faq details {
  grid-column: 2;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  padding: 22px 48px 22px 0;
  font-stretch: 104%;
  font-size: 19px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 6px;
  width: 14px;
  height: 14px;
  translate: 0 -50%;
  background:
    linear-gradient(var(--amber), var(--amber)) center / 14px 2px no-repeat,
    linear-gradient(var(--amber), var(--amber)) center / 2px 14px no-repeat;
  transition: rotate 0.24s var(--ease);
}

.faq details[open] summary::after {
  rotate: 45deg;
}

.faq summary:hover {
  color: var(--amber);
}

.faq details p {
  max-width: 62ch;
  padding: 0 0 24px;
  color: #cfd3d8;
}

/* ---------- Cierre ---------- */

.final {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 28px;
  padding: clamp(90px, 13vw, 170px) var(--gutter);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.final::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -40%;
  z-index: -1;
  width: min(1100px, 140vw);
  aspect-ratio: 2;
  translate: -50% 0;
  background: radial-gradient(closest-side, rgb(255 184 107 / 0.2), transparent);
}

.final h2 {
  max-width: 14em;
  font-size: clamp(2.3rem, 5.6vw, 4.6rem);
}

.final__mark {
  width: 72px;
  height: 72px;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 36px var(--gutter) 48px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 14px;
}

.foot img {
  width: 100px;
  height: auto;
}

/* ---------- Pantallas estrechas ---------- */

@media (max-width: 1080px) {
  .hud-nav {
    display: none;
  }

  .hud-top__actions {
    margin-left: auto;
  }
}

@media (max-width: 900px) {
  .rec-chip__game {
    display: none;
  }

  .panel--auto .panel__copy,
  .faq {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel--auto .panel__copy h2,
  .faq h2 {
    grid-row: auto;
  }

  .faq details {
    grid-column: 1;
  }

  .toast {
    top: 70px;
  }

  .panel,
  .panel--editor,
  .panel--local {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel--editor .panel__copy,
  .panel--local .panel__copy {
    order: 0;
  }

  .specs__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crosshair {
    left: 72%;
    top: 34%;
  }

  .killfeed {
    top: 82px;
  }



  .stat {
    display: none;
  }

  .arena__shade {
    background: linear-gradient(0deg, rgb(7 8 10 / 0.95) 0%, rgb(7 8 10 / 0.72) 55%, rgb(7 8 10 / 0.35) 100%);
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .brand img {
    width: 104px;
  }

  .hud-top {
    gap: 10px;
    height: 58px;
  }

  .rec-chip {
    gap: 6px;
    padding: 0 8px;
  }

  .rec-chip__buffer {
    display: none;
  }

  .hud-top .btn--sm {
    padding: 0 10px;
  }

  .hud-top .btn__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  body.is-docked .hud-bottom {
    inset: auto 12px 12px 12px;
    justify-content: space-between;
  }

  .hero {
    padding-top: 96px;
    padding-bottom: 190px;
  }

  .facts--cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .specs__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .meter__bar {
    width: 96px;
  }

  .tray {
    margin-left: 0;
  }

  .killfeed li:nth-child(n + 2) {
    display: none;
  }

  .crosshair {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .match__scan {
    display: none;
  }
}
