/* =============================================================================
   QR3D — hoja de estilo unica.
   1 Tokens · 2 Reset · 3 Utilidades · 4 Tipografia · 5 Componentes
   6 Herramienta · 7 Secciones · 8 Publicidad · 9 Responsive · 10 Movimiento
   ========================================================================== */

/* ============================== 1. Tokens ================================ */
:root {
  --paper:   #FAFAF7;
  --surface: #FFFFFF;
  --surface-2:#F4F3EE;
  --ink:     #14151A;
  --ink-2:   #3D414B;
  --muted:   #6C707A;
  --line:    #E4E2DA;
  --line-2:  #D2CFC5;
  --accent:  #D94B22;
  --accent-2:#F2E7E1;
  --accent-ink:#FFFFFF;
  --ok:      #1F7A4C;
  --warn:    #A96B00;
  --err:     #B3261E;

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", var(--sans);
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --maxw: 1240px;
  --shadow-s: 0 1px 2px rgba(20,21,26,.05), 0 4px 14px rgba(20,21,26,.045);
  --shadow-m: 0 2px 6px rgba(20,21,26,.06), 0 18px 48px rgba(20,21,26,.09);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:   #101116;
    --surface: #171921;
    --surface-2:#1E212A;
    --ink:     #F1F0EA;
    --ink-2:   #C9CAD1;
    --muted:   #9498A3;
    --line:    #282B35;
    --line-2:  #363A46;
    --accent:  #FF6A3D;
    --accent-2:#2A1C16;
    --accent-ink:#1A0E08;
    --ok:      #4CC38A;
    --warn:    #E0A335;
    --err:     #FF6B60;
    --shadow-s: 0 1px 2px rgba(0,0,0,.4);
    --shadow-m: 0 20px 50px rgba(0,0,0,.5);
  }
}

/* ============================== 2. Reset ================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.08; letter-spacing: -0.022em; font-family: var(--display); font-weight: 600; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

/* ============================ 3. Utilidades ============================== */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 999;
  padding: .6rem 1rem; background: var(--ink); color: var(--paper); border-radius: var(--r-s);
}
.skip-link:focus { top: 1rem; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.center { text-align: center; }

/* ============================ 4. Tipografia ============================== */
h1 { font-size: clamp(2rem, 5.2vw, 3.35rem); }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.3rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.45rem); }
h4 { font-size: 1.02rem; }
.eyebrow {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); font-weight: 500;
}
.lead { font-size: clamp(1.02rem, 1.6vw, 1.19rem); color: var(--ink-2); }
.prose p, .prose ul, .prose ol { margin-bottom: 1.05rem; color: var(--ink-2); }
.prose h2 { margin: 2.6rem 0 .9rem; }
.prose h3 { margin: 1.9rem 0 .6rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: .4rem; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: .94rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: .55rem .7rem; text-align: left; }
.prose th { background: var(--surface-2); font-weight: 600; }
.prose code, code {
  font-family: var(--mono); font-size: .88em; overflow-wrap: anywhere;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 5px; padding: .1em .35em;
}
.prose blockquote {
  border-left: 3px solid var(--accent); padding: .2rem 0 .2rem 1rem;
  color: var(--ink-2); font-style: italic; margin: 1.2rem 0;
}

