/* ========== Tipografías ========== */

@font-face {
  font-family: "Grift";
  src: url("../fonts/Grift-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Grift";
  src: url("../fonts/Grift-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Grift";
  src: url("../fonts/Grift-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Grift";
  src: url("../fonts/Grift-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Matrixel";
  src: url("../fonts/Matrixel.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

/* ========== Colores y medidas ========== */

:root {
  --blue: #0000ff;
  --blue-ink: #1119ee;
  --green: #85ff00;
  --orange: #ff7a00;
  --orange-soft: #ff9d43;
  --violet: #7227ff;
  --violet-deep: #301541;
  --plum: #452757;
  --ink: #241532;
  --pink: #ff32c8;
  --night: #070812;
  --paper: #f8f4ec;
  --cream: #fff7dd;
  --mute-dark: #aaa5b3;
  --mute-night: #9a97a6;
  --aura-light: #5b3bff;
  --aura-dark: #c9b8ff;
  --font:
    "Grift", "Avenir Next", Avenir, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --pixel: "Matrixel", "Courier New", monospace;
  --t-meta: 11px;
  --t-ui: 12.5px;
  --t-small: 14px;
  --t-body: 15px;
  --t-lead: 17px;
  --r-sm: 14px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 28px;
  --edge: clamp(16px, 4vw, 72px);
  --max: 1460px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ========== Base ========== */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}
body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  font-family: var(--font);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@supports not (overflow: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}
img,
svg {
  display: block;
  max-width: 100%;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
a,
button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
h1,
h2,
h3,
h4 {
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}
.matrix {
  font-family: var(--pixel);
  font-weight: 400;
  letter-spacing: 0.02em;
}
::selection {
  background: var(--green);
  color: var(--night);
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 2000;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--night);
  background: #fff;
  transform: translateY(-200%);
  transition: transform 0.18s;
}
.skip-link:focus {
  transform: none;
}
[class*="icon-"] {
  display: block;
  background: currentColor;
  -webkit-mask: var(--icon) center/contain no-repeat;
  mask: var(--icon) center/contain no-repeat;
}
.icon-leer {
  --icon: url("../img/icon-leerxtema.png");
}
.icon-etcetera {
  --icon: url("../img/icon-etcetera.png");
}
.icon-yqp {
  --icon: url("../img/icon-yqp.png");
}
.icon-suscripcion {
  --icon: url("../img/icon-suscripcion.png");
}
.icon-proponer {
  --icon: url("../img/icon-proponer.png");
}

/* ========== Menú ========== */

.dock {
  position: fixed;
  z-index: 1200;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  width: min(408px, calc(100vw - 28px));
  height: 54px;
  padding: 4px 6px 4px 4px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  color: #14121d;
  border-radius: 20px;
  background: linear-gradient(
    92deg,
    rgba(255, 247, 225, 0.94),
    rgba(242, 241, 236, 0.88) 46%,
    rgba(233, 224, 255, 0.93)
  );
  box-shadow:
    0 8px 24px rgba(45, 33, 94, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  transform: translateX(-50%);
  transition:
    color 0.3s,
    opacity 0.3s,
    transform 0.4s var(--ease),
    box-shadow 0.3s;
  isolation: isolate;
}
.dock::before {
  content: "";
  position: absolute;
  inset: -1.5px;
  padding: 1.5px;
  border-radius: 21.5px;
  background: linear-gradient(90deg, #00e5ff 0 14%, #ffee81 36%, #df8eff 66%, var(--green) 100%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.65;
  pointer-events: none;
}
.dock::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 20px;
  background: linear-gradient(
    92deg,
    rgba(5, 8, 18, 0.94),
    rgba(18, 18, 35, 0.9) 50%,
    rgba(36, 10, 58, 0.94)
  );
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.dock[data-tone="dark"] {
  color: #fff;
  box-shadow: 0 9px 26px rgba(10, 3, 38, 0.28);
}
.dock[data-tone="dark"]::after {
  opacity: 1;
}
.dock[data-tone="dark"]::before {
  opacity: 0.55;
}
.dock__mark {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  transition: transform 0.25s var(--ease);
}
.dock__mark:active {
  transform: scale(0.94);
}
.dock__symbol {
  width: 35px;
  height: 35px;
  background: var(--blue);
  -webkit-mask: url("../img/simbolo-mask.png") center/contain no-repeat;
  mask: url("../img/simbolo-mask.png") center/contain no-repeat;
  transition: background-color 0.3s;
}
.dock[data-tone="dark"] .dock__symbol {
  background: #fff;
}
.dock__orbit {
  position: absolute;
  inset: 1px;
  border: 1.25px solid var(--blue);
  border-radius: 50% 42% 50% 44%/38% 50% 40% 50%;
  transform: rotate(23deg) scaleX(1.08);
  transition: border-color 0.3s;
}
.dock[data-tone="dark"] .dock__orbit {
  border-color: rgba(255, 255, 255, 0.85);
}
.dock__orbit i {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9),
    0 0 8px rgba(133, 255, 0, 0.6);
  transform-origin: 0 23px;
  animation: dock-dot 6s linear infinite;
}
@keyframes dock-dot {
  to {
    transform: rotate(360deg);
  }
}
.dock__nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: 46px;
}
.dock__nav a {
  position: relative;
  display: grid;
  place-items: center;
  height: 46px;
  border-radius: 14px;
  color: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition:
    color 0.3s,
    transform 0.2s var(--ease);
}
.dock__nav a:active {
  transform: scale(0.96);
}
.dock__nav a::before {
  content: "";
  position: absolute;
  inset: -4px 2px;
  z-index: -1;
  background: linear-gradient(90deg, var(--c1), var(--c2));
  -webkit-mask: url("../img/aura-wide.png") center/100% 100% no-repeat;
  mask: url("../img/aura-wide.png") center/100% 100% no-repeat;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.dock__nav a:hover::before,
.dock__nav a:focus-visible::before {
  opacity: 0.5;
}
.dock__nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 24px;
  height: 2.5px;
  margin-left: -12px;
  border-radius: 2px;
  background: var(--c-line);
  transform: scaleX(0);
  transition: transform 0.35s var(--ease);
}
.dock__nav a[aria-current]::after {
  transform: none;
}
.dock__nav a[aria-current] {
  color: var(--c-ink);
}
.dock__nav [data-go="leer"] {
  --c1: #2b5bff;
  --c2: #00d2ff;
  --c-ink: #0000ff;
  --c-line: #0000ff;
}
.dock__nav [data-go="quien"] {
  --c1: #62e600;
  --c2: #c4ff3a;
  --c-ink: #1d5200;
  --c-line: #5fd400;
}
.dock__nav [data-go="participar"] {
  --c1: #ff32c8;
  --c2: #ff8ae6;
  --c-ink: #b3007f;
  --c-line: #ff32c8;
}
.dock[data-tone="dark"] [data-go="leer"] {
  --c-ink: #8fe6ff;
  --c-line: #5f7dff;
}
.dock[data-tone="dark"] [data-go="quien"] {
  --c-ink: #b6ff63;
  --c-line: var(--green);
}
.dock[data-tone="dark"] [data-go="participar"] {
  --c-ink: #ffb0ec;
  --c-line: #ff5fd6;
}
.dock--reading {
  width: min(600px, calc(100vw - 28px));
  grid-template-columns: 48px minmax(0, 1fr) auto;
}

/* ========== Órbitas ========== */

.orbits {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  mix-blend-mode: difference;
  opacity: 0.75;
  contain: strict;
}
.orbits svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.orbit__line {
  fill: none;
  stroke: #7d69ff;
  vector-effect: non-scaling-stroke;
}
.orbit--1 .orbit__line {
  stroke-width: 1.3;
  opacity: 0.75;
}
.orbit--2 .orbit__line {
  stroke-width: 1.05;
  opacity: 0.6;
}
.orbit--3 .orbit__line {
  stroke-width: 0.9;
  opacity: 0.48;
}
.orbits[data-tone="dark"] .orbit__line {
  stroke: #a797ff;
}
.orbits[data-tone="acid"] .orbit__line {
  stroke: #6b35ff;
}
.orbit__dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--green);
  box-shadow:
    0 0 0 1.3px #fff,
    0 0 8px rgba(133, 255, 0, 0.7);
  will-change: transform;
}
.orbit__dot:nth-of-type(2) {
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
}
.orbit__dot:nth-of-type(3) {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
}
.orbits[data-tone="acid"] .orbit__dot {
  background: var(--orange);
}

/* ========== Destello al tocar ========== */

.tap {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1300;
  width: 150px;
  height: 150px;
  margin: -75px 0 0 -75px;
  pointer-events: none;
  opacity: 0;
  background: var(--tap, var(--aura-light));
  -webkit-mask: url("../img/aura.png") center/contain no-repeat;
  mask: url("../img/aura.png") center/contain no-repeat;
  will-change: transform, opacity;
}

/* ========== Pie ========== */

.site-footer {
  position: relative;
  color: #fff;
  background: var(--night);
}
.footer {
  padding: 132px var(--edge) 0;
}
.footer__lead {
  width: min(100%, 1180px);
  margin: 0 auto 58px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(24px, 5vw, 90px);
  align-items: end;
}
.footer__logo {
  display: block;
  width: clamp(150px, 15vw, 220px);
}
.footer__kinetic {
  display: grid;
}
.footer__kinetic img {
  grid-area: 1/1;
  width: 100%;
  height: auto;
  opacity: 0;
}
.footer__kinetic img:first-child,
.footer__kinetic img.is-on {
  opacity: 1;
}
.footer__kinetic.is-playing img:first-child:not(.is-on) {
  opacity: 0;
}
.footer__statement {
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 4.6vw, 66px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.055em;
  text-align: right;
}
.footer__statement span {
  color: var(--green);
}
.footer__grid {
  width: min(100%, 1180px);
  margin: 0 auto 44px;
  padding-top: 34px;
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.footer__grid nav {
  display: grid;
  align-content: start;
  gap: 12px;
}
.footer__grid nav strong {
  margin: 0 0 2px;
  color: var(--mute-night);
  font-family: var(--font);
  font-size: var(--t-meta);
  font-weight: 700;
  letter-spacing: 0.095em;
  text-transform: uppercase;
}
.footer__grid nav a,
.footer__grid nav button {
  position: relative;
  width: max-content;
  max-width: 100%;
  color: #fff;
  font-size: var(--t-small);
  font-weight: 600;
  text-align: left;
  transition: color 0.2s;
}
.footer__grid nav a::after,
.footer__grid nav button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -3px;
  height: 1px;
  background: var(--green);
  transition: right 0.25s var(--ease);
}
.footer__grid nav a:hover,
.footer__grid nav button:hover {
  color: #dfffbc;
}
.footer__grid nav a:hover::after,
.footer__grid nav button:hover::after {
  right: 0;
}
.footer__meta {
  width: min(100%, 1180px);
  margin-inline: auto;
  padding: 18px 0 72px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  color: var(--mute-night);
  font-size: var(--t-meta);
}
.footer__meta p {
  margin: 0;
}
.footer__meta a {
  transition: color 0.2s;
}
.footer__meta a:hover {
  color: #fff;
}

/* ========== Ajustes por tamaño ========== */

@media (max-width: 1020px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
  .rotor {
    grid-column: 1/-1;
  }
}
@media (max-width: 720px) {
  :root {
    --edge: 16px;
  }
  .dock {
    top: auto;
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: min(400px, calc(100vw - 24px));
    height: 58px;
    padding: 5px 6px 5px 5px;
  }
  .dock.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, calc(100% + 24px));
  }
  .dock__nav,
  .dock__nav a {
    height: 48px;
  }
  .dock__nav a {
    font-size: 13.5px;
  }
  .dock__nav a::after {
    bottom: 7px;
  }
  .dock--reading {
    width: calc(100vw - 24px);
    max-width: 520px;
  }
  .orbits {
    opacity: 0.66;
  }
  .tap {
    width: 130px;
    height: 130px;
    margin: -65px 0 0 -65px;
  }
  .footer {
    padding: 96px 16px 0;
  }
  .footer__lead {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 44px;
  }
  .footer__logo {
    width: 150px;
  }
  .footer__statement {
    text-align: left;
    font-size: 40px;
  }
  .footer__grid {
    gap: 30px 20px;
    margin-bottom: 36px;
    padding-top: 28px;
  }
  .footer__grid nav:last-child {
    grid-column: 1/-1;
  }
  .footer__meta {
    padding-bottom: 30px;
  }
}
@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;
  }
  .tap {
    display: none;
  }
}

