/* ==========================================================================
   apps.css — Landing /apps ("Apps 1-Clic") ONLY
   Loaded after landing.css. Reuses hero/section/feature/dark-band primitives
   from landing.css; this file adds the app-catalog, logo marquee, deploy
   terminal, plans, reviews and FAQ specific to the apps landing.
   Tokens auto-adapt to dark via :root[data-theme="dark"] (see core.css).
   ========================================================================== */

/* --- Hero extras -------------------------------------------------------- */
.apps-eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: .72rem; font-weight: 800;
    letter-spacing: .2em; text-transform: uppercase;
    color: var(--blue-text);
    margin-bottom: 1rem;
}
.hero-title .blue { color: var(--brand); }

.apps-hero-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
    margin-top: 1.6rem;
}
.apps-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .85rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-dim);
    background: var(--bg-raised);
    font-weight: 650;
    font-size: .85rem;
    color: var(--text-1);
    transition: border-color var(--transition-base), transform var(--transition-base);
}
.apps-hero-pill:hover { border-color: var(--blue-border); transform: translateY(-2px); }
.apps-hero-pill img { width: 18px; height: 18px; display: block; }

.apps-hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 1.5rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--border-dim);
    width: 100%;
    max-width: 720px;
}
.apps-hero-stat { display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.apps-hero-stat strong {
    font-size: 1.55rem; font-weight: 860; letter-spacing: -.02em; line-height: 1; color: var(--text-1);
}
.apps-hero-stat span {
    font-family: var(--font-mono); font-size: .62rem; opacity: .65;
    text-transform: uppercase; letter-spacing: .14em; font-weight: 700;
}

/* --- Infinite logo marquee --------------------------------------------- */
.apps-marquee-section { padding: 2.5rem 0 1rem; }
.apps-marquee-head {
    text-align: center; margin-bottom: 1.75rem;
    font-family: var(--font-mono); font-size: .72rem; font-weight: 700;
    letter-spacing: .16em; text-transform: uppercase; color: var(--text-3);
}
.apps-marquee {
    position: relative;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.apps-marquee + .apps-marquee { margin-top: 1rem; }
.apps-marquee-track {
    display: flex;
    width: max-content;
    gap: 3rem;
    padding: .5rem 1.5rem;
    animation: apps-marquee-scroll 42s linear infinite;
}
.apps-marquee--reverse .apps-marquee-track { animation-direction: reverse; animation-duration: 52s; }
.apps-marquee:hover .apps-marquee-track { animation-play-state: paused; }
.apps-marquee-logo {
    display: flex; align-items: center; gap: .6rem;
    flex-shrink: 0; opacity: .55;
    transition: opacity var(--transition-base);
}
.apps-marquee-logo img {
    width: 30px; height: 30px; display: block;
    filter: grayscale(1) opacity(.85);
    transition: filter var(--transition-base);
}
.apps-marquee-logo span {
    font-weight: 650; font-size: .9rem; color: var(--text-2); white-space: nowrap;
}
.apps-marquee-logo:hover { opacity: 1; }
.apps-marquee-logo:hover img { filter: grayscale(0); }
@keyframes apps-marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* --- "Cómo funciona" + deploy terminal --------------------------------- */
.apps-deploy-grid {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: 2.5rem;
    align-items: center;
    margin-top: 2.25rem;
}
.apps-steps { display: flex; flex-direction: column; gap: 1.1rem; }
.apps-step {
    display: flex; gap: 1rem; align-items: flex-start;
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-lg);
    background: var(--bg-raised);
    transition: border-color var(--transition-base), background var(--transition-base);
}
.apps-step:hover { border-color: var(--blue-border); background: var(--bg-hover); }
.apps-step-num {
    flex-shrink: 0;
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: var(--blue-dim);
    color: var(--blue-text);
    font-weight: 820; font-size: 1.05rem;
    font-family: var(--font-mono);
}
.apps-step-body h3 { margin: 0 0 .25rem; font-size: 1.02rem; font-weight: 760; letter-spacing: -.012em; color: var(--text-1); }
.apps-step-body p { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--text-2); }

