/* Estilos complementarios a Tailwind (tipografía, visor, deslizador, estados de imagen y navegación).
   Tokens del sistema visual: Ember #ff5900 (única acción principal), Ink #000000, Paper #ffffff,
   Fog #f3f3f7, Mist #b9bbc6, Steel #8b8d98, Pewter #6f737b, Graphite #60646c, Abyss #000710, Carbon #15191e. */

/* Inter (SIL Open Font License, ver fuentes/LICENSE-Inter.txt), subconjunto latino variable 100–900. */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fuentes/inter-latin-wght-normal.woff2') format('woff2-variations'), url('../fuentes/inter-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Inter sin ligaduras ni alternativas contextuales, con tracking negativo (rasgo del sistema). */
body {
  font-feature-settings: "calt" 0, "liga" 0, "ss03" 1, "cv01" 1, "cv10" 1;
  letter-spacing: -0.01em;
}

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 4.5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Marco de imagen con estados de carga y error */
.img-frame { position: relative; overflow: hidden; background: #ffffff; }
.img-frame.is-loading::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, #f3f3f7 0%, #e8e8ee 50%, #f3f3f7 100%);
  background-size: 200% 100%; animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.img-frame .img-error { display: none; }
.img-frame.is-error img { visibility: hidden; }
.img-frame.is-error .img-error { display: flex; }

/* Recorte de una región de una imagen original (sin generar nuevas imágenes) */
.crop-img { position: absolute; max-width: none; height: auto; }

/* Deslizador de progreso: indicador en Ember sobre pista Fog */
.step-range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 6px; cursor: pointer;
  background: linear-gradient(to right, #ff5900 0%, #ff5900 var(--pct, 0%), #f3f3f7 var(--pct, 0%), #f3f3f7 100%); }
.step-range:focus { outline: none; }
.step-range:focus-visible { box-shadow: 0 0 0 4px #ffffff, 0 0 0 6px #000000; }
.step-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 9999px;
  background: #ffffff; border: 2px solid #ff5900; transition: transform .15s; }
.step-range::-webkit-slider-thumb:hover { transform: scale(1.12); }
.step-range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 9999px; background: #ffffff; border: 2px solid #ff5900; }
.step-range::-moz-range-track { background: transparent; }

/* Visor */
#viewer-stage { touch-action: none; }
#viewer-stage.is-zoomed { cursor: grab; }
#viewer-stage.is-dragging { cursor: grabbing; }
#viewer-img { transform-origin: center center; will-change: transform; }
#viewer-stage:not(.is-dragging) #viewer-img { transition: transform .18s ease-out; }
#viewer-panel:fullscreen { max-width: none; max-height: none; width: 100vw; height: 100vh; border-radius: 0; }
#viewer-panel:-webkit-full-screen { max-width: none; max-height: none; width: 100vw; height: 100vh; border-radius: 0; }

/* Sección activa en la navegación: texto Ink con indicador inferior Ember */
.nav-link { box-shadow: inset 0 -2px 0 transparent; transition: box-shadow .2s, color .2s; }
.nav-link[aria-current="true"] { color: #000000; box-shadow: inset 0 -2px 0 #ff5900; }
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