/* ========== Nota legal de los formularios ========== */

.form-legal {
  max-width: 62ch;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.45;
}
.form-legal a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.form-legal a:hover {
  color: #fff;
}

/* ========== Pie: páginas que rotan ========== */

.rotor {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}
.rotor__label {
  margin: 0;
  color: var(--orange);
  font-size: 12px;
}
.rotor__stage {
  display: grid;
}
.rotor__item {
  grid-area: 1/1;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  column-gap: 14px;
  row-gap: 3px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-sm);
  background: #0e0f1c;
  visibility: hidden;
}
.rotor__item.is-on {
  visibility: visible;
  animation: rotor-entra 0.42s steps(7) both;
}
@keyframes rotor-entra {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0);
  }
}
.rotor__item img {
  grid-row: 1/3;
  width: 96px;
  height: 76px;
  border-radius: 9px;
  object-fit: cover;
}
.rotor__item strong {
  align-self: end;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.rotor__item span {
  align-self: start;
  color: var(--mute-dark);
  font-size: 12px;
}
a.rotor__item {
  transition: border-color 0.2s;
}
a.rotor__item:hover {
  border-color: var(--green);
}

/* ========== Último pixel ==========
   Una franja delgada que se rompe donde termina la página.
   JS muerde el borde superior y suelta astillas sobre el pie. */

.last-pixel {
  position: relative;
  font-size: 11px;
}
.last-pixel__band {
  position: relative;
  padding: 21px var(--edge) 9px;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  background: var(--blue);
}
.last-pixel__quote {
  flex: none;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: #fff;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
}
.last-pixel__quote p {
  margin: 0;
}
.last-pixel__quote cite {
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
}
.last-pixel__noise {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.36);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}
.last-pixel__noise b {
  font-weight: 400;
}
.last-pixel__noise .v {
  color: var(--green);
}
.last-pixel__noise .r {
  color: #ff5fae;
}
.last-pixel__noise .n {
  color: var(--orange);
}
.last-pixel__noise .b {
  color: #fff;
}
.last-pixel__mail {
  position: relative;
  z-index: 2;
  flex: none;
  margin-right: 46px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  transition: color 0.2s;
}
.last-pixel__mail:hover {
  color: #fff;
}
.last-pixel__wedge {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 44px;
  height: 20px;
  background: repeating-linear-gradient(90deg, var(--green) 0 4px, transparent 4px 8px);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}
.last-pixel__shard {
  position: absolute;
  z-index: 3;
  pointer-events: none;
}
.last-pixel.is-glitch .last-pixel__quote,
.last-pixel.is-glitch .last-pixel__mail {
  transform: translateX(var(--dx, 0));
  text-shadow:
    2px 0 #ff5fae,
    -2px 0 #00e5ff;
}
.last-pixel.is-glitch .last-pixel__band {
  background-image: repeating-linear-gradient(
    0deg,
    transparent 0 6px,
    rgba(255, 255, 255, 0.1) 6px 9px
  );
  background-position-x: var(--dx, 0);
}
@media (max-width: 720px) {
  .last-pixel__band {
    padding: 21px 16px calc(12px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 7px 12px;
  }
  .last-pixel__quote {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 2px 8px;
    font-size: 12px;
    white-space: normal;
  }
  .last-pixel__mail {
    grid-row: 2;
    grid-column: 1;
    margin-right: 0;
  }
  .last-pixel__noise {
    grid-row: 2;
    grid-column: 2;
    margin-right: 34px;
  }
}
