/* ==========================================================================
   Secciones · Fase 1: cabecera, hero, funciones, importar biblioteca, generador de fondos, pie
   ========================================================================== */

/* ------------------------------------------------------------------ cabecera
   Réplica del comportamiento del menú de RW Titler (recursosworship.com/rw-titler-rw-vip/):
   barra fija que flota a 22 px; al pasar 40 px de scroll la «píldora» de fondo se EXPANDE desde el centro hasta
   cubrir toda la barra, la barra se estrecha (máx. 1080 px) y baja de altura, y el logo completo se contrae en una ficha.
   Mismas medidas, mismos tiempos (.7 s) y misma curva; sin sombras ni brillos. */
.site-header {
  --top: 22px; --top-scrolled: 14px;
  --bar-h: 68px; --bar-h-scrolled: 60px;
  --side: 32px; --bar-w-scrolled: 1180px;
  --radius: 18px;
  --dur: 0.7s; --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --bar-bg-scrolled: rgba(32, 33, 36, 0.88);
  --bar-border: rgba(38, 140, 255, 0.2);
  --menu-bg: rgba(0, 0, 0, 0.17);
  --nav-text: rgba(237, 243, 250, 0.72);
  --nav-icon: rgba(237, 243, 250, 0.72);
  --nav-hover-bg: rgba(38, 140, 255, 0.14);
  --nav-hover: #ffffff;
  position: relative;
  z-index: 9999;
  width: 100%;
  height: calc(var(--top) + var(--bar-h));
}
:root[data-theme="light"] .site-header {
  --bar-bg-scrolled: rgba(229, 231, 235, 0.88);
  --bar-border: rgba(22, 115, 224, 0.22);
  --menu-bg: rgba(10, 18, 32, 0.05);
  --nav-text: rgba(10, 18, 32, 0.72);
  --nav-icon: rgba(10, 18, 32, 0.72);
  --nav-hover-bg: rgba(22, 115, 224, 0.1);
  --nav-hover: #0a1220;
}
.site-header__bar {
  position: fixed; top: var(--top); left: 0; right: 0; z-index: 9999;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  width: calc(100% - var(--side) * 2); max-width: 1380px; height: var(--bar-h); margin-inline: auto; padding: 0;
  isolation: isolate;
  transition: top var(--dur) var(--ease), width var(--dur) var(--ease), height var(--dur) var(--ease), padding var(--dur) var(--ease);
}
.site-header.is-scrolled .site-header__bar {
  top: var(--top-scrolled); height: var(--bar-h-scrolled);
  width: min(var(--bar-w-scrolled), calc(100% - 32px)); padding: 0 8px 0 10px;
}
.site-header__bar::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; right: 50%; z-index: -1;
  border-radius: var(--radius); border: 1px solid transparent;
  background-color: transparent;
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  pointer-events: none;
  transition: left var(--dur) var(--ease), right var(--dur) var(--ease), background-color var(--dur) ease;
}
.site-header.is-scrolled .site-header__bar::before {
  left: 0;
  right: 0;
  border-color: var(--bar-border);
  background-color: var(--bar-bg-scrolled);
}

/* logo: completo → ficha compacta */
.brand { position: relative; display: flex; align-items: center; align-self: stretch; justify-self: start; min-width: 0; }
.brand__full { display: inline-flex; align-items: center; gap: 10px; font-size: 1.12rem; font-weight: 700; letter-spacing: -0.025em; white-space: nowrap; transform-origin: 0% 50%; transition: opacity 0.35s ease, transform var(--dur) var(--ease); }
.brand__full img { width: 30px; height: 30px; }
.brand::after {
  content: ""; position: absolute; top: 50%; left: 0; width: 40px; height: 40px; border-radius: 11px;
  background: url("../brand/rw-presenter.svg") center / 36px no-repeat; border: 0;
  opacity: 0; transform: translateY(-50%) scale(0.8); pointer-events: none;
  transition: opacity 0.45s ease, transform var(--dur) var(--ease);
}
.site-header.is-scrolled .brand__full { opacity: 0; transform: scale(0.9); }
.site-header.is-scrolled .brand::after { opacity: 1; transform: translateY(-50%) scale(1); }
.site-header.is-scrolled .brand__full { opacity: 1; transform: none; }
.site-header.is-scrolled .brand::after { opacity: 0; }

