:root {
  --night: #070b1f;
  --night-2: #0d1433;
  --night-3: #141d45;
  --line: rgba(255, 255, 255, .12);
  --cyan: #22d3ff;
  --violet: #7c5cff;
  --white: #ffffff;
  --muted: #a9b4d6;
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #ff6b81;
  --grad: linear-gradient(100deg, var(--cyan), var(--violet));
  --radius: 16px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--white); font-family: var(--font); line-height: 1.5;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(124, 92, 255, .28), transparent 60%),
    radial-gradient(800px 500px at -10% 10%, rgba(34, 211, 255, .18), transparent 60%),
    var(--night);
  background-attachment: fixed;
}
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fine { color: var(--muted); font-size: .88rem; }
.center { text-align: center; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px); position: sticky; top: 0; z-index: 20;
  background: rgba(7, 11, 31, .72); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.wordmark { font-weight: 800; letter-spacing: .14em; font-size: 1.05rem; }
.mark { width: 34px; height: 34px; overflow: visible; }
.mark rect { transform-box: fill-box; transform-origin: center; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav-link { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 10px; font-size: .95rem; }
.nav-link:hover { color: var(--white); background: rgba(255, 255, 255, .06); }
@media (max-width: 640px) { .nav-link { display: none; } }

/* ---------- botones ---------- */
.btn {
  font: inherit; font-weight: 650; color: var(--white); cursor: pointer; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06); padding: 12px 18px; border-radius: 12px; min-height: 46px;
  transition: transform .15s, background .15s, box-shadow .15s, opacity .15s;
}
.btn:hover:not(:disabled) { background: rgba(255, 255, 255, .12); transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--grad); border: 0; color: #04101f; box-shadow: 0 10px 30px rgba(34, 211, 255, .25); }
.btn-primary:hover:not(:disabled) { background: var(--grad); filter: brightness(1.08); box-shadow: 0 14px 38px rgba(124, 92, 255, .4); }
.btn-xl { font-size: 1.1rem; padding: 16px 28px; letter-spacing: .04em; font-weight: 800; width: 100%; }
.btn-ghost { background: transparent; }
.btn-link { background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 8px; width: 100%; }
.btn-tool { background: var(--night-3); text-align: left; }
.btn-tool small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.btn-download { width: 100%; background: #fff; color: var(--night); border: 0; font-size: 1.05rem; font-weight: 800; }
.btn-download:hover:not(:disabled) { background: #eaf3ff; }

/* ---------- landing ---------- */
.hero { padding: clamp(20px, 4vw, 48px) clamp(16px, 4vw, 40px) 28px; display: grid; place-items: center; text-align: center; }
.hero-copy { max-width: 780px; width: 100%; }
.mark-hero { width: clamp(48px, 9vw, 64px); height: auto; margin: 0 auto 12px; display: block; }
.lead { font-size: clamp(1.15rem, 2.4vw, 1.5rem); color: var(--cyan); font-weight: 650; margin-top: 10px; }
.drop {
  margin: 28px auto 12px; padding: 26px; border: 2px dashed rgba(34, 211, 255, .45); border-radius: 22px;
  background: rgba(13, 20, 51, .6); max-width: 560px; transition: border-color .2s, background .2s, transform .2s;
}
.drop.over { border-color: var(--violet); background: rgba(124, 92, 255, .18); transform: scale(1.015); }
.drop-hint { margin: 14px 0 0; color: var(--muted); font-size: .92rem; }

.band { text-align: center; padding: 56px clamp(16px, 4vw, 40px) 12px; }
.sub { color: var(--muted); max-width: 640px; margin: 0 auto; font-size: 1.1rem; }

section.examples, section.steps, section.tools-intro, section.audience, section.pricing {
  max-width: 1080px; margin: 0 auto; padding: 36px clamp(16px, 4vw, 40px);
}
.steps h2, .tools-intro h2, .audience h2, .pricing h2 { text-align: center; }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.ex { border: 1px solid var(--line); border-radius: var(--radius); background: var(--night-2); padding: 12px; }
.ex .stage { aspect-ratio: 1 / 1; border-radius: 12px; }
.ex figcaption { color: var(--muted); font-size: .9rem; padding: 10px 4px 2px; }
.steps ol { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.steps li { display: grid; gap: 4px; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--night-2); }
.steps .n { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--grad); color: #04101f; font-weight: 800; }
.steps li span:last-child { color: var(--muted); font-size: .95rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 22px; }
.cards article { padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(160deg, rgba(34, 211, 255, .08), rgba(124, 92, 255, .08)); }
.cards p { color: var(--muted); margin: 0; font-size: .95rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 0; margin: 20px 0 0; }
.chips li { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--night-2); font-size: .95rem; }
.price-card { margin: 22px auto 0; max-width: 640px; padding: 26px; border-radius: 22px; border: 1px solid rgba(124, 92, 255, .5); background: var(--night-2); box-shadow: 0 20px 60px rgba(124, 92, 255, .18); }
.price { font-size: 2.1rem; font-weight: 800; margin: 0 0 10px; }
.price small { font-size: .95rem; font-weight: 500; color: var(--muted); }
.price-card ul { padding-left: 1.1em; color: var(--muted); }
.price-card li { margin-bottom: 6px; }
.foot { text-align: center; max-width: 760px; margin: 40px auto 0; padding: 28px 16px 40px; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- editor ---------- */
#editor { padding: 20px clamp(12px, 3vw, 36px) 20px; max-width: 1280px; margin: 0 auto; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 920px) { .editor-grid { grid-template-columns: 1fr; } }
.stage-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--night-2); }
.seg button { font: inherit; color: var(--muted); background: none; border: 0; padding: 9px 13px; cursor: pointer; min-height: 40px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button:hover:not(:disabled) { color: var(--white); background: rgba(255, 255, 255, .07); }
.seg button.on { color: #04101f; background: var(--grad); font-weight: 700; }
.seg button:disabled { opacity: .4; cursor: not-allowed; }

.stage { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); aspect-ratio: 4 / 3; touch-action: pan-y; user-select: none; }
#stage { max-height: 72vh; width: 100%; }
.bg-light { background: #f4f7ff; }
.bg-dark { background: #0a0e1f; }
.bg-checker { background: #fff conic-gradient(#d5dbea 25%, #fff 0 50%, #d5dbea 0 75%, #fff 0) 0 0 / 22px 22px; }
.pan { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.pan img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; image-rendering: auto; }
.clip { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--split, 50%)); }
.clipb { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--split, 50%)) 0 0); }
.stage.single .clipb { clip-path: none; }
.stage.single .clip { display: none; }
.tag { position: absolute; top: 10px; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: rgba(7, 11, 31, .78); color: #fff; pointer-events: none; }
.tag-before { left: 10px; } .tag-after { right: 10px; background: var(--violet); }
.handle { position: absolute; top: 0; bottom: 0; left: var(--split, 50%); width: 44px; margin-left: -22px; cursor: ew-resize; touch-action: none; display: grid; place-items: center; z-index: 3; }
.handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.handle span { position: relative; width: 38px; height: 38px; border-radius: 50%; background: #fff; box-shadow: 0 4px 16px rgba(0, 0, 0, .45); display: grid; place-items: center; }
.handle span::before { content: "◀ ▶"; font-size: 9px; letter-spacing: 2px; color: var(--night); }
.stage.single .handle, .stage.single .tag-after { display: none; }
.busy { position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 10px; background: rgba(7, 11, 31, .72); backdrop-filter: blur(3px); }
.spin { width: 42px; height: 42px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .2); border-top-color: var(--cyan); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.panel { display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 20px; background: rgba(13, 20, 51, .78); padding: 18px; position: sticky; top: 76px; }
@media (max-width: 920px) { .panel { position: static; } }
.panel .fine { margin: -4px 0 4px; }
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tool-grid .btn { text-align: center; padding: 12px 8px; }
.print-row label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.print-ctl { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
select, input[type=text] {
  font: inherit; color: var(--white); background: var(--night-3); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; min-height: 46px; width: 100%;
}
.result { border-radius: 14px; border: 1px solid rgba(74, 222, 128, .4); background: rgba(74, 222, 128, .08); padding: 12px 14px; font-size: .92rem; }
.result.off { border-color: var(--line); background: rgba(255, 255, 255, .05); }
.result.bad { border-color: rgba(255, 107, 129, .5); background: rgba(255, 107, 129, .09); }
.result b { display: block; margin-bottom: 4px; font-size: 1rem; }
.result ul { margin: 0; padding-left: 1.1em; color: #dbe4ff; }
.result .w { color: var(--warn); margin-top: 6px; }
.meter { font-size: .9rem; color: var(--muted); text-align: center; }
.meter strong { color: var(--white); }
.meter .bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .12); margin: 8px 0 0; overflow: hidden; }
.meter .bar i { display: block; height: 100%; background: var(--grad); transition: width .3s; }
.code-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: .9rem; color: var(--muted); }
.code-box summary { cursor: pointer; color: var(--white); }
.code-row { display: flex; gap: 8px; align-items: center; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--night-3); padding: 8px 10px; border-radius: 8px; color: var(--cyan); flex: 1; overflow-x: auto; white-space: nowrap; }

