/* Bernini Bank sandbox · portada (sitio DEL BANCO). Cascada FINAL del mockup aprobado (reference/mockup.css)
   aplanada: mismos valores computados, sin las reglas de variantes descartadas ni las del chat: lanzador, aviso,
   panel y avatar flotante son del PRODUCTO y los pinta su cargador (/embed/v1/dafne-embed.js). */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bb-teal-d); color: var(--bb-text); font-family: var(--bb-font); -webkit-font-smoothing: antialiased; overflow-x: clip; }
button { font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--bb-peach); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: min(1240px, 100% - 40px); margin: 0 auto; }

/* barra sandbox */
.sandbox { background: var(--bb-teal-d); color: var(--bb-sandbox-text); text-align: center; font-size: 13px; padding: 7px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.sandbox b { color: var(--bb-peach); }
.sb-short { display: none; }

/* escena: fondo de agua + escritorio 3D + grano */
.scene { position: relative; min-height: calc(100vh - 34px); display: flex; flex-direction: column; isolation: isolate; color: var(--bb-ice); }
.scene::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
#bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; }
#hero3d { position: absolute; z-index: 1; left: calc(var(--gx) * 100%); bottom: calc(var(--hz) * 100% - 170px); width: min(700px, 48vw); height: 560px; transform: translateX(-50%); cursor: pointer; transition: opacity .4s ease; }
#hero3d canvas { width: 100% !important; height: 100% !important; display: block; }
#hero3d:focus-visible { outline: 2px solid var(--bb-peach); outline-offset: -8px; border-radius: 24px; }
body.chat-open #hero3d { opacity: .22; pointer-events: none; }

/* encabezado */
header { position: relative; z-index: 20; background: transparent; border-bottom: 1px solid transparent; }
.hbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--bb-ice); }
.brand .wm { font-size: 17px; font-weight: 700; letter-spacing: .22em; color: var(--bb-ice); }
.brand .wm .ai { font-weight: 400; letter-spacing: .12em; opacity: .7; }
.brand .bk { display: flex; align-items: center; gap: 8px; border: 1px solid var(--bb-line); border-left-color: rgba(238, 246, 247, .35);
  padding: 6px 14px 6px 12px; font-size: 12px; font-weight: 500; line-height: 18px; letter-spacing: .2em; text-transform: uppercase; color: var(--bb-ice); opacity: .85; }

/* selector de idioma: <select> nativo (teclado, lector y selector del teléfono del sistema) con forma de píldora */
.idioma { position: relative; display: flex; align-items: center; flex: none; }
.idioma .globo { position: absolute; left: 12px; width: 16px; height: 16px; fill: none; stroke: var(--bb-ice); stroke-width: 1.6; opacity: .8; pointer-events: none; }
.idioma select { appearance: none; -webkit-appearance: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--bb-ice); cursor: pointer;
  min-height: 40px; padding: 0 34px 0 36px; border-radius: var(--bb-r-pill); background-color: var(--bb-glass); border: 1px solid var(--bb-glass-border);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23EEF6F7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 11px 8px; }
.idioma select:hover { background-color: var(--bb-glass-hover); }
.idioma select:focus-visible { outline: 2px solid var(--bb-peach); outline-offset: 2px; }
.idioma option { color: var(--bb-text); background: #fff; }

/* japonés: fuente con kana/kanji, sin el tracking negativo del latín y cortes de línea por frase */
body:lang(ja) { font-family: var(--bb-font-ja); }
.hero h1:lang(ja) { letter-spacing: -0.01em; line-height: 1.12; word-break: auto-phrase; }
.hero p.sub:lang(ja) { word-break: auto-phrase; line-height: 1.7; }

/* botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 0 22px; min-height: 48px; font-weight: 600; font-size: 15px; border: 0; text-decoration: none; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn.dark { background: var(--bb-peach); color: var(--bb-teal); }
.btn.dark:hover { background: var(--bb-peach-h); }
.btn.ghost { background: var(--bb-glass); color: var(--bb-ice); border: 1px solid var(--bb-glass-border); }
.btn.ghost:hover { background: var(--bb-glass-hover); }

/* hero */
main { flex: 1; min-height: 0; display: flex; align-items: center; }
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 56px); align-items: center; text-align: left; padding: clamp(28px, 5vw, 56px) 0; }
.tag { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--bb-ice); background: var(--bb-tag); border-radius: 999px; padding: 6px 14px; }
.tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--bb-peach); }
.hero h1 { font-size: var(--bb-h1); line-height: .98; letter-spacing: -0.045em; font-weight: 800; margin: 18px auto 0 0; max-width: 980px; text-wrap: balance; color: var(--bb-ice); text-shadow: var(--bb-h1-shadow); }
.hero p.sub { font-size: clamp(17px, 1.6vw, 20px); color: var(--bb-on-dark-sub); max-width: 620px; margin: 18px auto 26px 0; line-height: 1.5; }
.hero .cta { display: flex; gap: 12px; justify-content: flex-start; flex-wrap: wrap; }
.trust { list-style: none; padding: 0; margin: 28px 0 0; display: flex; gap: 22px; flex-wrap: wrap; color: var(--bb-on-dark-trust); font-size: 14px; font-weight: 500; }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--bb-peach); }

/* pie */
footer { padding: 22px 0; border-top: 1px solid rgba(255, 255, 255, .1); background: transparent; }
.fslim { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; font-size: 12.5px; color: var(--bb-on-dark-muted); padding-right: 84px; }


/* responsivo */
@media (max-width: 900px) {
  main { padding-top: 48px; padding-bottom: 300px; align-items: flex-start; }
  .hero { grid-template-columns: 1fr; padding-top: 28px; }
  #hero3d { width: min(620px, 100vw); height: 440px; bottom: calc(var(--hz) * 100% - 120px); }
}
@media (max-width: 760px) {
  .sb-long { display: none; } .sb-short { display: inline; }
  .hbar { height: 60px; gap: 10px; }
  .brand { gap: 8px; } .brand .wm { font-size: 14px; letter-spacing: .16em; }
  .brand .bk { font-size: 10px; padding-left: 8px; letter-spacing: .16em; }
  .idioma select { font-size: 13px; min-height: 40px; padding: 0 30px 0 32px; background-position: right 12px center; }
  .idioma .globo { left: 11px; width: 15px; height: 15px; }
  main { padding-bottom: 360px; }
  .hero h1 { font-size: var(--bb-h1-phone); }
  .hero .cta .btn { flex: 1 1 100%; }
  #hero3d { width: 100vw; height: 360px; bottom: calc(var(--hz) * 100% - 110px); }
  .fslim { padding-right: 0; padding-bottom: 70px; }
}
@media (max-width: 380px) { .brand .bk { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #hero3d { transition: none; }
}
