/* Guías · infografías interactivas. Reutiliza los tokens de /styles.css (póster plano, tinta y campos de color). */

/* ——— Cabecera ——— */
.ghero { position: relative; background: var(--red); color: var(--white); overflow: hidden; padding: 120px var(--margin) clamp(40px, 6vw, 80px); }
.ghero .nav { color: var(--white); }
.ghero .nav a[aria-current="page"] { text-decoration: underline; }
.ghero-inner { position: relative; z-index: 2; max-width: 880px; }
.ghero h1 { font-size: clamp(7rem, 2rem + 22vw, 20rem); line-height: 0.82; letter-spacing: -0.03em; }
.ghero-lead { margin-top: 24px; font-size: var(--step-lead); line-height: 1.25; max-width: 30ch; }
.ghero-links { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.gchip { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 20px; background: var(--ink); color: var(--bg); font-family: var(--display); font-size: 1.5rem; letter-spacing: 0.02em; text-transform: uppercase; text-decoration: none; transition: background 150ms var(--ease), transform 150ms var(--ease); }
.gchip b { font-weight: 400; color: var(--mustard); }
.gchip:hover { background: #3d1c1a; transform: translateY(-2px); }
.ghero-pepo { position: absolute; z-index: 1; right: 3vw; bottom: -8%; width: clamp(220px, 34vw, 520px); transform: rotate(5deg); transform-origin: 50% 100%; pointer-events: none; }

/* ——— Guías ——— */
.guide { scroll-margin-top: 0; }
.guide-head { max-width: 1100px; margin-bottom: clamp(32px, 5vw, 64px); }
.guide-head-sub { margin: clamp(56px, 8vw, 112px) 0 clamp(24px, 3vw, 40px); }
.kicker { font-size: var(--step-small); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500; margin-bottom: 14px; opacity: 0.9; }
.guide h2 { font-size: clamp(3.5rem, 1.2rem + 8vw, 9rem); line-height: 0.86; margin-bottom: 20px; }
.sub-title { font-size: clamp(2.5rem, 1rem + 5vw, 5.5rem); }

/* ——— Stepper ——— */
.stepper-tabs { display: none; }
.stepper-panels { display: grid; gap: 28px; }
.gstep { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.gstep-scene { min-height: clamp(280px, 34vw, 440px); background: var(--bg); color: var(--ink); border: 3px solid var(--ink); display: grid; place-items: center; padding: clamp(16px, 3vw, 40px); overflow: hidden; position: relative; }
.gstep-copy { display: grid; gap: 16px; align-content: center; }
.gstep-copy h3 { font-size: clamp(2.5rem, 1.2rem + 4.4vw, 5.5rem); line-height: 0.9; }
.gstep-copy p { font-size: var(--step-body); line-height: 1.4; max-width: 44ch; }
.gstep-copy code, .gstep code { font-family: Consolas, Menlo, monospace; font-size: 0.88em; background: rgba(0,0,0,0.22); padding: 1px 7px; }
.gstep-tip { border-left: 4px solid var(--mustard); padding-left: 14px; font-size: 1rem; }
.gstep-tip b { color: var(--mustard); font-weight: 500; }
.gstep-copy a:not(.btn) { color: var(--mustard); }
kbd { font-family: Consolas, Menlo, monospace; font-size: 0.85em; background: var(--bg); color: var(--ink); padding: 2px 8px; border-bottom: 3px solid var(--ink); }

/* Con JavaScript: un paso cada vez */
.js .stepper-tabs { display: flex; gap: 8px; margin-bottom: 28px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.js .stepper-tabs button { flex: 1 1 0; min-width: 56px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; background: transparent; color: inherit; border: 2px solid currentColor; font-family: var(--display); text-transform: uppercase; cursor: pointer; opacity: 0.7; transition: opacity 150ms var(--ease), background 150ms var(--ease), color 150ms var(--ease); text-align: left; }
.js .stepper-tabs button span { font-size: 2rem; line-height: 1; }
.js .stepper-tabs button small { font-family: var(--text); font-size: 0.8125rem; text-transform: none; font-weight: 500; letter-spacing: 0; }
.js .stepper-tabs button:hover { opacity: 1; }
.js .stepper-tabs button[aria-selected="true"] { opacity: 1; background: var(--bg); color: var(--ink); border-color: var(--bg); }
.js .stepper-tabs button.is-done:not([aria-selected="true"]) { opacity: 0.9; background: rgba(255,255,255,0.12); }
.js .gstep[hidden] { display: none; }
.stepper-bar { display: flex; align-items: center; gap: 16px; margin-top: 28px; }
.stepper-bar button { min-height: 52px; padding: 0 22px; background: var(--mustard); color: var(--ink); border: 0; font-family: var(--display); font-size: 1.5rem; letter-spacing: 0.02em; text-transform: uppercase; cursor: pointer; transition: transform 150ms var(--ease), opacity 150ms var(--ease); }
.stepper-bar button:hover:not(:disabled) { transform: translateY(-2px); }
.stepper-bar button:disabled { opacity: 0.35; cursor: default; }
.stepper-progress { flex: 1; height: 8px; background: rgba(255,255,255,0.25); position: relative; }
.stepper-progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--mustard); transition: width 400ms var(--ease); }
.stepper-count { font-family: var(--display); font-size: 1.5rem; letter-spacing: 0.04em; min-width: 3.5em; text-align: right; }

/* Pepo y su bocadillo, en cada paso */
.js .gstep-scene { padding-bottom: 88px; }
.gstep-says { position: absolute; left: 16px; bottom: 14px; max-width: 70%; background: var(--ink); color: var(--bg); padding: 8px 14px; font-size: 0.9375rem; font-style: italic; z-index: 3; }
.gstep-pepo { position: absolute; right: 8px; bottom: -14px; width: 84px; z-index: 3; transform-origin: 50% 100%; }

/* Animación de entrada de cada paso */
@keyframes gin { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes gpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(42,17,16,0); } 50% { box-shadow: 0 0 0 7px rgba(224,169,18,0.55); } }
@keyframes gwave { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(6deg); } }
@keyframes gprogress { from { width: 8%; } to { width: 100%; } }
@keyframes gblink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.js .gstep.is-active .gstep-scene > *, .js .gstep.is-active .gstep-copy > * { animation: gin 500ms var(--ease) both; }
.js .gstep.is-active .gstep-copy > :nth-child(2) { animation-delay: 70ms; }
.js .gstep.is-active .gstep-copy > :nth-child(3) { animation-delay: 140ms; }
.js .gstep.is-active .gstep-copy > :nth-child(4) { animation-delay: 210ms; }
.gstep-pepo.is-wave { animation: gwave 1s ease-in-out 2; }
.m-pulse { animation: gpulse 1.6s ease-in-out infinite; }

