/** =========================================================
*   1. RESET & VARIABLES
* ========================================================= */

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

html, body { margin: 0; padding: 0; }

:root {
  --color-bg: #000000;
  --color-fg: #ffffff;
  --color-accent: #00d9ff;
  --color-overlay-dark: rgba(0, 0, 0, 0.5);
  --color-overlay-strong: rgba(0, 0, 0, 0.78);

  --font-serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, sans-serif;

  --header-h: 84px;
  --header-h-mobile: 64px;

  --radius-sm: 8px;
  --radius-md: 18px;
  --radius-lg: 48px;

  --ease-smooth: cubic-bezier(.16, .84, .44, 1);
  --ease-fast: cubic-bezier(.4, 0, .2, 1);

  --vh: 1vh;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; margin: 0; padding: 0; }

button { font-family: inherit; background: none; border: none; color: inherit; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/** =========================================================
*   2. HEADER
* ========================================================= */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}

.header-inner {
  height: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  pointer-events: auto;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  height: 32px;
  width: auto;
}

.header-divider {
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,0.3);
  margin: 0 28px;
  flex-shrink: 0;
}

.main-nav ul {
  display: flex;
  gap: 34px;
}

.main-nav li {
  position: relative;
}

/** Subrayado, se dibuja con un pequeño delay tras el reveal de letras */
.main-nav li::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-smooth) 0.12s;
}

.main-nav li:hover::after {
  transform: scaleX(1);
}

/** --- Enlace: reveal letra a letra, generado por JS --- */
.nav-link {
  display: inline-flex;
  vertical-align: top;
  white-space: nowrap;
}

.nav-letter {
  display: inline-block;
  overflow: hidden;
  height: 1.15em;
  line-height: 1.15em;
}

.nav-letter-inner {
  display: flex;
  flex-direction: column;
  transition: transform 0.45s var(--ease-smooth);
  transition-delay: calc(var(--i, 0) * 16ms);
}

.nav-letter-line {
  display: block;
  height: 1.15em;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,0.88);
}

.nav-link:hover .nav-letter-inner {
  transform: translateY(-1.15em);
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

/** --- Selector de idioma --- */
.lang-switcher { position: relative; }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--color-fg);
  transition: border-color 0.25s var(--ease-fast), background 0.25s var(--ease-fast);
}

.lang-toggle:hover { border-color: var(--color-accent); }

.lang-arrow { transition: transform 0.3s var(--ease-smooth); }

.lang-switcher.is-open .lang-arrow { transform: rotate(180deg); }

.lang-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 140px;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-sm);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s var(--ease-smooth), transform 0.25s var(--ease-smooth), visibility 0.25s;
}

.lang-switcher.is-open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-dropdown button {
  width: 100%;
  text-align: left;
  padding: 12px 18px;
  font-size: 0.86rem;
  color: rgba(255,255,255,0.8);
  transition: background 0.2s, color 0.2s;
}

.lang-dropdown li.is-active button { color: var(--color-accent); }

.lang-dropdown button:hover { background: rgba(255,255,255,0.06); color: var(--color-fg); }

/** --- Hamburguesa (solo móvil) --- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-fg);
  transition: transform 0.3s var(--ease-smooth), opacity 0.3s var(--ease-smooth);
}

.hamburger.is-active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }

.hamburger.is-active span:nth-child(2) { opacity: 0; }

.hamburger.is-active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/** =========================================================
*   3. MENÚ MÓVIL (overlay)
* ========================================================= */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0,0,0,0.97);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 60px;
  opacity: 0;
  visibility: hidden;
  clip-path: circle(0% at 100% 0%);
  transition: clip-path 0.6s var(--ease-smooth), opacity 0.3s, visibility 0.6s;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  clip-path: circle(150% at 100% 0%);
}

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: 26px;
  text-align: center;
}

.mobile-nav a {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--color-fg);
  transition: color 0.25s var(--ease-fast);
}

.mobile-nav a:hover { color: var(--color-accent); }

.mobile-lang {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.mobile-lang-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

.mobile-lang-options {
  display: flex;
  gap: 14px;
}

.mobile-lang-options button {
  padding: 8px 20px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

.mobile-lang-options button.is-active {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/** =========================================================
*   4. HERO
* ========================================================= */

.hero {
  position: relative;
  width: 100%;
  height: 100svh;
  height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  background: var(--color-bg);
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.45) 0%,
    rgba(0,0,0,0.15) 35%,
    rgba(0,0,0,0.35) 100%
  );
}

.hero-logo {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* --- Contenedor del logo con efecto hover premium ---
   pointer-events: auto aquí (y solo aquí) para que el hover
   funcione sobre el logo, sin bloquear clicks en el resto
   del hero (que sigue en pointer-events: none vía .hero-logo).
   Lleva además los dos anillos expansivos (::before/::after),
   generados sin tocar el HTML. */
.hero-logo-inner {
  position: relative;
  display: inline-flex;
  pointer-events: auto;
  cursor: default;
}

/* --- Anillos expansivos: dos ondas concéntricas que salen
       desde el centro al entrar el hover, con distinto
       retraso cada una para dar sensación de "pulso doble" --- */
.hero-logo-inner::before,
.hero-logo-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: auto;
  width: 60%;
  height: 60%;
  border: 1px solid rgba(0, 217, 255, 0.7);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.4);
}

