/* =============================================================
   QR3D — styles.css · rediseño "vibrante y juguetón" (2026-08-23)
   Paleta: uva eléctrica (#6D2AE8) + mango (#FF6B35), menta de apoyo.
   Tipografía: Fredoka (display redondeada) + Plus Jakarta Sans (texto).

   1. Tokens · 2. Reset · 3. Utilidades · 4. Decoración (blobs)
   5. Cabecera y hero · 6. La herramienta · 7. Secciones
   8. Anuncios · 9. Responsive · 10. Reduced-motion
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  color-scheme: light;

  /* --- marca --------------------------------------------------- */
  --accent:       #6D2AE8;   /* uva — primario  (6.7:1 sobre blanco) */
  --accent-dark:  #5417C7;   /* hover del primario */
  --accent-soft:  #F1E9FF;   /* tinte de fondo */
  --accent-2:     #FF6B35;   /* mango — secundario (decorativo) */
  --accent-2-ink: #C2410C;   /* mango legible como texto (5.2:1) */
  --accent-2-soft:#FFEDE3;
  --accent-3:     #12C08A;   /* menta — apoyo decorativo */
  --on-accent:    #FFFFFF;   /* texto sobre el primario */

  /* --- superficies --------------------------------------------- */
  --bg:        #FDFBFF;
  --bg-2:      #F4EFFB;
  --surface:   #FFFFFF;
  --surface-2: #F6F1FD;
  --line:      #E7DFF5;
  --line-2:    #D5C8EE;
  --text:      #1E1533;   /* 16.9:1 sobre --bg */
  --muted:     #635A78;   /*  6.4:1 sobre blanco */

  /* --- estados funcionales (avisos de impresión) ---------------- */
  --ok:      #0B7A4C;
  --warn:    #8A5300;
  --bad:     #C0182E;
  --ok-bg:   #E6F7EF;
  --warn-bg: #FFF3DC;
  --bad-bg:  #FDE9EC;

  /* --- tipografía ---------------------------------------------- */
  --sans:    "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Fredoka", "Plus Jakarta Sans", system-ui, "Segoe UI", sans-serif;

  /* --- formas: esquinas MUY curvas ------------------------------ */
  --r-s:    12px;
  --r-m:    18px;
  --r-l:    26px;
  --r-xl:   34px;
  --r-pill: 999px;

  --shadow-s: 0 1px 2px rgba(43, 18, 88, .06), 0 3px 10px rgba(43, 18, 88, .05);
  --shadow-m: 0 2px 6px rgba(43, 18, 88, .06), 0 16px 38px rgba(43, 18, 88, .10);
  --shadow-pop: 0 10px 24px rgba(109, 42, 232, .22);

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --gutter: clamp(1rem, 4vw, 2rem);

  --sel-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5' fill='none' stroke='%23635A78' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --accent:       #B18AFF;
    --accent-dark:  #C7A9FF;
    --accent-soft:  #2C1F47;
    --accent-2:     #FF8A5B;
    --accent-2-ink: #FFA783;
    --accent-2-soft:#3A2318;
    --accent-3:     #4FE0B0;
    --on-accent:    #1A0F33;

    --bg:        #14101F;
    --bg-2:      #1B1630;
    --surface:   #1E1930;
    --surface-2: #29223F;
    --line:      #362D4E;
    --line-2:    #4A3E68;
    --text:      #F3EEFF;
    --muted:     #B0A5C8;

    --ok:      #5FE0A5;
    --warn:    #FFC46B;
    --bad:     #FF8095;
    --ok-bg:   #10301F;
    --warn-bg: #33240A;
    --bad-bg:  #3A1420;

    --shadow-s: 0 1px 2px rgba(0,0,0,.4);
    --shadow-m: 0 16px 38px rgba(0,0,0,.5);
    --shadow-pop: 0 10px 24px rgba(0,0,0,.5);

    --sel-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5' fill='none' stroke='%23B0A5C8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; 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.14; letter-spacing: -0.015em; }
strong, b { font-weight: 700; }
::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

/* =============================================================
   3. Utilidades
   ============================================================= */