/* menú central */
.menu { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0 6px; border-radius: 30px; background: var(--menu-bg); height: 54px; }
.site-header.is-scrolled .menu { background: transparent; }
.menu a { display: flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 11px; cursor: pointer; transition: background-color 0.25s; }
.menu .ico { width: 15px; height: 15px; background-color: var(--nav-icon); transition: background-color 0.25s ease, transform 0.25s var(--ease); }
.menu span:last-child { font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap; color: var(--nav-text); transition: color 0.25s; }
.menu a:hover { background: var(--nav-hover-bg); }
.menu a:hover span:last-child { color: var(--nav-hover); }
.menu a:hover .ico { background-color: var(--nav-hover); transform: scale(1.08); }
.menu a[aria-current="true"] span:last-child { color: var(--nav-hover); }
.menu a[aria-current="true"] .ico { background-color: var(--nav-hover); }

/* acciones a la derecha */
.bar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text); transition: background-color 0.2s, border-color 0.2s; }
.icon-btn:hover { background: var(--hover); }
.icon-btn .ico { width: 20px; height: 20px; }
.theme-toggle .ico--moon { display: none; }
:root[data-theme="light"] .theme-toggle .ico--sun { display: none; }
:root[data-theme="light"] .theme-toggle .ico--moon { display: inline-block; }
.header-login { display: inline-flex; padding: 8px 14px; font-size: 0.92rem; font-weight: 500; color: var(--nav-text); border-radius: 999px; white-space: nowrap; transition: color 0.2s; }
.header-login:hover { color: var(--nav-hover); }
.btn--bar { height: 48px; padding: 0 22px 0 18px; font-size: 0.95rem; }
.btn--bar .ico { width: 18px; height: 18px; color: var(--accent-ink); }

@media (max-width: 1100px) { .header-login { display: none; } }
@media (max-width: 1024px) {
  .site-header { --top: 14px; --top-scrolled: 10px; --bar-h: 62px; --bar-h-scrolled: 58px; --side: 16px; --radius: 16px; }
  .site-header.is-scrolled .site-header__bar { width: calc(100% - 24px); padding: 0 7px 0 9px; }
  .brand { width: auto; min-width: max-content; }
  .brand__full { display: inline-flex; gap: 6px; font-size: 0.9rem; }
  .brand__full img { width: 24px; height: 24px; }
  .brand::after { opacity: 0; }
  .site-header.is-scrolled .brand__full { opacity: 1; transform: none; }
  .site-header.is-scrolled .brand::after { opacity: 0; }
  .menu { padding: 0 4px; }
  .menu a { padding: 8px 9px; }
  .menu span:last-child { font-size: 13px; }
  .menu .ico { display: none; }
}
@media (max-width: 767px) {
  .site-header { --top: 10px; --top-scrolled: 8px; --bar-h: 54px; --bar-h-scrolled: 54px; --side: 12px; --radius: 14px; }
  .site-header__bar { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 8px; }
  .site-header.is-scrolled .site-header__bar { width: calc(100% - 16px); padding: 0 4px 0 7px; }
  .brand { width: auto; min-width: max-content; }
  .brand__full { display: inline-flex; gap: 6px; font-size: 0.82rem; }
  .brand__full img { width: 24px; height: 24px; }
  .brand::after { opacity: 0; }
  .site-header.is-scrolled .brand__full { opacity: 1; transform: none; }
  .site-header.is-scrolled .brand::after { opacity: 0; }
  .menu { justify-self: center; max-width: 100%; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; height: 46px; }
  .menu::-webkit-scrollbar { display: none; }
  .menu a { padding: 8px 7px; }
  .menu span:last-child { font-size: 12.5px; }
  .btn--bar, .header-login { display: none; }
  .icon-btn { width: 40px; height: 40px; }
}

