/* HalfTri — portada cinematográfica (PROTOTIPO, cine.html).
   Va sola, sin style.css ni home.css: es siempre oscura, porque el fondo es
   una escena dibujada y el texto claro tiene que leerse encima. */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #06141d;
  --teal: #2fb8a6;
  --blue: #3d82f6;
  --orange: #f4a043;
  --purple: #9b7cf0;
  --taper: #5b8def;
  --text: #f3f7f9;
  --text-2: rgba(243, 247, 249, .78);
  --glass: rgba(8, 22, 32, .56);
  --line: rgba(255, 255, 255, .14);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
}

/* Idiomas: seis (EN base, ES, PT, DE, FR, IT), cada texto en su clase. */
html:not([data-lang="es"]) .es,
html:not([data-lang="pt"]) .pt,
html:not([data-lang="de"]) .de,
html:not([data-lang="fr"]) .fr,
html:not([data-lang="it"]) .it,
html:not([data-lang="en"]) .en { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font); background: var(--ink); color: var(--text);
  line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* El mundo */
#world { position: fixed; inset: 0; width: 100%; height: 100lvh; z-index: 0; display: block; }
main { position: relative; z-index: 1; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }

/* ── Navegación: una píldora flotante ── */
.pill {
  position: fixed; z-index: 20; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px;
  border-radius: 999px; background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  max-width: calc(100vw - 20px);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; margin-right: 6px; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.pill-links { display: flex; gap: 2px; }
.pill-links a {
  text-decoration: none; font-size: .9rem; color: var(--text-2); padding: 6px 12px; border-radius: 999px;
  white-space: nowrap; transition: background .25s, color .25s;
}
.pill-links a:hover { color: #fff; }
.pill-links a.on { background: #fff; color: #06141d; }
.lang-seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; border: 1px solid var(--line); margin-left: 4px; }
.lang-seg button { border: 0; background: none; font-size: .78rem; font-weight: 600; padding: 4px 9px; border-radius: 999px; color: var(--text-2); }
.lang-seg button[aria-pressed="true"] { background: rgba(255, 255, 255, .16); color: #fff; }
/* Cada idioma tiene su URL: el selector son enlaces y el actual va marcado con aria-current. */
.lang-seg a { font-size: .78rem; font-weight: 600; padding: 4px 9px; border-radius: 999px; color: var(--text-2); text-decoration: none; }
.lang-seg a:hover { color: #fff; }
.lang-seg a[aria-current="true"] { background: rgba(255, 255, 255, .16); color: #fff; }

/* ── El anillo de la cuenta atrás ── */
.ring {
  position: fixed; z-index: 15; right: 22px; bottom: 22px; width: 104px; height: 104px;
  border-radius: 50%; background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; transform: scale(.8) translateY(16px); pointer-events: none;
  transition: opacity .4s ease, transform .4s cubic-bezier(.2, .9, .3, 1.2);
  --c: var(--teal);
}
.ring.on { opacity: 1; transform: none; }
.ring svg, .demo-rest svg { position: absolute; inset: 6px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 7; }
.ring-fg { fill: none; stroke: var(--c); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke .5s; }
.ring-in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.ring-in b { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ring-in small { font-size: .68rem; color: var(--text-2); margin-top: 3px; }
.ring-phase {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); white-space: nowrap;
  font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--c); color: #06141d; transition: background .5s;
}
.ring.done { animation: pop .6s ease; }
@keyframes pop { 40% { transform: scale(1.18); } }

/* ── Escenas ── */
.scene { position: relative; padding: 16vh 0; }
.scene h2 { font-size: clamp(1.9rem, 4.2vw, 3.2rem); line-height: 1.06; letter-spacing: -.03em; font-weight: 800; text-wrap: balance; }
.scene p { color: var(--text-2); font-size: 1.08rem; max-width: 34em; }
.copy > * + * { margin-top: 18px; }
.kicker { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.k-teal { color: var(--teal); } .k-blue { color: #7db0ff; } .k-orange { color: var(--orange); } .k-purple { color: #c0aaff; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 13px 22px; border-radius: 14px;
  font-weight: 650; text-decoration: none; border: 1px solid transparent; transition: transform .2s, background .2s;
}
.btn svg { width: 19px; height: 19px; }
.btn:hover { transform: translateY(-2px); }
.btn-light { background: #fff; color: #06141d; }
.btn-ghost { background: rgba(255, 255, 255, .08); border-color: var(--line); color: #fff; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ── Salida ── */
.hero { min-height: 118vh; padding: 0 0 12vh; }
.hero-in { padding-top: clamp(96px, 15vh, 150px); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; font-size: .86rem; padding: 7px 14px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(47, 184, 166, .25); }
h1 { font-size: clamp(2.5rem, 7.2vw, 5.4rem); line-height: 1; letter-spacing: -.04em; font-weight: 800; text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }
.grad { background: linear-gradient(90deg, #7fe3d6, #8fb8ff 50%, #ffc184); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chips { display: flex; gap: 8px 18px; flex-wrap: wrap; justify-content: center; font-size: .86rem; color: var(--text-2); max-width: none !important; }
.chips a { text-decoration: none; }

/* El plan que se arma */
.builder {
  width: min(100%, 760px); text-align: left; padding: 20px 22px; border-radius: 26px;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: saturate(150%) blur(22px); -webkit-backdrop-filter: saturate(150%) blur(22px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.b-row { display: flex; align-items: center; gap: 14px; }
.b-row + .b-row { margin-top: 12px; }
.b-label { flex: 0 0 92px; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.b-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.b-chips button, .b-chips input {
  border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: #fff;
  padding: 8px 14px; border-radius: 999px; font-size: .92rem; font-weight: 600; transition: background .2s, color .2s, border-color .2s;
}
.b-chips input { font: inherit; font-size: .92rem; font-weight: 600; color-scheme: dark; min-height: 38px; }
.b-chips button:hover { border-color: rgba(255, 255, 255, .4); }
.b-chips button[aria-pressed="true"] { background: #fff; color: #06141d; border-color: #fff; }
.b-quick { display: contents; }
.b-plan { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.b-ends { display: flex; justify-content: space-between; font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); margin-bottom: 7px; }
.weeks { display: flex; gap: 2px; height: 34px; }
.weeks i {
  flex: 1 1 0; min-width: 0; border-radius: 4px; background: var(--c);
  transform-origin: bottom; animation: grow .5s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: var(--d);
}
.weeks i:first-child { border-radius: 10px 4px 4px 10px; }
.weeks i:last-child { border-radius: 4px 10px 10px 4px; }
@keyframes grow { from { transform: scaleY(0); opacity: 0; } }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: .84rem; color: var(--text-2); }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--c); margin-right: 6px; }
.legend b { color: #fff; font-weight: 650; }
.b-sum { margin-top: 12px; font-size: 1.02rem !important; color: #fff !important; max-width: none !important; }
.b-sum b { font-variant-numeric: tabular-nums; }

/* ── Capítulos ── */
.chapter { display: flex; align-items: center; gap: 18px; margin-bottom: 9vh; }
.chapter > b {
  font-size: clamp(4.5rem, 13vw, 10rem); font-weight: 800; line-height: .82; letter-spacing: -.05em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .7);
}
.chapter > div { display: flex; flex-direction: column; }
.ch-k { font-size: clamp(1.2rem, 2.6vw, 1.9rem); font-weight: 800; letter-spacing: -.02em; }
.ch-d { font-size: 1rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.chapter > p { margin-left: auto; font-size: 1rem; text-align: right; }
.chapter.trans { margin-bottom: 22vh; opacity: .9; }
.chapter.trans > b { font-size: clamp(2.2rem, 5vw, 3.6rem); -webkit-text-stroke: 0; color: var(--orange); }
.chapter.trans > p { margin-left: 0; text-align: left; font-size: 1.15rem; color: #fff; }

/* ── Teléfonos ── */
.phone {
  position: relative; width: min(100%, 300px); aspect-ratio: 640 / 1391; padding: 8px; border-radius: 44px;
  background: #0a0f14; border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(0, 0, 0, .6);
  transform: perspective(1100px) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg));
  transition: transform .25s ease-out;
}
.phone img { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: cover; object-position: top; border-radius: 36px; background: #f2f4f6; }
#planPhone img, #exPhone img { opacity: 0; transition: opacity .5s ease; }
#planPhone img.on, #exPhone img.on { opacity: 1; }

/* ── 01: el plan, con el teléfono que se queda ── */
.scrolly { display: grid; grid-template-columns: 1fr 340px; gap: 60px; }
.step { min-height: 82vh; display: flex; flex-direction: column; justify-content: center; gap: 18px; opacity: .35; transition: opacity .5s; }
.step.on { opacity: 1; }
.step-shot { display: none; }
.sticky { position: sticky; top: max(90px, calc(50vh - 330px)); height: fit-content; display: flex; justify-content: center; }

/* ── Dos columnas ── */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
.split.reverse .copy { order: 2; }
.stage { display: flex; justify-content: center; }
.duo { position: relative; min-height: 620px; width: 100%; }
.duo .phone { position: absolute; width: 54%; max-width: 280px; }
.duo .a { left: 4%; top: 0; --ry: 8deg; }
.duo .b { right: 4%; top: 90px; --ry: -8deg; }

/* Selector de ejercicios */
.picker { display: grid; gap: 8px; margin-top: 26px !important; }
.picker button {
  text-align: left; padding: 13px 16px; border-radius: 16px; border: 1px solid var(--line);
  background: rgba(8, 22, 32, .45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: grid; gap: 1px; transition: background .25s, border-color .25s, transform .25s;
}
.picker button b { font-size: 1rem; }
.picker button span { font-size: .88rem; color: var(--text-2); }
.picker button:hover { transform: translateX(4px); }
.picker button[aria-selected="true"] { background: rgba(61, 130, 246, .28); border-color: #7db0ff; }

/* Demo de la sesión */
.demo {
  max-width: 380px; padding: 18px; border-radius: 24px; background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); margin-top: 24px !important;
}
.demo-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.demo-head span { font-size: .86rem; color: var(--text-2); }
.demo-body { height: 128px; display: grid; place-items: center; }
.demo-work, .demo-rest, .demo-done { display: none; }
.demo[data-mode="work"] .demo-work { display: flex; gap: 40px; }
.demo-work div { text-align: center; }
.demo-work b { display: block; font-size: 3.2rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.demo-work small, .demo-rest small { color: var(--text-2); font-size: .82rem; }
.demo[data-mode="rest"] .demo-rest { display: grid; place-content: center; text-align: center; position: relative; width: 116px; height: 116px; --c: var(--purple); }
.demo-rest svg { inset: 0; }
.demo-rest b { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; display: block; line-height: 1.1; }
.demo-rest .ring-fg { transition: none; }
.demo[data-mode="done"] .demo-done { display: grid; text-align: center; gap: 4px; animation: pop .6s ease; }
.demo-done i { font-size: 2.6rem; font-style: normal; }
.demo-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; }
.demo-dots i { width: 28px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .16); transition: background .3s; }
.demo-dots i.on { background: var(--purple); }
.demo-actions { display: flex; gap: 8px; }
.demo-actions .btn { flex: 1; justify-content: center; padding: 11px 14px; }
.demo:not([data-mode="rest"]) #demoPlus { display: none; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px !important; }
.tags span { font-size: .84rem; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); }

/* Tarjetas del día de la carrera */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px !important; }
.card { padding: 16px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); display: grid; gap: 4px; }
.card i { font-style: normal; font-size: 1.4rem; }
.card span { font-size: .88rem; color: var(--text-2); }

/* ── Meta ── */
.finish { padding: 30vh 0 26vh; }
.price {
  max-width: 760px; margin: 0 auto; text-align: center; padding: 40px 28px; border-radius: 32px;
  background: rgba(6, 20, 29, .72); border: 1px solid var(--line);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); box-shadow: 0 40px 100px rgba(0, 0, 0, .5);
  display: grid; gap: 16px; justify-items: center;
}
.price .icon { width: 76px; height: 76px; border-radius: 18px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; margin-top: 8px; }
.plan { position: relative; padding: 20px 12px 16px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); display: grid; gap: 3px; }
.plan b { font-size: 1.15rem; }
.plan span { font-size: .86rem; color: var(--text-2); }
.plan.featured { border-color: var(--teal); background: rgba(47, 184, 166, .14); }
.badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--teal); color: #06141d !important; font-weight: 700; font-size: .74rem !important; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.fine { font-size: .8rem !important; color: rgba(243, 247, 249, .55) !important; }

/* ── Después de la meta ── */
/* minmax(0, 1fr): sin el 0, la columna crecía hasta el ancho de la tira de
   fotos (que se desliza) y todo lo de después de la meta quedaba el doble de
   ancho que la pantalla, o sea, descentrado y cortado. */
.after { padding-top: 10vh; padding-bottom: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14vh; }
.after > .wrap { width: 100%; }
.founder { display: grid; grid-template-columns: 1fr 340px; gap: 60px; align-items: center; width: 100%; }
.sign a { color: var(--teal); text-decoration: none; }
.founder-video { min-height: 420px; display: grid; place-items: center; border-radius: 20px; }
.founder-video .instagram-media { margin: 0 auto !important; min-width: 0 !important; width: 100% !important; }
.people-row { display: flex; gap: 14px; overflow-x: auto; padding: 30px 24px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.people-row::-webkit-scrollbar { display: none; }
.people-row figure { flex: 0 0 min(62vw, 230px); scroll-snap-align: center; position: relative; border-radius: 22px; overflow: hidden; }
.people-row img { width: 100%; height: auto; display: block; }
.people-row figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px; font-size: .88rem; font-weight: 600; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); }
.android { text-align: center; display: grid; gap: 14px; justify-items: center; }
.aw-form { display: flex; gap: 8px; width: min(100%, 460px); margin-top: 6px; }
.aw-form input[type="email"] { flex: 1; min-width: 0; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: #fff; font: inherit; }
.aw-trap { position: absolute; left: -9999px; }
.aw-msg { display: none; }
.aw-msg.err { color: #ff9c8a; }
.android:has(form[data-state="ok"]) .aw-msg[data-for="ok"],
.android:has(form[data-state="dup"]) .aw-msg[data-for="dup"],
.android:has(form[data-state="invalid"]) .aw-msg[data-for="invalid"],
.android:has(form[data-state="error"]) .aw-msg[data-for="error"] { display: block; }
.faq { max-width: 760px; }
.faq h2 { margin-bottom: 18px; }
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq summary { font-weight: 650; font-size: 1.05rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; color: var(--text-2); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; }
.disclaimer { font-size: .78rem !important; color: rgba(243, 247, 249, .45) !important; max-width: 760px !important; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding-top: 22px; padding-bottom: 130px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--text-2); width: 100%; }
.footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer a { text-decoration: none; }

/* ── Móvil: escenas más cortas, sin teléfono fijo ── */
/* Con carreras, blog y seis idiomas el menú no cabe en pantallas medianas. */
@media (max-width: 1180px) { .pill-links { display: none; } }
@media (max-width: 860px) {
  .lang-seg button, .lang-seg a { padding: 4px 6px; font-size: .74rem; }
  .pill { left: 10px; right: 10px; transform: none; justify-content: space-between; }
  .scene { padding: 11vh 0; }
  .hero { min-height: 0; padding-bottom: 16vh; }
  .hero-in { gap: 16px; padding-top: 84px; }
  .builder { padding: 16px; border-radius: 22px; }
  .b-row { flex-direction: column; align-items: stretch; gap: 7px; }
  .b-label { flex: none; }
  /* Cada fila de opciones en una sola línea que se desliza: así el plan
     armado cabe en la primera pantalla del móvil. */
  .b-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
  .b-chips::-webkit-scrollbar { display: none; }
  .b-chips > *, .b-quick > * { flex: 0 0 auto; white-space: nowrap; }
  .b-chips button, .b-chips input { padding: 7px 12px; font-size: .86rem; }
  .chapter { flex-wrap: wrap; margin-bottom: 6vh; }
  .chapter > p { margin-left: 0; text-align: left; flex-basis: 100%; }
  .chapter.trans { margin-bottom: 12vh; }
  .scrolly, .split, .founder { grid-template-columns: 1fr; gap: 36px; }
  .sticky { display: none; }
  .step { min-height: 0; opacity: 1; padding-bottom: 9vh; }
  .step-shot { display: block; width: min(72%, 270px); margin: 12px auto 0; --phone-r: 36px; }
  .split.reverse .copy { order: 0; }
  .phone { width: min(72%, 270px); }
  .duo { min-height: 0; aspect-ratio: 1 / 1.12; }
  .duo .phone { width: 52%; }
  .duo .b { top: 12%; }
  .cards { grid-template-columns: 1fr; }
  .finish { padding: 18vh 0; }
  .price { padding: 30px 18px; }
  .plans { grid-template-columns: 1fr; }
  .aw-form { flex-direction: column; }
  .ring { width: 78px; height: 78px; right: 12px; bottom: 12px; }
  .ring-in b { font-size: 1.4rem; }
  .ring-in small { font-size: .6rem; }
  .ring-phase { font-size: .66rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .weeks i { animation: none; }
  .phone { transition: none; }
}

/* Tiendas según el sistema (26 nov 2026, HalfTri ya en Google Play): en un
   iPhone solo el App Store, en Android solo Google Play, en el ordenador
   los dos (data-os lo pone el script de la cabecera). */
html[data-os="ios"] .store-android, html[data-os="android"] .store-ios { display: none !important; }
.os-android { display: none; }
html[data-os="android"] .os-android { display: block; }
html[data-os="android"] .os-apple { display: none; }
.android .btn svg { width: 20px; height: 20px; }