/* ---------- diálogos ---------- */
dialog { border: 1px solid var(--line); border-radius: 20px; background: var(--night-2); color: var(--white); padding: 0; width: min(92vw, 480px); }
dialog::backdrop { background: rgba(3, 6, 18, .75); backdrop-filter: blur(4px); }
.dlg { padding: 24px; display: grid; gap: 12px; }
.dlg h2 { margin: 0; }
.dlg p { margin: 0; color: #dbe4ff; }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; }
.dl-list { display: grid; gap: 10px; }
.err { color: var(--bad) !important; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #fff; color: var(--night); padding: 12px 18px; border-radius: 12px; font-weight: 650; z-index: 50; max-width: 92vw; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

#dlgLocked .price small { display: block; margin-top: 2px; }
#codeWrap { margin: 4px 0 10px; }
#codeWrap .btn-link { text-align: left; padding-left: 0; }
#codeBox .code-row input { flex: 1; min-width: 0; }

/* páginas legales */
.legal { max-width: 760px; margin: 0 auto; padding: 28px 16px 8px; line-height: 1.6; }
.legal h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 4px; }
.legal h2 { font-size: 1.15rem; margin: 28px 0 6px; }
.legal p, .legal li { color: #dfe5fb; }
.legal a, .foot a { color: var(--cyan); }
.form-legal { display: grid; gap: 14px; margin: 18px 0; }
.form-legal label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.form-legal small { font-weight: 400; color: var(--muted); }
.form-legal input, .form-legal textarea { font: inherit; color: var(--white); background: var(--night-3); border: 1px solid var(--line); border-radius: 12px; padding: 12px; width: 100%; }
.ok-box { border: 1px solid var(--ok); border-radius: 14px; padding: 14px 16px; margin: 18px 0; }
.legal a.btn { text-decoration: none; color: var(--white); display: inline-block; }

/* envío por email */
.mail-box { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line, rgba(255,255,255,.14)); display: grid; gap: 10px; }
.mail-title { font-weight: 700; }
.mail-box .code-row { display: flex; gap: 8px; }
.mail-box input, .mail-box select { flex: 1; min-width: 0; font: inherit; color: inherit; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.2); border-radius: 12px; padding: 10px 12px; }
.mail-box select option { color: #141B4A; }

.cookie-bar{position:fixed;left:12px;right:12px;bottom:16px;z-index:60;max-width:560px;margin:0 auto;display:flex;gap:16px;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:14px 18px;border-radius:16px;background:#f4f6ff;border:2px solid #22d3ee;box-shadow:0 0 0 6px rgba(34,211,238,.22),0 18px 60px rgba(0,0,0,.65);color:#0b1030;font-size:16px;line-height:1.3;animation:cbIn .35s ease-out}
.cookie-bar p{margin:0;flex:1 1 280px}.cookie-bar strong{display:block;font-size:17px;margin-bottom:2px}.cookie-bar a{color:#2740c9;font-weight:600}
.cookie-bar div{display:flex;gap:10px;flex:0 0 auto}.cookie-bar .btn-ghost{color:#0b1030;border-color:rgba(11,16,48,.35);background:transparent}
@keyframes cbIn{from{transform:translateY(20px);opacity:0}to{transform:none;opacity:1}}
@media (max-width:520px){.cookie-bar div{width:100%}.cookie-bar div .btn{flex:1}}
#dlgLocked > .btn { display: block; width: 100%; margin-top: 8px; }
#dlgLocked > .btn[hidden] { display: none; }

.opt-row{display:flex;flex-direction:column;gap:6px;margin:10px 0 4px;font-size:.88rem;color:var(--muted,#9aa3c7)}
.opt-row .chk{display:flex;align-items:center;gap:8px;cursor:pointer}
.opt-row input{width:18px;height:18px;accent-color:#765cf5}

.stage-top { margin: 0 0 10px; }
.btn-new { background: rgba(34, 211, 255, .12); color: var(--cyan, #22d3ff); border: 1px solid rgba(34, 211, 255, .45); font-weight: 700; padding: 10px 16px; border-radius: 12px; }
.btn-new:hover { background: rgba(34, 211, 255, .22); }
.dl-price { margin: 6px 2px 10px; text-align: center; font-size: .86rem; color: var(--muted, #9aa3c7); }
@media (max-width: 520px) { #btnRecover { font-size: .8rem; padding: 8px 12px; white-space: nowrap; } }

/* Usá tu logo */
.btn-use { width: 100%; margin-top: 8px; }
#dlgLayouts { width: min(96vw, 980px); max-height: 94vh; overflow: auto; }
.lay-grid { display: grid; grid-template-columns: minmax(250px, 340px) 1fr; gap: 18px; align-items: start; }
.lay-form { display: grid; gap: 8px; }
.lay-form label, .lay-label { display: grid; gap: 4px; font-size: .85rem; color: var(--muted, #b8c3e6); }
.lay-form input, .lay-form textarea, .lay-form select { font: inherit; color: inherit; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.2); border-radius: 10px; padding: 9px 11px; width: 100%; box-sizing: border-box; }
#layFields { display: grid; gap: 8px; }
#layFields label[hidden] { display: none; }
.lay-pages { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; min-height: 160px; align-items: flex-start; }
.lay-pages img { max-width: 100%; max-height: 52vh; width: auto; background: #fff; border-radius: 6px; box-shadow: 0 6px 24px rgba(0,0,0,.45); }
.lay-pages.two img { max-width: calc(50% - 8px); }
@media (max-width: 760px) { .lay-grid { grid-template-columns: 1fr; } .lay-pages.two img { max-width: 100%; } }

/* Página /tarjetas: solo la tarjeta y un botón */
.tj-demo { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(10px, 2.5vw, 22px); max-width: 640px; margin: 8px auto 26px; }
.tj-demo[hidden] { display: none; }
.tj-demo img { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 12px 34px rgba(0, 0, 0, .45); }
@media (max-width: 460px) { .tj-demo { grid-template-columns: 1fr; max-width: 320px; } }
.tj-demo[data-n="1"] { grid-template-columns: minmax(0, 1fr); max-width: 380px; }
.tj-demo[data-n="1"] img[src*="carpeta"] { max-width: 400px; margin: 0 auto; }
.tj-demo[data-n="1"]:has(img[src*="carpeta"]) { max-width: 400px; }
.tj-demo img[src*="folleto"] { max-height: 230px; width: auto; justify-self: center; max-width: 100%; }
.tj-demo[data-n="1"] img { max-height: 230px; width: auto; justify-self: center; max-width: 100%; }
/* Portada: diseños con tu logo */
.disenos { padding: 36px clamp(16px, 4vw, 40px); max-width: 1000px; margin: 0 auto; text-align: center; }
.disenos[hidden] { display: none; }
.di-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 22px; }
.di-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px; border: 1px solid var(--line, rgba(255,255,255,.14)); border-radius: 14px; text-decoration: none; color: inherit; background: rgba(255,255,255,.03); transition: transform .15s, border-color .15s; }
.di-card:hover, .di-card:focus-visible { transform: translateY(-3px); border-color: #29d3ff; }
.di-card img { width: 100%; height: 120px; object-fit: contain; border-radius: 6px; margin-bottom: 6px; }
.di-card span { font-size: .85rem; opacity: .75; }
.resume-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin: 14px auto 0; padding: 10px 16px; max-width: 520px; border: 1px solid rgba(41, 211, 255, .45); border-radius: 12px; background: rgba(41, 211, 255, .08); }
.resume-bar[hidden] { display: none; }

#freeBox { margin: 14px 0 12px; display: grid; gap: 8px; }
#freeBox .fine { margin: 2px 0 0; }
#freeBox[hidden] { display: none; }