.wrap { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 760px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: -120px; left: 1rem; z-index: 9999;
  padding: .7rem 1.15rem; border-radius: var(--r-pill);
  background: var(--accent); color: var(--on-accent);
  font-family: var(--display); font-weight: 600;
  box-shadow: var(--shadow-pop);
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   4. Decoración — blobs orgánicos de fondo
   ============================================================= */
.deco {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  contain: paint;
}
.deco svg { position: absolute; display: block; }
.blob { opacity: .5; }

@media (prefers-color-scheme: dark) { .blob { opacity: .32; } }

/* posiciones — se mantienen fuera del texto y nunca generan scroll */
.deco--hero .blob-a {
  width: 42vw; max-width: 420px; top: -14%; right: -9%;
  color: var(--accent-2);
  animation: floaty 22s var(--ease-out) infinite alternate;
}
.deco--hero .blob-b {
  width: 34vw; max-width: 320px; bottom: -18%; left: -14%;
  color: var(--accent);
  animation: floaty 27s var(--ease-out) 1.5s infinite alternate-reverse;
}
.deco--steps .blob-a {
  width: 38vw; max-width: 360px; top: -22%; left: -12%;
  color: var(--accent-3);
  animation: floaty 25s var(--ease-out) infinite alternate;
}
.deco--ideas .blob-a {
  width: 40vw; max-width: 400px; bottom: -25%; right: -12%;
  color: var(--accent);
  animation: floaty 30s var(--ease-out) infinite alternate-reverse;
}
.deco--foot .blob-a {
  width: 30vw; max-width: 280px; top: -40%; right: 4%;
  color: var(--accent-2);
}

@keyframes floaty {
  from { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  to   { transform: translate3d(2%, 4%, 0) rotate(12deg) scale(1.07); }
}

/* animaciones juguetonas reutilizables */
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  30%      { transform: rotate(-9deg); }
  65%      { transform: rotate(7deg); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(.9) translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* =============================================================
   5. Cabecera y hero
   ============================================================= */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  border-bottom: 2px solid var(--line);
}
@supports (backdrop-filter: blur(12px)) {
  .site-header {
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
  }
}
.site-header-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; height: 62px;
}

.brand { display: inline-flex; align-items: center; gap: .55rem; }
.brand-mark {
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 12px 16px 12px 16px;
  padding: 5px;
  box-shadow: var(--shadow-pop);
  transition: transform .3s var(--ease-bounce), border-radius .3s var(--ease-out);
}
.brand:hover .brand-mark {
  transform: rotate(-8deg) scale(1.08);
  border-radius: 18px 10px 18px 10px;
}
.brand-name {
  font-family: var(--display); font-weight: 600; font-size: 1.32rem;
  color: var(--text); letter-spacing: -0.01em;
}

.site-nav { display: flex; gap: .35rem; font-size: .92rem; font-weight: 600; }
.site-nav a {
  color: var(--muted);
  padding: .35rem .7rem; border-radius: var(--r-pill);
  transition: color .2s var(--ease-out), background .2s var(--ease-out), transform .2s var(--ease-bounce);
}
.site-nav a:hover {
  color: var(--accent); background: var(--accent-soft);
  transform: translateY(-2px) rotate(-1.5deg);
}

.hero {
  position: relative; isolation: isolate;
  padding-block: clamp(1.1rem, 4vw, 2.75rem) 1.5rem;
}
.hero > .wrap { position: relative; z-index: 1; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .32rem .85rem .32rem .55rem;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  border: 2px solid color-mix(in srgb, var(--accent) 24%, transparent);
  font-size: .78rem; font-weight: 700; letter-spacing: .01em;
  margin-bottom: .7rem;
}
.hero-eyebrow .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-3) 25%, transparent);
  flex: 0 0 auto;
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(1.9rem, 5.6vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.06;
  max-width: 20ch;
}
.hero-title .pop {
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}
.hero-title .pop::after {
  content: ""; position: absolute;
  left: -1%; right: -1%; bottom: .04em; height: .22em;
  border-radius: var(--r-pill);
  background: var(--accent-2);
  opacity: .32;
  z-index: -1;
}
.hero-sub {
  margin-top: .6rem;
  color: var(--muted);
  font-size: clamp(.95rem, 2.4vw, 1.1rem);
  max-width: 62ch;
}
.hero-sub strong { color: var(--text); font-weight: 700; }