/* =========================== 5. Componentes ============================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .78rem 1.25rem; border-radius: var(--r-m); font-weight: 550;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  transition: transform .18s var(--ease-out), background .18s var(--ease-out), border-color .18s var(--ease-out), box-shadow .18s var(--ease-out);
  text-align: center;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-s); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn--primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn--primary:hover { background: color-mix(in oklab, var(--accent) 88%, #000); }
.btn--ink { background: var(--ink); color: var(--paper); border-color: transparent; }
.btn--ghost { background: transparent; }
.btn--lg { padding: 1rem 1.6rem; font-size: 1.03rem; }
.btn--full { width: 100%; }
.btn--dl { flex-direction: column; gap: .1rem; padding: .8rem 1rem; line-height: 1.25; }
.btn--dl small { font-weight: 400; font-size: .76rem; color: var(--muted); }
.btn--primary.btn--dl small { color: color-mix(in oklab, var(--accent-ink) 78%, transparent); }
.btn.is-busy { position: relative; color: transparent; }
.btn.is-busy::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px;
  border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%;
  color: var(--accent-ink); animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-l); padding: 1.25rem;
}
.card + .card { margin-top: 1rem; }
.card__title {
  display: flex; align-items: center; gap: .55rem; margin-bottom: .95rem;
  font-family: var(--display); font-size: 1.02rem; font-weight: 600; letter-spacing: -.01em;
}
.card__title .num {
  display: inline-grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px;
  border-radius: 6px; background: var(--accent-2); color: var(--accent);
  font-family: var(--mono); font-size: .72rem; font-weight: 600;
}

.field { margin-bottom: .85rem; }
.field:last-child { margin-bottom: 0; }
.field > label, .field-label {
  display: block; font-size: .81rem; font-weight: 550; color: var(--ink-2);
  margin-bottom: .35rem; letter-spacing: .005em;
}
.field .hint { font-size: .76rem; color: var(--muted); margin-top: .3rem; }
input[type="text"], input[type="url"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; padding: .65rem .8rem; border-radius: var(--r-s);
  border: 1px solid var(--line-2); background: var(--paper); color: var(--ink);
  transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent);
}
textarea { resize: vertical; min-height: 88px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
input[type="color"] {
  width: 100%; height: 40px; padding: 3px; border-radius: var(--r-s);
  border: 1px solid var(--line-2); background: var(--paper); cursor: pointer;
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.check { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--ink-2); }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.range-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.range-row output { font-family: var(--mono); font-size: .78rem; color: var(--muted); white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  padding: .42rem .7rem; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); font-size: .8rem; color: var(--ink-2);
  transition: all .16s var(--ease-out);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.swatches { display: flex; flex-wrap: wrap; gap: .45rem; }
.swatch {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2);
  position: relative; overflow: hidden; transition: transform .16s var(--ease-out);
}
.swatch:hover { transform: scale(1.08); }
.swatch span { position: absolute; inset: 0; }
.swatch span:last-child { clip-path: polygon(100% 0, 100% 100%, 0 100%); }

.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: .3rem; }
.emoji-btn {
  aspect-ratio: 1; display: grid; place-items: center; font-size: 1.05rem;
  border-radius: 8px; border: 1px solid transparent; background: var(--surface-2);
  transition: all .15s var(--ease-out);
}
.emoji-btn:hover { border-color: var(--accent); }
.emoji-btn.is-on { border-color: var(--accent); background: var(--accent-2); }

.fmt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .55rem; }
.fmt {
  text-align: left; padding: .75rem; border-radius: var(--r-m);
  border: 1px solid var(--line-2); background: var(--surface);
  transition: all .18s var(--ease-out);
}
.fmt:hover { border-color: var(--accent); }
.fmt.is-on { border-color: var(--accent); background: var(--accent-2); box-shadow: inset 0 0 0 1px var(--accent); }
.fmt b { display: block; font-size: .87rem; font-weight: 600; }
.fmt small { display: block; font-size: .73rem; color: var(--muted); line-height: 1.35; margin-top: .15rem; }
.fmt svg { width: 26px; height: 26px; margin-bottom: .35rem; color: var(--accent); }

/* avisos */
.warnings { list-style: none; padding: 0; margin: .85rem 0 0; display: grid; gap: .45rem; }
.w {
  display: flex; gap: .55rem; align-items: flex-start; font-size: .82rem; line-height: 1.45;
  padding: .55rem .7rem; border-radius: var(--r-s); border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink-2);
}
.w__i {
  flex: 0 0 17px; width: 17px; height: 17px; border-radius: 50%; margin-top: 1px;
  display: grid; place-items: center; font-family: var(--mono); font-size: .68rem;
  font-weight: 700; background: var(--muted); color: var(--surface);
}
.w--error { border-color: color-mix(in oklab, var(--err) 40%, var(--line)); background: color-mix(in oklab, var(--err) 8%, var(--surface)); }
.w--error .w__i { background: var(--err); color: #fff; }
.w--warn { border-color: color-mix(in oklab, var(--warn) 40%, var(--line)); background: color-mix(in oklab, var(--warn) 8%, var(--surface)); }
.w--warn .w__i { background: var(--warn); color: #fff; }
.w--info .w__i { background: var(--ink-2); color: var(--surface); }

/* badge */
.badge {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem;
  color: var(--muted); padding: .35rem .6rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
}

/* dialogo */
dialog {
  border: 1px solid var(--line); border-radius: var(--r-l); padding: 0;
  background: var(--surface); color: var(--ink); max-width: min(92vw, 520px); width: 100%;
  box-shadow: var(--shadow-m);
}
dialog::backdrop { background: rgba(10,10,14,.55); backdrop-filter: blur(3px); }
.dlg__body { padding: 1.4rem; }
.dlg__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .8rem; }
.dlg__close {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); font-size: 1.1rem; line-height: 1; color: var(--muted);
}
.dlg__close:hover { border-color: var(--accent); color: var(--accent); }

/* ========================== 6. La herramienta ============================ */
.tool { padding: 1.5rem 0 2.5rem; scroll-margin-top: 70px; }
.tool__grid { display: grid; gap: 1rem; align-items: start; }
.tool__config, .tool__preview { min-width: 0; }
.tool__preview { display: grid; gap: 1rem; }
input[type="file"] { max-width: 100%; }
label.btn { cursor: pointer; }

