/* Lo que la demo añade a la landing: los botones de los vídeos, «Mis dudas» (notas.js), la ventana
   del presupuesto (presupuesto.js), la barra del móvil y el interruptor del «permiso de los cuatro». */
:root {
  --letra: Inter, "Segoe UI", system-ui, sans-serif;
  --p-tinta: #f3f5fa; --p-gris: #a3acbd; --p-gris-2: #6f7889;
  --p-linea: rgba(255,255,255,.08); --p-linea-2: rgba(255,255,255,.16);
  --tarjeta-o: #0b1426; --tarjeta-o2: #142140;
}

/* «Solo con el permiso de los cuatro»: se ve solo con permisoCuatro en config.js */
.solo-permiso { display: none !important; }
.permiso-cuatro .solo-permiso { display: revert !important; }
.permiso-cuatro .sin-permiso { display: none !important; }
html:not(.permiso-cuatro) .cam-chip em { display: none; }

/* Portada: los dos vídeos y «mírala paso a paso» */
button.btn-borde { background: transparent; }
.nav-marca img { width: 98px; height: auto; border-radius: 0; }
.btn small { font-size: 13px; font-weight: 700; opacity: .7; }
.btn-play { display: grid; place-items: center; width: 30px; height: 30px; margin-left: -10px; border-radius: 50%; background: rgba(255,255,255,.2); }
.btn-play svg { margin-left: 2px; }
.hero-tocar { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-size: 15px; font-weight: 700; color: rgba(255,255,255,.72); text-decoration: none; }
.hero-tocar:hover { color: #fff; }
.hero-tocar svg { color: var(--bola); }
.hero-sellos { margin-top: 30px; }
button.enlace { padding: 0; border: 0; background: none; color: var(--azul); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* El botón flotante para ver la demo cuando ya no se ve el de arriba */
.guia-lanzar { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border-radius: 999px; border: 1px solid rgba(111,155,255,.4); background: rgba(7,10,18,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff; font-weight: 800; font-size: 14.5px; box-shadow: 0 16px 40px rgba(0,0,0,.35), 0 0 30px rgba(0,83,254,.25); animation: aparecer .5s ease both; }
.guia-lanzar[hidden] { display: none; }
.guia-lanzar span { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--azul); }
.guia-lanzar span svg { width: 16px; height: 16px; margin-left: 2px; }
.guia-lanzar span::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(215,242,74,.55); animation: onda 2s ease-out infinite; }
@keyframes onda { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }

/* Pie: la nota de la demo */
.pie-links { flex-wrap: wrap; row-gap: 8px; }
.pie-marca img { width: 91px; height: auto; border-radius: 0; }
.pie-nota { grid-column: 1 / -1; margin: 0; font-size: 12.5px; line-height: 1.6; color: rgba(255,255,255,.45); }

/* ── Mis dudas (notas.js) ── */
.notas-boton { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 42px; margin-left: auto; margin-right: -10px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(7,10,18,.35); color: #fff; font: 700 14px/1 var(--letra); transition: border-color .2s, background .2s; }
.notas-boton:hover, .notas-boton[aria-expanded="true"] { border-color: var(--bola); background: rgba(215,242,74,.1); }
.notas-boton svg { color: var(--bola); }
.notas-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--bola); color: var(--tinta); font-size: 12.5px; line-height: 22px; text-align: center; }
.notas-n[hidden] { display: none; }
.en-peli .notas-boton { display: none; }
.notas-panel { position: fixed; right: 18px; top: calc(76px + env(safe-area-inset-top, 0px)); z-index: 140; width: min(380px, calc(100vw - 36px)); max-height: calc(100vh - 100px); overflow-y: auto; overscroll-behavior: contain; padding: 18px; border-radius: 22px; background: var(--tarjeta-o); color: var(--p-tinta); border: 1px solid var(--p-linea-2); box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: aparecer .25s ease both; }
.en-peli .notas-panel { max-height: calc(100vh - 190px); }
.notas-panel[hidden] { display: none; }
.notas-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.notas-cab h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 18px; font-weight: 800; }
.notas-cab h3 svg { color: var(--bola); }
.notas-cerrar { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--tarjeta-o2); color: var(--p-tinta); font-size: 22px; line-height: 1; }
.notas-que { margin: 8px 0 12px; color: var(--p-gris); font-size: 14px; line-height: 1.5; }
.notas-escribir { position: relative; }
.notas-escribir textarea { display: block; width: 100%; min-height: 84px; resize: vertical; padding: 12px 52px 12px 14px; border-radius: 14px; border: 1px solid var(--p-linea-2); background: #070d1a; color: var(--p-tinta); font: 15px/1.45 var(--letra); }
.notas-escribir textarea::placeholder { color: var(--p-gris-2); }
.notas-escribir textarea:focus { outline: none; border-color: var(--azul-c); box-shadow: 0 0 0 3px rgba(0,83,254,.3); }
.notas-micro { position: absolute; right: 8px; top: 8px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--tarjeta-o2); color: var(--p-gris); transition: background .2s, color .2s; }
.notas-micro:hover { color: #fff; }
.notas-micro.on { background: var(--rojo); color: #fff; animation: escucha 1.4s ease-in-out infinite; }
@keyframes escucha { 50% { box-shadow: 0 0 0 6px rgba(239,68,68,.25); } }
.notas-dictado { margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--p-gris-2); }
.notas-dictado[hidden] { display: none; }
.notas-guardar { width: 100%; height: 44px; margin-top: 10px; border-radius: 12px; border: 1px solid var(--azul); background: rgba(0,83,254,.22); color: #fff; font: 800 14.5px/1 var(--letra); }
.notas-guardar:hover { background: rgba(0,83,254,.36); }
.notas-lista { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.notas-lista[hidden] { display: none; }
.notas-lista li { display: flex; align-items: flex-start; gap: 8px; padding: 10px 8px 10px 12px; border-radius: 12px; background: #070d1a; border: 1px solid var(--p-linea); }
.notas-lista p { flex: 1; min-width: 0; margin: 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-line; }
.notas-lista p small { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: rgba(34,197,94,.15); color: #6ee7a0; font-size: 11.5px; font-weight: 700; }
.notas-lista button { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; color: var(--p-gris-2); font-size: 18px; line-height: 1; }
.notas-lista button:hover { background: var(--tarjeta-o2); color: #fff; }
.notas-pie { display: grid; gap: 8px; margin-top: 14px; }
.notas-pie .btn { width: 100%; height: 48px; justify-content: center; font-size: 15px; }
.notas-pie small { color: var(--p-gris-2); font-size: 12px; line-height: 1.45; }
.notas-aviso { position: fixed; right: 18px; top: calc(76px + env(safe-area-inset-top, 0px)); z-index: 141; max-width: 300px; padding: 12px 14px; border-radius: 14px; background: #fff; color: var(--tinta); font-size: 14px; font-weight: 600; line-height: 1.4; box-shadow: 0 16px 40px rgba(0,0,0,.35); animation: aparecer .35s ease both; pointer-events: none; }
.en-peli .notas-aviso { top: calc(70px + env(safe-area-inset-top, 0px)); }

/* ── Tu presupuesto (presupuesto.js): la ventana, encima de la página o del vídeo ── */
html.presu-abierto { overflow: hidden; }
.presu { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; padding: 16px; background: rgba(5,8,15,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fundido .25s ease both; }
.presu[hidden] { display: none; }
@keyframes fundido { from { opacity: 0; } }
.presu-caja { position: relative; width: min(620px, 100%); max-height: calc(100vh - 32px); max-height: calc(100svh - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 30px; border-radius: 30px; background: var(--papel); color: var(--tinta); box-shadow: 0 40px 100px rgba(0,0,0,.5); animation: aparecer .3s ease both; }
.presu-cerrar { position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--claro); color: var(--tinta); font-size: 24px; line-height: 1; }
.presu h2 { margin: 12px 0 6px; font-size: clamp(26px, 4vw, 36px); line-height: 1.08; padding-right: 40px; }
.presu-que { margin: 0 0 20px; color: var(--gris); font-size: 15.5px; line-height: 1.5; }
.presu-fila { display: grid; gap: 8px; margin-bottom: 18px; }
.presu-fila > label, .presu-fila > span { font-size: 14px; font-weight: 800; color: var(--gris); }
.presu-pistas { display: flex; align-items: center; gap: 10px; }
.presu-pistas button { width: 44px; height: 44px; border-radius: 14px; border: 1.5px solid var(--linea); background: #fff; font-size: 22px; font-weight: 800; color: var(--tinta); }
.presu-pistas button:hover { border-color: var(--azul); }
.presu-pistas output { min-width: 56px; text-align: center; font-size: 30px; font-weight: 900; letter-spacing: -.02em; }
.presu-pistas small { color: var(--gris); font-weight: 700; }
.presu-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.presu-campos input { height: 50px; min-width: 0; border-radius: 14px; border: 1.5px solid var(--linea); background: #fff; padding: 0 14px; font: 600 15.5px var(--letra); color: var(--tinta); outline: none; }
.presu-campos input:focus { border-color: var(--azul); }
.presu-dudas { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--claro); border: 1px solid var(--linea); margin-bottom: 18px; }
.presu-dudas b { display: block; font-size: 15px; }
.presu-dudas small { display: block; color: var(--gris); font-size: 13.5px; line-height: 1.4; }
.presu-dudas button { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--linea); background: #fff; font-weight: 800; font-size: 14px; color: var(--tinta); }
.presu-dudas button svg { color: var(--azul); }
.presu-botones { display: flex; flex-wrap: wrap; gap: 10px; }
.presu-botones .btn { flex: 1 1 200px; justify-content: center; }
.presu-hecho { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: #ecfdf3; color: #166534; font-size: 14px; font-weight: 600; line-height: 1.45; }
.presu-hecho[hidden] { display: none; }
.presu-priv { margin: 14px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--gris); }

/* ── El móvil: una barra fija abajo con lo importante ── */
.barra-movil { display: none; }
@media (max-width: 760px) {
  .barra-movil { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; gap: 8px; padding: 8px; border-radius: 22px; background: rgba(7,10,18,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
  .barra-movil button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 48px; padding: 0 8px; border-radius: 16px; border: 0; font-weight: 800; font-size: 14px; white-space: nowrap; }
  .bm-ver { flex: 1; background: var(--azul); color: #fff; }
  .bm-notas { flex: none; width: 52px; background: rgba(255,255,255,.08); color: var(--bola); }
  .bm-notas b { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--bola); color: var(--tinta); font-size: 12px; line-height: 20px; }
  .bm-notas b[hidden] { display: none; }
  .bm-presu { flex: 1; background: #fff; color: var(--tinta); }
  .en-peli .barra-movil, .presu-abierto .barra-movil { display: none; }
  .guia-lanzar { display: none !important; }
  .nav .notas-boton { display: none; }
  .pie { padding-bottom: 110px; }
  .hero-cta .btn { flex: 1 1 100%; justify-content: center; }
  .presu-caja { padding: 24px 18px; border-radius: 24px; }
  .presu-campos { grid-template-columns: 1fr; }
  .notas-panel { left: 10px; right: 10px; top: auto; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); width: auto; max-height: 70vh; }
  .en-peli .notas-panel { bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
  /* Abajo, también dentro del vídeo: con el «top» de .en-peli se estiraba de arriba abajo y lo tapaba. */
  .notas-aviso, .en-peli .notas-aviso { left: 10px; right: 10px; top: auto; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); max-width: none; }
}
@media (max-width: 1100px) {
  .nav .notas-boton { margin-left: auto; }
}