/* ------------------------------------------------------------------ hero (a sangre; la captura CRECE al hacer scroll, como en RW Titler) */
.hero { padding-top: clamp(28px, 5vw, 64px); overflow: clip; background: linear-gradient(180deg, #000 0%, #000 28%, var(--bg) 58%, var(--bg) 100%); }
:root[data-theme="light"] .hero { background: transparent; }
.hero__copy { display: grid; justify-items: center; gap: 26px; text-align: center; padding-inline: var(--gutter); }
.hero h1 { font-size: 81px; max-width: 16ch; }
@media (max-width: 767px) { .hero h1 { font-size: clamp(2.6rem, 8vw, 6.4rem); } }
.hero h1 em {
  font-style: normal;
  color: transparent;
  background-image: linear-gradient(90deg, #295BFF 0%, #65DAFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.hero .lede { max-width: 660px; }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 4px; }
.hero__note { font-size: 0.875rem; color: var(--text-3); }
.hero__stage { position: relative; padding: clamp(40px, 6vw, 72px) 0 0; perspective: 1800px; }
.hero__stage::before {
  content: ""; position: absolute; z-index: 0; top: -470px; left: 50%; width: min(2000px, 125vw);
  aspect-ratio: 2000 / 1411; transform: translateX(-50%); pointer-events: none; filter: blur(18px); opacity: 0.92;
  background:
    radial-gradient(ellipse 43% 43% at 12% 72%, rgba(0, 72, 255, 0.94) 0%, rgba(0, 103, 255, 0.8) 44%, rgba(73, 160, 255, 0.42) 68%, transparent 100%),
    radial-gradient(ellipse 43% 43% at 88% 72%, rgba(0, 72, 255, 0.94) 0%, rgba(0, 103, 255, 0.8) 44%, rgba(73, 160, 255, 0.42) 68%, transparent 100%);
}
.hero__shot { --shot-w: min(64vw, 1040px); position: relative; z-index: 1; width: var(--shot-w); margin-inline: auto; transform-origin: 50% 0; border-radius: 26px; }
.hero__shot .win__body img { aspect-ratio: 8 / 5; }
@media (max-width: 760px) { .hero__shot { --shot-w: calc(100vw - 2 * var(--gutter)); border-radius: 14px; } }
@media (max-width: 760px) { .hero__stage::before { top: -115px; width: 160vw; } }

.proof { margin-top: clamp(56px, 8vw, 104px); border-block: 1px solid var(--line); }
.proof__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.proof__item { display: grid; gap: 8px; align-content: start; padding: 34px var(--gutter) 38px; }
.proof__item + .proof__item { border-left: 1px solid var(--line); }
.proof__item .ico { width: 28px; height: 28px; color: var(--text); margin-bottom: 8px; }
.proof__item h3 { font-size: 1.08rem; font-weight: 600; letter-spacing: -0.015em; }
.proof__item p { font-size: 0.95rem; color: var(--text-2); max-width: 34ch; }
@media (max-width: 820px) {
  .proof__grid { grid-template-columns: 1fr; }
  .proof__item + .proof__item { border-left: 0; border-top: 1px solid var(--line); }
}

/* ------------------------------------------------------------------ funciones */
.features { border-top: 0; padding-bottom: 0; }
.features__head { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px 64px; align-items: end; }
.features__head .h2 { margin-top: 18px; }
.features__head p { color: var(--text-2); max-width: 36ch; justify-self: end; }
@media (max-width: 820px) { .features__head { grid-template-columns: 1fr; } .features__head p { justify-self: start; } }

.feature { padding-block: clamp(56px, 8vw, 112px); border-top: 1px solid var(--line); }
.features__head + .feature, .features__intro + .feature { margin-top: clamp(48px, 7vw, 88px); }
.features__intro { padding-bottom: 0; }
.feature__grid { display: grid; gap: clamp(28px, 4.5vw, 72px); align-items: center; }
.feature__grid--5-7 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.feature__grid--7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature__grid--7-5 .feature__copy { order: 2; }
.feature__copy { display: grid; gap: 18px; justify-items: start; align-content: center; }
.feature__copy .lede { font-size: 1.04rem; }
.feature__icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text); background: var(--surface); }
.feature__icon .ico { width: 24px; height: 24px; }
.feature__top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.points { display: grid; gap: 12px; margin-top: 4px; }
.points li { position: relative; padding-left: 28px; font-size: 0.97rem; color: var(--text-2); }
.points li::before {
  content: ""; position: absolute; left: 0; top: 0.16em; width: 19.8px; height: 19.8px;
  background: url("../icons/local-media/check.svg") center / contain no-repeat;
}
.points strong { color: var(--text); font-weight: 600; }
@media (max-width: 980px) {
  .feature__grid--5-7, .feature__grid--7-5 { grid-template-columns: 1fr; }
  .feature__grid--7-5 .feature__copy { order: 0; }
  .win--bleed-r, .win--bleed-l { margin-inline: 0; border-radius: var(--r-m); }
}
.feature__headrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px clamp(32px, 6vw, 96px); align-items: start; margin-bottom: clamp(32px, 4vw, 56px); }
#temas .feature__headrow, #herramientas .feature__headrow { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
#temas .feature__headrow > .feature__copy, #herramientas .feature__headrow > .feature__copy { justify-items: center; }
#temas .feature__headrow > .feature__copy:last-child, #herramientas .feature__headrow > .feature__copy:last-child { max-width: 500px; }
@media (max-width: 820px) { .feature__headrow { grid-template-columns: 1fr; } }

/* tarjetas (bento) */
.bento { display: grid; gap: 16px; }
.bento--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .bento--2 { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; gap: 22px; padding: clamp(22px, 2.6vw, 34px); border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); overflow: hidden; }
.section--band .card { background: var(--bg); }
.card__copy { display: grid; gap: 10px; justify-items: start; }
.card__copy h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; }
.card__copy p { font-size: 0.97rem; color: var(--text-2); max-width: 52ch; }
.card .win { margin-top: auto; }

