/* Reels Factory. Layout: arriba la promesa junto al video vivo; abajo el estudio en tres pasos con la vista previa fija al lado. */
:root {
  --bg: #f0f1f6; --surface: #ffffff; --surface-2: #e4e6ef; --fg: #121424; --muted: #5b5f78; --line: #d2d5e2;
  --accent: #e8402f; --accent-ink: #ffffff; --ok: #1d7a4a; --err: #b3261e;
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d0f1c; --surface: #161930; --surface-2: #1f2340; --fg: #eef0fa; --muted: #9ca2c4; --line: #2b3056; --accent: #ff5a47; --accent-ink: #160403; --ok: #5fd39a; --err: #ff8a80; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 var(--body); padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(16px, env(safe-area-inset-left, 0px)); }
.wrap { max-width: 1100px; margin: 0 auto; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.mark { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 20px; text-decoration: none; }
.top nav { display: flex; align-items: center; gap: 18px; font-weight: 700; font-size: 15px; }
.top nav a, .link { color: var(--muted); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: 6px 0; }
.top nav a:hover, .link:hover { color: var(--fg); }
.aviso { margin-block: 8px; padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--ok) 15%, var(--surface)); border: 1px solid var(--ok); font-weight: 600; }

.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 40px; align-items: center; padding-block: 24px 56px; }
.hero h1 { font-size: clamp(40px, 6.4vw, 72px); font-weight: 800; line-height: 1.02; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { margin-top: 20px; font-size: 19px; color: var(--muted); max-width: 34em; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 28px 0 0; font-size: 14px; color: var(--muted); }
.facts b { color: var(--fg); }
.phone { margin: 0; justify-self: center; width: min(100%, 320px); }
.screen { position: relative; aspect-ratio: 9 / 16; width: 100%; max-width: 100%; border-radius: 28px; overflow: hidden; background: #05060f; border: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(10, 12, 40, 0.55); }
.screen canvas, .screen video { width: 100%; height: 100%; display: block; }
.phone figcaption { text-align: center; margin-top: 12px; font-size: 13px; color: var(--muted); }

.btn { appearance: none; border: 0; cursor: pointer; font: 700 16px/1 var(--body); padding: 15px 22px; border-radius: 999px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-main { background: var(--accent); color: var(--accent-ink); }
.btn-main:hover { filter: brightness(1.08); }
.btn-soft { background: var(--surface-2); color: var(--fg); }
.btn[disabled] { opacity: 0.5; cursor: default; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }

.band { padding-block: 56px; border-top: 1px solid var(--line); }
.eyebrow { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); }
.band h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; margin-top: 8px; }
.intro { margin-top: 12px; color: var(--muted); max-width: 40em; font-size: 17px; }

.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: paso; }
.steps li { counter-increment: paso; padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.steps li::before { content: counter(paso); font-family: var(--display); font-weight: 800; font-size: 34px; color: var(--accent); line-height: 1; display: block; margin-bottom: 10px; }
.steps h3 { font-size: 19px; }
.steps p { margin-top: 6px; color: var(--muted); font-size: 15px; }

.studio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 28px; margin-top: 28px; align-items: start; }
.panel { display: grid; gap: 18px; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; min-width: 0; }
.card h3 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.num { font: 800 13px var(--body); color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 3px 9px; }
.hint { color: var(--muted); font-size: 14px; margin-top: 6px; }
label { display: block; font-weight: 700; font-size: 14px; margin-top: 14px; }
input[type=text], input[type=email], input[type=password], textarea, select { width: 100%; margin-top: 6px; font: 15px/1.5 var(--body); color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
input[type=color] { margin-top: 6px; width: 64px; height: 46px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 4px; }
textarea { font: 12.5px/1.5 var(--mono); resize: vertical; }
::placeholder { color: var(--muted); opacity: 0.55; font-weight: 400; }
.grid2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; align-items: end; }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.msg { font-size: 14px; font-weight: 600; min-height: 1.4em; margin-top: 8px; }
.msg.ok { color: var(--ok); } .msg.err { color: var(--err); }
.uso { font-size: 14px; color: var(--muted); padding-bottom: 12px; }
.uso b { color: var(--fg); font-variant-numeric: tabular-nums; }

