/* La home de DUNITY. Marca: docs/MARCA.md del repo de la app.
   Índigo que se apaga al negro, la voz en serif, el dorado para la acción, el rojo en una sola zona. */
:root {
  --void: #060510; --ground: #0A0912;
  --ink: #ECEAF4; --mid: #A9A4BE; --dim: #6C6786;
  --line: rgba(180, 170, 220, .12);
  --gold: #E8B84B; --hot: #FFD873; --soft: #C79A34;
  --red: #F32424; --violet: #A78BFA;
  --surf: rgba(20, 17, 38, .55);
  --serif: Georgia, "Times New Roman", "Noto Serif", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --gutter: 20px; --nav: 64px;
  --sale: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--void); }
body { color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; overflow-x: clip; }
img { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h1, h2 { text-wrap: balance; }
h1 { font-size: clamp(36px, 9.4vw, 66px); line-height: 1.1; letter-spacing: -.012em; }
h2 { font-size: clamp(30px, 7.8vw, 50px); line-height: 1.14; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; border-radius: 6px; }

.kicker { font-size: 11px; line-height: 1.4; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; font-weight: 600; }
.kicker.rojo { color: var(--red); font-size: 13px; letter-spacing: .22em; }
.linea { font-family: var(--serif); font-size: clamp(18px, 4.8vw, 22px); line-height: 1.4; color: var(--mid); margin-top: 14px; text-wrap: pretty; }

/* acciones */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 38px; border-radius: 27px; background: linear-gradient(180deg, var(--hot), #C99A2E); color: #1A1206; font-weight: 700; font-size: 15px; box-shadow: 0 10px 30px rgba(232, 184, 75, .26), inset 0 1px 0 rgba(255, 255, 255, .5); transition: transform .5s var(--sale), box-shadow .5s var(--sale); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 38px rgba(232, 184, 75, .36), inset 0 1px 0 rgba(255, 255, 255, .5); }
.texto .btn { margin-top: 24px; }
.btn-borde { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 28px; border-radius: 25px; border: 1px solid rgba(232, 184, 75, .4); background: rgba(232, 184, 75, .08); color: var(--hot); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; margin-top: 22px; transition: background .5s; }
.btn-borde:hover { background: rgba(232, 184, 75, .16); }

/* el cielo que vive detrás de los bloques */
#cielo { position: fixed; inset: 0; z-index: -1; opacity: .8; }

/* la barra */
.nav { position: fixed; z-index: 40; top: 0; left: 0; right: 0; height: var(--nav); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 var(--gutter); padding-top: env(safe-area-inset-top, 0); transition: background .8s, backdrop-filter .8s; }
.nav.fija { background: rgba(6, 5, 16, .72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.marca { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; letter-spacing: .24em; font-weight: 600; color: var(--ink); }
.marca img { width: 28px; height: 28px; border-radius: 8px; }
.nav-enlaces { display: none; gap: 30px; font-size: 13px; color: var(--mid); }
.nav-enlaces a { transition: color .4s; }
.nav-enlaces a:hover { color: var(--ink); }
.nav-der { display: flex; align-items: center; gap: 14px; }
.pildora { display: flex; align-items: center; gap: 5px; height: 38px; padding: 0 14px 0 7px; border-radius: 19px; background: rgba(14, 11, 28, .74); border: 1px solid rgba(180, 170, 220, .18); font-family: var(--serif); font-size: 17px; color: #8f86a8; opacity: 0; visibility: hidden; transform: scale(.6); transition: color .8s, border-color .8s, box-shadow .8s, opacity .9s, transform .9s var(--sale), visibility 0s .9s; }
/* la racha no se muestra en cero: aparece encendida cuando la persona termina El Cruce */
.pildora.viva { color: var(--hot); border-color: rgba(232, 184, 75, .45); box-shadow: 0 0 18px rgba(255, 180, 80, .25); opacity: 1; visibility: visible; transform: none; transition: color .8s, border-color .8s, box-shadow .8s, opacity .9s, transform .9s var(--sale), visibility 0s; }
.mini { position: relative; display: inline-block; width: 24px; height: 30px; }
.btn-nav { display: none; align-items: center; min-height: 38px; padding: 0 18px; border-radius: 19px; border: 1px solid rgba(232, 184, 75, .4); background: rgba(232, 184, 75, .08); color: var(--hot); font-size: 13px; font-weight: 600; transition: background .5s; }
.btn-nav:hover { background: rgba(232, 184, 75, .16); }

/* las pantallas: una escena viva detrás, sin tarjetas */
.pantalla { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; background: var(--void); }
.lienzo { position: absolute; inset: 0; }
.pantalla::before, .pantalla::after { content: ""; position: absolute; left: 0; right: 0; height: 90px; z-index: 1; pointer-events: none; }
.pantalla::before { top: 0; background: linear-gradient(180deg, var(--void), rgba(6, 5, 16, 0)); }
.pantalla::after { bottom: 0; background: linear-gradient(0deg, var(--void), rgba(6, 5, 16, 0)); }
.contenido { position: relative; z-index: 2; width: 100%; max-width: 1180px; margin: 0 auto; padding: calc(var(--nav) + 26px) var(--gutter) 0; }
.bloque { position: relative; padding: 84px var(--gutter) 56px; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.bloque > * { width: 100%; }
.bloque::before, .bloque::after { content: ""; position: absolute; left: 0; right: 0; height: 110px; pointer-events: none; }
.bloque::before { top: 0; background: linear-gradient(180deg, var(--void), rgba(6, 5, 16, 0)); }
.bloque::after { bottom: 0; background: linear-gradient(0deg, var(--void), rgba(6, 5, 16, 0)); }
.centro { text-align: center; }
.junto { white-space: nowrap; }
.centro h2, .centro .linea { margin-left: auto; margin-right: auto; max-width: 20em; }

/* entrada lenta */
.js .aparece { opacity: 0; transform: translateY(12px); transition: opacity 1.1s ease, transform 1.1s var(--sale); }
.js .aparece.en { opacity: 1; transform: none; }
.aparece[data-d="1"] { transition-delay: .18s !important; }
.aparece[data-d="2"] { transition-delay: .36s !important; }
.aparece[data-d="3"] { transition-delay: .54s !important; }

/* 1 · el gancho: entra solo, sin depender del script */
.js .hero .aparece { opacity: 1; transform: none; transition: none; animation: entra 1.2s var(--sale) both; }
.js .hero .aparece[data-d="1"] { animation-delay: .18s; }
.js .hero .aparece[data-d="2"] { animation-delay: .36s; }
@keyframes entra { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hero .texto { max-width: 15.5em; font-size: 16px; }
.hero h1 { max-width: 11.2em; }
.hero .linea { max-width: 19em; }
.hero::before { display: none; }

/* 2 · el Ego */
.dialogo { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.burbuja { position: relative; font-family: var(--serif); font-size: 17px; line-height: 1.38; padding: 10px 16px 12px; border-radius: 18px; max-width: 15em; text-wrap: pretty; }
.burbuja p { margin: 0; }
.quien { display: block; font-family: var(--sans); font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 3px; }
.b-ego { background: #1A102E; border: 1px solid rgba(167, 139, 250, .4); color: #DCCFFF; font-style: italic; }
.b-ego .quien { color: var(--violet); }
.b-dunity { background: #22190A; border: 1px solid rgba(232, 184, 75, .5); color: #FFE7A8; }
.b-dunity .quien { color: var(--gold); }
/* la cola sale de la burbuja hacia quien habla */
.cola { position: absolute; top: 50%; right: -25px; width: 26px; height: 22px; margin-top: -11px; overflow: visible; }
.cola.izq { right: auto; left: -25px; }
.cola path { stroke-width: 1; stroke-linejoin: round; }
.b-ego .cola path { fill: #1A102E; stroke: rgba(167, 139, 250, .55); }
.b-dunity .cola path { fill: #22190A; stroke: rgba(232, 184, 75, .6); }
.mensaje { display: flex; align-items: center; gap: 22px; }
.cara { flex: none; width: 52px; height: 52px; object-fit: contain; }
.cara-ego { position: relative; display: block; }
.cara[hidden] { display: none; }
.fila-ego { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.fila-dunity { position: relative; display: flex; align-items: flex-start; gap: 30px; margin-top: 12px; }
.ego-caja { position: relative; flex: none; width: 124px; height: 124px; margin-right: -18px; margin-left: 12px; }
.ego-caja #ego { width: 100% !important; height: 100% !important; }
.hueco { flex: none; width: 96px; height: 1px; }

/* 3 · El Cruce: la pantalla de la app */
.bloque.cruce { padding: calc(var(--nav) + 6px) 14px 18px; justify-content: flex-start; }
.cruce-grilla { display: flex; flex-direction: column; flex: 1; max-width: 1020px; margin: 0 auto; }
.cruce .texto { padding: 0 6px; text-align: center; }
.cruce .kicker { margin-bottom: 8px; }
.cruce h2 { font-size: clamp(22px, 6.3vw, 30px); }
.cruce-app { position: relative; flex: 1; min-height: 540px; margin-top: 14px; border-radius: 30px; overflow: hidden; background: #020205; box-shadow: 0 0 0 1px rgba(180, 170, 220, .14), 0 24px 60px rgba(0, 0, 0, .5); }
.cruce-app iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 4 · la racha */
.racha { position: relative; height: 430vh; height: 430svh; }
.racha-escena { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--void); }
.racha-escena::before, .racha-escena::after { content: ""; position: absolute; left: 0; right: 0; height: 90px; z-index: 1; pointer-events: none; }
.racha-escena::before { top: 0; background: linear-gradient(180deg, var(--void), rgba(6, 5, 16, 0)); }
.racha-escena::after { bottom: 0; background: linear-gradient(0deg, var(--void), rgba(6, 5, 16, 0)); }
.racha .dia { font-family: var(--serif); font-size: clamp(60px, 15vw, 96px); line-height: 1; color: var(--hot); text-shadow: 0 0 22px rgba(255, 180, 80, .35); transition: opacity .35s; }
.racha h2 { font-size: clamp(26px, 6.6vw, 40px); margin-top: 4px; transition: opacity .35s; }
.racha .linea { margin-top: 6px; transition: opacity .35s; }
.racha .cambia { opacity: 0; }

/* 5 · la liga */
.liga-grilla { max-width: 1020px; margin: 0 auto; }
.voz-liga { margin-top: 14px; transition: opacity .6s; }
.tabla { position: relative; height: 270px; margin-top: 18px; }
.renglon { position: absolute; left: 0; right: 0; top: 0; height: 50px; display: flex; align-items: center; gap: 12px; padding: 0 14px; border-radius: 15px; background: var(--surf); border: 1px solid rgba(180, 170, 220, .1); transition: transform 1.1s var(--sale), border-color 1s, background 1s; font-size: 15px; }
.renglon .pos { width: 18px; color: var(--dim); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.renglon .ini { width: 30px; height: 30px; flex: none; border-radius: 48% 52% 50% 50% / 52% 50% 50% 48%; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 14px; color: var(--mid); background: rgba(180, 170, 220, .1); }
.renglon .nom { flex: 1; font-family: var(--serif); font-size: 17px; }
.renglon .luz { font-family: var(--serif); font-size: 17px; color: var(--mid); font-variant-numeric: tabular-nums; }
.renglon.tu { background: rgba(232, 184, 75, .1); border-color: rgba(232, 184, 75, .5); z-index: 2; }
.renglon.tu .nom, .renglon.tu .luz { color: var(--hot); }
.renglon.tu .ini { background: rgba(232, 184, 75, .18); }
.divisiones { max-width: 760px; margin: 6px auto 0; }
.div-arte { position: relative; height: 118px; }
.div-nombres { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); margin-top: 6px; }
.div-nombres li { text-align: center; font-family: var(--serif); font-size: clamp(11px, 3vw, 15px); color: var(--mid); }

.div-arte canvas, .hitos-lienzo canvas { -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent), linear-gradient(180deg, transparent, #000 12%, #000 80%, transparent); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent), linear-gradient(180deg, transparent, #000 12%, #000 80%, transparent); mask-composite: intersect; }

/* 7 · lo que hay en juego */
.objetos { display: flex; flex-direction: column; gap: 10px; max-width: 980px; margin: 22px auto 0; }
.objeto { display: flex; align-items: center; gap: 16px; }
.obj-arte { position: relative; flex: none; width: 112px; height: 112px; }
.objeto h3 { font-size: 21px; line-height: 1.2; }
.objeto p { font-family: var(--serif); font-size: 17px; line-height: 1.34; color: var(--mid); margin-top: 3px; }

/* 8 · la transformación */
.hitos-arte { max-width: 760px; margin: 26px auto 0; }
.hitos-lienzo { position: relative; height: 210px; }
.hitos-dias { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.hitos-dias b { display: block; font-family: var(--serif); font-weight: 400; font-size: 25px; line-height: 1.1; color: var(--hot); }
.hitos-dias span { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.hito-frase { font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.3; text-align: center; color: var(--ink); margin-top: 22px; transition: opacity .7s; min-height: 1.3em; }

/* 9 · Legado */
.legado .texto { max-width: 560px; }
.legado h2 { max-width: 13em; }

/* 10 · la decisión */
.final::after { display: none; }
.final h2 { max-width: 13em; margin-top: 14px; }
.final .mensaje { justify-content: center; text-align: left; }
.tiendas { display: flex; justify-content: center; gap: 22px; margin-top: 18px; font-size: 14px; color: var(--mid); }
.tienda { padding: 8px 2px; border-bottom: 1px solid var(--line); transition: color .4s, border-color .4s; }
.tienda:hover { color: var(--hot); border-color: rgba(232, 184, 75, .4); }

/* pie */
.pie { position: relative; padding: 40px var(--gutter) 34px; border-top: 1px solid var(--line); background: var(--void); font-size: 14px; color: var(--mid); }
.pie-grilla { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 24px; max-width: 1020px; margin: 0 auto; }
.pie-marca, #creadores { grid-column: 1 / -1; }
.pie-marca p { margin-top: 8px; font-family: var(--serif); }
.pie h4 { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); font-weight: 600; margin-bottom: 10px; }
.pie-grilla a:not(.marca) { display: block; padding: 5px 0; transition: color .4s; }
#creadores a { color: var(--hot); }
.pie-grilla a:not(.marca):hover { color: var(--ink); }
.pie-legal { max-width: 1020px; margin: 26px auto 0; font-size: 12px; color: var(--dim); }

#vuelo { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 50; pointer-events: none; }

/* escritorio */
@media (min-width: 900px) {
  :root { --gutter: 44px; --nav: 76px; }
  .nav-enlaces { display: flex; }
  .btn-nav { display: inline-flex; }
  .contenido { padding-top: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
  .hero .contenido, .legado .contenido, .ascenso .contenido { align-items: flex-start; padding-bottom: 8vh; }
  h1 { font-size: 64px; }
  .hero .texto { max-width: 640px; }
  .hero .linea { font-size: 23px; }
  h2 { font-size: 50px; }
  .noche .contenido { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; align-content: center; gap: 48px; }
  .dialogo { margin-top: 0; gap: 12px; }
  .ego-caja { width: 230px; height: 230px; margin-right: 0; }
  .burbuja { font-size: 19px; }
  .hueco { width: 170px; height: 150px; }
  .bloque.cruce { padding: calc(var(--nav) + 10px) var(--gutter) 40px; justify-content: center; }
  .cruce-grilla { flex: none; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 60px; align-items: center; }
  .cruce .texto { text-align: left; padding: 0; }
  .cruce h2 { font-size: 44px; }
  .cruce-app { margin: 0; height: min(760px, calc(100vh - 120px)); min-height: 600px; border-radius: 42px; }
  .fila-dunity { align-items: flex-start; }
  .bloque { padding: 110px var(--gutter); }
  .liga-grilla { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 60px; align-items: center; }
  .tabla { margin-top: 0; }
  .divisiones { margin-top: 44px; }
  .div-arte { height: 150px; }
  .objetos { flex-direction: row; gap: 28px; margin-top: 46px; }
  .objeto { flex: 1; flex-direction: column; text-align: center; }
  .obj-arte { width: 190px; height: 190px; }
  .hitos-lienzo { height: 240px; }
  .racha h2 { font-size: 40px; }
  .racha .contenido { justify-content: flex-start; padding-top: calc(var(--nav) + 10px); }
  .legado .linea { max-width: 400px; }
  .final .contenido { justify-content: flex-start; padding-top: 16vh; align-items: center; }
  .pie-grilla { grid-template-columns: 1.1fr 1.6fr 1fr 1fr; }
  .pie-marca, #creadores { grid-column: auto; }
}

/* teléfonos bajitos: el arte conserva su aire */
@media (max-width: 899px) and (max-height: 700px) {
  h1 { font-size: 34px; }
  h2 { font-size: 28px; }
  .linea { font-size: 17px; }
  .contenido { padding-top: calc(var(--nav) + 12px); }
  .ego-caja { width: 110px; height: 110px; }
  .burbuja { font-size: 16px; padding: 10px 14px; }
  .racha .dia { font-size: 52px; }
  .racha h2 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .aparece, .js .hero .aparece { opacity: 1; transform: none; transition: none; animation: none; }
  .renglon, .btn, .racha .dia, .racha h2, .racha .linea { transition: none; }
}
