/* ===============================
   FONT FACE — INTER TIGHT
=============================== */

/* Thin */
@font-face {
  font-family: "Inter Tight";
  src: url("./assets/fonts/InterTight-Thin.woff2") format("woff2");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter Tight";
  src: url("./assets/fonts/InterTight-ThinItalic.woff2") format("woff2");
  font-weight: 100;
  font-style: italic;
  font-display: swap;
}

/* ExtraLight */
@font-face {
  font-family: "Inter Tight";
  src: url("./assets/fonts/InterTight-ExtraLight.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter Tight";
  src: url("./assets/fonts/InterTight-ExtraLightItalic.woff2") format("woff2");
  font-weight: 200;
  font-style: italic;
  font-display: swap;
}

/* Light */
@font-face {
  font-family: "Inter Tight";
  src: url("./assets/fonts/InterTight-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter Tight";
  src: url("./assets/fonts/InterTight-LightItalic.woff2") format("woff2");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

/* Regular */
@font-face {
  font-family: "Inter Tight";
  src: url("./assets/fonts/InterTight-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter Tight";
  src: url("./assets/fonts/InterTight-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Medium */
@font-face {
  font-family: "Inter Tight";
  src: url("./assets/fonts/InterTight-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter Tight";
  src: url("./assets/fonts/InterTight-MediumItalic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

/* SemiBold */
@font-face {
  font-family: "Inter Tight";
  src: url("./assets/fonts/InterTight-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter Tight";
  src: url("./assets/fonts/InterTight-SemiBoldItalic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

/* Bold */
@font-face {
  font-family: "Inter Tight";
  src: url("./assets/fonts/InterTight-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter Tight";
  src: url("./assets/fonts/InterTight-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* ExtraBold */
@font-face {
  font-family: "Inter Tight";
  src: url("./assets/fonts/InterTight-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter Tight";
  src: url("./assets/fonts/InterTight-ExtraBoldItalic.woff2") format("woff2");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}

/* Black */
@font-face {
  font-family: "Inter Tight";
  src: url("./assets/fonts/InterTight-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter Tight";
  src: url("./assets/fonts/InterTight-BlackItalic.woff2") format("woff2");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}


/* ===============================
   RESET Y CONTENEDOR
=============================== */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  background: #000;
}

#canvas-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;

  /* IMPORTANTE: oculto hasta que activemos el sistema */
  visibility: hidden;
  pointer-events: none;
}

body.system-active #canvas-container {
  visibility: visible;
  pointer-events: auto;
}

canvas {
  display: block;
}

/* ===============================
   REC INDICATOR
=============================== */
#rec-indicator {
  position: fixed;
  top: 26px;
  right: 24px;
  width: 14px;
  height: 14px;
  background: red;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.9);
  display: none;
  z-index: 9999;
}

#rec-label {
  position: fixed;
  top: 24px;
  right: 50px;
  color: red;
  font-family: "Inter Tight", sans-serif;
  font-size: 14px;
  font-weight: bold;
  display: none;
  z-index: 9999;
}

/* ===============================
   HELP BUTTON
=============================== */
#help-button {
  position: fixed;
  top: 56px;
  /* <-- AHORA va debajo del botón volver */
  left: 22px;
  /* <-- misma columna */
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: rgb(255, 0, 0);
  font-size: 18px;
  font-family: "Inter Tight", sans-serif;
  font-weight: 400;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  border: 1.75px solid rgb(255, 0, 0);
  z-index: 9999;
  transition: 0.2s ease;

  user-select: none;
  -webkit-user-select: none;
}

#help-button:hover {
  background: rgba(255, 0, 0, 0.35);
}

/* ===============================
   HELP PANEL
=============================== */
#help-panel {
  position: fixed;
  top: 96px;
  /* <-- BAJADO para no tapar el ? */
  left: 20px;
  width: 343px;
  max-width: calc(100vw - 40px);
  padding: 18px 20px;

  border: 1.75px solid rgb(255, 0, 0);
  border-radius: 12px;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  color: rgb(255, 0, 0);
  font-family: "Inter Tight", sans-serif;
  display: none;
  z-index: 9998;

  user-select: none;
  -webkit-user-select: none;
}

#help-panel h2 {
  margin: 0 0 12px;
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 24px);
  letter-spacing: clamp(0.5px, 0.1vw, 0.75px);
}

#help-panel p {
  margin: 4px 0;
  font-weight: 400;
  font-size: clamp(12px, 2vw, 14px);
  letter-spacing: clamp(0.25px, 0.1vw, 0.50px);
  opacity: 0.9;
}

/* ===============================
   INTRO
=============================== */
#intro {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 10000;

  display: flex;
  justify-content: center;
  align-items: center;

  transform: translateY(0);
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);

  cursor: pointer;
}

/* Estado de salida */
#intro.curtain-up {
  transform: translateY(-100%);
}

.intro-content {
  text-align: center;
  color: #fff;
  user-select: none;
  pointer-events: none;
}

/* TÍTULO */
.intro-content h1 {
  font-family: "Inter Tight", sans-serif;
  font-weight: 500;

  /* Responsive typography */
  font-size: clamp(80px, 14vw, 160px);

  margin: 0;
  line-height: 1;
}

/* SUBTÍTULO */
.intro-content h2 {
  font-family: "Inter Tight", sans-serif;
  font-weight: 200;

  font-size: clamp(12px, 2.2vw, 24px);
  letter-spacing: clamp(0.5px, 0.15vw, 2px);

  margin-top: 20px;
  opacity: 0.75;
}

/* CTA */
.intro-content p {
  font-family: "Inter Tight", sans-serif;
  font-weight: 200;

  font-size: clamp(12px, 2vw, 14px);
  letter-spacing: clamp(0.5px, 0.15vw, 2px);

  margin-top: clamp(40px, 6vh, 80px);
  opacity: 0.5;
}

/* ===============================
   UI COLOR OVERRIDE — T / Y
=============================== */

body.ui-blue #help-button {
  color: #1b00cb !important;
  border-color: #1b00cb !important;
}

body.ui-blue #help-button:hover {
  background: rgba(27, 0, 203, 0.35) !important;
}

