/* ===================== Reset ===================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ===================== Theme Tokens ===================== */
:root {
  --bg: #17233C;
  --bg-2: #0b1020;
  --fg: #b4acac;
  --muted: #b8bdc7;

  --brand: #B68742;
  --brand-600: #a77933;
  --brand-700: #825b25;
  --ink: #0b1020;

  --card: #0f172a;
  --ring: rgba(182, 135, 66, .28);
  --shadow: 0 14px 28px rgba(0, 0, 0, .28);

  --header-h: 72px;
  --nav-offset: 88px;
  --veo-interval: 5000ms;
}

html[data-theme="dark"] {
  --bg: #0f1115;
  --bg-2: #0b0d11;
  --fg: #f4f6f8;
  --muted: #aab0b6;
  --ink: #f8f9fa;
  --card: #12151b;
  --shadow: 0 10px 20px rgba(0, 0, 0, .35);
}

/* ===================== Base ===================== */
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans";
  color: var(--fg);
  background-color: var(--bg);
  background-image: radial-gradient(#b6884227 1px, transparent 1px);
  background-size: 16px 16px;
  background-attachment: fixed;
}

html[data-theme="dark"] body {
  background-image: radial-gradient(#2a2f36 1px, transparent 1px);
}

body.no-scroll,
body.no-scroll-modal {
  overflow: hidden;
}

.container {
  width: min(1140px, 92%);
  margin-inline: auto;
}

.center {
  text-align: center;
}

.section {
  padding: 64px 0;
}

.section--tight {
  padding: 48px 0 72px;
}

.section__head h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem);
  margin: 0 0 6px;
}

.section__head p {
  color: var(--muted);
  margin: 0;
}

/* ===================== Header ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: saturate(180%) blur(8px);
  background: color-mix(in oklab, var(--bg), transparent 10%);
  border-bottom: 1px solid color-mix(in oklab, var(--fg), transparent 92%);
}

/* Desktop: logo arriba + nav abajo centrado */
.header__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 0 12px;
  min-height: var(--header-h);
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand__logo {
  height: 84px;
  width: auto;
}

.brand__name {
  font-weight: 700;
  letter-spacing: .2px;
}

.nav {
  margin: 0;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.nav a {
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background .2s, color .2s;
}

.nav a:hover {
  background: color-mix(in oklab, var(--brand), transparent 92%);
  color: var(--brand);
}

/* ===================== Theme toggle ===================== */
.theme-btn {
  margin-left: 8px;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid color-mix(in oklab, var(--fg), transparent 85%);
  background: var(--card);
  color: var(--fg);
  transition: background .2s ease, border-color .2s ease, transform .05s ease;
  position: relative;
}

.theme-btn:active {
  transform: translateY(1px);
}

.theme-btn .icon {
  position: absolute;
  width: 22px;
  height: 22px;
  transition: opacity .22s ease, transform .25s ease;
}

.theme-btn .sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.theme-btn .moon {
  opacity: 0;
  transform: scale(.85) rotate(-20deg);
}

html[data-theme="dark"] .theme-btn .sun {
  opacity: 0;
  transform: scale(.85) rotate(20deg);
}

html[data-theme="dark"] .theme-btn .moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* ===================== Hero ===================== */
.hero {
  padding: 72px 0 56px;
}

.hero__inner {
  text-align: center;
}

.hero h1 {
  margin: .2rem 0 .5rem;
  font-size: clamp(2rem, 1.2rem + 3vw, 3rem);
}

.grad {
  background: linear-gradient(90deg, var(--ink), var(--brand));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  color: var(--muted);
  margin: 0 auto 18px;
  max-width: 720px;
}

.hero__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .06s ease, background .2s ease, border-color .2s ease;
  user-select: none;
  border: 1px solid transparent;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--brand);
  color: var(--ink);
}

.btn--primary:hover {
  background: var(--brand-600);
}

.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: color-mix(in oklab, var(--fg), transparent 82%);
}

.btn--ghost:hover {
  background: color-mix(in oklab, var(--brand), transparent 92%);
}

.btn--outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}

.btn--outline:hover {
  background: color-mix(in oklab, var(--brand), transparent 92%);
}

/* ===================== Footer ===================== */
.site-footer {
  border-top: 1px solid color-mix(in oklab, var(--fg), transparent 90%);
  padding: 18px 0;
  background: color-mix(in oklab, var(--bg), #ffffff 4%);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  text-align: center;
}

/* ===================== Reveal ===================== */
[data-animate="up"] {
  opacity: 0;
  translate: 0 10px;
}

.revealed {
  opacity: 1 !important;
  translate: 0 0 !important;
  transition: opacity .5s ease, translate .5s ease;
}

/* ===================== Responsive: redes bottom ===================== */
@media (max-width:768px) {
  .redesSociales {
    left: 0;
    right: 0;
    bottom: 14px;
    top: auto;
    transform: none;
    display: flex;
    justify-content: center;
  }

  .redesSociales ul {
    display: flex;
    gap: 12px;
    background: rgba(0, 0, 0, .35);
    backdrop-filter: blur(4px);
    border-radius: 999px;
    padding: 8px 12px;
  }

  .redesSociales li {
    margin-bottom: 0;
  }

  .redesSociales a {
    width: 40px;
    height: 40px;
  }
}

/* ===================== Mega Conexión v2 (mt-mega) ===================== */
.mt-mega__grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  align-items: start;
}

@media (max-width:900px) {
  .mt-mega__grid {
    grid-template-columns: 1fr;
  }
}