.noscript-msg {
  margin-top: 1rem; padding: .9rem 1.05rem;
  border: 2px solid color-mix(in srgb, var(--warn) 35%, transparent);
  border-radius: var(--r-m);
  background: var(--warn-bg); color: var(--warn); font-weight: 600;
}

/* =============================================================
   6. La herramienta
   ============================================================= */
.tool {
  margin-top: 1.25rem;
  display: flex; flex-direction: column; gap: .9rem;
}
.t-block {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--r-l);
  padding: clamp(1rem, 3vw, 1.35rem);
  box-shadow: var(--shadow-s);
}
.t-title {
  font-family: var(--display);
  font-size: 1.15rem; font-weight: 600; letter-spacing: -0.005em;
  margin-bottom: .9rem; display: flex; align-items: center; gap: .55rem;
}
.t-title::before {
  content: ""; flex: 0 0 auto;
  width: 16px; height: 16px;
  border-radius: 60% 40% 55% 45% / 45% 55% 45% 55%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* --- control segmentado ---------------------------------------- */
.seg {
  display: inline-flex; gap: 3px; padding: 4px;
  background: var(--surface-2); border-radius: var(--r-pill);
  margin-bottom: .85rem;
  border: 2px solid var(--line);
}
.seg-btn {
  padding: .42rem 1.05rem; border-radius: var(--r-pill);
  font-size: .88rem; font-weight: 700; color: var(--muted);
  transition: background .22s var(--ease-out), color .22s var(--ease-out), transform .22s var(--ease-bounce);
}
.seg-btn:hover { color: var(--accent); transform: translateY(-1px); }
.seg-btn.is-on {
  background: var(--accent); color: var(--on-accent);
  box-shadow: var(--shadow-pop);
}
.seg-btn.is-on:hover { color: var(--on-accent); }

/* --- campos ----------------------------------------------------- */
.field { display: block; margin-bottom: .9rem; }
.field:last-child { margin-bottom: 0; }
.field-label {
  display: flex; align-items: baseline; justify-content: space-between; gap: .5rem;
  font-size: .82rem; font-weight: 700; color: var(--muted);
  margin-bottom: .4rem; letter-spacing: .01em;
}
.field-label output {
  color: var(--accent); font-variant-numeric: tabular-nums;
  font-weight: 700;
  background: var(--accent-soft);
  padding: .1rem .5rem; border-radius: var(--r-pill);
}

.input {
  width: 100%; padding: .72rem .9rem;
  font: inherit; font-size: .98rem; font-weight: 500; color: var(--text);
  background: var(--bg-2);
  border: 2px solid var(--line-2); border-radius: var(--r-m);
  transition: border-color .18s var(--ease-out), box-shadow .18s var(--ease-out), background .18s var(--ease-out);
}
.input::placeholder { color: var(--muted); opacity: .75; }
.input:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-2)); }
.input:focus {
  outline: none; border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}
select.input {
  appearance: none; cursor: pointer;
  background-image: var(--sel-arrow);
  background-repeat: no-repeat;
  background-position: right .9rem center;
  padding-right: 2.4rem;
}

.grid-2 { display: grid; grid-template-columns: 1fr; gap: .25rem .9rem; }

.hint { font-size: .81rem; color: var(--muted); margin-top: .4rem; line-height: 1.5; }
.hint code {
  font-size: .95em; background: var(--accent-soft); color: var(--accent);
  padding: .05em .35em; border-radius: 6px; font-weight: 600;
}

/* --- range ------------------------------------------------------ */
.range {
  width: 100%; accent-color: var(--accent); cursor: pointer;
  height: 26px;
}

/* --- color ------------------------------------------------------ */
.color-row { display: flex; align-items: center; gap: .6rem; }
.color {
  width: 52px; height: 42px; padding: 3px; cursor: pointer;
  border: 2px solid var(--line-2); border-radius: var(--r-s); background: var(--bg-2);
  transition: transform .2s var(--ease-bounce), border-color .2s var(--ease-out);
}
.color:hover { transform: scale(1.07) rotate(-3deg); border-color: var(--accent); }
.color-val {
  font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* --- chips ------------------------------------------------------ */
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  padding: .48rem .95rem; border-radius: var(--r-pill);
  border: 2px solid var(--line-2); background: var(--surface);
  font-size: .86rem; font-weight: 700; color: var(--muted);
  transition: border-color .18s var(--ease-out), color .18s var(--ease-out),
              background .18s var(--ease-out), transform .22s var(--ease-bounce),
              box-shadow .18s var(--ease-out);
}
.chip:hover {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px) rotate(-2deg);
}
.chip.is-on {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
  box-shadow: var(--shadow-pop);
}
.chip.is-on:hover { color: var(--on-accent); background: var(--accent-dark); border-color: var(--accent-dark); }

