:root{
  --bg: #0b0f17;
  --text: #e9eefb;
  --muted: rgba(233, 238, 251, 0.78);
  --glass: rgba(10, 14, 24, 0.46);
  --stroke: rgba(255,255,255,0.12);
  --accent: #7c5cff;

  --radius: 18px;
  --shadow: 0 18px 45px rgba(0,0,0,.45);
}

*{ box-sizing: border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* =========================
   TOPBAR
========================= */
.topbar{
  position: fixed;
  inset: 16px 16px auto 16px;
  z-index: 50;
  display:flex;
  justify-content: space-between;
  align-items:center;

  padding: 10px 12px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(10, 14, 24, 0.35);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color: var(--text);
}
.brand-dot{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, var(--accent));
  box-shadow: 0 0 0 6px rgba(124,92,255,.15);
}
.brand-name{
  font-weight: 600;
  letter-spacing: .2px;
  font-size: 14px;
}

/* =========================
   MENU BUTTON (ICONO + ANIM)
========================= */
.menu-btn{
  display:flex;
  align-items:center;
  gap: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  cursor:pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.menu-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.18);
}
.menu-label{
  font-size: 13px;
  font-weight: 400;
  opacity: .9;
}

/* SVG lines */
.menu-icon svg{ display:block; }
.line{
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  transition: transform .25s ease, opacity .2s ease;
  transform-origin: 12px 12px;
}

/* Estado abierto (añadido con JS: body.drawer-open) */
body.drawer-open .line1{ transform: translateY(5px) rotate(45deg); }
body.drawer-open .line2{ opacity: 0; }
body.drawer-open .line3{ transform: translateY(-5px) rotate(-45deg); }

/* =========================
   HERO (IMAGEN FULL)
========================= */
.hero{
  min-height: 100vh;
  display:grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;

  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  position: relative;
}

.hero-overlay{
  position:absolute;
  inset:0;
  background:
    radial-gradient(1200px 600px at 20% 40%, rgba(124,92,255,.38), rgba(0,0,0,0) 60%),
    linear-gradient(90deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.38) 45%, rgba(0,0,0,.10) 70%, rgba(0,0,0,.0) 100%),
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.18) 45%, rgba(0,0,0,.55) 100%);
}

.hero-content{
  position: relative;
  z-index: 1;
  padding: 118px 56px 56px 56px;
  max-width: 740px;
}

.hero-spacer{
  position: relative;
  z-index: 1;
}

/* =========================
   TEXTOS
========================= */
.kicker{
  margin:0 0 16px 0;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(233, 238, 251, 0.75);
}

.title{
  margin: 0 0 18px 0;
  font-size: clamp(60px, 7vw, 100px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.title .thin{
  display:block;
  font-weight: 200;
}
.title .bold{
  display:block;
  font-weight: 600;
}

.subtitle{
  margin: 0 0 26px 0;
  font-size: 28px;
  line-height: 1.4;
  color: var(--muted);
  max-width: 60ch;
}

/* =========================
   BOTONES
========================= */
.actions{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;

  padding: 18px 28px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  color: var(--text);
  font-size: 24px;
  font-weight: 400;

  transition: transform .2s ease, background .2s ease, border-color .2s ease;
  box-shadow: 0 10px 25px rgba(0,0,0,.20);
}

.btn.primary{
  background: linear-gradient(135deg, rgba(124,92,255,.95), rgba(124,92,255,.55));
  border-color: rgba(124,92,255,.55);
}
.btn.primary:hover{ transform: translateY(-1px); }

.btn.ghost{
  background: rgba(255,255,255,0.06);
}
.btn.ghost:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.10);
}

.meta{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.pill{
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--stroke);
  color: rgba(233, 238, 251, 0.88);
  backdrop-filter: blur(12px);
}

/* =========================
   DRAWER + BACKDROP
========================= */
.backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 60;
}

.drawer{
  position: fixed;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: min(380px, calc(100vw - 32px));
  z-index: 70;

  border-radius: 22px;
  border: 1px solid var(--stroke);
  background: rgba(10, 14, 24, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);

  padding: 14px;
  transform: translateX(120%);
  transition: transform .28s ease;

  display:flex;
  flex-direction: column;
  gap: 10px;
}

body.drawer-open .drawer{ transform: translateX(0); }

.drawer-header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 6px 6px 10px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.drawer-title{
  font-weight: 600;
  letter-spacing: .2px;
}
.drawer-close{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor:pointer;
}

.drawer-link{
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  text-decoration:none;
  color: rgba(233,238,251,0.92);
  background: rgba(255,255,255,0.04);
  transition: transform .2s ease, background .2s ease;
}
.drawer-link:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.08);
}

.drawer-link-primary{
  border-color: rgba(124,92,255,.55);
  background: rgba(124,92,255,.18);
}

.drawer-footer{
  margin-top: auto;
  padding: 10px 6px 6px 6px;
  color: rgba(233,238,251,0.68);
}