.hero-logo-inner:hover::before {
  animation: heroLogoRing 1.3s var(--ease-smooth) 0.05s 1;
}

.hero-logo-inner:hover::after {
  animation: heroLogoRing 1.3s var(--ease-smooth) 0.3s 1;
  border-color: rgba(255, 255, 255, 0.55);
}

@keyframes heroLogoRing {
  0%   { opacity: 0.8; transform: scale(0.4); }
  70%  { opacity: 0.25; }
  100% { opacity: 0; transform: scale(2.1); }
}

.hero-logo-img {
  position: relative;
  z-index: 2;
  width: clamp(120px, 14vw, 220px);
  height: auto;
  transform: rotate(360deg) scale(1); /* equivale visualmente a 0°; truco para el retorno suave */
  transition: transform 0.4s var(--ease-smooth), filter 0.5s var(--ease-smooth);
  filter: drop-shadow(0 0 0 rgba(0, 217, 255, 0));
}

/* Giro completo de entrada (una sola pasada), con un breve
   "glitch" cromático (desdoblamiento rojo/cian) a mitad del
   giro, que converge de nuevo en un único resplandor cian
   limpio al asentarse. Termina exactamente en la misma
   inclinación sutil (-2°, expresada como 358° para que el
   giro sea en una sola dirección) que ya teníamos. */
@keyframes heroLogoSpinIn {
  0% {
    transform: rotate(0deg) scale(1);
    filter: drop-shadow(0 0 0 rgba(0, 217, 255, 0));
  }
  35% {
    transform: rotate(230deg) scale(1.16);
    filter:
      drop-shadow(-3px 0 0 #ffedf08c)
      drop-shadow(3px 0 0 rgba(0, 217, 255, 0.55));
  }
  55% {
    transform: rotate(300deg) scale(1.12);
    filter:
      drop-shadow(-1.5px 0 0 #ffe5e959)
      drop-shadow(1.5px 0 0 rgba(0, 217, 255, 0.6));
  }
  75%  {
    transform: rotate(345deg) scale(1.04);
    filter: drop-shadow(0 0 20px rgba(0, 217, 255, 0.5));
  }
  100% {
    transform: rotate(358deg) scale(1.08);
    filter:
      drop-shadow(0 0 16px rgba(0, 217, 255, 0.55))
      drop-shadow(0 0 40px rgba(0, 217, 255, 0.25));
  }
}

.hero-logo-inner:hover .hero-logo-img {
  animation: heroLogoSpinIn 0.85s var(--ease-smooth) forwards;
}

/* Halo radial de fondo: se expande al entrar y, una vez
   asentado, respira suavemente (pulso continuo) mientras
   dure el hover. */
.hero-logo-glow {
  position: absolute;
  z-index: 1;
  inset: -30%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 217, 255, 0.35) 0%, rgba(0, 217, 255, 0) 70%);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-smooth);
  pointer-events: none;
  filter: blur(4px);
}

.hero-logo-inner:hover .hero-logo-glow {
  opacity: 1;
  transform: scale(1.15);
  animation: heroLogoGlowPulse 2.4s var(--ease-smooth) 0.6s infinite;
}

@keyframes heroLogoGlowPulse {
  0%, 100% { opacity: 1; transform: scale(1.15); }
  50%      { opacity: 0.6; transform: scale(1.3); }
}

/* Brillo que recorre el logo en diagonal, recortado exactamente
   a la silueta del propio LogoDBR.png mediante mask-image (misma
   técnica que el icono de TikTok del footer). En reposo el
   gradiente está fuera de la caja (background-position negativo);
   en hover se anima en diagonal de extremo a extremo, y se
   repite en bucle mientras el ratón siga encima. */
.hero-logo-shine {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.95) 48%,
    rgba(0, 217, 255, 0.85) 52%,
    transparent 70%
  );
  background-size: 260% 260%;
  background-position: -160% -160%;
  -webkit-mask-image: url('Logos/LogoDBR.png');
  mask-image: url('Logos/LogoDBR.png');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  mask-type: alpha;
  opacity: 0;
}

