/* ==========================================================================
   PACCEKO — estilos base (tokens, layout, header, footer, componentes)
   Mobile first. Toda la página cabe en una pantalla: html/body no hacen scroll.
   Para cambiar el color de acento, edita --accent.
   ========================================================================== */

:root {
  --white: #fff;
  --black: #000;
  --accent: #1d3bff; /* azul eléctrico "rayos X" */

  --paper: var(--white);
  --ink: var(--black);
  --muted: rgba(0, 0, 0, 0.45);
  --line: rgba(0, 0, 0, 0.12);

  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Archivo', 'Inter', system-ui, sans-serif;

  --fs-ui: 12px;
  --lh-ui: 1.2;
  --fs-small: 10px;
  --fs-body: 14px;
  --lh-body: 1.45;

  --gutter: 16px;
  --row-h: 32px;
  --btn-h: 44px;
  --hit: 32px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 220ms;
}

@media (min-width: 768px) {
  :root { --gutter: 24px; }
}
@media (min-width: 1440px) {
  :root { --gutter: 32px; }
}
@media (pointer: fine) and (min-width: 1024px) {
  :root { --row-h: 24px; --btn-h: 36px; --hit: 24px; }
}

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

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font: 700 var(--fs-ui) / var(--lh-ui) var(--font-ui);
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea {
  font: inherit;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
}
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

::selection { background: var(--accent); color: var(--white); }

/* ---------- Accesibilidad ---------- */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--black);
  color: var(--white);
}
.skip-link:focus { top: 8px; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Header (angosto) ---------- */
.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  padding: 2px var(--gutter) 4px;
}

.site-nav {
  display: flex;
  justify-content: space-between;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  transition: color var(--dur) var(--ease);
}
.site-nav a[aria-current='page'] { color: var(--accent); }
.site-nav a[aria-current='page']::before { content: '['; }
.site-nav a[aria-current='page']::after { content: ']'; }

.ticker {
  align-self: center;
  min-height: 16px;
  line-height: 16px;
  /* área táctil más grande sin agrandar el header */
  padding: 5px 8px;
  margin: -5px -8px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}

@media (hover: hover) {
  .site-nav a:hover { color: var(--accent); }
  .ticker:hover { color: var(--ink); }
}

@media (min-width: 1024px) {
  .site-header {
    flex-direction: row;
    align-items: center;
    height: 44px;
    padding-block: 0;
  }
  .site-nav { justify-content: flex-start; gap: 24px; }
  .ticker {
    position: absolute;
    left: 50%;
    top: 50%;
    margin: 0;
    transform: translate(-50%, -50%);
  }
}

/* ---------- Main ---------- */
.site-main {
  position: relative;
  min-height: 0;
  padding: 0 var(--gutter);
}
.site-main > * { animation: pk-in 420ms var(--ease) both; }

@keyframes pk-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Válvula de seguridad SOLO para teléfonos en horizontal */
@media (max-height: 480px) and (orientation: landscape) {
  .site-main { overflow-y: auto; }
}

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px var(--gutter) max(6px, env(safe-area-inset-bottom));
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 900;
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.01em;
  transition: color var(--dur) var(--ease);
}
@media (hover: hover) {
  .wordmark:hover { color: var(--accent); }
}

.footer-social {
  display: flex;
  margin-left: auto;
  margin-right: -6px;
}
.copyright { display: none; }

@media (min-width: 768px) {
  .wordmark { font-size: 24px; }
  .footer-social { margin-right: 8px; }
  .copyright { display: block; }
}

/* ---------- Idioma: banderas (EE. UU. = inglés · México = español) ----------
   La activa va a todo color y subrayada (con el color del texto: azul por defecto). */
.lang-switch {
  display: flex;
  flex: none;
  align-items: center;
}
.lang-flag {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--accent);
}
.lang-flag .flag {
  width: 21px;
  height: 14px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14);
  opacity: 0.5;
  transition: opacity var(--dur) var(--ease);
}
.lang-flag[aria-pressed='true'] .flag { opacity: 1; }
.lang-flag[aria-pressed='true']::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 21px;
  height: 2px;
  margin-left: -10.5px;
  background: currentColor;
}
@media (hover: hover) {
  .lang-flag:hover .flag { opacity: 1; }
}

/* ---------- Layout dividido (escritorio: contenido | media) ---------- */
.layout-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gutter);
  height: 100%;
}
@media (min-width: 1024px) {
  .layout-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.media-panel {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: var(--black);
}
.media-panel > video,
.media-panel > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Tipografía ---------- */
.label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 10px;
}
.label__count,
.muted { color: var(--muted); }
.accent { color: var(--accent); }

.bracket::before { content: '['; }
.bracket::after { content: ']'; }

.display {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
}

.text {
  max-width: 42ch;
  font-weight: 500;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  text-transform: none;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-h);
  padding: 0 16px;
  border: 2px solid currentColor;
  background: transparent;
  color: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--white); }
.btn--solid { background: var(--black); border-color: var(--black); color: var(--white); }
.btn--invert { color: var(--white); }
.btn--block { width: 100%; }
.btn--sm { height: 32px; padding: 0 10px; gap: 6px; }

@media (hover: hover) {
  .btn:hover { background: var(--black); border-color: var(--black); color: var(--white); }
  .btn--accent:hover { background: var(--black); border-color: var(--black); }
  .btn--solid:hover { background: var(--accent); border-color: var(--accent); }
  .btn--invert:hover { background: var(--white); border-color: var(--white); color: var(--black); }
}

