/* Estudio · estudio.rayyan.pe — marca de Rayyan: papel, tinta, Manrope 800 + DM Sans, píldoras negras, tarjetas blancas. */
@font-face { font-family: "Manrope"; src: url(fonts/manrope-800.ttf) format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Manrope"; src: url(fonts/manrope-600.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(fonts/dmsans-400.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(fonts/dmsans-600.ttf) format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --paper: #f6f7f9; --ink: #17191d; --muted: #686d77; --soft: #a7acb5; --line: #e0e4eb; --card: #ffffff;
  --figma: #0d99ff; --figma-label: #0870d4; --ok: #1f9d5b; --warn: #b5541c;
  --r: 22px; --sombra: 0 1px 0 rgba(23,25,29,.04), 0 18px 50px -24px rgba(23,25,29,.22);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 "DM Sans", -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, video { display: block; max-width: 100%; }
h1, h2, h3 { font-family: "Manrope", sans-serif; font-weight: 800; letter-spacing: -.035em; line-height: 1.02; margin: 0; }
.envoltura { width: min(1120px, 100% - 32px); margin-inline: auto; }
.oculto { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- barra ---------- */
.barra { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid transparent; transition: border-color .2s; }
.barra.con-borde { border-bottom-color: var(--line); }
.barra .envoltura { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.marca { display: flex; align-items: baseline; gap: 7px; text-decoration: none; font: 800 18px "Manrope"; letter-spacing: -.03em; }
.marca small { font: 600 13px "DM Sans"; color: var(--soft); letter-spacing: 0; }
.barra nav { display: flex; gap: 6px; align-items: center; }
.barra nav a.link { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 999px; }
.barra nav a.link:hover { color: var(--ink); background: rgba(23,25,29,.05); }

/* ---------- botones y campos ---------- */
.pill { appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 24px; border-radius: 999px;
  background: var(--ink); color: #fff; font: 600 15px "DM Sans"; text-decoration: none; white-space: nowrap; transition: transform .15s, background .15s, opacity .15s; }
.pill:hover { background: #000; }
.pill:active { transform: scale(.98); }
.pill[disabled] { opacity: .45; cursor: default; }
.pill.chica { height: 38px; padding: 0 16px; font-size: 14px; }
.pill.clara { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.pill.clara:hover { background: #fbfbfc; }
.pill.peligro { background: #b42318; }
.campo { width: 100%; height: 50px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: 400 16px "DM Sans"; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
.campo:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(23,25,29,.07); }
.campo.codigo { letter-spacing: .5em; font: 600 22px "Manrope"; text-align: center; padding-left: calc(18px + .5em); }
textarea.campo { height: auto; min-height: 110px; padding: 14px 18px; border-radius: 18px; resize: vertical; }
.fila-form { display: flex; gap: 8px; }
.fila-form .campo { flex: 1; min-width: 0; }
.nota { font-size: 13px; color: var(--muted); margin: 10px 4px 0; }
.error { color: #b42318; font-size: 14px; margin: 10px 4px 0; min-height: 1em; }
.volver { background: none; border: 0; color: var(--muted); font: 600 13px "DM Sans"; cursor: pointer; padding: 0; margin-top: 12px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- héroe ---------- */
.heroe { padding: 64px 0 40px; display: grid; grid-template-columns: 1fr; gap: 40px; }
.heroe .pildora-dia { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.heroe .pildora-dia i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.heroe h1 { font-size: clamp(42px, 7.4vw, 84px); margin: 20px 0 18px; max-width: 12ch; }
.heroe .bajada { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 46ch; margin: 0 0 28px; }
.heroe .bajada b { color: var(--ink); font-weight: 600; }
.lista-form { max-width: 470px; }
.listo { background: #fff; border-radius: var(--r); padding: 22px 24px; box-shadow: var(--sombra), inset 0 0 0 1px var(--line); max-width: 470px; }
.listo .pos { font: 800 54px/1 "Manrope"; letter-spacing: -.05em; }
.listo .pos sup { font-size: 18px; color: var(--soft); vertical-align: top; margin-left: 4px; letter-spacing: 0; }
.listo p { margin: 8px 0 0; color: var(--muted); }
.listo b { color: var(--ink); }

/* ventana de Mac con selección de Figma (el motivo de la marca) */
.mac { position: relative; border-radius: 16px; background: #fff; box-shadow: 0 30px 80px -30px rgba(23,25,29,.35), 0 0 0 1px rgba(23,25,29,.08); overflow: hidden; }
.mac .tope { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 14px; background: #fbfbfc; border-bottom: 1px solid var(--line); }
.mac .tope i { width: 11px; height: 11px; border-radius: 50%; background: #e0e4eb; }
.mac .tope i:nth-child(1) { background: #ff5f57; } .mac .tope i:nth-child(2) { background: #febc2e; } .mac .tope i:nth-child(3) { background: #28c840; }
.mac img { width: 100%; height: auto; }
.escena { position: relative; }
.seleccion { position: absolute; border: 1.5px solid var(--figma); pointer-events: none; }
.seleccion::before, .seleccion::after { content: ""; position: absolute; width: 7px; height: 7px; background: #fff; border: 1.5px solid var(--figma); }
.seleccion::before { left: -5px; top: -5px; } .seleccion::after { right: -5px; bottom: -5px; }
.seleccion .etq { position: absolute; left: -1.5px; top: -24px; background: var(--figma); color: #fff; font: 600 11px "DM Sans"; padding: 3px 7px; border-radius: 4px 4px 4px 0; white-space: nowrap; }
.cursor { position: absolute; display: flex; align-items: flex-start; gap: 2px; pointer-events: none; filter: drop-shadow(0 4px 8px rgba(0,0,0,.15)); }
.cursor svg { width: 20px; height: 20px; }
.cursor span { margin-top: 14px; background: var(--figma); color: #fff; font: 600 12px "DM Sans"; padding: 3px 9px; border-radius: 999px; }

/* ---------- secciones ---------- */
.seccion { padding: 72px 0; }
.seccion > .envoltura > h2, .titulo-seccion { font-size: clamp(32px, 4.6vw, 54px); max-width: 16ch; }
.seccion .sub { color: var(--muted); font-size: 18px; max-width: 52ch; margin: 14px 0 34px; }
.cnt { font: 600 .42em "DM Sans"; color: var(--soft); vertical-align: super; letter-spacing: 0; margin-left: 4px; }

.estilos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.tarjeta { background: var(--card); border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.estilo video { width: 100%; aspect-ratio: 9/16; object-fit: cover; background: #eef0f3; }
.estilo.ancho video { aspect-ratio: 16/9; }
.estilo .pie { padding: 14px 16px 16px; }
.estilo h3 { font-size: 18px; letter-spacing: -.02em; }
.estilo p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; }

.familias { display: grid; gap: 14px; grid-template-columns: 1fr; }
.familia { display: grid; grid-template-columns: 112px 1fr; gap: 18px; align-items: center; padding: 14px; }
.familia video, .familia img { width: 112px; aspect-ratio: 9/16; object-fit: cover; border-radius: 14px; background: #eef0f3; }
.familia h3 { font-size: 22px; }
.familia p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

.pasos { display: grid; gap: 14px; counter-reset: paso; }
.paso { padding: 26px 24px; position: relative; }
.paso::before { counter-increment: paso; content: counter(paso, decimal-leading-zero); position: absolute; right: 22px; top: 20px; font: 600 13px "DM Sans"; color: var(--soft); }
.paso h3 { font-size: 22px; margin-bottom: 8px; max-width: 18ch; }
.paso p { margin: 0; color: var(--muted); }

.precios { display: grid; gap: 14px; }
.precio { padding: 26px 24px; display: flex; flex-direction: column; gap: 6px; }
.precio .quien { font-weight: 600; color: var(--muted); font-size: 14px; }
.precio .monto { font: 800 46px/1 "Manrope"; letter-spacing: -.05em; margin: 6px 0; }
.precio .monto small { font: 600 15px "DM Sans"; color: var(--soft); letter-spacing: 0; }
.precio p { margin: 0; color: var(--muted); font-size: 15px; }
.precio.destacado { background: var(--ink); color: #fff; box-shadow: none; }
.precio.destacado .quien, .precio.destacado p { color: #b9bdc5; }
.precio.destacado .monto small { color: #8b9099; }
.tachado { text-decoration: line-through; color: var(--soft); font-weight: 600; font-size: 15px; }

.preguntas { display: grid; gap: 10px; max-width: 760px; margin-top: 30px; }
.preguntas details { background: #fff; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); padding: 0 22px; }
.preguntas summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.preguntas summary::-webkit-details-marker { display: none; }
.preguntas summary::after { content: "+"; font: 400 22px/1 "DM Sans"; color: var(--soft); transition: transform .2s; }
.preguntas details[open] summary::after { transform: rotate(45deg); }
.preguntas details p { margin: 0 0 18px; color: var(--muted); }

.cierre { text-align: left; padding: 80px 0 90px; }
.cierre h2 { font-size: clamp(36px, 5.6vw, 64px); max-width: 14ch; margin-bottom: 26px; }
.pie-pagina { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--soft); font-size: 13px; }
.pie-pagina .envoltura { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
.pie-pagina a { color: var(--muted); text-decoration: none; }

/* entrada suave (sin bloquear nada) */
.aparece { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.aparece.visto { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .aparece { opacity: 1; transform: none; transition: none; } }

@media (min-width: 760px) {
  .heroe { padding: 88px 0 56px; }
  .estilos { grid-template-columns: repeat(4, 1fr); }
  .familias { grid-template-columns: repeat(2, 1fr); }
  .pasos, .precios { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 520px) {
  .fila-form { flex-direction: column; }
  .fila-form .campo { flex: none; }
  .pill { width: 100%; }
  .barra .pill { width: auto; }
  .familia { grid-template-columns: 88px 1fr; }
  .familia video, .familia img { width: 88px; }
}

/* ---------- cuenta y panel ---------- */
.pagina { padding: 48px 0 80px; }
.pagina h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 8px; }
.pagina .sub { color: var(--muted); margin: 0 0 28px; }
.caja { background: #fff; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); padding: 24px; }
.caja + .caja { margin-top: 14px; }
.caja h2 { font-size: 22px; letter-spacing: -.02em; margin-bottom: 12px; }
.entrar { max-width: 440px; }
.dato { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.dato:first-of-type { border-top: 0; }
.dato span:first-child { color: var(--muted); }
.estado { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: #eef0f3; color: var(--muted); }
.estado.ok { background: #e7f6ee; color: var(--ok); }
.estado.espera { background: #fff4e5; color: var(--warn); }
.equipo { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.equipo:first-child { border-top: 0; }
.equipo small { color: var(--soft); display: block; }
.dos { display: grid; gap: 14px; }
@media (min-width: 860px) { .dos { grid-template-columns: 1.15fr .85fr; align-items: start; } }

/* panel admin */
.panel { width: min(1240px, 100% - 32px); margin-inline: auto; padding: 28px 0 80px; }
.pestanas { display: flex; gap: 4px; flex-wrap: wrap; background: #eceef2; padding: 4px; border-radius: 999px; width: fit-content; margin: 18px 0 22px; }
.pestanas button { appearance: none; border: 0; background: none; padding: 8px 16px; border-radius: 999px; font: 600 14px "DM Sans"; color: var(--muted); cursor: pointer; }
.pestanas button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.metricas { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .metricas { grid-template-columns: repeat(4, 1fr); } }
.metrica { background: #fff; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); padding: 18px 20px; }
.metrica span { color: var(--muted); font-size: 13px; font-weight: 600; }
.metrica b { display: block; font: 800 36px/1.1 "Manrope"; letter-spacing: -.04em; margin-top: 6px; }
.metrica small { color: var(--soft); font-size: 13px; }
.grafico { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding-top: 10px; }
.grafico div { flex: 1; background: var(--ink); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.grafico div:hover { background: var(--figma); }
.grafico div[data-n="0"] { background: var(--line); }
.ejes { display: flex; justify-content: space-between; color: var(--soft); font-size: 12px; margin-top: 6px; }
.barras-h .b { display: grid; grid-template-columns: 120px 1fr 40px; gap: 10px; align-items: center; font-size: 14px; padding: 5px 0; }
.barras-h .b i { display: block; height: 8px; border-radius: 99px; background: var(--ink); }
.barras-h .b em { font-style: normal; text-align: right; color: var(--muted); }
.tabla-env { overflow-x: auto; background: #fff; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 11px 14px; border-top: 1px solid var(--line); white-space: nowrap; }
th { border-top: 0; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: #fbfbfc; position: sticky; top: 0; }
td.gris { color: var(--soft); }
.herramientas { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.herramientas .campo { height: 40px; max-width: 280px; font-size: 14px; }
select.campo { appearance: none; padding-right: 32px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23686d77' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 14px center; max-width: 180px; }
.interruptor { appearance: none; width: 36px; height: 22px; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; vertical-align: middle; }
.interruptor::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.interruptor:checked { background: var(--ink); } .interruptor:checked::after { transform: translateX(14px); }
.reporte { display: grid; gap: 14px; grid-template-columns: 1fr; padding: 18px 0; border-top: 1px solid var(--line); }
.reporte:first-child { border-top: 0; }
.reporte img { border-radius: 12px; max-height: 260px; width: auto; box-shadow: inset 0 0 0 1px var(--line); cursor: zoom-in; }
@media (min-width: 900px) { .reporte { grid-template-columns: 1fr 360px; } }
.aviso { padding: 14px 18px; border-radius: 16px; background: #fff4e5; color: #7a3a10; font-size: 14px; margin-bottom: 14px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; opacity: 0; transition: .25s; z-index: 50; pointer-events: none; }
.toast.on { opacity: 1; transform: translateX(-50%); }
dialog { border: 0; border-radius: 24px; padding: 28px; max-width: 460px; width: calc(100% - 32px); box-shadow: 0 40px 100px -30px rgba(0,0,0,.4); }
dialog::backdrop { background: rgba(23,25,29,.35); backdrop-filter: blur(3px); }
dialog h3 { font-size: 24px; margin-bottom: 10px; }
dialog p { color: var(--muted); margin: 0 0 16px; }
dialog .fila-form { margin-top: 16px; justify-content: flex-end; }

/* landing: posiciones sobre la captura real y rejillas de estilos */
.sel-estilos { left: 43.6%; top: 41.6%; width: 52.2%; height: 28.6%; }
.cur-estilos { left: 90%; top: 69%; }
.estilos.anchos { grid-template-columns: 1fr; margin-bottom: 14px; }
.estilos.verticales { grid-template-columns: repeat(2, 1fr); }
.estilos.verticales .estilo:last-child:nth-child(odd) { grid-column: span 2; }
.estilos.verticales .estilo:last-child:nth-child(odd) video { aspect-ratio: 16/10; }
.vista-video { margin-top: 28px; }
@media (min-width: 760px) {
  .estilos.anchos { grid-template-columns: repeat(2, 1fr); }
  .estilos.verticales { grid-template-columns: repeat(3, 1fr); }
  .estilos.verticales .estilo:last-child:nth-child(odd) { grid-column: auto; }
  .estilos.verticales .estilo:last-child:nth-child(odd) video { aspect-ratio: 9/16; }
  .heroe .texto { display: grid; grid-template-columns: 1.1fr .9fr; gap: 12px 56px; align-items: end; }
  .heroe .texto h1 { grid-column: 1 / -1; max-width: 15ch; }
  .heroe .texto .bajada { margin: 0; }
  .heroe .texto .formulario { padding-bottom: 4px; }
}
@media (max-width: 759px) {
  .sel-estilos { left: 4.8%; top: 38.6%; width: 88%; height: 30%; }
  .cur-estilos { left: 72%; top: 66%; }
}
.barra .barra-panel { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0; }
.grid-2 { display: grid; gap: 14px; margin-top: 14px; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1.4fr 1fr; } }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: #eef0f3; color: var(--muted); }
.chip.comprador { background: #ede9fe; color: #5b3fd0; } .chip.waitlist { background: #e0f2fe; color: #0870d4; } .chip.ok { background: #e7f6ee; color: var(--ok); }
.caja p { color: var(--muted); margin: 0 0 14px; }
.caja h2 + p { margin-top: 0; }
.caja p + h2 { margin-top: 22px; }
.grid-2 > .caja + .caja, .grid-2 > .caja { margin-top: 0; }
