/* ═══════════════════════════════════════════════════════════
   PORTAFOLIO DE PROYECTOS — Estilos Responsive
   ═══════════════════════════════════════════════════════════ */

/* ── Reset & Variables ──────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --font-main: "Outfit", system-ui, -apple-system, sans-serif;
  --clr-bg: #07070b;
  --clr-text: #f4f4f8;
  --clr-accent: #38bdf8;          /* Azul cyan comercial de alto impacto */
  --clr-accent-glow: rgba(56, 189, 248, 0.4);
  --clr-badge-bg: rgba(56, 189, 248, 0.12);
  --clr-badge-border: rgba(56, 189, 248, 0.35);
  --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--clr-bg);
  font-family: var(--font-main);
  color: var(--clr-text);
  -webkit-font-smoothing: antialiased;
}

/* ── LOADER ─────────────────────────────────────────────── */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--clr-bg);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__ring {
  width: 56px;
  height: 56px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--clr-accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader__text {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 244, 248, 0.65);
  animation: pulse-text 2s ease-in-out infinite;
}

@keyframes pulse-text {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

/* ── VIDEO DE FONDO FULL SCREEN ─────────────────────────── */
.bg-video {
  position: fixed;
  top: 50%;
  left: 50%;
  min-width: 100vw;
  min-height: 100vh;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.bg-video--visible {
  opacity: 1;
}

/* ── OVERLAY OSCURO CON GRADIENTE ELEGANTE ──────────────── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(7, 7, 11, 0.45) 0%,
    rgba(7, 7, 11, 0.15) 35%,
    rgba(7, 7, 11, 0.20) 65%,
    rgba(7, 7, 11, 0.70) 100%
  );
  pointer-events: none;
}

/* ── CONTENIDO CENTRAL ──────────────────────────────────── */
.content {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5vw;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease 0.2s, transform 0.8s ease 0.2s;
  pointer-events: none;
}

.content--visible {
  opacity: 1;
  transform: translateY(0);
}

.content__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.4rem 1.15rem;
  font-size: clamp(0.72rem, 1.1vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--clr-accent);
  background: var(--clr-badge-bg);
  border: 1px solid var(--clr-badge-border);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.content__badge::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--clr-accent);
  box-shadow: 0 0 8px var(--clr-accent);
}

.content__title {
  font-size: clamp(2.2rem, 5.5vw, 4.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-shadow: 0 4px 35px rgba(0, 0, 0, 0.8);
  max-width: 950px;
}

.content__subtitle {
  margin-top: 1rem;
  font-size: clamp(0.85rem, 1.8vw, 1.15rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 244, 248, 0.7);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

/* ── BOTÓN DE SONIDO (DISCRETO Y ACCESIBLE) ──────────────── */
.sound-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(10, 10, 15, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--clr-text);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity var(--transition-smooth),
              transform var(--transition-smooth),
              border-color var(--transition-smooth),
              box-shadow var(--transition-smooth);
}

.sound-btn--visible {
  opacity: 1;
  transform: scale(1);
}

.sound-btn:hover {
  border-color: var(--clr-accent);
  box-shadow: 0 0 20px var(--clr-accent-glow);
  transform: scale(1.08);
}

.sound-btn:active {
  transform: scale(0.95);
}

.sound-btn__icon {
  width: 22px;
  height: 22px;
}

.sound-btn__icon--hidden {
  display: none;
}

/* ── MEDIA QUERIES RESPONSIVE ───────────────────────────── */
@media (max-width: 768px) {
  .sound-btn {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 480px) {
  .content__title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }
  .sound-btn {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 42px;
    height: 42px;
  }
}