.preview { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 16px); display: grid; gap: 12px; min-width: 0; }
.controls { display: flex; align-items: center; gap: 10px; }
.bar { flex: 1; height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.tiempo { font: 500 13px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; min-width: 92px; text-align: right; }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; display: grid; place-items: center; flex: none; }
.iconbtn svg { width: 18px; height: 18px; }
.note { font-size: 13px; color: var(--muted); }
.scenes { display: flex; flex-wrap: wrap; gap: 6px; }
.scenes span { font: 500 12px var(--mono); padding: 4px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.scenes span.on { background: var(--accent); color: var(--accent-ink); }

.lista { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 12px; }
.lista li { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.lista .cab { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.lista .cab b { min-width: 0; overflow-wrap: anywhere; }
.lista .estado { font-size: 13px; color: var(--muted); white-space: nowrap; }
.lista video { width: 100%; max-width: 260px; border-radius: 14px; background: #000; }
.lista .barra { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.lista .barra i { display: block; height: 100%; background: var(--accent); transition: width 0.4s; }

.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.plan.star { border: 2px solid var(--accent); }
.plan h3 { font-size: 20px; }
.price { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.price small { font-family: var(--body); font-size: 14px; font-weight: 600; color: var(--muted); }
.plan ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; display: grid; gap: 4px; flex: 1; }
.tag { align-self: flex-start; font-size: 12px; font-weight: 800; background: var(--accent); color: var(--accent-ink); padding: 3px 10px; border-radius: 999px; }
.actual { font-size: 13px; font-weight: 700; color: var(--ok); }
.cuenta { margin-top: 24px; max-width: 640px; }
.modos { border: 0; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.modos legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; padding: 0; }
.modo { margin: 0; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); cursor: pointer; font-weight: 400; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.modo b { display: block; color: var(--fg); font-size: 15px; }
.modo input { margin-top: 3px; accent-color: var(--accent); }
.modo:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.resumen { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.resumen div { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.resumen b { display: block; font-size: 22px; color: var(--fg); font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .modos { grid-template-columns: minmax(0, 1fr); } }

footer { padding-block: 32px 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
footer nav { display: flex; gap: 18px; }

dialog { border: 1px solid var(--line); border-radius: 20px; padding: 0; background: var(--surface); color: var(--fg); width: min(92vw, 420px); }
dialog::backdrop { background: rgba(5, 6, 15, 0.6); }
dialog form { padding: 24px; position: relative; }
dialog h2 { font-size: 26px; padding-right: 30px; }
.cerrar { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--fg); font-size: 22px; cursor: pointer; }

.legal { max-width: 70ch; padding-block: 24px 64px; }
.legal h1 { font-size: 36px; margin-bottom: 16px; }
.legal h2 { font-size: 20px; margin-top: 28px; }
.legal p, .legal li { color: var(--muted); margin-top: 10px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .phone { width: min(100%, 300px); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .studio { grid-template-columns: minmax(0, 1fr); }
  .preview { position: static; order: -1; }
  .preview .screen { max-width: 300px; margin: 0 auto; }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .plans, .grid2 { grid-template-columns: minmax(0, 1fr); }
  .uso { padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.card-estudio { border: 1.5px solid var(--accent); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%); }
.card-estudio textarea { min-height: 84px; }
.tag-pro { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--fg); vertical-align: middle; margin-left: 6px; }

.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#captcha:not(:empty) { margin: 12px 0 4px; }
.link { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 6px 0; }
.aviso-correo { margin: 0 0 16px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

#estilos .lead { color: var(--muted); max-width: 640px; margin-top: 8px; }
.catalogo { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 24px; }
.estilo-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.estilo-card canvas { width: 100%; aspect-ratio: 9 / 16; border-radius: 12px; background: #000; display: block; }
.estilo-card h3 { font-size: 18px; font-weight: 800; margin: 4px 0 0; }
.estilo-card .para { font-size: 14.5px; line-height: 1.45; margin: 0; }
.estilo-card .ej { font-size: 13px; color: var(--muted); margin: 0; }
.estilo-card .btn { margin-top: auto; }
@media (max-width: 520px) { .catalogo { grid-template-columns: 1fr 1fr; gap: 10px; } .estilo-card { padding: 8px; } .estilo-card .para { font-size: 13px; } .estilo-card .btn { font-size: 13px; padding: 10px 8px; } }

.top nav a, .top nav button { white-space: nowrap; }

.ejemplos { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 99px; padding: 7px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.avanzado summary { cursor: pointer; font-weight: 700; padding: 4px 0; list-style-position: inside; }
.avanzado[open] summary { margin-bottom: 12px; }
.avanzado h3 { margin-top: 18px; }
#cardCrear .uso { margin-top: 10px; }

.tablero { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 18px; }
.tablero .card h3 { margin-top: 0; }
.medidores { display: grid; gap: 12px; margin: 12px 0; }
.medidor-t { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.medidor .barra { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.medidor .barra i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.renueva { font-size: 13px; color: var(--muted); margin: 8px 0 0; line-height: 1.4; }
.revisa { text-align: center; padding: 8px 0; }
.revisa .sobre { font-size: 56px; }
.revisa h2 { margin: 6px 0; }

.legal-nota { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.legal-nota a { color: inherit; }

.borrador { background: #fff3cd; color: #5c4400; border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.legal-nav { margin-top: 32px; font-size: 14px; line-height: 2; }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0; }
.tabla th, .tabla td { text-align: left; border-bottom: 1px solid var(--line); padding: 8px 6px; vertical-align: top; }
@media (max-width: 520px) { .tabla { display: block; overflow-x: auto; } }
.borrar { margin-top: 16px; font-size: 14px; }
.borrar summary { cursor: pointer; color: var(--muted); }
footer nav { flex-wrap: wrap; }

/* letras de cada estilo de video (se bajan solo cuando un estilo las usa) */
@font-face { font-family: "Anton"; src: url(/fuentes/Anton.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Caveat"; src: url(/fuentes/Caveat.ttf) format("truetype"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Permanent Marker"; src: url(/fuentes/PermanentMarker.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Playfair"; src: url(/fuentes/Playfair.ttf) format("truetype"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(/fuentes/JetBrainsMono.ttf) format("truetype"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Sora"; src: url(/fuentes/Sora.ttf) format("truetype"); font-weight: 100 800; font-display: swap; }

/* mensual / anual */
.periodo { display: flex; gap: 6px; justify-content: center; margin: 0 auto 22px; padding: 5px; background: var(--soft, #eef0f6); border-radius: 999px; width: fit-content; }
.periodo label { display: flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 15px; }
.periodo input { position: absolute; opacity: 0; pointer-events: none; }
.periodo label:has(input:checked) { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.periodo .ahorro, .ahorro-plan { color: #0f9d58; font-weight: 700; font-size: 13px; }
.ahorro-plan { margin: -6px 0 8px; }

/* mensajes del panel de admin */
.mensajes { margin-top: 18px; display: grid; gap: 10px; }
.mensaje { border: 1px solid #e3e5ec; border-radius: 14px; padding: 12px 14px; background: #fff; display: grid; gap: 6px; }
.mensaje p { margin: 0; white-space: pre-wrap; } .mensaje small { color: #667; }
.mensaje.cerrado { opacity: .55; } .mensaje .btn { justify-self: start; padding: 8px 14px; font-size: 14px; }
.regalo { margin-top: 18px; display: grid; gap: 8px; border: 1px dashed #c9cdd8; border-radius: 14px; padding: 14px; }
.regalo h3 { margin: 0; } .regalo .nota { margin: 0; color: #667; font-size: 14px; }
.regalo input, .regalo select { padding: 10px 12px; border-radius: 10px; border: 1px solid #d5d8e0; font: inherit; }

/* video de muestra en la portada */
.phone .screen { position: relative; }
.phone video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.phone .sonido { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); border: 0; border-radius: 999px; padding: 9px 16px; background: rgba(0,0,0,.6); color: #fff; font: 700 14px/1 inherit; backdrop-filter: blur(6px); cursor: pointer; }
.phone figcaption small { opacity: .7; font-size: 12px; }
.cierre-promo { display: flex; gap: 8px; align-items: center; font-size: 14px; color: #556; margin: 4px 0 10px; }
.mensaje.alerta { border-color: #f3b4b4; background: #fff6f6; } #lista2fa { background: #f4f5f8; padding: 10px; border-radius: 10px; font-size: 15px; }
