/* ==========================================================================
   Semanario Regional El Sol — hoja de estilos
   Paleta extraída del logotipo original: rojo #E3020F, negro, sol #F08A00 / #F6B21B
   ========================================================================== */

:root {
  --paper: #ffffff;
  --paper-2: #f6f6f4;
  --paper-3: #ececea;
  --sheet: #ffffff;
  --ink: #151515;
  --ink-2: #3d3d3b;
  --ink-3: #686865;
  --hair: #e4e4e1;
  --red: #e3020f;
  --red-ink: #b3000c;
  --red-wash: #fdf0ef;
  --sun: #f08a00;
  --gold: #f6b21b;

  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 52px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  word-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

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

::selection { background: var(--gold); color: var(--ink); }

svg[viewBox="0 0 24 24"] {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.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;
}

.skip-link {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: none; }

/* ---------- Tipografía editorial ---------- */

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red-ink);
}

.kicker__num {
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  padding-right: 12px;
  border-right: 1px solid var(--hair);
}

.section__title {
  font-weight: 600;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  word-spacing: 0.06em;
  margin-top: 18px;
}

.section__dek {
  margin-top: 18px;
  max-width: 60ch;
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  line-height: 1.6;
  color: var(--ink-2);
}

/* ---------- Cabecera / mancheta ---------- */

.masthead__strip {
  border-bottom: 1px solid var(--hair);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.masthead__strip-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 38px;
}

.masthead__brand {
  display: flex;
  justify-content: center;
  padding-block: clamp(26px, 4vw, 44px) clamp(20px, 3vw, 30px);
}

.masthead__logo a {
  display: block;
  width: clamp(260px, 46vw, 520px);
}

.masthead__logo img { width: 100%; }

/* ---------- Navegación ---------- */

.nav-sentinel { height: 1px; }

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-top: 3px solid var(--ink);
  box-shadow: inset 0 3px 0 var(--paper), inset 0 4px 0 var(--ink);
  border-bottom: 1px solid var(--hair);
  transition: box-shadow 0.3s var(--ease);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--nav-h);
  padding-top: 4px;
  gap: 24px;
}

.nav__brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.nav.is-stuck .nav__inner { justify-content: space-between; }
.nav.is-stuck .nav__brand { display: inline-flex; animation: fade-in 0.35s var(--ease); }

.nav__links {
  display: flex;
  align-items: center;
}

.nav__links li + li { border-left: 1px solid var(--hair); }

.nav__links a {
  display: block;
  padding: 8px clamp(14px, 3vw, 28px);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: clamp(14px, 3vw, 28px);
  right: clamp(14px, 3vw, 28px);
  bottom: 2px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav__links a:hover::after,
.nav__links a[aria-current="true"]::after { transform: scaleX(1); }

/* ---------- Presentación ---------- */

.intro { padding-top: clamp(32px, 5vw, 64px); }

.intro__grid {
  display: grid;
  gap: 28px;
  align-items: end;
}

@media (min-width: 1000px) {
  .intro__grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 56px;
  }
}

.intro__title {
  margin-top: 16px;
  font-weight: 600;
  font-size: clamp(2.125rem, 4.4vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  word-spacing: 0.06em;
  text-wrap: balance;
}

.intro__title em {
  font-style: normal;
  color: var(--red);
}

/* Accesos principales: dos cajas compactas al mismo nivel */

.accesos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.6vw, 16px);
}

.acceso {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(16px, 2.4vw, 28px);
  background: var(--sheet);
  border: 1px solid var(--hair);
  border-top: 3px solid var(--ink);
  text-decoration: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.acceso:hover {
  border-color: var(--ink-3);
  border-top-color: var(--red);
  box-shadow: 0 14px 30px -20px rgb(21 21 21 / 0.4);
  transform: translateY(-2px);
}

.acceso__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.acceso__num {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--red);
}

.acceso__top svg {
  color: var(--red-ink);
  transition: transform 0.3s var(--ease);
}

.acceso:hover .acceso__top svg { transform: translateX(4px); }