/* --- emojis ----------------------------------------------------- */
.emoji-grid { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .6rem; }
.emoji-btn {
  width: 42px; height: 42px; font-size: 1.22rem; line-height: 1;
  display: grid; place-items: center;
  border: 2px solid var(--line); border-radius: 14px;
  background: var(--surface-2);
  transition: border-color .15s var(--ease-out), transform .25s var(--ease-bounce),
              background .15s var(--ease-out);
}
.emoji-btn:hover {
  border-color: var(--accent); background: var(--accent-soft);
  transform: translateY(-3px) scale(1.1) rotate(-6deg);
}
.emoji-btn.is-on {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px var(--accent), var(--shadow-pop);
  transform: scale(1.05);
}

/* --- botones ---------------------------------------------------- */
.btn-row { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .8rem; }
.btn-row--tight { margin-top: .4rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .68rem 1.15rem; border-radius: var(--r-pill);
  border: 2px solid var(--line-2); background: var(--surface);
  font-size: .9rem; font-weight: 700; color: var(--text);
  transition: border-color .18s var(--ease-out), background .18s var(--ease-out),
              color .18s var(--ease-out), transform .2s var(--ease-bounce),
              box-shadow .2s var(--ease-out);
}
.btn:hover {
  border-color: var(--accent); color: var(--accent); background: var(--accent-soft);
  transform: translateY(-2px);
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[disabled]:hover { border-color: var(--line-2); color: var(--text); background: var(--surface); transform: none; }

.btn-primary {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
  box-shadow: var(--shadow-pop);
  flex: 1 1 auto;
}
.btn-primary:hover {
  background: var(--accent-dark); border-color: var(--accent-dark); color: var(--on-accent);
  transform: translateY(-2px) scale(1.02);
}
.btn-big { padding: .92rem 1.2rem; font-size: 1rem; width: 100%; }
.btn-ghost { background: var(--bg-2); }
.btn-ghost:hover { background: var(--accent-soft); }

.link-btn {
  display: inline-block; margin-top: .6rem;
  font-size: .84rem; font-weight: 600; color: var(--muted);
  text-decoration: underline; text-decoration-style: wavy;
  text-decoration-thickness: 1.5px; text-underline-offset: 4px;
  transition: color .18s var(--ease-out);
}
.link-btn:hover { color: var(--accent); }

/* --- escenario del QR ------------------------------------------- */
.qr-stage {
  display: grid; place-items: center;
  background:
    radial-gradient(120% 120% at 15% 0%, var(--accent-soft), transparent 60%),
    radial-gradient(120% 120% at 100% 100%, var(--accent-2-soft), transparent 55%),
    var(--surface-2);
  border: 2px dashed color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: var(--r-l);
  padding: clamp(.8rem, 3vw, 1.2rem);
  min-height: 200px;
}
.qr-holder { width: 100%; max-width: 260px; display: grid; place-items: center; }
.qr-holder canvas, .qr-holder svg {
  width: 100% !important; height: auto !important;
  border-radius: 10px;
}
.qr-placeholder { font-size: .85rem; color: var(--muted); text-align: center; font-weight: 600; }
.stage-meta {
  margin-top: .6rem; font-size: .78rem; color: var(--muted);
  font-variant-numeric: tabular-nums; line-height: 1.5;
}

/* --- avisos de calidad de impresión (colores funcionales) ------- */
.warnbox { display: flex; flex-direction: column; gap: .45rem; margin-top: .4rem; }
.warn-item {
  display: flex; gap: .6rem; align-items: flex-start;
  font-size: .82rem; line-height: 1.45;
  padding: .6rem .75rem; border-radius: var(--r-m);
  border: 2px solid transparent;
  animation: popIn .25s var(--ease-out) both;
}
.warn-item b { font-weight: 800; }
/* glifo redundante: la información no depende sólo del color */
.warn-item::before {
  flex: 0 0 auto;
  width: 20px; height: 20px; margin-top: .05rem;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: .72rem; font-weight: 800; line-height: 1;
  color: var(--surface);
}
.warn-item--ok  { background: var(--ok-bg);   color: var(--ok);   border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.warn-item--mid { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.warn-item--bad { background: var(--bad-bg);  color: var(--bad);  border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.warn-item--ok::before  { content: "\2713"; background: var(--ok);   color: var(--ok-bg); }
.warn-item--mid::before { content: "!";      background: var(--warn); color: var(--warn-bg); }
.warn-item--bad::before { content: "\2715"; background: var(--bad);  color: var(--bad-bg); }

/* --- visor 3D --------------------------------------------------- */
.viewer {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  border-radius: var(--r-l);
  background:
    radial-gradient(90% 90% at 25% 10%, var(--accent-soft), transparent 65%),
    radial-gradient(90% 90% at 90% 100%, var(--accent-2-soft), transparent 60%),
    var(--surface-2);
  border: 2px solid var(--line);
  overflow: hidden;
}
.viewer canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.viewer-msg {
  position: absolute; inset: 0; display: grid; place-items: center;
  padding: 1.5rem; text-align: center;
  font-size: .86rem; font-weight: 600; color: var(--muted);
  background: var(--surface-2);
}
.viewer[data-state="ready"] .viewer-msg { display: none; }
.viewer[data-state="error"] .viewer-msg { color: var(--warn); background: var(--warn-bg); }
.viewer-hint { font-size: .78rem; color: var(--muted); margin-top: .5rem; }
.viewer[data-state="error"] ~ .viewer-hint { display: none; }

/* --- insignias -------------------------------------------------- */
.badges { margin-top: 1.2rem; display: flex; flex-direction: column; gap: .7rem; }
.privacy-badge {
  display: flex; gap: .6rem; align-items: flex-start;
  font-size: .87rem; color: var(--ok);
  background: var(--ok-bg);
  border: 2px solid color-mix(in srgb, var(--ok) 30%, transparent);
  border-radius: var(--r-l); padding: .8rem 1rem;
}
.privacy-badge svg { flex: 0 0 auto; margin-top: .2rem; }
.privacy-badge strong { font-weight: 800; }
.limits { font-size: .82rem; color: var(--muted); line-height: 1.6; }
.limits strong { color: var(--text); }

/* =============================================================
   7. Secciones
   ============================================================= */
.section {
  position: relative; isolation: isolate;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.section > .wrap { position: relative; z-index: 1; }
.section--prose {
  background: var(--surface);
  border-block: 2px solid var(--line);
}
.section-title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.8vw, 2.3rem);
  font-weight: 600; letter-spacing: -0.015em;
}
.section-lead { color: var(--muted); margin-top: .5rem; max-width: 60ch; }

/* --- pasos ------------------------------------------------------ */
.steps {
  list-style: none; padding: 0; margin-top: 1.7rem;
  display: grid; gap: 1rem; grid-template-columns: 1fr;
}
.step {
  position: relative;
  background: var(--surface); border: 2px solid var(--line);
  border-radius: var(--r-xl); padding: 1.3rem;
  transition: transform .28s var(--ease-bounce), border-color .22s var(--ease-out),
              box-shadow .22s var(--ease-out);
}
.step:hover {
  transform: translateY(-4px) rotate(-.7deg);
  border-color: var(--accent);
  box-shadow: var(--shadow-m);
}
.step-ico {
  display: grid; place-items: center; width: 54px; height: 54px;
  border-radius: 62% 38% 55% 45% / 45% 58% 42% 55%;
  background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--accent-2)));
  color: var(--on-accent);
  margin-bottom: .85rem;
  box-shadow: var(--shadow-pop);
  transition: transform .35s var(--ease-bounce), border-radius .35s var(--ease-out);
}
.step:hover .step-ico {
  transform: rotate(-12deg) scale(1.08);
  border-radius: 42% 58% 40% 60% / 58% 42% 58% 42%;
}
.step:nth-child(2) .step-ico {
  background: linear-gradient(140deg, var(--accent-2), color-mix(in srgb, var(--accent-2) 55%, var(--accent)));
  color: #FFFFFF;
}
.step:nth-child(3) .step-ico {
  background: linear-gradient(140deg, var(--accent-3), color-mix(in srgb, var(--accent-3) 50%, var(--accent)));
  color: #06251A;
}
.step h3 { font-family: var(--display); font-weight: 600; font-size: 1.15rem; margin-bottom: .35rem; }
.step p { font-size: .9rem; color: var(--muted); }

