@font-face {
  font-family: 'Raster';
  src: url('FKRaster.woff2') format('woff2');
}

@font-face {
  font-family: 'OCRA';
  src: url('OCRAEXT.woff2') format('woff2');
}

* {
  box-sizing: border-box;
}

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

/* ---------- BODY + FADE ENTRE PÁGINAS ---------- */

body {
  background: #E0E0E0;
  font-family: 'OCRA', monospace;
  color: #000;
  opacity: 0;                        /* empieza oculto */
  transition: opacity 0.4s ease;     /* transición suave */
}

body.page-visible {
  opacity: 1;                        /* se ve al cargar */
}

body.page-fade-out {
  opacity: 0;                        /* cuando salimos de la página */
}

a {
  color: #000;
  text-decoration: none;
}

/* ---------- INTRO (VIDEO + LOGO) ---------- */

.intro-screen {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #000;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.intro-screen.fade-out {
  opacity: 0;
}

.intro-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 0.9;
}

.intro-overlay {
  position: relative;
  z-index: 2;
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.intro-logo {
  max-width: 60vw;
  width: 420px;
  height: auto;
  opacity: 0;
  transform: scale(0.9) translateY(12px);
  animation: introLogoIn 2.2s ease-out forwards;
}

@keyframes introLogoIn {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(12px);
  }
  40% {
    opacity: 1;
    transform: scale(1.02) translateY(0);
  }
  100% {
    opacity: 1;
    transform: scale(1.0) translateY(0);
  }
}

/* ---------- LOGO CENTRADO (logob.png: input, brush, archive, manifesto) ---------- */

.header-center {
  text-align: center;
  padding-top: 4px;      /* casi pegado arriba */
  margin: 0 0 8px 0;     /* muy poco espacio debajo */
}

.header-center img {
  width: 250px;
  max-width: 55vw;
  height: auto;
}

/* ---------- MAIN FRAME (PANTALLA MAIN) ---------- */

.main-frame {
  position: relative;
  min-height: 100vh;
  padding: 0 80px 120px 80px;
}

/* ---------- LOGO ROTATOR EN ESQUINA (MAIN) ---------- */

.logo-block {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 3; /* por encima de líneas y contenido de fondo */
}

/* tamaño base del logo en escritorio */
.logo-block img {
  width: 220px;
  height: auto;
}

/* override específico al id para que crezca de verdad */
#rotatingLogo {
  width: 320px;
  height: auto;
  max-width: none;
}

/* ---------- MENÚ LATERAL DESPLEGABLE ---------- */

.side-menu {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translate(100%, -50%); /* oculto por defecto */
  background: #E0E0E0;
  border-left: 1px solid #000;
  padding: 16px 20px;
  width: 220px;
  z-index: 2;
  transition: transform 0.3s ease;
  font-family: 'Raster', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.side-menu.open {
  transform: translate(0, -50%); /* visible al hacer click en el logo */
}

.side-menu a {
  display: block;
  margin-bottom: 10px;
}

/* ---------- LÍNEAS DECORATIVAS DE MARGEN (MAIN: line1 y line4) ---------- */

.border-line {
  position: absolute;
  pointer-events: none;
  opacity: 0.9;
  z-index: 1; /* por debajo del logo y del resto de contenido */
}

/* arriba, centrado, sin tocar el logo */
.border-top {
  top: 110px;
  left: 50%;
  transform: translateX(-50%);
  width: 35%;
  max-width: 360px;
}

/* abajo, centrado y pegado al borde inferior */
.border-bottom {
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  max-width: 320px;
}

@media (max-width: 768px) {
  .main-frame {
    padding: 0 24px 80px 24px;
  }

  .border-top,
  .border-bottom {
    width: 60%;
  }

  .logo-block img {
    width: 180px;
  }

  #rotatingLogo {
    width: 220px;
  }
}

/* ---------- START CENTERED (MAIN) ---------- */

.start-wrapper {
  min-height: 110vh; /* controla lo lejos que queda el manifesto */
  display: flex;
  justify-content: center;
  align-items: center;
}

.start-button {
  font-family: 'Raster', sans-serif;
  font-size: 40px;
  padding: 20px 50px;
  border: 2px solid #000;
  background: transparent;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
}

/* ---------- MANIFESTO + EVENT FOOTER (MAIN) ---------- */

.manifesto-wrapper {
  padding-top: 40px;
  max-width: 900px;
  margin: 0 auto 0 auto;
}

.manifesto-title {
  font-family: 'Raster', sans-serif;
  font-size: 30px;
  margin-bottom: 20px;
}

