/* Vizion Render Upgrade — hoja UNICA del widget.
 *
 * POR QUE EXISTE: hasta el 2026-09-07 este CSS estaba escrito DOS veces, una en
 * index.html y otra en render-upgrade.html. Un arreglo hecho en una no llegaba a
 * la otra; ya habia pasado con el comparador del upscaler, que se quedo sin la
 * manija para arrastrar porque le faltaban reglas.
 *
 * POR QUE EL MISMO CSS ESTA DOS VECES ACA ADENTRO:
 * el home envuelve todo en #vizion-app y tiene reglas globales que le ganan a un
 * selector de una sola clase; la landing y el canvas NO tienen ese contenedor.
 * Se emite el bloque tal cual (gana en el home por especificidad) y de nuevo sin
 * el prefijo (unica forma que aplica fuera del home).
 *
 * ⚠️ NO transformar selectores con una expresion regular. Se intento y se
 * perdieron 14 reglas: las que estaban dentro de @media y la primera de cada
 * bloque no matcheaban, y el resultado quedaba mal formado. Duplicar el texto
 * entero es feo y es correcto.
 */
/* ── 1. tal cual vive en el home (con #vizion-app) ─────────────────────── */
/* ── RENDER UPGRADE section ── */
      #vizion-app .vzn-ru {
        padding: 9rem 0 0; border-top: 1px solid var(--border);
        overflow: hidden; background: var(--bg);
      }
      #vizion-app .vzn-ru-header {
        max-width: 1300px; margin: 0 auto 4.5rem;
        padding: 0 3rem;
      }
      #vizion-app .vzn-ru-header .vzn-eyebrow { margin-bottom: .6rem; }
      #vizion-app .vzn-ru-tagline {
        font-size: .9rem; color: var(--muted); max-width: 520px;
        line-height: 1.8; margin-top: 1rem;
      }

      /* ── Comparison slider (full-bleed) ── */
      #vizion-app .vzn-ru-compare {
        position: relative;
        width: 100vw; margin-left: calc(50% - 50vw);
        height: clamp(380px, 58vw, 760px);
        overflow: hidden; cursor: col-resize;
        user-select: none; touch-action: none;
      }
      /* Two-comparator grid */
      #vizion-app .vzn-ru-duo {
        display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem;
        max-width: 1280px; margin: 0 auto; padding: 0 4rem;
      }
      #vizion-app .vzn-ru-duo .vzn-ru-compare {
        width: 100%; margin-left: 0;
        height: auto; aspect-ratio: 4 / 3;
        border-radius: 16px;
        box-shadow: inset 0 1px 1px rgba(255,255,255,0.08);
      }
      #vizion-app .vzn-ru-duo .vzn-ru-compare::after {
        content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px;
        background: linear-gradient(180deg, rgba(255,255,255,0.32), rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%, rgba(255,255,255,0.32));
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; z-index: 5;
      }
      @media (max-width: 860px) {
        #vizion-app .vzn-ru-duo { grid-template-columns: 1fr; gap: 1.4rem; padding: 0 1.5rem; }
      }
      /* AFTER image — base layer (always full) */
      #vizion-app .vzn-ru-after,
      #vizion-app .vzn-ru-before {
        position: absolute; inset: 0;
        width: 100%; height: 100%;
        object-fit: cover; object-position: center;
        pointer-events: none;
      }
      /* BEFORE image — clipped via clip-path (most reliable cross-browser) */
      #vizion-app .vzn-ru-before {
        z-index: 2;
        clip-path: inset(0 50% 0 0); /* updated by JS */
        will-change: clip-path;
      }
      /* Divider line + handle */
      #vizion-app .vzn-ru-divider {
        position: absolute; top: 0; bottom: 0;
        left: 50%; /* updated by JS */
        width: 2px; background: rgba(255,255,255,0.9);
        transform: translateX(-50%);
        pointer-events: none; z-index: 4;
        box-shadow: 0 0 12px rgba(0,0,0,0.5);
      }
      #vizion-app .vzn-ru-handle {
        position: absolute; top: 50%; left: 50%;
        width: 30px; height: 30px;
        background: rgba(255,255,255,0.15);
        -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
        border: 1px solid rgba(255,255,255,0.45);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        display: flex; align-items: center; justify-content: center;
        box-shadow: 0 2px 10px rgba(0,0,0,0.25);
        z-index: 5; pointer-events: none;
      }
      #vizion-app .vzn-ru-handle svg {
        width: 15px; height: 15px; color: #fff;
      }
      /* Labels Before / After */
      #vizion-app .vzn-ru-label {
        position: absolute; top: 1.4rem;
        font-family: var(--sans); font-size: .65rem;
        letter-spacing: .14em; text-transform: uppercase;
        padding: .3rem .85rem;
        backdrop-filter: blur(8px);
        z-index: 6; pointer-events: none;
      }
      #vizion-app .vzn-ru-label-before {
        left: 1.4rem;
        background: rgba(0,0,0,.65); color: var(--muted);
        border: 1px solid rgba(255,255,255,.1);
      }
      #vizion-app .vzn-ru-label-after {
        right: 1.4rem;
        background: rgba(201,169,110,.15); color: var(--gold);
        border: 1px solid rgba(201,169,110,.3);
      }
      /* Hint text that fades after first drag */
      #vizion-app .vzn-ru-hint {
        position: absolute; bottom: 1.6rem; left: 50%;
        transform: translateX(-50%);
        font-family: var(--sans); font-size: .72rem;
        color: rgba(255,255,255,.55); letter-spacing: .1em;
        pointer-events: none; z-index: 6;
        transition: opacity .5s ease;
        white-space: nowrap;
      }
      #vizion-app .vzn-ru-compare.dragging .vzn-ru-hint,
      #vizion-app .vzn-ru-compare.dragged  .vzn-ru-hint { opacity: 0; }

      /* ── Upload zone ── */
      #vizion-app .vzn-ru-upload-section {
        max-width: 1400px; margin: 0 auto;
        padding: 6rem 3rem 10rem;
        text-align: center;
      }
      #vizion-app .vzn-ru-upload-title {
        font-family: var(--serif); font-size: 2.3rem; font-weight: 300;
        line-height: 1.15; margin-bottom: .9rem;
      }
      #vizion-app .vzn-ru-upload-title em { font-style: italic; color: var(--gold); }
      #vizion-app .vzn-ru-upload-sub {
        font-size: .95rem; color: var(--muted); line-height: 1.8;
        margin-bottom: 3rem; max-width: 600px; margin-left: auto; margin-right: auto;
      }
      #vizion-app .vzn-ru-zone {
        display: flex; flex-direction: column;
        align-items: center; justify-content: center;
        width: 100%;
        min-height: 480px;
        border: 1.5px dashed var(--dim-line);
        padding: 5rem 2rem; cursor: pointer;
        transition: border-color .3s, background .3s, transform .4s;
        position: relative; overflow: hidden;
        background: linear-gradient(180deg, var(--surface) 0%, var(--lift) 100%);
        text-align: center;
      }
      #vizion-app .vzn-ru-zone:hover,
      #vizion-app .vzn-ru-zone.drag-over {
        border-color: var(--gold);
        background: linear-gradient(180deg, rgba(201,169,110,.04) 0%, rgba(201,169,110,.07) 100%);
      }
      #vizion-app .vzn-ru-zone input { display: none; }
      #vizion-app .vzn-ru-zone-icon {
        font-size: 3.2rem; margin-bottom: 1.4rem; opacity: .4;
        color: var(--gold);
      }
      #vizion-app .vzn-ru-zone-text {
        font-family: var(--serif); font-size: 1.55rem; font-weight: 300;
        color: var(--fg); margin-bottom: .55rem;
      }
      #vizion-app .vzn-ru-zone-sub {
        font-size: .78rem; color: var(--dim); letter-spacing: .12em;
        text-transform: uppercase;
      }
      /* Preview state */
      #vizion-app .vzn-ru-zone.has-image {
        border-style: solid; border-color: var(--border);
        padding: 0; min-height: 0;
        background: #0a0907;
      }
      #vizion-app .vzn-ru-zone-preview {
        display: none; width: 100%;
        max-height: 78vh;
        object-fit: contain; background: #0a0907;
      }
      #vizion-app .vzn-ru-zone.has-image .vzn-ru-zone-preview { display: block; }
      #vizion-app .vzn-ru-zone.has-image .vzn-ru-zone-icon,
      #vizion-app .vzn-ru-zone.has-image .vzn-ru-zone-text,
      #vizion-app .vzn-ru-zone.has-image .vzn-ru-zone-sub { display: none; }
      /* CTA below upload */
      #vizion-app .vzn-ru-cta-row {
        margin-top: 2rem; display: flex;
        gap: 1rem; justify-content: center; align-items: center;
        flex-wrap: wrap;
      }
      #vizion-app .vzn-ru-cta-primary {
        background: var(--gold); color: var(--bg);
        border: none; padding: .85rem 2.4rem;
        font-family: var(--sans); font-size: .8rem;
        font-weight: 500; letter-spacing: .12em;
        text-transform: uppercase; cursor: pointer;
        transition: background .25s, transform .2s;
      }
      #vizion-app .vzn-ru-cta-primary:hover {
        background: var(--gold-lt); transform: translateY(-2px);
      }
      #vizion-app .vzn-ru-cta-sub {
        font-size: .75rem; color: var(--dim); letter-spacing: .05em;
      }
      @media (max-width: 768px) {
        #vizion-app .vzn-ru-compare { height: 54vw; min-height: 240px; }
        #vizion-app .vzn-ru-upload-section { padding: 4rem 1.5rem 6rem; }
      }