/* --- tarjetas de ideas ------------------------------------------ */
.cards {
  margin-top: 1.7rem;
  display: grid; gap: 1rem; grid-template-columns: 1fr;
}
.card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 2px solid var(--line);
  border-radius: var(--r-xl); padding: 1.2rem 1.25rem;
  transition: border-color .22s var(--ease-out), transform .28s var(--ease-bounce),
              box-shadow .22s var(--ease-out);
}
.card::before {
  content: ""; position: absolute;
  width: 90px; height: 90px; top: -42px; right: -30px;
  border-radius: 60% 40% 50% 50% / 45% 55% 45% 55%;
  background: var(--accent-soft);
  transition: transform .4s var(--ease-out), background .25s var(--ease-out);
  z-index: 0;
}
.card:nth-child(3n+2)::before { background: var(--accent-2-soft); }
.card:nth-child(3n+3)::before { background: color-mix(in srgb, var(--accent-3) 16%, transparent); }
.card > * { position: relative; z-index: 1; }
.card:hover {
  border-color: var(--accent); transform: translateY(-4px) rotate(.6deg);
  box-shadow: var(--shadow-m);
}
.card:hover::before { transform: scale(1.5) rotate(35deg); }
.card h3 { font-family: var(--display); font-weight: 600; font-size: 1.08rem; margin-bottom: .3rem; }
.card p { font-size: .88rem; color: var(--muted); }