.mt-mega__menu {
  position: sticky;
  top: var(--nav-offset, 88px);
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--card);
  border: 1px solid color-mix(in oklab, var(--fg), transparent 90%);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.mt-mega__link {
  appearance: none;
  display: block;
  width: 100%;
  text-align: left;
  background: color-mix(in oklab, var(--bg), #fff 6%);
  border: 1px solid color-mix(in oklab, var(--fg), transparent 88%);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .2s, color .2s, transform .08s;
}

.mt-mega__link:hover {
  background: color-mix(in oklab, var(--bg), #fff 10%);
  transform: translateY(-1px);
}

.mt-mega__link.is-active {
  outline: 2px solid var(--brand);
  color: var(--brand);
  background: color-mix(in oklab, var(--brand), transparent 92%);
}

.mt-mega__viewer {
  background: var(--card);
  border: 1px solid color-mix(in oklab, var(--fg), transparent 90%);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.mt-mega__title {
  margin: 4px 6px 10px;
  font-size: 16px;
  color: var(--fg);
}

.mt-mega__frameWrap {
  border-radius: 10px;
  overflow: hidden;
}

.mt-mega__frame {
  display: block;
  width: 100%;
  min-height: 72vh;
  border: 0;
  background: var(--bg-2);
}

.mt-mega__fallback {
  margin: 10px 6px 0;
  color: var(--muted);
  font-size: 14px;
}

/* ===================== VEO Slider (pulido) ===================== */
.veo-slider .container {
  position: relative;
}

.veo-slider__viewport {
  position: relative;
  background: var(--card);
  border: 1px solid color-mix(in oklab, var(--fg), transparent 90%);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  user-select: none;
}

.veo-slider__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  transition: transform .55s cubic-bezier(.22, .61, .36, 1);
}

.veo-slide {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  overflow: hidden;
  background: color-mix(in oklab, var(--bg), #000 8%);
  place-items: center;
}

.veo-slide__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: none;
  filter: saturate(1.02) contrast(1.02);
}

/* Kenburns neutral (sin escalado real; evita “temblores”) */
.veo-slide.is-active .veo-slide__img {
  animation: veo-kenburns var(--veo-interval, 5000ms) ease-out forwards;
}

@keyframes veo-kenburns {
  from {
    transform: none;
  }

  to {
    transform: none;
  }
}

.veo-slide__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: clamp(14px, 2.4vw, 28px);
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, .58), rgba(0, 0, 0, 0) 55%);
  backdrop-filter: saturate(120%);
}

.veo-slide__title {
  margin: 0 0 4px;
  font-size: clamp(1.1rem, .9rem + 1vw, 1.7rem);
  line-height: 1.15;
  letter-spacing: .2px;
}

.veo-slide__text {
  margin: 0 0 10px;
  color: #f2f2f2;
  font-size: clamp(.9rem, .85rem + .4vw, 1rem);
}

.veo-slide__cta {
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
}

/* Flechas */
.veo-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, #fff, transparent 65%);
  background: color-mix(in oklab, #000, transparent 35%);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px) saturate(120%);
  transition: background .2s ease, transform .08s ease, box-shadow .2s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, .25);
}

.veo-slider__arrow:hover {
  background: color-mix(in oklab, #000, transparent 15%);
}

.veo-slider__arrow:active {
  transform: translateY(-50%) scale(.98);
}

.veo-slider__arrow--prev {
  left: 12px;
}

.veo-slider__arrow--next {
  right: 12px;
}

/* Dots */
.veo-slider__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.veo-slider__dots button {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: color-mix(in oklab, #fff, transparent 55%);
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, width .2s ease;
}

.veo-slider__dots button.is-active {
  width: 26px;
  background: #fff;
}

/* Barra de progreso */
.veo-slider__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: color-mix(in oklab, #fff, transparent 85%);
  z-index: 2;
  overflow: hidden;
}

.veo-slider__progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #fff, color-mix(in oklab, var(--brand), #fff 40%));
}

.veo-slider__progress.is-playing span {
  animation: veo-progress var(--veo-interval, 5000ms) linear forwards;
}

@keyframes veo-progress {
  from {
    width: 0%;
  }

  to {
    width: 100%;
  }
}

/* Motion */
@media (prefers-reduced-motion: reduce) {
  .veo-slider__track {
    transition: none !important;
  }

  .veo-slider__arrow {
    transition: none !important;
  }

  .veo-slider__dots button {
    transition: none !important;
  }

  .veo-slide.is-active .veo-slide__img {
    animation: none !important;
  }

  .veo-slider__progress.is-playing span {
    animation: none !important;
    width: 100%;
  }
}

/* ===================== Menú Hamburguesa (ÚNICO) ===================== */
.nav-toggle {
  margin-left: auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid color-mix(in oklab, var(--fg), transparent 85%);
  background: var(--card);
  color: var(--fg);
  display: none;
  /* desktop */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  line-height: 0;
  transition: background .2s, border-color .2s, transform .05s;
}

.nav-toggle:active {
  transform: translateY(1px);
}

.nav-toggle .bar {
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  display: block;
  transition: transform .2s, opacity .2s;
}

.nav-open .nav-toggle .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-open .nav-toggle .bar:nth-child(2) {
  opacity: 0;
}

.nav-open .nav-toggle .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  backdrop-filter: blur(2px);
  z-index: 25;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.nav-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile behavior */
@media (max-width:980px) {
  :root {
    --header-h: 64px;
  }

  /* Header móvil: fila, logo centrado absoluto */
  .header__inner {
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
  }

  .brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .brand__logo {
    height: 66px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-h);
    z-index: 26;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 12px;
    background: var(--card);
    border-top: 1px solid color-mix(in oklab, var(--fg), transparent 88%);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .10);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }

  .nav a {
    display: block;
    padding: 12px 10px;
    border-radius: 10px;
  }

  .nav a:active {
    background: color-mix(in oklab, var(--brand), transparent 92%);
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}