/* scroll-scroll
   Dirección: cartel suizo. Grotesca negra en mayúsculas, columna central, márgenes vacíos
   con texto diminuto repetido, un solo azul. Todo es tipografía; el color aparece una vez. */
:root {
  --bg: #f2f2f0;
  --ink: #000000;
  --mute: #7a7a76;
  --line: #000000;
  --blue: #1876ff;
  --blue-soft: #cfe3ff;
  --panel: #ffffff;
  --col: 46rem;
  --media: 22rem;
  --gutter: 1.25rem;
  --composer: 6.4rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --ink: #ffffff;
    --mute: #8a8a86;
    --line: #ffffff;
    --blue: #3d8bff;
    --blue-soft: #0f2a55;
    --panel: #111111;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.4;
  padding-bottom: 4rem;
}
body.can-post { padding-bottom: calc(var(--composer) + env(safe-area-inset-bottom) + 4rem); }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* texto diminuto en mayúsculas: la voz de los márgenes y de las fichas */
.tiny {
  font-size: 0.68rem;
  line-height: 1.15;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

/* márgenes */
.corner {
  position: fixed;
  z-index: 3;
  max-width: 11rem;
  margin: 0;
  pointer-events: none;
}
.corner a { pointer-events: auto; text-decoration: none; }

/* logo: se selecciona y deselecciona solo, a trompicones, como un cursor nervioso */
.wordmark {
  position: relative;
  display: inline-block;
  padding: 0.15em 0.3em;
  margin: -0.15em -0.3em;
  white-space: nowrap;
}
.wordmark .sel {
  position: absolute;
  inset: 0;
  padding: 0.15em 0.3em;
  background: var(--blue);
  color: #ffffff;
  clip-path: inset(0 100% 0 0);
  animation: select-jitter 9s steps(1, end) infinite;
}
@keyframes select-jitter {
  0%    { clip-path: inset(0 100% 0 0); }
  5%    { clip-path: inset(0 68% 0 0); }
  6.5%  { clip-path: inset(0 61% 0 0); }
  11%   { clip-path: inset(0 0% 0 0); }
  20%   { clip-path: inset(0 0% 0 0); }
  21%   { clip-path: inset(0 9% 0 0); }
  24%   { clip-path: inset(0 46% 0 0); }
  27%   { clip-path: inset(0 51% 0 0); }
  31%   { clip-path: inset(0 100% 0 0); }
  58%   { clip-path: inset(0 100% 0 0); }
  59%   { clip-path: inset(0 0% 0 0); }
  70%   { clip-path: inset(0 0% 0 0); }
  71%   { clip-path: inset(0 22% 0 0); }
  73%   { clip-path: inset(0 30% 0 0); }
  76%   { clip-path: inset(0 83% 0 0); }
  78%   { clip-path: inset(0 100% 0 0); }
  86%   { clip-path: inset(0 100% 0 0); }
  87%   { clip-path: inset(0 74% 0 0); }
  89%   { clip-path: inset(0 100% 0 0); }
  100%  { clip-path: inset(0 100% 0 0); }
}
.corner.tl { top: 0.6rem; left: var(--gutter); font-size: 1.8rem; font-weight: 800; letter-spacing: -0.03em; max-width: none; }
.corner.tr { top: 0.9rem; right: var(--gutter); text-align: right; white-space: nowrap; }
.corner.tr .caret { display: inline-block; width: 0.55em; border-bottom: 1.5px solid var(--ink); vertical-align: baseline; margin-left: 0.1em; animation: caret-blink 1s steps(1, end) infinite; }
@keyframes caret-blink { 50% { opacity: 0; } }
.corner.ml { top: 50%; left: var(--gutter); transform: translateY(-50%); max-width: none; white-space: nowrap; }
.corner.mr { top: 50%; right: var(--gutter); transform: translateY(-50%); max-width: none; white-space: nowrap; text-align: right; }
/* en pantallas estrechas la frase va en vertical pegada al borde izquierdo, leyéndose de abajo arriba */
@media (max-width: 60rem) {
  .corner.mr { display: none; }
  .corner.ml {
    left: 0.45rem;
    writing-mode: vertical-rl;
    transform: translateY(-50%) rotate(180deg);
    text-align: left;
    line-height: 1.25;
  }
  .feed, .colophon { padding-left: 2.4rem; }
  .corner.tl { font-size: 1.25rem; top: 0.8rem; }
}

/* feed */
.feed {
  max-width: var(--col);
  margin: 0 auto;
  padding: 4.5rem var(--gutter) 0;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}
.item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}
.item .meta {
  margin: 0;
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}
.item .meta .n { color: var(--blue); }
.item .meta .del {
  background: none; border: 0; padding: 0;
  color: var(--mute);
  cursor: pointer;
  opacity: 0;
  transition: opacity 120ms;
  text-transform: inherit; font: inherit; letter-spacing: inherit;
}
.item:hover .meta .del, .item:focus-within .meta .del { opacity: 1; }
@media (hover: none) { .item .meta .del { opacity: 1; } }

