/* =========================================================
   morciis. — BASE
   Variables de diseño, reset y reglas de estructura comunes.
   Cambia aquí colores, tipografía o márgenes y se aplican
   a todas las páginas.
   ========================================================= */

:root {
  /* Colores */
  --color-red: #e8492f;        /* rojo coral de Morciis (botones, enlaces, triángulo) */
  --color-red-hover: #cf3a22;
  --color-black: #050505;
  --color-white: #fff;
  --color-ink: #151515;        /* texto principal */
  --color-muted: #888;         /* textos secundarios */
  --color-meta: #9c9c9c;       /* metadatos de proyectos */

  /* Color de fondo de cada proyecto mientras carga su vídeo */
  --bg-nobodys-here: #929292;
  --bg-4lugar: #000;
  --bg-illustrations: #17101d;

  /* Tipografía */
  --font-sans: "Instrument Sans", Arial, sans-serif;

  /* Espaciado y medidas */
  --page-gutter: clamp(20px, 2.25vw, 42px);   /* margen lateral de cabecera y footer */
  --container: 1100px;                         /* ancho máximo de las páginas de proyecto */
  --radius: 9px;               /* botones */
  --radius-card: 16px;         /* tarjetas de trabajos y proyectos */

  /* Animación */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

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

html { min-height: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  color: var(--color-ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body > main { flex: 1 0 auto; }
body > footer { flex-shrink: 0; margin-top: auto; }

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; }

a:focus-visible,
button:focus-visible { outline: 3px solid var(--color-red); outline-offset: 4px; }

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

/* Contenedor centrado de las páginas de proyecto */
.container { width: min(var(--container), calc(100% - 64px)); margin-inline: auto; }
@media (max-width: 760px) { .container { width: calc(100% - 36px); } }
@media (max-width: 480px) { .container { width: calc(100% - 32px); } }

/* Bloquea el scroll de la página cuando hay un visor abierto */
body.is-locked { overflow: hidden; }

/* ---------- Entrada suave de la página ---------- */
@keyframes page-enter {
  from { opacity: .62; transform: translate3d(0, 7px, 0); }
  to   { opacity: 1;   transform: translate3d(0, 0, 0); }
}
body > header,
body > main { animation: page-enter 700ms var(--ease-out) both; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body > header, body > main { animation: none; }
  *, *::before, *::after { transition: none !important; }
}