/* --- prosa ------------------------------------------------------ */
.section--prose h3 {
  font-family: var(--display); font-weight: 600;
  font-size: 1.22rem; margin-top: 1.9rem; margin-bottom: .4rem;
}
.section--prose p { margin-top: .75rem; color: var(--muted); }
.section--prose p strong, .section--prose p em { color: var(--text); }
.section--prose > .wrap > p:first-of-type { margin-top: 1rem; }

/* --- FAQ -------------------------------------------------------- */
.faq {
  border: 2px solid var(--line); border-radius: var(--r-l);
  background: var(--surface); margin-top: .7rem; overflow: hidden;
  transition: border-color .2s var(--ease-out);
}
.faq:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.faq[open] { border-color: var(--accent); }
.faq summary {
  cursor: pointer; padding: .95rem 1.15rem; font-weight: 700; 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: "+";
  flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.2rem; line-height: 1;
  background: var(--accent-soft); color: var(--accent);
  transition: transform .3s var(--ease-bounce), background .2s var(--ease-out);
}
.faq summary:hover::after { background: var(--accent); color: var(--on-accent); transform: scale(1.1); }
.faq[open] summary::after { transform: rotate(135deg); background: var(--accent); color: var(--on-accent); }
.faq p { padding: 0 1.15rem 1.15rem; font-size: .9rem; color: var(--muted); }