/* texto: corto va a gritos, medio va a sentencia, largo va a párrafo */
.item.text .body {
  margin: 0;
  width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.item.text.short .body {
  font-size: clamp(2.6rem, 7.2vw, 5.4rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  padding: 0.3rem 0;
}
.item.text.medium .body {
  font-size: clamp(1.55rem, 3.4vw, 2.5rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.item.text.long .body {
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.005em;
  text-align: left;
  text-wrap: pretty;
  max-width: 36rem;
}
.item .body a, .item .caption a {
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.12em;
  text-decoration-color: var(--blue);
}

/* medios: columna estrecha, centrada */
.item img, .item video {
  display: block;
  width: auto;
  max-width: min(100%, var(--media));
  height: auto;
  max-height: 78vh;
}
.item img.wide, .item video.wide { max-width: 100%; }
.item audio { width: min(100%, var(--media)); }
.item .frame {
  position: relative;
  width: 100%;
  max-width: 36rem;
  aspect-ratio: 16 / 9;
  background: var(--blue-soft);
  overflow: hidden;
}
.item .frame.tall { aspect-ratio: 9 / 16; max-width: var(--media); }
.item .frame.square { aspect-ratio: 1; max-width: 28rem; }
.item .frame.spotify { aspect-ratio: auto; height: 152px; max-width: 28rem; }
.item .frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.item .caption {
  margin: 0;
  max-width: 36rem;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
/* tarjeta de enlace: imagen del medio, título, y botón LINK */
.item .linkcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  max-width: 36rem;
  width: 100%;
}
.item .linkcard > a:first-child { display: block; width: 100%; }
.item .linkcard img {
  margin: 0 auto;
  max-width: min(100%, var(--media));
}
.item .linkcard img.wide { max-width: 100%; }
.item .linkcard .title {
  margin: 0;
  text-decoration: none;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.item .linkcard .title:hover { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; text-decoration-color: var(--blue); }
.item .linkcard .host { margin: 0; color: var(--mute); }
.item .linkcard .linkbtn {
  display: inline-block;
  padding: 0.55rem 1.3rem;
  background: var(--blue);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}
.item .linkcard .linkbtn:hover, .item .linkcard .linkbtn:focus-visible { background: var(--ink); color: var(--bg); outline: none; }

.empty {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-align: center;
  text-wrap: balance;
}
.sentinel { height: 1px; margin: 0; }

/* pie: quiénes somos, con subrayado de marcador que se pinta al llegar */
.colophon {
  max-width: var(--col);
  margin: 5rem auto 0;
  padding: 0 var(--gutter);
  text-align: center;
}
.colophon p {
  margin: 0;
  max-width: 34rem;
  margin-inline: auto;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: 0;
  text-transform: uppercase;
}
.colophon a { text-decoration: none; color: inherit; }
.colophon .mark {
  padding: 0.1em 0.3em;
  background-image: linear-gradient(var(--blue), var(--blue));
  background-repeat: no-repeat;
  background-size: 0% 100%;
  background-position: 0 0;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 650ms cubic-bezier(0.2, 0.8, 0.2, 1), color 300ms;
}
.colophon.lit .mark { background-size: 100% 100%; color: #ffffff; }
.colophon.lit .mark:nth-child(4) { transition-delay: 600ms; }
.colophon p a:not(.mark):hover { text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.15em; text-decoration-color: var(--blue); }
.colophon a.mark:hover, .colophon a.mark:focus-visible { background-image: linear-gradient(var(--ink), var(--ink)); color: var(--bg); outline: none; }

/* botón del pie y pop up "en profundidad" */
.colophon .deep {
  margin-top: 1.1rem;
  padding: 0.55rem 0.9rem;
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  cursor: pointer;
}
.colophon .deep:hover, .colophon .deep:focus-visible { background: var(--ink); color: var(--bg); outline: none; }
/* "saber más" siempre a mano: fijo abajo en el centro, sin fondo para que se mezcle con lo que pasa por detrás */
.colophon .deep {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(1rem + env(safe-area-inset-bottom));
  margin: 0;
  z-index: 4;
}
body.can-post .colophon .deep { bottom: calc(var(--composer) + env(safe-area-inset-bottom) + 0.8rem); }
body:has(.about[open]) .colophon .deep { visibility: hidden; }
.about {
  border: 0;
  border-radius: 0;
  background: var(--bg);
  color: var(--ink);
  padding: 0;
  width: min(52rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
}
.about::backdrop { background: rgba(0,0,0,0.6); }
body:has(.about[open]) .corner { visibility: hidden; }
.about-inner {
  padding: 4rem 3rem 3rem;
  text-align: center;
}
.about p {
  margin: 0 auto 1.4em;
  max-width: 40rem;
  font-size: clamp(1.15rem, 2.1vw, 1.5rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.about p.punch { margin-top: 2rem; }
.about .sign { margin: 2.2rem auto 0; font-weight: 600; }
.about .hi {
  background: var(--blue);
  color: #ffffff;
  padding: 0 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.about a.hi:hover, .about a.hi:focus-visible { background: var(--ink); color: var(--bg); outline: none; }
/* CONTRÁTANOS: mismo botón que "saber más" del pie */
.about .hire {
  display: inline-block;
  margin-top: 1.6rem;
  padding: 0.55rem 0.9rem;
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
}
.about .hire:hover, .about .hire:focus-visible { background: var(--ink); color: var(--bg); outline: none; }
.about-close {
  position: sticky;
  top: 0.6rem;
  float: right;
  margin: 0.6rem 0.8rem 0 0;
  width: 2.4rem; height: 2.4rem;
  background: none; border: 0; padding: 0;
  font-size: 2.2rem; line-height: 1; font-weight: 300;
  cursor: pointer;
}
.about-close:hover, .about-close:focus-visible { color: var(--blue); outline: none; }
@media (max-width: 40rem) {
  .about-inner { padding: 3rem 1.25rem 2rem; }
}

/* caja de subida: una regla negra, un cuadrado azul. Solo se ve con contraseña (body.can-post) */
.composer { display: none; }
body.can-post .composer { display: block; }
.item .meta .del { display: none; }
body.can-post .item .meta .del { display: inline; }
.composer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 0.65rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--line);
  z-index: 5;
}
.composer > * { max-width: calc(var(--col) - 2 * var(--gutter)); margin-left: auto; margin-right: auto; }
.composer .who {
  display: flex;
  gap: 1.1rem;
  margin-bottom: 0.45rem;
}
.composer .who label { cursor: pointer; color: var(--mute); }
.composer .who input { position: absolute; opacity: 0; width: 0; height: 0; }
.composer .who input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
.composer .who input:checked + span { color: var(--ink); }
.composer .who input:checked + span::before { content: ""; display: inline-block; width: 0.55em; height: 0.55em; background: var(--blue); margin-right: 0.45em; vertical-align: 0.05em; }

.composer .row { display: flex; align-items: flex-end; gap: 0.5rem; }
.composer textarea {
  flex: 1;
  resize: none;
  min-height: 2.75rem;
  max-height: 40vh;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  line-height: 1.35;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.composer textarea::placeholder { color: var(--mute); }
.composer textarea:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
.composer .clip {
  display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--line);
  cursor: pointer;
  background: var(--panel);
}
.composer .clip:hover { background: var(--blue-soft); }
.composer .send {
  height: 2.75rem;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 0;
  background: var(--blue);
  color: #ffffff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  cursor: pointer;
}
.composer .send:disabled { background: var(--blue-soft); color: var(--mute); cursor: default; }
.composer .send:focus-visible, .composer .clip:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }

.composer .pending {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.composer .pending img, .composer .pending video { height: 2.75rem; width: 2.75rem; object-fit: cover; }
.composer .pending button {
  background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; text-decoration: underline;
  font: inherit; text-transform: inherit; letter-spacing: inherit;
}
.composer .status { margin: 0.4rem 0 0; min-height: 1em; color: var(--mute); }
.composer .status.err { color: var(--blue); }

/* arrastrar */
.dropveil {
  position: fixed; inset: 0;
  display: none; place-items: center;
  background: var(--blue);
  color: #ffffff;
  font-size: clamp(3rem, 12vw, 9rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  z-index: 9;
  pointer-events: none;
}
body.dragging .dropveil { display: grid; }

/* contraseña */
.passdialog {
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--bg);
  color: var(--ink);
  padding: 1.25rem;
  width: min(22rem, calc(100vw - 2rem));
}
.passdialog::backdrop { background: rgba(0,0,0,0.5); }
.passdialog label { display: block; margin-bottom: 0.6rem; }
.passdialog input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
}
.passdialog input:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
.passdialog .dialog-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.9rem; }
.passdialog button {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  cursor: pointer;
}
.passdialog button[type="submit"] { background: var(--blue); color: #ffffff; border-color: var(--blue); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .wordmark .sel { animation: none; }
  .corner.tr .caret { animation: none; }
  .colophon .mark { background-size: 100% 100%; color: #ffffff; }
}