.hero-logo-inner:hover .hero-logo-shine {
  opacity: 1;
  animation: heroLogoShineSweep 2.6s var(--ease-smooth) 0.1s infinite;
}

@keyframes heroLogoShineSweep {
  0%   { background-position: -160% -160%; }
  35%  { background-position: 160% 160%; }
  100% { background-position: 160% 160%; }
}

/** =========================================================
*   5. TEXTO INTRODUCTORIO
* ========================================================= */

.intro-text {
  background: var(--color-bg);
  padding: 140px 24px;
  display: flex;
  justify-content: center;
}

.intro-text p {
  max-width: 1180px;
  margin: 0;
  text-align: center;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(1.3rem, 2.4vw, 2.15rem);
  line-height: 1.55;
  color: rgba(255,255,255,0.92);
}

/** =========================================================
*   6. SECCIÓN EXPLORA — vídeo con crecimiento ligado al scroll
* ========================================================= */

.explora-wrapper {
  position: relative;
  height: 350vh;
}

.explora-stage {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100svh;
  height: calc(var(--vh, 1vh) * 100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-bg);
}

.explora-video-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  will-change: transform, border-radius;
  transform: scale(0.34);
}

.explora-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.explora-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
}

.explora-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 46px;
  padding: 0 24px;
  text-align: center;
}

.explora-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(3.2rem, 11vw, 9rem);
  letter-spacing: 0.02em;
  color: var(--color-fg);
  line-height: 1;
  display: flex;
}

.explora-title .letter {
  display: inline-block;
  overflow: hidden;
}

.explora-title .letter-inner {
  display: inline-block;
  transform: translateY(115%);
  opacity: 0;
  will-change: transform, opacity;
}

.explora-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  opacity: 0;
  will-change: transform, opacity;
}

.explora-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 999px;
  background: rgba(0,0,0,0.3);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--color-fg);
  transition: border-color 0.3s var(--ease-fast), background 0.3s var(--ease-fast), color 0.3s var(--ease-fast);
}

.explora-btn .btn-icon {
  font-size: 1.1rem;
  line-height: 1;
  color: var(--color-accent);
  transition: transform 0.3s var(--ease-smooth);
}

.explora-btn:hover {
  border-color: var(--color-accent);
  background: rgba(0,217,255,0.08);
}

.explora-btn:hover .btn-icon { transform: rotate(90deg); }

/* =========================================================
   3. FOOTER
========================================================= */
.site-footer {
  background: var(--color-bg);
  padding: 72px 24px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-top {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr auto;
  gap: 60px;
  padding-bottom: 48px;
}

/* --- Columna de marca --- */
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.footer-logo-img {
  height: 40px;
  width: auto;
  margin: 0;
}

.footer-tagline {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.98rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
  max-width: 340px;
  margin: 0;
  text-align: left;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #ffffff;
  opacity: 0.85;
  transition: opacity 0.25s var(--ease-fast), transform 0.25s var(--ease-fast);
}

.footer-social-link svg {
  width: 20px;
  height: 20px;
}

.footer-social-link:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.footer-tiktok-mask {
  display: block;
  width: 50px;
  height: 50px;
  background-color: currentColor;
  -webkit-mask-image: url('../Logos/tiktok.png');
  mask-image: url('../Logos/tiktok.png');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  mask-type: alpha;
}

/* --- Columna "Secciones" --- */
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-nav-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.25s var(--ease-fast);
}

.footer-nav a:hover {
  color: var(--color-fg);
}

/* --- Línea inferior: copyright + crédito --- */
.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

.footer-credit {
  margin: 8px 0 0;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
}

.footer-credit a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s var(--ease-fast);
}

.footer-credit a:hover {
  color: var(--color-fg);
}

@media (max-width: 600px) {

    .footer-credit {
        font-size: 0.7rem;
        margin-top: 7px;
        padding: 0 20px;
    }

}

/** =========================================================
*   8. RESPONSIVE
* ========================================================= */

@media (max-width: 900px) {

  .main-nav { display: none; }

  .hamburger { display: flex; }

  .lang-switcher { display: none; }

  .site-header { height: var(--header-h-mobile); }

  .header-inner { padding: 0 20px; }

  .header-divider { display: none; }

  .logo-img { height: 26px; }

  .intro-text { padding: 90px 20px; }

  .explora-wrapper { height: 300vh; }

  .explora-content { gap: 32px; }

  .explora-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }

  .explora-btn {
    justify-content: space-between;
    width: 100%;
  }

  .footer-logo-img { height: 36px; }
}

@media (max-width: 480px) {

  .header-inner { padding: 0 16px; }

  .explora-video-container { border-radius: var(--radius-md); }
}

@media (min-width: 1800px) {

  .header-inner { padding: 0 64px; }
}