/* fila de salidas a sangre de pantalla */
.outputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-inline: 12px; margin-top: clamp(40px, 5vw, 72px); }
.outputs figure { position: relative; border: 1px solid var(--line-strong); border-radius: var(--r-m); overflow: hidden; background: #000; }
.outputs img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.outputs figcaption { position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(9, 14, 22, 0.8); color: #edf3fa; font-size: 0.75rem; font-weight: 600; }
@media (max-width: 720px) { .outputs { grid-template-columns: 1fr; } }

.tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 1176px; margin: 42px auto 0; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); overflow: hidden; }
.tool { display: grid; gap: 6px; align-content: start; justify-items: center; padding: 26px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; transition: background-color 0.25s var(--ease); }
.tool:hover { background: var(--hover); }
.tool:nth-child(4n) { border-right: 0; }
.tool:nth-last-child(-n + 4) { border-bottom: 0; }
.tool .ico { width: 24px; height: 24px; color: var(--text); margin-bottom: 10px; }
.tool h4 { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.98rem; font-weight: 600; letter-spacing: -0.01em; }
.tool p { font-size: 0.87rem; color: var(--text-3); line-height: 1.45; text-align: center; }
@media (max-width: 980px) { .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tool:nth-child(4n) { border-right: 1px solid var(--line); } .tool:nth-child(2n) { border-right: 0; } .tool:nth-last-child(-n + 4) { border-bottom: 1px solid var(--line); } .tool:nth-last-child(-n + 2) { border-bottom: 0; } }
@media (max-width: 520px) { .tools { grid-template-columns: 1fr; } .tool, .tool:nth-child(n) { border-right: 0; border-bottom: 1px solid var(--line); } .tool:last-child { border-bottom: 0; } }