body.ui-blue #help-panel {
  color: #1b00cb !important;
  border-color: #1b00cb !important;
}

body.ui-blue #rec-indicator {
  background: #1b00cb !important;
  box-shadow: 0 0 12px rgba(27, 0, 203, 0.9) !important;
}

body.ui-blue #rec-label {
  color: #1b00cb !important;
}

/* ===============================
   HOME
=============================== */
#home {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: clamp(16px, 4vw, 56px);

  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

#home.home-visible {
  opacity: 1;
  pointer-events: auto;
}

.home-content {
  width: min(1400px, 100%);
  color: #fff;
  font-family: "Inter Tight", sans-serif;
}

.home-content h1 {
  font-weight: 500;
  font-size: clamp(56px, 10vw, 120px);
  margin: 0;
  line-height: 1;
}

.home-content h2 {
  font-weight: 200;
  font-size: clamp(12px, 2vw, 20px);
  letter-spacing: clamp(0.5px, 0.15vw, 2px);
  margin-top: 14px;
  opacity: 0.75;
}

.home-grid {
  margin-top: clamp(18px, 4vh, 36px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(14px, 3vw, 28px);
  align-items: end;
}

@media (max-width: 980px) {
  .home-grid {
    grid-template-columns: 1fr;
  }

  #home {
    align-items: flex-start;
    padding-top: clamp(32px, 2vh, 96px);
  }
}

.home-text p {
  margin: 0 0 14px;
  font-weight: 200;
  font-size: clamp(13px, 1.6vw, 16px);
  line-height: 1.55;
  opacity: 0.85;
  max-width: 62ch;
}

.home-button {
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: 7px;
  border: 1.75px solid rgb(255, 0, 0);
  background: transparent;
  color: rgb(255, 0, 0);
  font-family: "Inter Tight", sans-serif;
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.home-button:hover {
  background: rgba(255, 0, 0, 0.35);
}

.home-media {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.home-media video {
  width: 100%;
  max-width: 900px;
  height: auto;
  max-height: clamp(260px, 60vh, 820px);
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #000;
  display: block;
  object-fit: contain;
}

/* ===============================
   BACK BUTTON (volver a HOME)
=============================== */
#home-button {
  position: fixed;
  top: 18px;
  left: 22px;
  width: 28px;
  height: 28px;
  border-radius: 50%;

  color: rgb(255, 0, 0);
  font-size: 18px;
  line-height: 1;
  font-family: "Inter Tight", sans-serif;
  font-weight: 400;

  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  border: 1.75px solid rgb(255, 0, 0);
  z-index: 9999;
  transition: 0.2s ease;

  user-select: none;
  -webkit-user-select: none;
}

#home-button:hover {
  background: rgba(255, 0, 0, 0.35);
}

/* UI azul coherente */
body.ui-blue #home-button {
  color: #1b00cb !important;
  border-color: #1b00cb !important;
}

body.ui-blue #home-button:hover {
  background: rgba(27, 0, 203, 0.35) !important;
}

/* ===============================
   UI SOLO EN SISTEMA (no en HOME)
=============================== */
body:not(.system-active) #help-button,
body:not(.system-active) #help-panel,
body:not(.system-active) #home-button {
  display: none !important;
}