.btn[disabled],
.btn.is-disabled {
  background: transparent;
  border-color: currentColor;
  color: var(--muted);
  text-decoration: line-through;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Iconos ---------- */
.icon {
  flex: none;
  width: var(--icon, 16px);
  height: var(--icon, 16px);
  fill: currentColor;
}

.icon-link {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--hit);
  height: var(--hit);
  color: inherit;
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
@media (hover: hover) {
  .icon-link:hover { color: var(--accent); }
}

/* ---------- Tabla de renglones (catálogo tipo Axwell) ---------- */
.rows { display: flex; flex-direction: column; }

.row {
  --row-cols: 3.4em 5.4em minmax(0, 1fr) auto;
  position: relative;
  display: grid;
  grid-template-columns: var(--row-cols);
  column-gap: 8px;
  align-items: center;
  min-height: var(--row-h);
  padding: 0 4px;
  transition: background-color 120ms linear, color 120ms linear;
}
.row__select {
  min-width: 0;
  text-align: left;
}
.row__select::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
}
.row__select:focus-visible { outline: none; }
.row:focus-within { outline: 2px solid var(--accent); outline-offset: -2px; }
.row.is-selected:focus-within { outline-color: var(--black); }
.row a,
.row .row__actions { position: relative; z-index: 1; }
.row__actions { display: flex; justify-content: flex-end; align-items: center; }

.row.is-selected { background: var(--accent); color: var(--white); }
.row.is-muted { color: var(--muted); }
.row.is-selected.is-muted { color: rgba(255, 255, 255, 0.75); }

@media (hover: hover) {
  .row:not(.is-selected):hover { color: var(--accent); }
  .row.is-selected .icon-link:hover { color: var(--white); opacity: 0.7; }
}

/* ---------- Marquee (títulos largos) ---------- */
.marquee {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee__track { display: inline-block; }
.marquee.is-overflowing .marquee__track {
  animation: pk-marquee var(--marquee-dur, 7s) ease-in-out infinite alternate;
}
@keyframes pk-marquee {
  0%, 18% { transform: translateX(0); }
  82%, 100% { transform: translateX(var(--marquee-shift, 0)); }
}

/* ---------- Formularios ---------- */
.field {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 2px;
  border: 0;
  border-bottom: 2px solid currentColor;
  border-radius: 0;
  background: transparent;
  font-weight: 500;
  font-size: 16px;
  text-transform: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--dur) var(--ease);
}
.field::placeholder {
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  opacity: 1;
}
.field:focus { outline: none; border-color: var(--accent); }
.field--invert { color: var(--white); }
.field--invert::placeholder { color: rgba(255, 255, 255, 0.55); }
.field--invert:focus { border-color: var(--white); }
select.field { cursor: pointer; font-size: 12px; font-weight: 700; text-transform: uppercase; }
select.field option { color: var(--black); }

.select { position: relative; }
.select::after {
  content: '↓';
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

@media (pointer: fine) and (min-width: 1024px) {
  .field { height: 40px; font-size: 14px; }
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.35;
  text-transform: none;
  cursor: pointer;
}
.check input {
  -webkit-appearance: none;
  appearance: none;
  display: grid;
  place-items: center;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 2px solid currentColor;
  cursor: pointer;
}
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after {
  content: '';
  width: 9px;
  height: 5px;
  border: 2px solid var(--white);
  border-top: 0;
  border-right: 0;
  transform: translateY(-1px) rotate(-45deg);
}

.hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.nl-form__msg {
  min-height: 14px;
  margin-top: 6px;
  color: var(--accent);
}

/* ---------- Chips (tallas) ---------- */
.chip {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border: 2px solid currentColor;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.chip[aria-pressed='true'] { background: var(--black); border-color: var(--black); color: var(--white); }
@media (hover: hover) {
  .chip:not([aria-pressed='true']):hover { color: var(--accent); }
}
@media (pointer: fine) and (min-width: 1024px) {
  .chip { min-width: 32px; height: 32px; }
}

/* ---------- Portadas ---------- */
.cover {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--black);
}
.cover img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 16px; }
.tab {
  min-height: 32px;
  color: var(--muted);
  transition: color var(--dur) var(--ease);
}
.tab[aria-selected='true'] { color: var(--accent); }
.tab[aria-selected='true']::before { content: '['; }
.tab[aria-selected='true']::after { content: ']'; }
@media (hover: hover) {
  .tab:hover { color: var(--ink); }
}

/* ---------- Video ---------- */
.sound-toggle {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 6px;
  color: var(--white);
}
.sound-toggle .icon { --icon: 14px; }

[data-video] video { opacity: 0; transition: opacity 700ms var(--ease); }
[data-video].is-loaded video { opacity: 1; }

.scrim {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
  pointer-events: none;
}

/* Reproductor de SoundCloud para los previews: invisible y fuera del flujo */
.pk-sc-frame {
  position: fixed;
  left: -10px;
  bottom: 0;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 64px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--black);
  color: var(--white);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Utilidades ---------- */
.u-desktop { display: none !important; }
@media (min-width: 1024px) {
  .u-desktop { display: revert !important; }
  .u-mobile { display: none !important; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .marquee { text-overflow: ellipsis; }
}