/* ------------------------------------------------------------------ importar biblioteca */
.import .h2 { max-width: 16ch; }
.apps { display: grid; gap: 16px; margin-top: clamp(40px, 6vw, 64px); overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 49%, #000 51%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0%, #000 49%, #000 51%, transparent 100%); }
.apps.bleed.reveal { max-width: 933px; margin: auto; margin-top: clamp(40px, 6vw, 64px); }
.marquee { display: flex; width: max-content; gap: 16px; padding-right: 16px; animation: marquee 46s linear infinite; }
.marquee--rev { animation-direction: reverse; animation-duration: 52s; }
.apps:hover .marquee, .apps:focus-within .marquee { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.app-tile { display: grid; place-items: center; width: 112px; height: 112px; border: 1px solid var(--line); border-radius: 26px; background: var(--surface); transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease), transform 0.35s var(--ease); }
.app-tile img { width: 62px; height: 62px; object-fit: contain; border-radius: 15px; }
.app-tile:hover { border-color: var(--line-strong); background: var(--hover); transform: translateY(-3px); }
.app-tile[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-tint); }

.app-detail { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: center; margin-top: clamp(36px, 5vw, 56px); padding: clamp(22px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
.app-detail__logo { width: 84px; height: 84px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; }
.app-detail__logo img { width: 56px; height: 56px; object-fit: contain; border-radius: 13px; }
.app-detail__body { display: grid; gap: 8px; min-width: 0; }
.app-detail__name { font-size: 1.4rem; font-weight: 600; letter-spacing: -0.025em; }
.app-detail__help { color: var(--text-2); font-size: 0.98rem; max-width: 62ch; }
.app-detail__ext { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.app-detail__step { display: grid; justify-items: end; gap: 6px; text-align: right; font-size: 0.82rem; color: var(--text-3); }
.app-detail__step b { color: var(--text); font-weight: 600; font-size: 0.95rem; }
@media (max-width: 760px) {
  .app-detail { grid-template-columns: auto minmax(0, 1fr); }
  .app-detail__step { grid-column: 1 / -1; justify-items: start; text-align: left; }
}
.import__shot { margin-top: clamp(40px, 6vw, 72px); }
.import__also { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 28px auto 0; max-width: 860px; }
.import__also-title { width: 100%; text-align: center; font-size: 0.875rem; color: var(--text-3); margin-bottom: 4px; }

/* ------------------------------------------------------------------ generador de fondos */
.gen-wrap { padding-top: clamp(36px, 5vw, 56px); }
.gen-win .win__body { background: var(--a-bg); }
.app-ui {
  --a-bg: #090e16; --a-card: #101824; --a-field: #131d2b; --a-hover: #172335; --a-line: #202c3b; --a-line2: #34475f;
  --a-text: #edf3fa; --a-text2: #b9c7d7; --a-muted: #8191a5; --a-accent: #268cff; --a-accent-light: #79d7f7;
  color: var(--a-text);
}
.gen { display: grid; grid-template-columns: minmax(0, 1fr); }
.gen__view { order: -1; }
/* los controles van en una franja bajo la vista previa (la vista previa manda: grande y a todo el ancho) */
.gen__panel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; border-top: 1px solid var(--a-line); background: var(--a-bg); }
.gen__section { display: grid; gap: 14px; padding: 20px 22px 24px; border-right: 1px solid var(--a-line); align-content: start; }
.gen__section:last-child { border-right: 0; }
.gen__title { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--a-text); }
.gen__opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gen__opt { display: grid; gap: 6px; padding: 5px 5px 7px; border: 1px solid var(--a-line); border-radius: 9px; background: var(--a-card); text-align: center; font-size: 0.74rem; font-weight: 600; color: var(--a-text2); transition: border-color 0.2s, background-color 0.2s, color 0.2s; }
.gen__opt img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 6px; }
.gen__opt:hover { border-color: var(--a-line2); }
.gen__opt[aria-checked="true"] { border-color: var(--a-accent); color: var(--a-text); background: rgba(38, 140, 255, 0.1); }
.gen__swatches { display: flex; align-items: center; gap: 8px; }
.gen__swatch { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.22); transition: background-color 0.25s; }
.gen__swatches small { margin-left: auto; font-size: 0.72rem; color: var(--a-muted); }
.ctl { display: grid; gap: 4px; }
.ctl__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.82rem; color: var(--a-text2); }
.ctl__row output { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--a-text); }
.ctl input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; background: transparent; cursor: pointer; }
.ctl input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--a-accent) var(--p, 50%), var(--a-line2) var(--p, 50%)); }
.ctl input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--a-line2); }
.ctl input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--a-accent); }
.ctl input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: #fff; border: 0; }
.ctl input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 0; }
.ctl input[type="range"]:focus-visible { outline: 2px solid var(--a-accent); outline-offset: 2px; border-radius: 4px; }
.gen__toggles { display: grid; gap: 12px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.86rem; color: var(--a-text2); }
.switch { position: relative; width: 38px; height: 22px; flex: 0 0 auto; border-radius: 999px; background: var(--a-line2); transition: background-color 0.2s; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.25s var(--ease); }
.switch[aria-checked="true"] { background: var(--a-accent); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }
.seg { display: grid; grid-template-columns: repeat(2, 1fr); padding: 3px; border: 1px solid var(--a-line); border-radius: 9px; background: var(--a-card); }
.seg button { height: 28px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; color: var(--a-muted); transition: background-color 0.2s, color 0.2s; }
.seg button[aria-pressed="true"] { background: var(--a-hover); color: var(--a-text); }
.gen__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gen__btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; border: 1px solid var(--a-line2); border-radius: 8px; font-size: 0.82rem; font-weight: 600; color: var(--a-text); background: var(--a-field); transition: background-color 0.2s; }
.gen__btn:hover { background: var(--a-hover); }
.gen__btn .ico { width: 16px; height: 16px; color: var(--a-text); }