/* ── 2. la misma hoja para paginas sin el contenedor #vizion-app ───────── */
/* ── RENDER UPGRADE section ── */
      .vzn-ru {
        padding: 9rem 0 0; border-top: 1px solid var(--border);
        overflow: hidden; background: var(--bg);
      }
      .vzn-ru-header {
        max-width: 1300px; margin: 0 auto 4.5rem;
        padding: 0 3rem;
      }
      .vzn-ru-header .vzn-eyebrow { margin-bottom: .6rem; }
      .vzn-ru-tagline {
        font-size: .9rem; color: var(--muted); max-width: 520px;
        line-height: 1.8; margin-top: 1rem;
      }

      /* ── Comparison slider (full-bleed) ── */
      .vzn-ru-compare {
        position: relative;
        width: 100vw; margin-left: calc(50% - 50vw);
        height: clamp(380px, 58vw, 760px);
        overflow: hidden; cursor: col-resize;
        user-select: none; touch-action: none;
      }
      /* Two-comparator grid */
      .vzn-ru-duo {
        display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem;
        max-width: 1280px; margin: 0 auto; padding: 0 4rem;
      }
      .vzn-ru-duo .vzn-ru-compare {
        width: 100%; margin-left: 0;
        height: auto; aspect-ratio: 4 / 3;
        border-radius: 16px;
        box-shadow: inset 0 1px 1px rgba(255,255,255,0.08);
      }
      .vzn-ru-duo .vzn-ru-compare::after {
        content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px;
        background: linear-gradient(180deg, rgba(255,255,255,0.32), rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%, rgba(255,255,255,0.32));
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; z-index: 5;
      }
      @media (max-width: 860px) {
        .vzn-ru-duo { grid-template-columns: 1fr; gap: 1.4rem; padding: 0 1.5rem; }
      }
      /* AFTER image — base layer (always full) */
      .vzn-ru-after,
      .vzn-ru-before {
        position: absolute; inset: 0;
        width: 100%; height: 100%;
        object-fit: cover; object-position: center;
        pointer-events: none;
      }
      /* BEFORE image — clipped via clip-path (most reliable cross-browser) */
      .vzn-ru-before {
        z-index: 2;
        clip-path: inset(0 50% 0 0); /* updated by JS */
        will-change: clip-path;
      }
      /* Divider line + handle */
      .vzn-ru-divider {
        position: absolute; top: 0; bottom: 0;
        left: 50%; /* updated by JS */
        width: 2px; background: rgba(255,255,255,0.9);
        transform: translateX(-50%);
        pointer-events: none; z-index: 4;
        box-shadow: 0 0 12px rgba(0,0,0,0.5);
      }
      .vzn-ru-handle {
        position: absolute; top: 50%; left: 50%;
        width: 30px; height: 30px;
        background: rgba(255,255,255,0.15);
        -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
        border: 1px solid rgba(255,255,255,0.45);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        display: flex; align-items: center; justify-content: center;
        box-shadow: 0 2px 10px rgba(0,0,0,0.25);
        z-index: 5; pointer-events: none;
      }
      .vzn-ru-handle svg {
        width: 15px; height: 15px; color: #fff;
      }
      /* Labels Before / After */
      .vzn-ru-label {
        position: absolute; top: 1.4rem;
        font-family: var(--sans); font-size: .65rem;
        letter-spacing: .14em; text-transform: uppercase;
        padding: .3rem .85rem;
        backdrop-filter: blur(8px);
        z-index: 6; pointer-events: none;
      }
      .vzn-ru-label-before {
        left: 1.4rem;
        background: rgba(0,0,0,.65); color: var(--muted);
        border: 1px solid rgba(255,255,255,.1);
      }
      .vzn-ru-label-after {
        right: 1.4rem;
        background: rgba(201,169,110,.15); color: var(--gold);
        border: 1px solid rgba(201,169,110,.3);
      }
      /* Hint text that fades after first drag */
      .vzn-ru-hint {
        position: absolute; bottom: 1.6rem; left: 50%;
        transform: translateX(-50%);
        font-family: var(--sans); font-size: .72rem;
        color: rgba(255,255,255,.55); letter-spacing: .1em;
        pointer-events: none; z-index: 6;
        transition: opacity .5s ease;
        white-space: nowrap;
      }
      .vzn-ru-compare.dragging .vzn-ru-hint,
      .vzn-ru-compare.dragged  .vzn-ru-hint { opacity: 0; }

      /* ── Upload zone ── */
      .vzn-ru-upload-section {
        max-width: 1400px; margin: 0 auto;
        padding: 6rem 3rem 10rem;
        text-align: center;
      }
      .vzn-ru-upload-title {
        font-family: var(--serif); font-size: 2.3rem; font-weight: 300;
        line-height: 1.15; margin-bottom: .9rem;
      }
      .vzn-ru-upload-title em { font-style: italic; color: var(--gold); }
      .vzn-ru-upload-sub {
        font-size: .95rem; color: var(--muted); line-height: 1.8;
        margin-bottom: 3rem; max-width: 600px; margin-left: auto; margin-right: auto;
      }
      .vzn-ru-zone {
        display: flex; flex-direction: column;
        align-items: center; justify-content: center;
        width: 100%;
        min-height: 480px;
        border: 1.5px dashed var(--dim-line);
        padding: 5rem 2rem; cursor: pointer;
        transition: border-color .3s, background .3s, transform .4s;
        position: relative; overflow: hidden;
        background: linear-gradient(180deg, var(--surface) 0%, var(--lift) 100%);
        text-align: center;
      }
      .vzn-ru-zone:hover,
      .vzn-ru-zone.drag-over {
        border-color: var(--gold);
        background: linear-gradient(180deg, rgba(201,169,110,.04) 0%, rgba(201,169,110,.07) 100%);
      }
      .vzn-ru-zone input { display: none; }
      .vzn-ru-zone-icon {
        font-size: 3.2rem; margin-bottom: 1.4rem; opacity: .4;
        color: var(--gold);
      }
      .vzn-ru-zone-text {
        font-family: var(--serif); font-size: 1.55rem; font-weight: 300;
        color: var(--fg); margin-bottom: .55rem;
      }
      .vzn-ru-zone-sub {
        font-size: .78rem; color: var(--dim); letter-spacing: .12em;
        text-transform: uppercase;
      }
      /* Preview state */
      .vzn-ru-zone.has-image {
        border-style: solid; border-color: var(--border);
        padding: 0; min-height: 0;
        background: #0a0907;
      }
      .vzn-ru-zone-preview {
        display: none; width: 100%;
        max-height: 78vh;
        object-fit: contain; background: #0a0907;
      }
      .vzn-ru-zone.has-image .vzn-ru-zone-preview { display: block; }
      .vzn-ru-zone.has-image .vzn-ru-zone-icon,
      .vzn-ru-zone.has-image .vzn-ru-zone-text,
      .vzn-ru-zone.has-image .vzn-ru-zone-sub { display: none; }
      /* CTA below upload */
      .vzn-ru-cta-row {
        margin-top: 2rem; display: flex;
        gap: 1rem; justify-content: center; align-items: center;
        flex-wrap: wrap;
      }
      .vzn-ru-cta-primary {
        background: var(--gold); color: var(--bg);
        border: none; padding: .85rem 2.4rem;
        font-family: var(--sans); font-size: .8rem;
        font-weight: 500; letter-spacing: .12em;
        text-transform: uppercase; cursor: pointer;
        transition: background .25s, transform .2s;
      }
      .vzn-ru-cta-primary:hover {
        background: var(--gold-lt); transform: translateY(-2px);
      }
      .vzn-ru-cta-sub {
        font-size: .75rem; color: var(--dim); letter-spacing: .05em;
      }
      @media (max-width: 768px) {
        .vzn-ru-compare { height: 54vw; min-height: 240px; }
        .vzn-ru-upload-section { padding: 4rem 1.5rem 6rem; }
      }

/* Puerta al canvas propio de la herramienta. El markup se pone solo donde
   corresponde: en el home y en la landing, nunca en el canvas mismo. */
#vizion-app .vzn-ru-canvas-link, .vzn-ru-canvas-link {
  text-align: center; margin: 1.4rem 0 0; font-size: .82rem;
}
#vizion-app .vzn-ru-canvas-link a, .vzn-ru-canvas-link a {
  color: var(--gold-lt); text-decoration: none;
  border-bottom: 1px solid rgba(202,130,98,.35); padding-bottom: 2px;
  transition: border-color .2s;
}
#vizion-app .vzn-ru-canvas-link a:hover, .vzn-ru-canvas-link a:hover {
  border-bottom-color: var(--gold-lt);
}
