/* ============================================================
   OpenCode — Efectos de la portada (14/11/2026)
   Aurora y ventanas en el hero, tarjetas con foco, vitrina de
   productos y carrusel de clientes. Sin JS todo queda visible.
   ============================================================ */

/* --- Barra de progreso de lectura --- */
.fx-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 100%;
    background: linear-gradient(90deg, var(--orange), #ffb347);
    transform-origin: 0 50%; transform: scaleX(0);
    z-index: 2000; pointer-events: none;
}

/* --- Hero: aurora y retícula --- */
.hero-aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-aurora .blob {
    position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45;
    animation: fx-float 18s ease-in-out infinite alternate;
}
.hero-aurora .b1 { width: 520px; height: 520px; background: #ff6a00; top: -120px; right: -80px; }
.hero-aurora .b2 { width: 420px; height: 420px; background: #7c3aed; bottom: -160px; left: 10%; opacity: .28; animation-duration: 22s; }
.hero-aurora .b3 { width: 300px; height: 300px; background: #06b6d4; top: 40%; right: 30%; opacity: .18; animation-duration: 26s; }
@keyframes fx-float {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-40px, 30px) scale(1.08); }
    100% { transform: translate(30px, -20px) scale(.95); }
}
.hero-grid {
    position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
}

/* Palabra que rota */
.fx-rotate { display: inline-block; min-height: 1.1em; }
.fx-rotate::after {
    content: ""; display: inline-block; width: 3px; height: .85em; margin-left: 6px;
    background: var(--orange); vertical-align: -0.05em; animation: fx-caret 1s steps(1) infinite;
}
@keyframes fx-caret { 50% { opacity: 0; } }

/* Productos en el hero */
.fx-trust { flex-wrap: wrap; gap: 8px 10px; }
.fx-trust .trust-item {
    padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px;
    background: rgba(255,255,255,.03); color: var(--text-muted); text-decoration: none;
    transition: border-color .25s, color .25s, background .25s, transform .25s;
}
.fx-trust .trust-item:hover { border-color: var(--orange-border); color: var(--text-heading); background: var(--orange-glow); transform: translateY(-2px); }

/* Ventanas del hero */
.fx-stage { position: relative; display: flex; flex-direction: column; gap: 22px; perspective: 1400px; }
.fx-shots { position: relative; padding: 34px 34px 0 0; }
.fx-window {
    position: absolute; width: 100%; border-radius: 12px; overflow: hidden;
    background: #111; border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,106,0,.06);
}
.fx-window img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.fx-win-back  { top: 0; right: 0; width: 88%; opacity: .55; transform: rotateY(-14deg) rotateX(4deg) translateZ(-60px); }
.fx-win-front { position: relative; width: 100%; transform: rotateY(-8deg) rotateX(3deg); z-index: 1; }
.fx-bar {
    display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
    background: #1b1b1f; border-bottom: 1px solid rgba(255,255,255,.08);
}
.fx-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3f3f46; }
.fx-bar i:nth-child(1) { background: #ff5f57; }
.fx-bar i:nth-child(2) { background: #febc2e; }
.fx-bar i:nth-child(3) { background: #28c840; }
.fx-bar span {
    margin-left: 10px; flex: 1; max-width: 260px; padding: 3px 10px; border-radius: 6px;
    background: #0f0f12; color: var(--text-muted); font-size: 11px; font-family: ui-monospace, monospace;
}
.fx-hero-card.hero-card { position: relative; width: 100%; max-width: none; padding: 18px 22px; z-index: 2; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(22,22,24,.82); }

/* --- Tarjetas de producto con foco que sigue al mouse --- */
.fx-spot { overflow: hidden; isolation: isolate; }
.fx-spot::before {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255,106,0,.14), transparent 45%);
}
.fx-spot:hover::before { opacity: 1; }
.fx-spot .product-icon { transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.fx-spot:hover .product-icon { transform: translateY(-4px) rotate(-6deg) scale(1.06); }

/* --- Vitrina --- */
#showcase { padding: 110px 0; background: radial-gradient(ellipse at 50% 0%, rgba(255,106,0,.10), transparent 60%), var(--bg); overflow: hidden; }
.sc-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 44px; }
.sc-tab {
    padding: 10px 20px; border-radius: 999px; border: 1px solid var(--border);
    background: rgba(255,255,255,.03); color: var(--text-muted); font: 600 14px var(--font); cursor: pointer;
    transition: all .25s;
}
.sc-tab:hover { color: var(--text-heading); border-color: rgba(255,255,255,.25); }
.sc-tab.active { background: var(--orange); border-color: var(--orange); color: #fff; box-shadow: 0 8px 30px rgba(255,106,0,.35); }
.sc-stage { position: relative; max-width: 1040px; margin: 0 auto; }
.sc-browser {
    border-radius: 14px; overflow: hidden; background: #111; border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 40px 120px rgba(0,0,0,.6), 0 0 80px rgba(255,106,0,.08);
}
.sc-screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.sc-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: opacity .45s ease, transform .6s ease; }
.sc-screen img.out { opacity: 0; transform: scale(1.03); }
.sc-phone {
    position: absolute; right: -40px; bottom: -40px; width: 190px; aspect-ratio: 390 / 844;
    border-radius: 30px; padding: 8px; background: #0b0b0d; border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.sc-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 22px; display: block; }
.sc-notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 64px; height: 18px; border-radius: 10px; background: #0b0b0d; z-index: 1; }
.sc-caption { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 70px; text-align: center; flex-wrap: wrap; }
.sc-desc { color: var(--text-muted); margin: 0; }
.sc-link { color: var(--orange); font-weight: 600; text-decoration: none; white-space: nowrap; }
.sc-link i { transition: transform .25s; }
.sc-link:hover i { transform: translateX(4px); }

/* --- Carrusel de clientes --- */
.fx-marquee {
    overflow: hidden; padding: 10px 0;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.fx-track { display: flex; gap: 24px; width: max-content; animation: fx-scroll 40s linear infinite; }
.fx-marquee:hover .fx-track { animation-play-state: paused; }
.fx-track .client-card { flex: 0 0 220px; opacity: 1; transform: none; }
@keyframes fx-scroll { to { transform: translateX(calc(-50% - 12px)); } }

/* --- Responsive --- */
@media (max-width: 991px) {
    .hero-inner { padding-left: 24px; padding-right: 24px; }
    .fx-stage { margin-top: 10px; }
    .fx-shots { padding: 0; }
    .fx-win-back { display: none; }
    .fx-win-front { transform: none; }
    .sc-phone { width: 130px; right: -6px; bottom: -30px; border-radius: 22px; padding: 6px; }
    .sc-phone img { border-radius: 16px; }
    .sc-notch { width: 44px; height: 12px; top: 10px; }
}
@media (max-width: 767px) {
    #showcase { padding: 80px 0; }
    .sc-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
    .sc-tabs::-webkit-scrollbar { display: none; }
    .sc-tab { flex: 0 0 auto; padding: 8px 16px; font-size: 13px; }
    .hero-trust.fx-trust { flex-direction: row; align-items: flex-start; }
    .fx-trust .trust-item { padding: 5px 10px; }
    .sc-phone { width: 96px; }
    .sc-caption { margin-top: 48px; flex-direction: column; gap: 8px; }
    .hero-aurora .b1 { width: 320px; height: 320px; }
    .fx-track .client-card { flex-basis: 170px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-aurora .blob, .fx-track, .fx-rotate::after { animation: none; }
}

/* --- Tarjeta de ecosistema en franja horizontal bajo las ventanas --- */
.fx-hero-card .hero-card-header { margin-bottom: 12px; padding-bottom: 12px; }
.fx-hero-card .hero-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; padding-bottom: 14px; }
.fx-hero-card .hero-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.fx-hero-card .hero-stat-number { font-size: 1.9rem; line-height: 1; }
.fx-hero-card .hero-stat-label { font-size: .78rem; }
.fx-hero-card .hero-card-techs { display: flex; flex-wrap: wrap; gap: 6px; }

/* --- Productos en pestañas --- */
.px-wrap { margin-top: 10px; }
.px-tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 26px; }
.px-tab {
    position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; text-align: left;
    padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-card);
    color: var(--text-muted); font: inherit; cursor: pointer; transition: border-color .25s, transform .25s, box-shadow .25s;
}
.px-tab:hover { transform: translateY(-2px); border-color: rgba(255,106,0,.35); }
.px-tab.active { border-color: var(--orange); box-shadow: 0 10px 30px rgba(255,106,0,.18); }
.px-ico { flex: 0 0 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 16px; }
.px-tab-txt { min-width: 0; display: flex; flex-direction: column; }
.px-tab-txt b { color: var(--text-heading); font-size: .95rem; }
.px-tab-txt small { font-size: .72rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--orange); transform: scaleX(0); transform-origin: 0 50%; }
.px-tab.active .px-bar { animation: px-fill var(--px-dur, 7s) linear forwards; }
.px-wrap.paused .px-tab.active .px-bar { animation: none; transform: scaleX(1); }
@keyframes px-fill { to { transform: scaleX(1); } }