.gen__view { display: grid; background: var(--a-bg); min-width: 0; }
.stage { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: min(80vh, 780px); overflow: hidden; background: #000; container-type: inline-size; isolation: isolate; }
.stage__media { position: absolute; inset: 0; filter: hue-rotate(var(--hue, 0deg)) saturate(var(--sat, 1)) brightness(var(--bri, 1)) blur(var(--blur, 0px)); transform: scale(var(--zoom, 1)); }
.stage__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.7s var(--ease); }
.stage__media video.is-active { opacity: 1; }
.stage__grain { position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: overlay; opacity: var(--grain, 0); background-size: 220px 220px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.6 -.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.stage__text { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 8%; text-align: center; font-family: "Montserrat Demo", var(--font); font-weight: 700; font-size: 4.6cqw; line-height: 1.2; color: #fff; transition: opacity 0.35s var(--ease), color 0.35s var(--ease); }
.stage__text[data-tone="dark"] { color: #0a1220; }
.stage__text[hidden] { display: grid; opacity: 0; }
.gen__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--a-line); font-size: 0.8rem; color: var(--a-muted); }
.gen__bar b { color: var(--a-text); font-weight: 600; }
.gen__note { margin: 20px auto 0; max-width: 760px; text-align: center; font-size: 0.875rem; color: var(--text-3); }
@media (max-width: 1100px) {
  .gen__panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gen__section:nth-child(2) { border-right: 0; }
  .gen__section:nth-child(-n + 2) { border-bottom: 1px solid var(--a-line); }
}
@media (max-width: 640px) {
  .gen__panel { grid-template-columns: 1fr; }
  .gen__section { border-right: 0; border-bottom: 1px solid var(--a-line); }
  .gen__section:last-child { border-bottom: 0; }
}

/* ------------------------------------------------------------------ pie */
.site-footer { border-top: 1px solid var(--line); padding-block: 40px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer p { font-size: 0.875rem; color: var(--text-3); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 0.9rem; color: var(--text-2); }
.site-footer nav a:hover { color: var(--text); }

/* bandas a sangre (cambian el tono del fondo para dar ritmo, sin gradientes) */
.feature--band { background: var(--surface); border-bottom: 1px solid var(--line); }

/* ajustes de «proof» (franja bajo el hero) */
section.proof { max-width: 1207px; margin: auto; margin-top: 55px; }
.proof__item .ico { width: 50px; height: 50px; margin: auto; margin-bottom: 17px; }
.proof__item h3 { text-align: center; }
.proof__item p { text-align: center; margin-inline: auto; }

.card.reveal { background: transparent; }
.tool .ico { width: 50px; height: 50px; margin-bottom: 17px; }

/* ------------------------------------------------------------------ plantillas (slider a sangre) */
.templates { overflow: clip; }
.tpl-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 28px; margin-top: 6px; }
.tpl-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.tpl-link .arrow { width: 1.1em; height: 1.1em; transition: transform 0.3s var(--ease); }
.tpl-link:hover .arrow { transform: translateX(4px); }
.tpl-slider { display: grid; gap: 16px; margin-top: clamp(40px, 6vw, 72px); overflow: hidden; }
.tpl-track { display: flex; gap: 16px; width: max-content; padding-right: 16px; }
.tpl-card { flex: 0 0 auto; width: clamp(300px, 32vw, 520px); aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.tpl-card img { width: 100%; height: 100%; object-fit: cover; }
.tpl-slider.is-running .tpl-track--right { animation: tpl-scroll 110s linear infinite reverse; }
.tpl-slider.is-running .tpl-track--left { animation: tpl-scroll 110s linear infinite; }
.tpl-slider.is-running:hover .tpl-track, .tpl-slider.is-running:focus-within .tpl-track { animation-play-state: paused; }
@keyframes tpl-scroll { to { transform: translateX(calc(-50% - 8px)); } }
.tpl-slider.is-static { overflow-x: auto; scrollbar-width: thin; }

/* ------------------------------------------------------------------ selector de idioma (plano, sin sombra) */
.lang { position: relative; }
.lang__btn { width: auto; min-width: 44px; padding: 0 12px; }
.lang__code { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; }
.lang__menu { position: absolute; top: calc(100% + 10px); right: 0; z-index: 10; min-width: 168px; padding: 6px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--popup); }
.lang__menu[hidden] { display: none; }
.lang__menu a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 9px; font-size: 0.92rem; font-weight: 500; color: var(--text-2); transition: background-color 0.2s, color 0.2s; }
.lang__menu a:hover { background: var(--hover); color: var(--text); }
.lang__menu a[aria-current="true"] { color: var(--text); background: var(--accent-tint); }
@media (max-width: 767px) { .lang__btn { min-width: 40px; padding: 0 8px; } }