.qr-stage {
  display: grid; place-items: center; padding: 1.2rem;
  background:
    linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
    repeating-linear-gradient(45deg, transparent 0 8px, color-mix(in oklab, var(--line) 60%, transparent) 8px 9px);
  border-radius: var(--r-m); border: 1px solid var(--line); min-height: 260px;
}
.qr-stage canvas, .qr-stage svg { width: 100%; height: auto; max-width: 340px; border-radius: 6px; }
.qr-empty .qr-stage::after {
  content: "Escribe un enlace para ver tu QR"; color: var(--muted); font-size: .88rem;
}
.dl-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: .55rem; }

.viewer {
  position: relative; border-radius: var(--r-m); overflow: hidden;
  border: 1px solid var(--line); background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in oklab, var(--accent) 6%, var(--surface-2)), var(--surface-2));
  height: clamp(260px, 42vh, 380px); touch-action: none;
}
.viewer canvas { width: 100% !important; height: 100% !important; display: block; }
.viewer__status {
  position: absolute; inset: auto 12px 12px; padding: .55rem .7rem;
  background: color-mix(in oklab, var(--surface) 92%, transparent); border: 1px solid var(--line);
  border-radius: var(--r-s); font-size: .8rem; color: var(--muted); backdrop-filter: blur(4px);
}
.viewer__status.is-warn { color: var(--warn); border-color: color-mix(in oklab, var(--warn) 40%, var(--line)); }
.viewer__hint {
  position: absolute; top: 10px; left: 12px; font-family: var(--mono); font-size: .68rem;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.viewer.is-nogl { display: grid; place-items: center; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin-top: .85rem; }
.stat {
  border: 1px solid var(--line); border-radius: var(--r-s); padding: .5rem .6rem; background: var(--surface-2);
}
.stat dt { font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-family: var(--mono); }
.stat dd { font-family: var(--mono); font-size: .92rem; font-weight: 500; margin: 0; }

.tool-error { color: var(--err); font-size: .9rem; text-align: center; }
.noscript {
  border: 1px solid var(--warn); background: color-mix(in oklab, var(--warn) 10%, var(--surface));
  padding: 1rem; border-radius: var(--r-m); margin-bottom: 1rem;
}
.jump-preview {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 40;
  box-shadow: var(--shadow-m); display: none;
}

/* =========================== 7. Secciones ================================ */
.site-header {
  position: sticky; top: 0; z-index: 50; background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line);
}
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; }
.logo { display: flex; align-items: center; gap: .5rem; font-family: var(--display); font-weight: 700; letter-spacing: -.03em; font-size: 1.16rem; }
.logo__mark { width: 26px; height: 26px; }
.nav { display: flex; align-items: center; gap: .2rem; }
.nav a { padding: .45rem .65rem; border-radius: var(--r-s); font-size: .89rem; color: var(--ink-2); }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
.nav-toggle { display: none; padding: .45rem .6rem; border: 1px solid var(--line-2); border-radius: var(--r-s); }

.hero { padding: clamp(1.15rem, 3.2vw, 2.9rem) 0 .5rem; }
.hero__in { max-width: 780px; }
.hero h1 { margin: .4rem 0 .6rem; }
.hero .lead { max-width: 58ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; align-items: center; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-top: .9rem; font-size: .82rem; color: var(--muted); }
.hero__facts span { display: flex; align-items: center; gap: .38rem; }

.section { padding: clamp(2.2rem, 5vw, 3.6rem) 0; }
.section__head { max-width: 62ch; margin-bottom: 1.6rem; }
.section__head p { color: var(--ink-2); margin-top: .5rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .85rem; }
.ucard {
  display: block; padding: 1.05rem; border-radius: var(--r-m);
  border: 1px solid var(--line); background: var(--surface);
  transition: transform .2s var(--ease-out), border-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.ucard:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-s); }
.ucard h3 { font-size: 1.02rem; margin-bottom: .3rem; }
.ucard p { font-size: .87rem; color: var(--muted); }
.ucard .arrow { display: inline-block; margin-top: .6rem; font-size: .8rem; color: var(--accent); font-weight: 550; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; counter-reset: s; }
.step { padding: 1.1rem; border-radius: var(--r-m); border: 1px dashed var(--line-2); background: var(--surface); }
.step::before {
  counter-increment: s; content: counter(s, decimal-leading-zero);
  font-family: var(--mono); font-size: .78rem; color: var(--accent); display: block; margin-bottom: .5rem;
}
.step h3 { font-size: 1rem; margin-bottom: .3rem; }
.step p { font-size: .88rem; color: var(--muted); }