.px-panels {
    position: relative; border: 1px solid var(--border); border-radius: 20px; background: var(--bg-card);
    padding: 36px; overflow: hidden;
}
.px-panels::before {
    content: ""; position: absolute; inset: -40% -10% auto auto; width: 520px; height: 520px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,106,0,.14), transparent 65%); pointer-events: none;
}
.px-panel { display: none; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: center; position: relative; }
.px-panel.active { display: grid; animation: px-in .5s cubic-bezier(.2,.8,.2,1); }
@keyframes px-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.px-info h3 { font-size: 1.9rem; margin: 12px 0 10px; color: var(--text-heading); }
.px-info h3 span { display: block; font-size: 1rem; font-weight: 500; color: var(--orange); margin-top: 4px; }
.px-desc { color: var(--text-muted); line-height: 1.7; margin-bottom: 18px; }
.px-features { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.px-features li { display: flex; gap: 8px; font-size: .9rem; color: var(--text); }
.px-features i { color: #22c55e; margin-top: 4px; font-size: .8rem; }
.px-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.px-btn { padding: 12px 20px; font-size: .9rem; }
.px-visual { position: relative; padding: 0 30px 30px 0; }
.px-visual .sc-browser { box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.px-phone {
    position: absolute; right: 0; bottom: 0; width: 26%; aspect-ratio: 390 / 844;
    border-radius: 24px; padding: 6px; background: #0b0b0d; border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 24px 60px rgba(0,0,0,.5); position: absolute;
}
.px-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 18px; display: block; }
.px-phone .sc-notch { top: 11px; width: 34%; height: 12px; }

@media (max-width: 1100px) {
    .px-tabs { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 991px) {
    .px-panel.active { grid-template-columns: 1fr; }
    .px-visual { order: -1; }
}
@media (max-width: 767px) {
    .px-tabs { display: flex; overflow-x: auto; scrollbar-width: none; margin: 0 -24px 20px; padding: 0 24px 4px; }
    .px-tabs::-webkit-scrollbar { display: none; }
    .px-tab { flex: 0 0 auto; padding: 10px 12px; }
    .px-tab-txt small { display: none; }
    .px-panels { padding: 20px; border-radius: 16px; }
    .px-features { grid-template-columns: 1fr; }
    .px-info h3 { font-size: 1.5rem; }
    .px-visual { padding: 0 18px 18px 0; }
    .fx-hero-card .hero-stat-number { font-size: 1.5rem; }
}
html[data-theme="light"] .px-panels { box-shadow: 0 20px 60px rgba(0,0,0,.06); }
html[data-theme="light"] .px-visual .sc-browser { box-shadow: 0 30px 70px rgba(0,0,0,.18); }
.px-tab-txt b { white-space: nowrap; }
@media (max-width: 767px) { .px-tab-txt { min-width: auto; } }
@media (max-width: 767px) { .px-tab { min-width: max-content; padding-right: 16px; } }

/* Hero a la misma altura que las páginas de producto (14/11/2026) */
#hero { min-height: 0; padding: 0; }
#hero .hero-inner { padding: 140px 0 80px; }
#hero .hero-scroll { display: none; }
@media (max-width: 991px) { #hero .hero-inner { padding: 112px 24px 60px; } }

/* Portada en celular: pestañas de productos en cuadrícula de 2 columnas, sin cápsulas cortadas (14/11/2026) */
@media (max-width: 767px) {
    .px-tabs { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; margin: 0 0 18px; padding: 0; gap: 8px; }
    .px-tab { min-width: 0; padding: 10px; gap: 8px; }
    .px-ico { flex-basis: 32px; height: 32px; font-size: 14px; }
    .px-tab-txt b { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