.manifesto-body {
  font-family: 'OCRA', monospace;
  font-size: 16px;
  line-height: 1.45;
  text-align: justify; /* texto justificado */
}

.manifesto-body p {
  margin: 0 0 22px;
}

.event-footer {
  margin-top: 60px;
  padding-top: 18px;
  border-top: 1px solid #000;
  display: flex;
  justify-content: space-between;
  gap: 32px;
  font-family: 'OCRA', monospace;
  font-size: 14px;
  line-height: 1.5;
}

.event-col {
  flex: 1;
}

.event-col.center {
  text-align: center;
}

.event-col.right {
  text-align: right;
}

@media (max-width: 768px) {
  .event-footer {
    flex-direction: column;
    text-align: left;
  }

  .event-col.right {
    text-align: left;
  }
}

/* ---------- INPUT PAGE ---------- */

.input-screen {
  height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#wordInput {
  font-family: 'OCRA', monospace;
  font-size: 40px;
  border: none;
  border-bottom: 2px solid #000;
  background: transparent;
  width: 60%;
  text-align: center;
  outline: none;
}

.input-actions {
  display: flex;
  gap: 16px;
  margin-top: 40px;
}

.word-it-button,
.submit-button {
  font-family: 'Raster', sans-serif;
  font-size: 20px;
  padding: 12px 24px;
  border: 2px solid #000;
  background: transparent;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
.button-active {
  background: #000 !important;
  color: #E0E0E0 !important;
  transition: background 0.15s ease, color 0.15s ease;
}
.button-active {
  background: #000 !important;
  color: #E0E0E0 !important;
}
}


/* ---------- BRUSH PAGE ---------- */

.brush-screen {
  padding: 10px 40px 40px 40px; /* menos padding arriba: logo + canvas + botones */
}

.canvas-wrapper {
  width: 100%;
  height: 50vh;           /* menos alto para que quepan los botones */
  margin: 10px 0 20px 0;
}

#brushCanvas {
  width: 100%;
  height: 100%;
  background: #E0E0E0;
  display: block;
}

.brush-actions {
  display: flex;
  gap: 16px;
}

.brush-btn {
  font-family: 'Raster', sans-serif;
  font-size: 18px;
  padding: 12px 28px;
  border: 2px solid #000;
  background: transparent;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.brush-btn.primary {
  background: #000;
  color: #E0E0E0;
}

/* ---------- ARCHIVE PAGE ---------- */

.archive-page {
  padding-bottom: 40px;
}

/* Cabecera arriba de todo: logo + Archive + How button en la misma franja visual */
.archive-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 40px 10px 40px;
}

/* bloque izquierdo: logo + título Archive en línea */
.archive-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.archive-logo {
  width: 140px;
  height: auto;
  cursor: pointer;
}

.archive-title {
  font-family: 'Raster', sans-serif;
  font-size: 28px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.how-button {
  font-family: 'Raster', sans-serif;
  font-size: 14px;
  padding: 10px 18px;
  border: 1px solid #000;
  background: transparent;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.archive-viewport {
  padding: 10px 40px 30px;
  border-top: 1px solid #000;  /* delimita visualmente la zona de palabras */
  margin-top: 10px;
}

.words-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 120px;          /* para que se vea aunque haya pocas palabras */
}

.word-item {
  font-family: 'OCRA', monospace;
  font-size: 18px;
  text-transform: lowercase;
  letter-spacing: 0.12em;
  transition: opacity 0.5s ease;
}

.word-item.faded {
  opacity: 0;
}

.word-item-img {
  height: 80px;
  transition: opacity 0.5s ease;
}

.word-item-img.faded {
  opacity: 0;
}

.archive-credits {
  margin: 10px 40px 40px;
  font-family: 'OCRA', monospace;
  font-size: 12px;
  line-height: 1.4;
}

/* ---------- DEDICATED MANIFESTO PAGE ---------- */

.manifesto-page {
  padding: 140px 12vw 80px;
  max-width: 900px;
  margin: 0 auto;
}

.manifesto-page h1 {
  font-family: 'Raster', sans-serif;
  font-size: 32px;
  margin-bottom: 24px;
}

.manifesto-page-body {
  font-family: 'OCRA', monosense;
  font-size: 16px;
  line-height: 1.45;
}

.manifesto-page-body p {
  margin: 0 0 22px;
}

.back-button {
  display: inline-block;
  margin-top: 40px;
  font-family: 'Raster', sans-serif;
  font-size: 16px;
  padding: 10px 20px;
  border: 2px solid #000;
  background: transparent;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
}