/* ------------------------------------------------------------------ preguntas frecuentes (estilo Agentlyy, plano: sin sombras) */
.faq__list { display: grid; gap: 20px; margin: clamp(40px, 6vw, 64px) auto 0; max-width: 800px; }
.faq__item { border: 1px solid var(--line); border-radius: 24px; background: var(--surface); transition: border-color 0.4s var(--ease), background-color 0.4s var(--ease); }
.faq__item:hover, .faq__item.is-open { border-color: var(--line-strong); }
.faq__q { margin: 0; font: inherit; }
.faq__btn { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; padding: 18px 20px 18px 26px; text-align: left; font-size: clamp(1.05rem, 2.2vw, 1.25rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.35; color: var(--text); border-radius: 24px; }
.faq__icon {
  position: relative; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%;
  --btn-c: var(--accent); --btn-p: 50%;
  background-image: linear-gradient(1deg, var(--btn-c) 0%, var(--accent) var(--btn-p), var(--accent) 100%);
  transition: transform 0.5s var(--ease), --btn-c 0.55s var(--ease), --btn-p 0.55s var(--ease), filter 0.55s var(--ease);
}
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 2px; background: var(--accent-ink); }
.faq__icon::after { transform: rotate(90deg); }
.faq__btn:hover .faq__icon { --btn-c: var(--btn-glow); --btn-p: 38%; filter: saturate(1.2); }
.faq__item.is-open .faq__icon { transform: rotate(45deg); }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ease); }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a-inner { min-height: 0; overflow: hidden; }
.faq__a-inner p { margin: 0 26px; padding: 18px 0 26px; border-top: 1px solid var(--line); font-size: 1rem; line-height: 1.65; color: var(--text-2); max-width: 66ch; }
.faq__a-inner a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); transition: text-decoration-color 0.25s; }
.faq__a-inner a:hover { text-decoration-color: var(--accent); }
@media (max-width: 520px) { .faq__btn { padding: 16px 16px 16px 20px; gap: 14px; } .faq__a-inner p { margin: 0 20px; } }

