/* ==========================================================================
   MARQUITOUH · PLANO TECNICO
   pages.css — layouts por página
   01 · Portada (hero)      → .hero
   ========================================================================== */

/* ==========================================================================
   HERO — la portada es la imagen de referencia
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 108px 84px;
  overflow: hidden;
}

.hero__in { width: 100%; }

/* --- fila superior: etiqueta + numeración --- */
.hero__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(20px, 3vw, 34px);
}

/* Texto vertical: columna decorativa pegada al banner */
.hero__vtext {
  position: absolute;
  left: -46px; top: 4px; bottom: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--red);
  pointer-events: none;
  user-select: none;
}
.hero__vtext::after {
  content: "";
  flex: 1;
  width: 1px;
  margin-block: 12px;
  background: linear-gradient(var(--red), transparent);
  opacity: .45;
}

/* --- marco del banner --- */
.hero__frame {
  position: relative;
  max-width: 1120px;
  padding-block: clamp(8px, 1.5vw, 18px) clamp(34px, 5vw, 58px);
}

/* Retícula circular lenta detrás del logo */
.hero__orb {
  position: absolute;
  top: 50%; left: 50%;
  width: min(74%, 720px); aspect-ratio: 1;
  translate: -50% -50%;
  border: 1px solid var(--red-line);
  border-radius: 50%;
  opacity: .5;
  pointer-events: none;
  animation: orb 34s linear infinite;
}
.hero__orb::before, .hero__orb::after {
  content: ""; position: absolute;
  border: 1px solid var(--red-line);
  border-radius: 50%;
}
.hero__orb::before { inset: 14%; opacity: .55; }
.hero__orb::after  { inset: 32%; opacity: .4; }
@keyframes orb { to { transform: rotate(360deg); } }

/* Marcas de recorte del banner */
.cropbox { position: relative; }
.cropbox::after {
  content: "";
  position: absolute;
  inset: -14px;
  pointer-events: none;
  background-image:
    linear-gradient(var(--red), var(--red)), linear-gradient(var(--red), var(--red)),
    linear-gradient(var(--red), var(--red)), linear-gradient(var(--red), var(--red)),
    linear-gradient(var(--red), var(--red)), linear-gradient(var(--red), var(--red)),
    linear-gradient(var(--red), var(--red)), linear-gradient(var(--red), var(--red));
  background-size: 18px 1px, 18px 1px, 1px 18px, 1px 18px, 18px 1px, 18px 1px, 1px 18px, 1px 18px;
  background-position:
    0 0, 100% 0, 0 14px, 100% 14px,
    0 100%, 100% 100%, 14px 0, 14px 100%;
  background-repeat: no-repeat;
  opacity: 0;
  animation: cropIn .8s var(--ease-out) .5s forwards;
}
@keyframes cropIn { to { opacity: 1; } }

/* El logo: PNG blanco usado como máscara → toma el color de tinta del tema.
   El aspect-ratio coincide con el del PNG, así que 100% 100% no deforma. */
.hero__logo {
  position: relative;
  width: 100%;
  aspect-ratio: 1696 / 213;
  background: var(--ink);
  -webkit-mask: url('../logo-marquitouh-strip.png') center / 100% 100% no-repeat;
  mask: url('../logo-marquitouh-strip.png') center / 100% 100% no-repeat;
  transform-origin: left center;
  animation: logoDraw 1.05s var(--ease-out) .18s both;
}
@keyframes logoDraw {
  from { clip-path: inset(0 100% 0 0); transform: scaleX(.985); }
  to   { clip-path: inset(0 0 0 0);    transform: scaleX(1); }
}

/* Barrido de escaneo sobre el logo */
.hero__logo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  opacity: 0;
  mix-blend-mode: multiply;
  animation: logoScan 4.6s var(--ease-hard) 1.3s infinite;
}
[data-theme="dark"] .hero__logo::after { mix-blend-mode: screen; }
@keyframes logoScan {
  0%       { transform: translateX(-100%); opacity: 0; }
  8%       { opacity: .9; }
  55%      { opacity: .55; }
  62%, 100%{ transform: translateX(100%); opacity: 0; }
}

/* --- cotas de medida --- */
.dim {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .22em;
  color: var(--ink-3);
  white-space: nowrap;
}
.dim i { display: block; background: var(--red); position: relative; flex: none; }
/* Las cotas ("1696 PX") son anotacion de dibujo tecnico: viven en un
   aria-hidden y no son texto que deba poder leerse. El numero va por
   contenido generado (data-n) para que no cuente como texto accesible. */