/* --- pie -------------------------------------------------------- */
.site-footer {
  position: relative; isolation: isolate;
  border-top: 2px solid var(--line);
  padding-block: 2.25rem;
  background: var(--surface);
}
.site-footer-in {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: .55rem; align-items: flex-start;
}
.foot-brand { font-family: var(--display); font-weight: 600; font-size: 1rem; }
.foot-nav { display: flex; gap: .5rem; font-size: .88rem; font-weight: 600; }
.foot-nav a {
  color: var(--muted);
  padding: .25rem .7rem; border-radius: var(--r-pill);
  transition: color .2s var(--ease-out), background .2s var(--ease-out), transform .2s var(--ease-bounce);
}
.foot-nav a:hover { color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.foot-note { font-size: .8rem; color: var(--muted); }

/* =============================================================
   8. Huecos de anuncio (placeholders — sin código de terceros)
   ============================================================= */
.ad-slot {
  position: relative;
  display: grid; place-items: center;
  border: 3px dashed var(--line-2);
  border-radius: var(--r-l);
  background: repeating-linear-gradient(
    135deg,
    var(--surface-2) 0 14px,
    color-mix(in srgb, var(--surface-2) 60%, var(--bg)) 14px 28px
  );
  color: var(--muted);
}
.ad-tag {
  font-size: .68rem; font-weight: 800; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted);
  background: var(--surface);
  border: 2px dashed var(--line-2);
  border-radius: var(--r-pill);
  padding: .2rem .8rem;
}
.ad-slot--leaderboard { min-height: 108px; margin-block: 1.4rem; }
.ad-slot--incontent   { min-height: 250px; margin-block: .5rem 1.6rem; }
.ad-slot--modal       { min-height: 200px; width: 100%; margin-block: 1rem; }
.ad-slot--toast       { min-height: 82px; width: 100%; border-width: 2px; border-radius: var(--r-m); }
@media (min-width: 720px) {
  .ad-slot--leaderboard { min-height: 120px; }
}

.ad-modal {
  border: 3px solid var(--accent); border-radius: var(--r-xl);
  padding: 0; max-width: min(430px, calc(100vw - 2rem));
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-m);
  animation: popIn .3s var(--ease-bounce) both;
}
.ad-modal::backdrop { background: rgba(30, 21, 51, .6); backdrop-filter: blur(3px); }
.ad-modal-in { padding: 1.4rem; position: relative; }
.ad-modal-close {
  position: absolute; top: .55rem; right: .65rem;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 1.4rem; line-height: 1; color: var(--muted);
  display: grid; place-items: center;
  transition: background .2s var(--ease-out), color .2s var(--ease-out), transform .25s var(--ease-bounce);
}
.ad-modal-close:hover { background: var(--accent-soft); color: var(--accent); transform: rotate(90deg); }
.ad-modal-title {
  font-family: var(--display); font-weight: 600;
  font-size: 1.2rem; padding-right: 2.2rem;
}
.ad-modal-sub { font-size: .87rem; color: var(--muted); margin-top: .3rem; }
.ad-modal .btn-primary { width: 100%; }

.ad-toast {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 50;
  width: min(300px, calc(100vw - 2rem));
  padding: .65rem;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-m);
  animation: toastIn .4s var(--ease-bounce) both;
}
.ad-toast[hidden] { display: none; }
.ad-toast-close {
  position: absolute; top: -11px; right: -11px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  font-size: 1.05rem; line-height: 1; display: grid; place-items: center;
  box-shadow: var(--shadow-pop);
  transition: transform .25s var(--ease-bounce);
}
.ad-toast-close:hover { transform: rotate(90deg) scale(1.12); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }

/* =============================================================
   9. Responsive (mobile-first · 540 / 720 / 960 / 1280 / 1600)
   ============================================================= */
@media (min-width: 540px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 960px) {
  .tool {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
    grid-template-areas:
      "input  stage"
      "design stage"
      "opts   viewer";
    align-items: start;
    gap: .9rem;
  }
  .t-input  { grid-area: input; }
  .t-stage  { grid-area: stage; }
  .t-design { grid-area: design; }
  .t-3dopts { grid-area: opts; }
  .t-viewer { grid-area: viewer; }

  .cards { grid-template-columns: repeat(4, 1fr); }

  .site-footer-in { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (min-width: 1280px) {
  .hero-title { font-size: 3.5rem; }
}

/* En móvil la herramienta debe ser usable sin desplazarse: compactamos. */
@media (max-width: 539px) {
  .hero { padding-top: .7rem; }
  .hero-eyebrow { display: none; }
  .hero-sub { display: none; }
  .qr-stage { min-height: 0; }
  .qr-holder { max-width: 190px; }
  .site-nav { display: none; }
  .deco--hero .blob-a { width: 60vw; top: -8%; right: -22%; }
  .deco--hero .blob-b { width: 55vw; bottom: -10%; left: -26%; }
}

/* =============================================================
   10. Reduced-motion — sólo lo intrusivo (blobs ambientales,
       entradas del toast/modal). Los hovers NUNCA se desactivan.
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .deco svg { animation: none !important; }
  .ad-toast, .ad-modal, .warn-item { animation: none; }
}