/* ——— Maquetas de los pasos (decorativas) ——— */
.m-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 18px; font-family: var(--display); text-transform: uppercase; font-size: 1.125rem; letter-spacing: 0.02em; }
.m-btn-mustard { background: var(--mustard); color: var(--ink); }
.m-btn-line { border: 2px solid var(--ink); color: var(--ink); background: transparent; }
.m-line { display: block; height: 10px; background: rgba(42,17,16,0.16); margin-top: 10px; }
.m-line.short { width: 60%; }
.m-cap { font-size: 0.8125rem; color: #c7c9d1; margin: 4px 0; }
.m-switch { display: inline-block; width: 40px; height: 22px; background: #8a8378; position: relative; vertical-align: middle; transition: background 300ms var(--ease); }
.m-switch i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: var(--white); transition: transform 300ms var(--ease); }
.m-switch.on { background: var(--red); }
.m-switch.on i { transform: translateX(18px); }
.js .gstep.is-active .m-browser .m-switch-label .m-switch { animation: gswitch 2.4s var(--ease) 600ms infinite; }
@keyframes gswitch { 0%, 20% { background: #8a8378; } 30%, 100% { background: var(--red); } }
.js .gstep.is-active .m-browser .m-switch-label .m-switch i { animation: gswitchi 2.4s var(--ease) 600ms infinite; }
@keyframes gswitchi { 0%, 20% { transform: none; } 30%, 100% { transform: translateX(18px); } }

/* Email */
.m-mail { width: min(100%, 420px); border: 3px solid var(--ink); background: var(--white); }
.m-mail-top { display: flex; justify-content: space-between; align-items: baseline; background: var(--red); color: var(--white); padding: 14px 18px; font-family: var(--display); font-size: 1.75rem; text-transform: uppercase; letter-spacing: 0.02em; }
.m-mail-top small { font-family: var(--text); font-size: 0.875rem; text-transform: none; }
.m-mail-body { padding: 18px; display: grid; gap: 10px; justify-items: start; }
.m-mail-body p { font-size: 0.9375rem; }
.m-key { display: flex; flex-wrap: wrap; font-family: Consolas, Menlo, monospace; font-weight: 700; background: var(--bg); padding: 10px 12px; font-size: clamp(0.8125rem, 2.6vw, 1.0625rem); }
.m-mail-body .m-line { width: 100%; }

/* Archivos */
.m-files { display: flex; align-items: center; justify-content: center; gap: clamp(12px, 3vw, 32px); flex-wrap: wrap; }
.m-file { display: grid; justify-items: center; gap: 10px; font-size: 0.9375rem; font-weight: 500; }
.m-file i { display: block; width: 84px; height: 100px; background: var(--white); border: 3px solid var(--ink); position: relative; }
.m-zip i::before { content: ""; position: absolute; left: 50%; top: 0; width: 14px; height: 100%; margin-left: -7px; background: repeating-linear-gradient(var(--ink) 0 8px, var(--white) 8px 16px); }
.m-folder i { height: 76px; background: var(--mustard); margin-top: 24px; }
.m-folder i::before { content: ""; position: absolute; left: -3px; top: -17px; width: 38px; height: 14px; background: var(--mustard); border: 3px solid var(--ink); border-bottom: 0; }
.m-arrow { display: grid; justify-items: center; gap: 4px; }
.m-arrow svg { width: 80px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: square; }
.m-arrow small { font-size: 0.8125rem; }

/* Navegador */
.m-browser { width: min(100%, 520px); border: 3px solid var(--ink); background: var(--white); position: relative; }
.m-address { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface); border-bottom: 3px solid var(--ink); }
.m-dots { display: inline-flex; gap: 5px; }
.m-dots i { width: 10px; height: 10px; background: var(--ink); opacity: 0.35; border-radius: 50%; }
.m-url { flex: 1; background: var(--white); padding: 6px 12px; font-family: Consolas, Menlo, monospace; font-size: 0.9375rem; }
.m-page { padding: 16px; display: grid; gap: 4px; min-height: 150px; align-content: start; }
.m-page-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-family: var(--display); font-size: 1.5rem; text-transform: uppercase; margin-bottom: 8px; }
.m-switch-label { font-family: var(--text); text-transform: none; font-size: 0.9375rem; display: inline-flex; align-items: center; gap: 8px; }
.m-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.m-btns .m-btn { min-height: 36px; font-size: 1rem; padding: 0 12px; }
.m-card { display: flex; align-items: center; gap: 12px; padding: 12px; border: 2px solid var(--ink); }
.m-card div { flex: 1; display: grid; }
.m-card small { color: var(--muted); }
.m-puzzle { width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid var(--ink); background: var(--white); }
.m-puzzle svg { width: 22px; height: 22px; fill: var(--ink); }
.m-menu { position: absolute; right: 8px; top: 60px; width: min(86%, 280px); background: var(--white); border: 3px solid var(--ink); padding: 12px; }
.m-menu p { font-family: var(--display); font-size: 1.25rem; text-transform: uppercase; margin-bottom: 8px; }
.m-menu-row { display: flex; align-items: center; gap: 10px; font-size: 0.9375rem; font-weight: 500; }
.m-menu-row span:first-of-type { flex: 1; }
.m-pin { width: 34px; height: 34px; display: grid; place-items: center; background: var(--mustard); border: 2px solid var(--ink); }
.m-pin svg { width: 20px; height: 20px; fill: var(--ink); }
.m-browser:has(.m-menu) { min-height: 260px; }

/* Ventana oscura (popup de Pizzabot y de Pepo) */
.m-popup { width: min(100%, 340px); background: #16171b; color: #eceef2; border: 3px solid var(--ink); padding: 16px; display: grid; gap: 12px; justify-items: stretch; }
.m-popup-top { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 1.5rem; text-transform: uppercase; letter-spacing: 0.02em; }
.m-input { background: #24262d; border: 1px solid #3a3d47; padding: 10px 12px; font-family: Consolas, Menlo, monospace; font-size: 0.875rem; color: #eceef2; white-space: nowrap; overflow: hidden; }
.m-popup .m-btn { justify-self: stretch; }
.js .gstep.is-active .m-typing span { display: inline-block; overflow: hidden; white-space: nowrap; border-right: 2px solid var(--mustard); animation: gtype 1.4s steps(9) 400ms both, gblink 800ms step-end 1.8s infinite; }
@keyframes gtype { from { width: 0; } to { width: 9ch; } }

/* Descarga e instalador */
.m-dl { display: grid; justify-items: center; gap: 16px; }
.m-dl small { font-size: 0.9375rem; color: var(--muted); }
.m-win { width: min(100%, 380px); border: 3px solid var(--ink); background: var(--white); }
.m-win-top { display: flex; justify-content: space-between; align-items: center; background: var(--ink); color: var(--bg); padding: 8px 12px; font-size: 0.875rem; }
.m-win-top i { width: 10px; height: 10px; background: var(--bg); }
.m-win-body { padding: 22px 18px; display: grid; gap: 14px; justify-items: start; }
.m-progress { width: 100%; height: 16px; border: 2px solid var(--ink); }
.m-progress i { display: block; height: 100%; width: 100%; background: var(--red); }
.js .gstep.is-active .m-progress i { animation: gprogress 2.6s var(--ease) 300ms both; }

/* Ventana de Pepo */
.m-pepo { width: min(100%, 460px); background: #16171b; color: #eceef2; border: 3px solid var(--ink); }
.m-pepo-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #2d3038; }
.m-pepo-top > div { flex: 1; display: grid; line-height: 1.1; }
.m-pepo-top b { font-family: var(--display); font-size: 1.375rem; text-transform: uppercase; letter-spacing: 0.02em; }
.m-pepo-top small { color: #9ea2ad; font-size: 0.75rem; }
.m-chip { display: inline-flex; align-items: center; gap: 6px; background: #1f2a22; color: #4ade80; font-size: 0.8125rem; padding: 4px 10px; white-space: nowrap; }
.m-chip i { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; animation: gpulseDot 1.6s ease-in-out infinite; }
@keyframes gpulseDot { 50% { opacity: 0.3; } }
.m-pepo-stage { height: 170px; display: grid; place-items: center; position: relative; }
.m-orbit { position: absolute; width: 74%; height: 62%; border: 2px dashed #3a3d47; border-radius: 50%; }
.m-launch { display: flex; align-items: center; gap: 10px; padding: 14px; }
.m-launch span { flex: 1; background: #24262d; border: 1px solid #3a3d47; padding: 10px 12px; font-size: 0.8125rem; color: #9ea2ad; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-launch .m-btn { min-height: 38px; font-size: 1rem; white-space: nowrap; }
.m-clones { display: flex; justify-content: space-around; padding: 4px 14px 18px; gap: 8px; }
.m-clones span { padding: 6px 12px; border: 2px solid #4ade80; color: #4ade80; font-size: 0.8125rem; }
.js .gstep.is-active .m-clones span { animation: gclone 2.4s ease-in-out infinite; }
.js .gstep.is-active .m-clones span:nth-child(2) { animation-delay: 150ms; }
.js .gstep.is-active .m-clones span:nth-child(3) { animation-delay: 300ms; }
@keyframes gclone { 0%, 55%, 100% { background: transparent; color: #4ade80; } 65%, 85% { background: #4ade80; color: #16171b; } }

/* ——— Demostración de Pepo ——— */
.pdemo { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(24px, 4vw, 64px); align-items: center; margin-bottom: clamp(48px, 7vw, 96px); }
.pdemo-stage { background: #16171b; color: #eceef2; border: 3px solid var(--bg); padding: clamp(16px, 3vw, 32px); display: grid; gap: 0; position: relative; }
.pdemo-hub { display: grid; justify-items: center; gap: 4px; position: relative; z-index: 2; }
.pdemo-hub img { width: clamp(80px, 12vw, 120px); height: auto; }
.pdemo-hub span { font-family: var(--display); font-size: 1.5rem; text-transform: uppercase; letter-spacing: 0.04em; }
.pdemo-profiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 2vw, 20px); margin-top: 56px; position: relative; }
.pdemo-profiles::before { content: ""; position: absolute; left: 16.6%; right: 16.6%; top: -28px; height: 28px; border: 2px solid #3a3d47; border-bottom: 0; }
.pdemo-profile { position: relative; padding: 14px 10px; border: 2px solid #3a3d47; display: grid; gap: 2px; text-align: center; transition: border-color 200ms var(--ease), background 200ms var(--ease); }
.pdemo-profile::before { content: ""; position: absolute; left: 50%; top: -30px; height: 28px; border-left: 2px solid #3a3d47; }
.pdemo-profile b { font-family: var(--display); font-size: 1.375rem; letter-spacing: 0.03em; text-transform: uppercase; font-weight: 400; }
.pdemo-profile small { font-size: 0.8125rem; color: #9ea2ad; }
.pdemo-dot { position: absolute; top: 8px; left: 8px; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; }
.pdemo-stage.is-firing .pdemo-profile { border-color: #4ade80; background: rgba(74,222,128,0.1); }
.pdemo-stage.is-firing .pdemo-profile small { color: #4ade80; }
.pdemo-packet { position: absolute; width: 14px; height: 14px; background: var(--mustard); left: 50%; margin-left: -7px; top: -34px; opacity: 0; z-index: 3; }
.pdemo-stage.is-firing .pdemo-packet { animation: gpacket 700ms var(--ease) both; }
@keyframes gpacket { 0% { opacity: 1; transform: translateY(0); } 90% { opacity: 1; } 100% { opacity: 0; transform: translateY(32px); } }
.pdemo-side { display: grid; gap: 14px; justify-items: start; }
.pdemo-label { font-size: var(--step-small); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500; }
.pdemo-bar { width: 100%; background: var(--bg); color: var(--ink); padding: 12px 14px; font-family: Consolas, Menlo, monospace; font-size: 0.875rem; border: 3px solid var(--ink); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pdemo-note { font-size: 0.9375rem; opacity: 0.85; max-width: 38ch; }

/* ——— Ventajas ——— */
.perks-title { font-size: clamp(2.5rem, 1rem + 5vw, 5.5rem); margin-bottom: clamp(20px, 3vw, 36px); }
.perks-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px) clamp(24px, 4vw, 64px); }
.perks-list li { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; border-top: 3px solid var(--bg); padding-top: 16px; }
.perks-list li > b { font-family: var(--display); font-weight: 400; font-size: 3.5rem; line-height: 0.8; color: var(--mustard); }
.perks-list h4 { margin: 0 0 6px; font-family: var(--display); font-weight: 400; font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.5rem); text-transform: uppercase; line-height: 0.95; letter-spacing: 0; }
.perks-list p { font-size: var(--step-body); line-height: 1.4; max-width: 40ch; }

/* ——— Cierre y pie ——— */
.gcta { padding: clamp(56px, 9vw, 120px) var(--margin); }
.gcta-inner { display: grid; gap: 20px; justify-items: start; }
.gcta h2 { font-size: clamp(4rem, 1rem + 14vw, 12rem); line-height: 0.86; }
.gcta p { font-size: var(--step-lead); max-width: 30ch; line-height: 1.2; }
.gcta .btn { background: var(--mustard); }
.footer { display: block; min-height: 0; margin-top: 0; }
.footer-main { padding-top: 48px; padding-bottom: 40px; }
.footer .menu { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer .menu a { font-size: clamp(2rem, 1rem + 3vw, 3.5rem); }

/* ——— Móvil ——— */
@media (max-width: 900px) {
  .ghero { padding-top: 104px; }
  .ghero-pepo { right: -8%; bottom: -4%; width: 55vw; opacity: 0.95; }
  .ghero h1 { font-size: clamp(6rem, 30vw, 11rem); }
  .gchip { font-size: 1.25rem; min-height: 48px; padding: 0 16px; }
  .gstep { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .gstep-scene { min-height: 260px; }
  .js .stepper-tabs button small { display: none; }
  .js .stepper-tabs button { padding: 8px 12px; min-width: 52px; flex: 0 0 auto; }
  .pdemo { grid-template-columns: minmax(0, 1fr); }
  .perks-list { grid-template-columns: minmax(0, 1fr); }
  .stepper-bar { flex-wrap: wrap; }
  .stepper-progress { order: -1; flex-basis: 100%; }
  .stepper-bar button { flex: 1; }
  .stepper-count { display: none; }
  .m-menu { right: 4px; top: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .m-pulse, .m-chip i, .js .gstep.is-active .gstep-scene > *, .js .gstep.is-active .gstep-copy > * { animation: none !important; }
  .js .gstep.is-active .m-progress i, .js .gstep.is-active .m-typing span, .js .gstep.is-active .m-clones span, .pdemo-stage.is-firing .pdemo-packet { animation: none !important; }
  .stepper-progress i, .gchip, .stepper-bar button { transition: none; }
}