.dim span::after { content: attr(data-n); }
.dim--h { left: 0; right: 0; bottom: 0; }
.dim--h i { height: 1px; flex: 1; }
.dim--h i::before, .dim--h i::after {
  content: ""; position: absolute; top: -4px;
  width: 1px; height: 9px; background: var(--red);
}
.dim--h i::before { left: 0; }
.dim--h i::after  { right: 0; }
.dim--h span { animation: fadeUp .7s var(--ease-out) .9s both; }

.dim--v {
  right: -6px; top: 0; bottom: 0;
  flex-direction: column;
  writing-mode: vertical-rl;
}
.dim--v i { width: 1px; flex: 1; }
.dim--v i::before, .dim--v i::after {
  content: ""; position: absolute; left: -4px;
  width: 9px; height: 1px; background: var(--red);
}
.dim--v i::before { top: 0; }
.dim--v i::after  { bottom: 0; }
.dim--v span { animation: fadeUp .7s var(--ease-out) 1s both; }

/* Sello de numeración — esquina superior derecha de la portada */
.hero__stamp {
  display: flex; align-items: baseline; gap: 8px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: .9;
  color: transparent;
  -webkit-text-stroke: 1px var(--red);
  opacity: .8;
  animation: fadeIn .9s var(--ease-out) .9s both;
  pointer-events: none;
  user-select: none;
}
.hero__stamp b {
  font-family: var(--mono); font-size: 9px; font-weight: 500;
  letter-spacing: .2em; color: var(--red); -webkit-text-stroke: 0;
}
.hero__stamp b { font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: .2em; color: var(--red); -webkit-text-stroke: 0; }

@keyframes fadeIn  { from { opacity: 0; } to { opacity: .75; } }
@keyframes fadeUp  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* --- rol + subtítulo --- */
.hero__role {
  margin-top: clamp(26px, 4vw, 44px);
  font-size: clamp(1.55rem, 4.4vw, 3.3rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.03em;
  max-width: 22ch;
  text-wrap: balance;
}
.hero__role em {
  font-style: normal;
  color: var(--red);
}
.hero__sub {
  margin-top: 18px;
  max-width: 54ch;
  font-size: clamp(.95rem, .3vw + .9rem, 1.06rem);
  color: var(--ink-2);
}

/* --- estado Discord (Lanyard) --- */
.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-top: 26px;
  padding: 10px 16px 10px 13px;
  border: 1px solid var(--hair);
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: border-color var(--t) var(--ease), background-color .5s var(--ease);
}
.hero__status:hover { border-color: var(--red-line); }
.dot {
  width: 7px; height: 7px;
  background: var(--ink-4);
  flex: none;
  position: relative;
}
.dot::after {
  content: ""; position: absolute; inset: -4px;
  border: 1px solid currentColor;
  opacity: 0;
}
.dot--online   { background: #2E9E5B; color: #2E9E5B; }
.dot--idle     { background: #D9A521; color: #D9A521; }
.dot--dnd      { background: #C0392B; color: #C0392B; }
.dot--offline  { background: var(--ink-4); color: var(--ink-4); }
.dot--online::after, .dot--idle::after, .dot--dnd::after { animation: ping 2.2s var(--ease) infinite; }
@keyframes ping { 0% { opacity: .7; transform: scale(.7); } 70%,100% { opacity: 0; transform: scale(1.5); } }

/* --- CTA --- */
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* --- indicador de scroll (abajo a la derecha: el reproductor ocupa la izquierda) --- */
.hero__scroll {
  position: absolute;
  right: var(--gut); bottom: 22px;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 9px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--ink-4);
}
.hero__scroll i {
  display: block; width: 44px; height: 1px;
  background: var(--hair-3);
  position: relative; overflow: hidden;
}
.hero__scroll i::after {
  content: ""; position: absolute; inset: 0;
  background: var(--red);
  animation: slide 2.4s var(--ease-hard) infinite;
}
@keyframes slide {
  0%       { transform: translateX(-100%); }
  60%,100% { transform: translateX(100%); }
}

@media (max-width: 900px) {
  .hero { min-height: auto; padding-block: 96px 56px; }
  .hero__orb  { width: 120%; opacity: .3; }
  .dim--v     { display: none; }
  /* en móvil la columna vertical se sale del contenedor y pisa el logo */
  .hero__vtext { display: none; }
  .hero__stamp{ font-size: 2rem; top: -18px; }
  .hero__scroll { display: none; }
  .hero__frame { padding-bottom: 40px; }
  .cropbox::after { inset: -9px; }
}

/* ==========================================================================
   BLOQUES DE PRUEBA — para revisar la estética antes de montar contenido
   ========================================================================== */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 16px;
}
.demo-card { padding: 22px 20px 24px; }
.demo-card h3 { font-size: 1.05rem; margin-top: 14px; }
.demo-card p  { margin-top: 8px; font-size: .9rem; color: var(--ink-2); }

.demo-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Lista tipo especificación técnica */
.spec { border-top: 1px solid var(--hair); }
.spec div {
  display: flex; align-items: baseline; gap: 14px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--hair-2);
}
.spec dt {
  font-family: var(--mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3);
  flex: none; width: 40%;
}
.spec dd { margin: 0; font-size: .92rem; font-weight: 500; }