.acceso__title {
  font-weight: 600;
  font-size: clamp(1.125rem, 2.1vw, 1.625rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.acceso__desc {
  font-size: clamp(0.8125rem, 1.1vw, 0.9375rem);
  line-height: 1.5;
  color: var(--ink-2);
}

/* ---------- Secciones ---------- */

.section {
  padding-block: clamp(56px, 9vw, 120px);
}

.section__head { max-width: 860px; }

/* Botones */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn--primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.btn--primary:hover { background: var(--red-ink); border-color: var(--red-ink); }

.btn--ghost { background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

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

/* ---------- Código de Ética ---------- */

.codigo { border-top: 1px solid var(--hair); margin-top: clamp(40px, 6vw, 72px); }

.docmeta {
  display: flex;
  flex-wrap: wrap;
  margin-top: 24px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.docmeta li { display: flex; align-items: center; }
.docmeta li + li::before {
  content: "";
  width: 4px; height: 4px;
  margin-inline: 12px;
  border-radius: 50%;
  background: var(--sun);
}

.principios {
  display: grid;
  gap: 16px 32px;
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: 20px;
  border-top: 1px solid var(--ink);
}

.principios__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.principios__label span { display: block; color: var(--ink-3); font-weight: 600; }

.principios ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
}

.principios li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
  padding: 12px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 0.9375rem;
  font-weight: 500;
}

.principios li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 0.5em;
  border-radius: 50%;
  background: var(--red);
}

@media (min-width: 640px) {
  .principios ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .principios { grid-template-columns: 13rem 1fr; align-items: start; }
  .principios ul { margin-top: -12px; }
}

/* Lector del documento */

.lector {
  display: grid;
  gap: clamp(28px, 4vw, 48px);
  margin-top: clamp(32px, 5vw, 48px);
}

@media (min-width: 1024px) {
  .lector { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .indice { position: sticky; top: calc(var(--nav-h) + 24px); }
}

.visor {
  background: var(--paper-2);
  border: 1px solid var(--hair);
  min-width: 0;
}

.visor__barra {
  position: sticky;
  top: var(--nav-h);
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 10px 12px;
  background: var(--sheet);
  border-bottom: 1px solid var(--hair);
}

.visor__nav,
.visor__tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.visor__pag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-inline: 6px;
  font-size: 0.875rem;
  color: var(--ink-2);
  white-space: nowrap;
}

.visor__pag select {
  min-height: 40px;
  padding: 6px 30px 6px 12px;
  border: 1px solid var(--hair);
  border-radius: 2px;
  background: var(--sheet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23151515' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 8px center / 14px;
  font-weight: 600;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}

.btn-icon,
.btn-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--hair);
  border-radius: 2px;
  background: var(--sheet);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.btn-icon { width: 40px; }
.btn-tool { padding-inline: 14px; }

.btn-icon:hover:not(:disabled),
.btn-tool:hover { border-color: var(--ink); }

.btn-icon:disabled { opacity: 0.35; cursor: default; }

.btn-tool[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.visor__ayuda {
  display: none;
  padding: 10px 14px 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ink-3);
}

@media (max-width: 640px) {
  .visor__ayuda { display: block; }
}

.visor__hoja {
  position: relative;
  padding: clamp(12px, 3.5vw, 40px);
  overflow: auto;
  outline-offset: -3px;
  touch-action: pan-y pinch-zoom;
}

.visor__hoja img {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  aspect-ratio: 1240 / 1752;
  background: var(--sheet);
  box-shadow: 0 1px 2px rgb(21 21 21 / 0.08), 0 12px 32px -12px rgb(21 21 21 / 0.28);
  cursor: zoom-in;
  transition: opacity 0.28s var(--ease);
}

.visor__hoja.is-loading img { opacity: 0.25; }

.visor__hoja.is-zoomed {
  max-height: min(88vh, 1100px);
  touch-action: auto;
}

.visor__hoja.is-zoomed img {
  width: clamp(680px, 180%, 1240px);
  max-width: none;
  cursor: zoom-out;
}

.miniaturas {
  position: relative;
  border-top: 1px solid var(--hair);
  padding: 14px 12px 16px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.miniaturas ol {
  display: flex;
  gap: 10px;
  width: max-content;
}

.miniaturas button {
  position: relative;
  display: block;
  width: 64px;
  padding: 0;
  border: 1px solid var(--hair);
  background: var(--sheet);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.miniaturas button:hover { transform: translateY(-2px); border-color: var(--ink-3); }

.miniaturas button[aria-current="true"] {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}

.miniaturas span {
  position: absolute;
  right: 3px; bottom: 3px;
  min-width: 18px;
  padding: 1px 4px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.miniaturas button[aria-current="true"] span { background: var(--red); }

/* Índice */

.indice__title {
  padding-bottom: 12px;
  border-bottom: 3px solid var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.indice__lista button {
  display: grid;
  grid-template-columns: 2.6rem 1fr auto;
  gap: 8px;
  align-items: baseline;
  width: 100%;
  padding: 10px 6px 10px 0;
  border: 0;
  border-bottom: 1px solid var(--hair);
  background: none;
  text-align: left;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.indice__lista button:hover { background: var(--paper-2); }

.indice__cap {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  text-align: center;
}

.indice__nombre {
  font-size: 0.9375rem;
  line-height: 1.4;
}

.indice__pag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.indice__lista button[aria-current="true"] { background: var(--red-wash); }
.indice__lista button[aria-current="true"] .indice__cap,
.indice__lista button[aria-current="true"] .indice__pag { color: var(--red-ink); }
.indice__lista button[aria-current="true"] .indice__nombre { font-weight: 600; }

.indice__nota {
  margin-top: 18px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-3);
}

.indice__nota a { color: var(--red-ink); font-weight: 600; text-underline-offset: 3px; }

/* ---------- Buzón Ciudadano ---------- */

.buzon {
  background: var(--paper);
  border-top: 1px solid var(--hair);
}

.buzon__grid {
  display: grid;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

@media (min-width: 1024px) {
  .buzon__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .buzon__intro { position: sticky; top: calc(var(--nav-h) + 32px); }
}

/* Formulario */

.form {
  display: grid;
  gap: 22px;
  padding: clamp(22px, 4vw, 44px);
  background: var(--sheet);
  border: 1px solid var(--hair);
  border-top: 3px solid var(--ink);
  box-shadow: 0 18px 40px -28px rgb(21 21 21 / 0.35);
}

.form__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 16px;
}

.form__title {
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.form__req { font-size: 0.8125rem; color: var(--ink-3); }

.aviso {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  background: #fdf5e3;
  border: 1px solid #f0dcb0;
  border-radius: 2px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #5a4520;
}

.aviso__dot {
  flex: none;
  width: 8px; height: 8px;
  margin-top: 0.45em;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 4px rgb(240 138 0 / 0.18);
}

.form[data-estado="activo"] .aviso { display: none; }

.tipo {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.tipo legend,
.campo label {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tipo__opciones {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (min-width: 560px) {
  .tipo__opciones { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.tipo__opciones label { position: relative; display: block; }

.tipo__opciones input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.tipo__opciones span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 8px 6px;
  border: 1px solid var(--hair);
  border-radius: 2px;
  background: var(--paper);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.tipo__opciones label:hover span { border-color: var(--ink-3); }

.tipo__opciones input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.tipo__opciones input:focus-visible + span {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.form__fila {
  display: grid;
  gap: 22px;
}

@media (min-width: 640px) {
  .form__fila { grid-template-columns: 1fr 1fr; }
}

.campo input,
.campo textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--hair);
  border-radius: 2px;
  background: var(--paper);
  font-size: 1rem;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.campo textarea { resize: vertical; min-height: 150px; line-height: 1.5; }

.campo input:hover,
.campo textarea:hover { border-color: var(--ink-3); }

.campo input:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--sheet);
  box-shadow: 0 0 0 3px rgb(21 21 21 / 0.08);
}

.campo [aria-invalid="true"] { border-color: var(--red-ink); }

.campo__pie {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.campo__contador {
  margin-top: 6px;
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.campo__error {
  margin-top: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--red-ink);
}

.campo__error:empty { display: none; }

.trampa {
  position: absolute;
  left: -10000px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.consentimiento {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.875rem;
  color: var(--ink-2);
  cursor: pointer;
}

.consentimiento input {
  flex: none;
  width: 20px; height: 20px;
  margin: 1px 0 0;
  accent-color: var(--ink);
}

.form__envio {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  padding-top: 6px;
}

.btn--enviar { min-width: 210px; }
.btn--enviar .icon-send { display: none; }

.btn--enviar:disabled {
  background: var(--paper-3);
  border-color: var(--paper-3);
  color: var(--ink-3);
  cursor: not-allowed;
}

.form[data-estado="activo"] .btn--enviar .icon-lock { display: none; }
.form[data-estado="activo"] .btn--enviar .icon-send { display: block; }

.form__pendiente {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-3);
}

.form[data-estado="activo"] .form__pendiente { display: none; }

.form__resultado { font-size: 0.9375rem; font-weight: 600; }
.form__resultado:empty { display: none; }
.form__resultado.is-ok { color: #1f6b3a; }
.form__resultado.is-error { color: var(--red-ink); }

/* ---------- Pie de página ---------- */

.pie {
  padding-block: clamp(48px, 7vw, 72px) 28px;
  border-top: 3px solid var(--ink);
  box-shadow: inset 0 3px 0 var(--paper), inset 0 4px 0 var(--ink);
}

.pie__grid {
  display: grid;
  gap: 36px;
}

@media (min-width: 760px) {
  .pie__grid { grid-template-columns: 1fr auto; align-items: end; }
}

.pie__marca img { width: clamp(200px, 30vw, 300px); }

.pie__marca p {
  margin-top: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.pie__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.pie__nav ul { margin-top: 10px; display: grid; gap: 6px; }

.pie__nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  background-image: linear-gradient(var(--red), var(--red));
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s var(--ease);
}

.pie__nav a:hover { background-size: 100% 1px; }

.pie__legal {
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--hair);
  font-size: 0.8125rem;
  color: var(--ink-3);
}

/* ---------- Página 404 ---------- */

.no-encontrada {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 48px;
}

.no-encontrada__logo { width: clamp(220px, 40vw, 360px); margin-bottom: 40px; }

/* ---------- Animación de entrada ---------- */

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

/* Solo se ocultan los bloques que están fuera de la pantalla al cargar (ver main.js),
   así el contenido inicial nunca parpadea. */
@media (prefers-reduced-motion: no-preference) {
  .reveal { transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
  .reveal.is-pending { opacity: 0; transform: translateY(14px); }
  .accesos .acceso.reveal:nth-child(2) { transition-delay: 0.08s; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- Móvil ---------- */

@media (max-width: 800px) {
  .nav.is-stuck .nav__brand span { display: none; }
}

@media (max-width: 640px) {
  .masthead__strip-inner { justify-content: center; }
  .masthead__strip-inner > span:not(:first-child) { display: none; }

  .nav.is-stuck .nav__brand { display: none; }
  .nav.is-stuck .nav__inner { justify-content: center; }
  .nav__links a { padding-inline: 16px; letter-spacing: 0.08em; font-size: 0.75rem; white-space: nowrap; }
  .nav__links a::after { left: 16px; right: 16px; }


  .actions .btn { flex: 1 1 100%; }

  .visor__barra { padding: 8px; }
  .visor__nav { flex: 1 1 100%; justify-content: space-between; }
  .visor__tools { flex: 1 1 100%; }
  .visor__tools > * { flex: 1; }


  .btn--enviar { width: 100%; }
}

/* ---------- Impresión ---------- */

@media print {
  .nav, .skip-link, .visor__barra, .miniaturas, .buzon, .actions { display: none !important; }
  body { background: #fff; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