/* ------------------------------------------------------------------ testimonios (carrusel con scroll-snap, plano) */
.testi__bar { display: flex; justify-content: flex-end; margin: clamp(28px, 4vw, 48px) 0 16px; }
.testi__nav { display: flex; gap: 10px; }
.testi__arrow { transition: background-color 0.25s, border-color 0.25s, opacity 0.25s; }
.testi__arrow:hover:not(:disabled) { background: var(--hover); border-color: var(--text-3); }
.testi__arrow:disabled { opacity: 0.35; cursor: default; }
.testi__viewport { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; border-radius: 24px; }
.testi__viewport::-webkit-scrollbar { display: none; }
.testi__viewport:focus-visible { outline-offset: 6px; }
.testi__track { display: flex; gap: 16px; }
.testi__card { flex: 0 0 calc((100% - 32px) / 3); scroll-snap-align: start; display: grid; grid-template-rows: auto 1fr auto; gap: 20px; padding: clamp(22px, 2.4vw, 30px); border: 1px solid var(--line); border-radius: 24px; background: var(--surface); transition: border-color 0.4s var(--ease); }
.testi__card:hover { border-color: var(--line-strong); }
.testi__stars { font-size: 0.95rem; letter-spacing: 3px; color: var(--text); }
.testi__copy { font-size: 1.02rem; line-height: 1.65; letter-spacing: -0.01em; color: var(--text); text-wrap: pretty; }
.testi__person { display: flex; align-items: center; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.testi__person > div { display: grid; gap: 2px; min-width: 0; }
.testi__avatar { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-strong); font-weight: 600; font-size: 1rem; color: var(--text); }
.testi__name { font-weight: 600; letter-spacing: -0.01em; }
.testi__role { font-size: 0.88rem; color: var(--text-3); }
.testi__dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.testi__dots button { width: 8px; height: 8px; padding: 0; border-radius: 999px; background: var(--line-strong); transition: width 0.4s var(--ease), background-color 0.3s; }
.testi__dots button[aria-current="true"] { width: 26px; background: var(--accent); }
.testi__proof { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
@media (max-width: 1000px) { .testi__card { flex-basis: calc((100% - 16px) / 2); } }
@media (max-width: 640px) { .testi__card { flex-basis: 86%; } .testi__bar { justify-content: center; } }

/* móvil: solo el icono de RW Presenter en la barra (sin las letras) */
@media (max-width: 767px) {
  .brand { width: 40px; min-width: 40px; }
  .brand__full { gap: 0; }
  .brand__full > span { display: none; }
  .brand__full img { width: 32px; height: 32px; }
}
/* etiquetas de prueba social: en pantallas estrechas pueden ocupar dos líneas sin romperse */
.testi__proof .chip { height: auto; min-height: 30px; padding: 6px 14px; line-height: 1.4; text-align: center; white-space: normal; border-radius: 18px; }