/* Terminal — always dark, regardless of theme */
.apps-terminal {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid #222833;
    background: #0d1117;
    font-family: var(--font-mono);
}
.apps-terminal-bar {
    display: flex; align-items: center; gap: .55rem;
    padding: .7rem .95rem;
    background: #171b23;
    border-bottom: 1px solid #222833;
}
.apps-terminal-dot { width: 11px; height: 11px; border-radius: 50%; }
.apps-terminal-dot.is-red { background: #ff5f56; }
.apps-terminal-dot.is-amber { background: #ffbd2e; }
.apps-terminal-dot.is-green { background: #27c93f; }
.apps-terminal-title {
    margin-left: .5rem; font-size: .72rem; color: #8b95a5; letter-spacing: .04em;
}
.apps-terminal-title strong { color: #cfd6e0; font-weight: 600; }
.apps-terminal-body {
    padding: 1.1rem 1.2rem 1.3rem;
    font-size: .82rem;
    line-height: 1.75;
    min-height: 268px;
}
.apps-term-line {
    display: flex; gap: .55rem;
    color: #c9d4e2;
    opacity: 0;
    transform: translateY(4px);
    animation: apps-term-in .4s ease forwards;
}
.apps-term-line .tok-prompt { color: #3b82f6; font-weight: 700; }
.apps-term-line .tok-ok { color: #27c93f; }
.apps-term-line .tok-dim { color: #6b7689; }
.apps-term-line .tok-app { color: #e879f9; font-weight: 600; }
.apps-term-line .tok-warn { color: #ffbd2e; }
.apps-term-line:nth-child(1) { animation-delay: .2s; }
.apps-term-line:nth-child(2) { animation-delay: 1.1s; }
.apps-term-line:nth-child(3) { animation-delay: 1.9s; }
.apps-term-line:nth-child(4) { animation-delay: 2.7s; }
.apps-term-line:nth-child(5) { animation-delay: 3.5s; }
.apps-term-line:nth-child(6) { animation-delay: 4.3s; }
.apps-term-line:nth-child(7) { animation-delay: 5.1s; }
.apps-term-progress {
    margin-top: 1rem;
    height: 7px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    overflow: hidden;
    opacity: 0;
    animation: apps-term-in .4s ease forwards;
    animation-delay: 2.7s;
}
.apps-term-progress span {
    display: block; height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    animation: apps-progress-fill 2.4s ease-in-out forwards;
    animation-delay: 2.9s;
}
.apps-term-cursor {
    display: inline-block; width: 8px; height: 1.05em;
    background: #3b82f6; margin-left: 2px;
    transform: translateY(2px);
    animation: apps-blink 1s steps(2) infinite;
}
@keyframes apps-term-in { to { opacity: 1; transform: translateY(0); } }
@keyframes apps-progress-fill { from { width: 0; } to { width: 100%; } }
@keyframes apps-blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* --- App catalog -------------------------------------------------------- */
.apps-filter {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    margin: 1.75rem 0 2.25rem;
}
.apps-filter-tab {
    appearance: none;
    cursor: pointer;
    padding: .55rem 1.05rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-dim);
    background: var(--bg-raised);
    color: var(--text-2);
    font-family: inherit;
    font-weight: 650;
    font-size: .85rem;
    display: inline-flex; align-items: center; gap: .45rem;
    transition: border-color var(--transition-base), color var(--transition-base), background var(--transition-base);
}
.apps-filter-tab:hover { border-color: var(--blue-border); color: var(--text-1); }
.apps-filter-tab .apps-filter-count {
    font-family: var(--font-mono); font-size: .68rem; opacity: .6;
    background: var(--bg-hover); padding: .05rem .4rem; border-radius: 999px;
}
.apps-filter-tab.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.apps-filter-tab.is-active .apps-filter-count { background: rgba(255,255,255,.22); opacity: .9; }

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
    gap: 1rem;
}
.app-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .85rem;
    padding: 1.3rem;
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-lg);
    background: var(--bg-raised);
    text-decoration: none;
    overflow: hidden;
    transition: border-color var(--transition-base), background var(--transition-base), transform var(--transition-base);
}
.app-card::after {
    content: "";
    position: absolute; inset: 0;
    border-radius: inherit;
    background: radial-gradient(120% 100% at 100% 0%, var(--app-glow, rgba(59,130,246,.14)), transparent 55%);
    opacity: 0;
    transition: opacity var(--transition-slow);
    pointer-events: none;
}
.app-card:hover { border-color: var(--blue-border); transform: translateY(-3px); }
.app-card:hover::after { opacity: 1; }
.app-card-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.app-card-logo {
    width: 46px; height: 46px;
    border-radius: 12px;
    border: 1px solid var(--border-dim);
    background: var(--paper);
    display: grid; place-items: center;
    flex-shrink: 0;
}
:root[data-theme="dark"] .app-card-logo { background: rgba(255,255,255,.04); }
.app-card-logo img {
    width: 26px; height: 26px; display: block;
    filter: grayscale(1) opacity(.7);
    transition: filter var(--transition-base);
}
.app-card:hover .app-card-logo img { filter: grayscale(0) opacity(1); }
.app-card-tag {
    font-family: var(--font-mono); font-size: .6rem; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase;
    color: var(--text-3);
    border: 1px solid var(--border-dim);
    border-radius: 999px;
    padding: .25rem .55rem;
    white-space: nowrap;
}
.app-card-name { margin: 0; font-size: 1.05rem; font-weight: 780; letter-spacing: -.014em; color: var(--text-1); }
.app-card-desc { margin: -.35rem 0 0; font-size: .85rem; line-height: 1.5; color: var(--text-2); flex: 1; }
.app-card-foot {
    display: inline-flex; align-items: center; gap: .4rem;
    margin-top: .35rem;
    font-size: .8rem; font-weight: 650;
    color: var(--blue-text);
}
.app-card-foot svg { width: 14px; height: 14px; transition: transform var(--transition-base); }
.app-card:hover .app-card-foot svg { transform: translateX(4px); }
.app-card.is-hidden { display: none; }

.apps-catalog-note {
    margin-top: 1.75rem; text-align: center;
    font-size: .88rem; color: var(--text-2);
}
.apps-catalog-note strong { color: var(--text-1); font-weight: 700; }

/* --- Plans -------------------------------------------------------------- */
.apps-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}
.apps-plan {
    position: relative;
    display: flex; flex-direction: column; gap: 1.25rem;
    padding: 1.85rem;
    background: var(--bg-raised);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-xl);
    transition: border-color var(--transition-slow), transform var(--transition-slow);
}
.apps-plan:hover { border-color: var(--blue-border); transform: translateY(-3px); }
.apps-plan.is-featured { border-color: var(--brand); background: var(--blue-dim); }
.apps-plan.is-featured::before {
    content: "Más elegido"; position: absolute; top: -10px; right: 18px;
    padding: .25rem .7rem; background: var(--brand); color: #fff;
    font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
    border-radius: 999px;
}
.apps-plan-name { margin: 0; font-size: 1.22rem; font-weight: 820; letter-spacing: -.018em; color: var(--text-1); }
.apps-plan-blurb { margin: .3rem 0 0; font-size: .85rem; line-height: 1.45; color: var(--text-2); }
.apps-plan-price { display: flex; align-items: baseline; gap: 3px; padding-bottom: 1.1rem; border-bottom: 1px solid var(--border-dim); }
.apps-plan-price .v { font-size: 2.7rem; font-weight: 860; line-height: 1; letter-spacing: -.025em; color: var(--text-1); }
.apps-plan-price .c { font-size: 1.05rem; font-weight: 700; color: var(--text-1); }
.apps-plan-price .p { margin-left: 5px; opacity: .6; font-size: .78rem; font-weight: 600; }
.apps-plan-specs { margin: 0; padding: 0; list-style: none; display: grid; gap: .65rem; }
.apps-plan-specs li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.apps-plan-specs li span { opacity: .55; font-family: var(--font-mono); font-size: .64rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.apps-plan-specs li strong { font-size: .85rem; font-weight: 700; color: var(--text-1); }
.apps-plan-cta { margin-top: auto; width: 100%; justify-content: center; }
.apps-plan-foot { display: flex; align-items: center; gap: .5rem; opacity: .7; font-size: .74rem; margin: 0; }
.apps-plan-foot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* --- Reviews ------------------------------------------------------------ */
.apps-reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem; margin-top: 1.75rem;
}
.apps-review {
    padding: 1.35rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-dim);
    background: var(--bg-raised);
}
.apps-review-stars { color: #f59e0b; letter-spacing: 2px; font-size: .95rem; margin-bottom: .55rem; }
.apps-review-text { line-height: 1.55; color: var(--text-1); }
.apps-review-author { margin-top: .85rem; display: flex; align-items: center; gap: .6rem; font-size: .85rem; }
.apps-review-author .who { font-weight: 700; color: var(--text-1); }
.apps-review-author .what { color: var(--text-3); }
.apps-review-app {
    width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center;
    border: 1px solid var(--border-dim); background: var(--paper);
}
:root[data-theme="dark"] .apps-review-app { background: rgba(255,255,255,.04); }
.apps-review-app img { width: 16px; height: 16px; }
.apps-rating-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.apps-rating-pill {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .5rem .9rem; border-radius: 999px;
    background: var(--blue-dim); color: var(--blue-text);
    font-weight: 650; font-size: .88rem;
}

/* --- FAQ ---------------------------------------------------------------- */
.apps-faq { display: flex; flex-direction: column; gap: .75rem; margin-top: 1.75rem; }
.apps-faq-item {
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-lg);
    background: var(--bg-raised);
    overflow: hidden;
}
.apps-faq-item > summary {
    list-style: none; cursor: pointer; padding: 1.05rem 1.25rem;
    font-weight: 680; color: var(--text-1);
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.apps-faq-item > summary::-webkit-details-marker { display: none; }
.apps-faq-item > summary::after { content: "+"; font-size: 1.3rem; line-height: 1; opacity: .55; transition: transform var(--transition-base); }
.apps-faq-item[open] > summary::after { content: "−"; }
.apps-faq-item > div { padding: 0 1.25rem 1.15rem; color: var(--text-2); line-height: 1.6; }

/* --- CTA band ----------------------------------------------------------- */
.apps-cta {
    margin-top: 2.25rem; padding: 2.25rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.5rem; flex-wrap: wrap;
}
.apps-cta h3 { font-size: 1.55rem; font-weight: 780; margin: 0 0 .3rem; color: #fff; }
.apps-cta p { margin: 0; color: rgba(255,255,255,.9); }
.apps-cta .btn { background: #fff; color: #1d4ed8; border-color: #fff; }
.apps-cta .btn:hover { background: rgba(255,255,255,.92); }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 860px) {
    .apps-deploy-grid { grid-template-columns: 1fr; gap: 1.75rem; }
    .apps-hero-stats { gap: 1.75rem; }
}
@media (max-width: 520px) {
    .apps-hero-stats { gap: 1.25rem 2rem; }
    .apps-cta { padding: 1.6rem; }
}

/* Respect reduced motion (belt + braces over global rule) */
@media (prefers-reduced-motion: reduce) {
    .apps-marquee-track { animation: none; }
    .apps-term-line, .apps-term-progress { opacity: 1; transform: none; animation: none; }
    .apps-term-progress span { width: 100%; animation: none; }
    .apps-term-cursor { animation: none; }
}