/* ==========================================================================
   404 — pagina de error
   ========================================================================== */
.e404 {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 120px 80px;
}
.e404__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.e404__code {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(7rem, 26vw, 20rem);
  line-height: .82;
  letter-spacing: -.06em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--red);
  margin: clamp(20px, 4vw, 40px) 0 clamp(12px, 2vw, 24px);
  user-select: none;
  animation: e404In .8s var(--ease-out) both;
}
@keyframes e404In {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to   { opacity: 1; clip-path: inset(0 0 0 0); }
}
.e404__t { font-size: clamp(1.5rem, 4vw, 2.6rem); }
.e404__d  { margin-top: 16px; }
.e404__nav { gap: 10px; }
.e404__hint {
  margin-top: clamp(28px, 4vw, 44px);
  font-size: .9rem;
  color: var(--ink-3);
  max-width: 52ch;
}
.e404__hint .mono { margin-right: 8px; color: var(--red); }

/* Columna vertical decorativa al costado de listas largas */
.lista-vtext {
  position: absolute;
  top: 0;
  right: -26px;
  font-size: 11px;
  letter-spacing: .4em;
  color: var(--red);
  opacity: .85;
  writing-mode: vertical-rl;
  pointer-events: none;
  user-select: none;
}
@media (max-width: 1240px) { .lista-vtext { display: none; } }

/* ==========================================================================
   COMUNIDAD — servidor, rangos, niveles, normas
   ========================================================================== */

/* Cabecera de página (comunidad) */
.pagehead { padding-top: 132px; }

/* Tarjeta del servidor */
.server {
  position: relative;
  border: 1px solid var(--hair);
  background: var(--paper-2);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color var(--t) var(--ease), background-color .5s var(--ease);
}
.server:hover { border-color: var(--red-line); }

.server__banner {
  position: relative;
  aspect-ratio: 736 / 260;
  background: var(--paper-3) center / cover no-repeat;
  overflow: hidden;
}
.server__banner::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, var(--paper-2));
}
.server__banner::before {
  content: "";
  position: absolute; inset: 0; z-index: 2;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}
.server:hover .server__banner::before { opacity: 1; }

.server__icon {
  position: relative;
  z-index: 3;
  width: clamp(84px, 11vw, 116px);
  aspect-ratio: 1;
  margin: clamp(-52px, -6vw, -58px) 0 0 clamp(22px, 3.5vw, 40px);
  border: 3px solid var(--paper-2);
  background: var(--paper-3) center / cover no-repeat;
  box-shadow: var(--shadow);
}
.server__b { padding: clamp(22px, 3.5vw, 38px) clamp(22px, 3.5vw, 40px) clamp(26px, 3.5vw, 38px); }
.server__b h1 { font-size: clamp(1.6rem, 4vw, 2.7rem); margin-top: 20px; }

.meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; }
.meta__i {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono);
  font-size: 9.5px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-3);
}
.meta__i b { color: var(--ink); font-weight: 700; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.tags span {
  padding: 7px 12px;
  border: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: 8.5px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-2);
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.tags span:hover { color: var(--red); border-color: var(--red); }

.server__cta { margin-top: clamp(24px, 3.5vw, 36px); }

/* Bloque de dos columnas (X + CultCraft) */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } }

@media (max-width: 900px) {
  .pagehead { padding-top: 104px; }
}