/* =========================
   FLOATING BUTTONS (WhatsApp + Idiomas)
========================= */
.fab-stack{
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fab{
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: rgba(255,255,255,0.92);
  text-decoration: none;
  cursor: pointer;

  background: linear-gradient(180deg, rgba(0,0,0,0.82), rgba(0,0,0,0.56));
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(14px);
  box-shadow:
    0 18px 45px rgba(0,0,0,0.45),
    0 0 0 6px rgba(255,255,255,0.03);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.fab:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.22);
  box-shadow:
    0 18px 45px rgba(0,0,0,0.52),
    0 0 0 6px rgba(255,255,255,0.04),
    0 0 28px rgba(255,255,255,0.10);
}
.fab:active{ transform: translateY(0) scale(0.98); }
.fab svg{ display:block; }

/* Idiomas: botón circular + burbujas */
.lang-fab{
  position: relative;
  display: grid;
  justify-items: end;
  gap: 10px;
}

.fab-lang{
  width: 56px;
  height: 56px;
  border-radius: 50%;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(180deg, rgba(0,0,0,0.82), rgba(0,0,0,0.56));
  display: grid;
  place-items: center;
}

.fab-lang .lang-current{
  font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 12px;
  line-height: 1;
  transform: translateX(1px);
}

.lang-options{
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  display: grid;
  gap: 10px;

  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.lang-fab.open .lang-options{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-option{
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;

  font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.10em;
  font-size: 12px;

  color: rgba(255,255,255,0.92);
  background: linear-gradient(180deg, rgba(0,0,0,0.78), rgba(0,0,0,0.50));
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(14px);
  box-shadow:
    0 14px 38px rgba(0,0,0,0.45),
    0 0 0 6px rgba(255,255,255,0.02);

  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.lang-option:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.22);
  box-shadow:
    0 14px 38px rgba(0,0,0,0.52),
    0 0 26px rgba(255,255,255,0.10);
}

.lang-fab.open .lang-option{
  animation: popIn .22s ease both;
}
.lang-fab.open .lang-option:nth-child(1){ animation-delay: 0ms; }
.lang-fab.open .lang-option:nth-child(2){ animation-delay: 35ms; }
.lang-fab.open .lang-option:nth-child(3){ animation-delay: 70ms; }

@keyframes popIn{
  from{ transform: translateY(10px) scale(0.92); opacity: 0; }
  to  { transform: translateY(0) scale(1); opacity: 1; }
}

/* WhatsApp se mueve cuando idiomas está abierto */
.fab-wa{ transition: transform .25s ease; }
.fab-stack.lang-open .fab-wa{ transform: translateY(-180px); }
@media (max-width: 900px){
  .fab-stack.lang-open .fab-wa{ transform: translateY(-160px); }
}

/* =========================
   DESKTOP LEGAL FOOTER (solo desktop)
========================= */
.desktop-legal{
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 18px;
  z-index: 40;

  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;

  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(233,238,251,0.55);

  pointer-events: none; /* no molesta */
}
.desktop-legal .sep{ opacity: 0.4; }

/* ✅ clicable */
.desktop-legal .moixo-link{
  pointer-events: auto;
  color: rgba(233,238,251,0.70);
  text-decoration: none;
  border-bottom: 1px solid rgba(233,238,251,0.22);
}
.desktop-legal .moixo-link:hover{
  color: rgba(233,238,251,0.95);
  border-bottom-color: rgba(233,238,251,0.45);
}

/* =========================
   RESPONSIVE (MÓVIL)
========================= */
@media (max-width: 900px){
  .hero{
    grid-template-columns: 1fr;

    /* ✅ FIX definitivo: sin deformación */
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: 80% center !important;
  }

  /* overlay suave para no “ensuciar” la imagen */
  .hero-overlay{
    background:
      linear-gradient(180deg,
        rgba(0,0,0,0.10) 0%,
        rgba(0,0,0,0.12) 45%,
        rgba(0,0,0,0.35) 100%
      );
  }

  .hero-content{
    padding: 52vh 16px 18px 16px;
    max-width: 720px;
    margin: 0 auto;
    text-align: left;
  }

  .kicker, .title, .subtitle{
    text-shadow: 0 10px 30px rgba(0,0,0,.55);
  }

  .topbar{ inset: 12px 12px auto 12px; }
  .menu-label{ display:none; }

  .fab-stack{
    right: 12px;
    bottom: 12px;
    gap: 10px;
  }

  .fab{ width: 54px; height: 54px; }
  .fab-lang{ width: 54px; height: 54px; }
  .lang-option{ width: 50px; height: 50px; }

  /* ❌ Footer legal fuera en móvil */
  .desktop-legal{ display:none; }
}

@media (max-width: 480px){
  .hero{
    background-position: 70% center !important;
  }
  .hero-content{ padding-top: 48vh; }
  .title{ font-size: clamp(44px, 10vw, 64px); }
  .subtitle{ font-size: 22px; }
  .btn{ font-size: 20px; padding: 16px 24px; }
}

@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; scroll-behavior: auto !important; }
  .lang-fab.open .lang-option{ animation: none !important; }
}