.faq { display: grid; gap: .5rem; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); overflow: hidden;
}
.faq summary {
  padding: .95rem 1.1rem; cursor: pointer; font-weight: 550; font-size: .96rem;
  list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--accent); font-size: 1.15rem; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 1.1rem 1.05rem; color: var(--ink-2); font-size: .92rem; }
.faq details > div p + p { margin-top: .7rem; }

.breadcrumb { font-size: .8rem; color: var(--muted); padding: .9rem 0 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; }
.breadcrumb li::after { content: "/"; margin-left: .35rem; color: var(--line-2); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a:hover { color: var(--accent); }

.related { display: flex; flex-wrap: wrap; gap: .45rem; }
.related a {
  font-size: .84rem; padding: .45rem .75rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.related a:hover { border-color: var(--accent); color: var(--accent); }

.site-footer { border-top: 1px solid var(--line); padding: 2.4rem 0 2rem; margin-top: 2rem; background: var(--surface); }
.footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; }
.footer__grid h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-family: var(--mono); font-weight: 500; margin-bottom: .6rem; }
.footer__grid ul { list-style: none; padding: 0; display: grid; gap: .3rem; }
.footer__grid a { font-size: .87rem; color: var(--ink-2); }
.footer__grid a:hover { color: var(--accent); }
.footer__bottom { margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; }

.post-list { display: grid; gap: .7rem; }
.post-item {
  display: block; padding: 1.05rem 1.2rem; border: 1px solid var(--line);
  border-radius: var(--r-m); background: var(--surface); transition: all .18s var(--ease-out);
}
.post-item:hover { border-color: var(--accent); transform: translateX(2px); }
.post-item b { display: block; font-family: var(--display); font-size: 1.03rem; margin-bottom: .25rem; }
.post-item span { font-size: .86rem; color: var(--muted); }

/* =========================== 8. Publicidad =============================== */
/* Huecos vacios: el propietario pega aqui su codigo de AdSense.            */
.ad-slot {
  display: grid; place-items: center; gap: .2rem; margin: 1.6rem 0;
  border: 1px dashed var(--line-2); border-radius: var(--r-m);
  background: repeating-linear-gradient(45deg, transparent 0 10px, color-mix(in oklab, var(--line) 45%, transparent) 10px 11px);
  color: var(--muted); text-align: center;
}
.ad-slot__label { font-family: var(--mono); font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; }
.ad-slot__note { font-size: .7rem; opacity: .75; }
.ad-slot--leaderboard { min-height: 110px; }
.ad-slot--incontent { min-height: 260px; }
.ad-slot--rail { min-height: 600px; position: sticky; top: 92px; }
.ad-slot--mobile { min-height: 260px; }
.ad-rail { display: none; }
@media (min-width: 1280px) { .ad-rail { display: block; } .ad-slot--mobile { display: none; } }

#ad-notice {
  position: fixed; right: 14px; bottom: 14px; z-index: 45;
  max-width: min(300px, calc(100vw - 28px));
  padding: .8rem .9rem; border-radius: var(--r-m); border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow-m); font-size: .82rem; color: var(--ink-2);
  opacity: 0; transform: translateY(10px); transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
#ad-notice.is-in { opacity: 1; transform: none; }
#ad-notice .ad-slot { margin: .6rem 0 0; min-height: 60px; }
#ad-notice button { float: right; color: var(--muted); font-size: 1rem; line-height: 1; padding: 0 0 .3rem .5rem; }

/* =========================== 9. Responsive =============================== */
@media (max-width: 719px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: .5rem var(--gutter) 1rem;
    display: none;
  }
  .nav.is-open { display: flex; }
  .emoji-grid { grid-template-columns: repeat(5, 1fr); }
  .dl-grid { grid-template-columns: 1fr 1fr; }
  .jump-preview { display: inline-flex; }
  .jump-preview[hidden] { display: none; }
  .tool { padding-top: .8rem; }
}
@media (max-width: 539px) {
  /* en movil la herramienta manda: el hero se reduce al minimo util */
  .hero__facts { display: none; }
  .hero__cta .btn--ghost { display: none; }
  .hero .lead { font-size: .95rem; }
  h1 { font-size: clamp(1.7rem, 7.5vw, 2.2rem); }
}
@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 960px) {
  .tool__grid { grid-template-columns: minmax(360px, 420px) 1fr; gap: 1.4rem; }
  .tool__preview { position: sticky; top: 84px; }
  .fmt-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1280px) {
  .with-rail { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; align-items: start; }
}

/* ========================= 10. Movimiento ================================ */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .55s var(--ease-out), transform .55s var(--ease-out); }
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  #ad-notice { transition: none; }
}
