:root { --header-h: 80px; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; }
section, main { scroll-margin-top: 88px; }

/* Scroll progress bar */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; background: linear-gradient(90deg,#ef4444,#f87171); z-index: 60; width: 0%; transition: width .1s linear; }

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.show { opacity: 1; transform: translateY(0); }
.reveal-delay-1.show { transition-delay: .08s; }
.reveal-delay-2.show { transition-delay: .16s; }
.reveal-delay-3.show { transition-delay: .24s; }

/* Hero decorative orbs */
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(24px,-18px) scale(1.08); } }
.orb { position: absolute; border-radius: 9999px; filter: blur(60px); pointer-events: none; animation: drift 12s ease-in-out infinite alternate; }
.orb-a { width: 420px; height: 420px; top: -160px; right: -120px; background: radial-gradient(circle, rgba(239,68,68,.35), transparent 70%); }
.orb-b { width: 360px; height: 360px; bottom: -140px; left: -100px; background: radial-gradient(circle, rgba(248,113,113,.25), transparent 70%); animation-duration: 16s; }
.orb-small { width: 260px; height: 260px; filter: blur(50px); }

/* Gradient text */
.text-gradient { background: linear-gradient(90deg,#f87171,#ef4444); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Footer texture */
.site-footer {
    position: relative;
    background-image: linear-gradient(180deg, rgba(2,6,23,.72), rgba(15,23,42,.8) 40%, rgba(2,6,23,.92)), url('../img/page-banner-texture.jpg');
    background-size: cover; background-position: center top;
}

/* Header */
.site-header {
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
}
.site-header.scrolled {
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
}

/* Inner page hero banner */
.page-hero {
    position: relative; overflow: hidden; padding-top: 128px; padding-bottom: 56px; color: #fff;
    background-image: linear-gradient(135deg, rgba(15,23,42,.90), rgba(30,41,59,.88) 55%, rgba(69,10,10,.90)), url('../img/page-banner-texture.jpg');
    background-size: cover; background-position: center;
}
.page-hero .crumbs a { color: rgba(255,255,255,.6); transition: color .2s ease; }
.page-hero .crumbs a:hover { color: #fff; }

/* Language switch pill */
.lang-switch { position: relative; display: inline-flex; background: rgba(148,163,184,.15); border: 1px solid rgba(148,163,184,.3); border-radius: 9999px; padding: 3px; }
.lang-switch button { position: relative; z-index: 2; padding: 4px 12px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; border-radius: 9999px; transition: color .3s ease; }
.lang-switch .lang-thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); background: #dc2626; border-radius: 9999px; transition: transform .3s cubic-bezier(.65,0,.35,1); z-index: 1; }
.lang-switch[data-active="es"] .lang-thumb { transform: translateX(100%); }
.lang-switch button[data-lang="en"] { color: #fff; }
.lang-switch button[data-lang="es"] { color: #64748b; }
.lang-switch[data-active="es"] button[data-lang="en"] { color: #64748b; }
.lang-switch[data-active="es"] button[data-lang="es"] { color: #fff; }
.lang-switch.on-dark button[data-lang="en"] { color: #fff; }
.lang-switch.on-dark button[data-lang="es"] { color: rgba(255,255,255,.55); }
.lang-switch.on-dark[data-active="es"] button[data-lang="en"] { color: rgba(255,255,255,.55); }
.lang-switch.on-dark[data-active="es"] button[data-lang="es"] { color: #fff; }

/* Mobile drawer */
.mobile-drawer { position: fixed; inset: 0; z-index: 70; visibility: hidden; }
.mobile-drawer .backdrop { position: absolute; inset: 0; background: rgba(2,6,23,.6); backdrop-filter: blur(2px); opacity: 0; transition: opacity .3s ease; }
.mobile-drawer .panel { position: absolute; top: 0; right: 0; height: 100%; width: min(86vw, 360px); background: #0f172a; box-shadow: -20px 0 50px rgba(0,0,0,.4); transform: translateX(100%); transition: transform .35s cubic-bezier(.65,0,.35,1); padding: 28px 24px; overflow-y: auto; }
.mobile-drawer.open { visibility: visible; }
.mobile-drawer.open .backdrop { opacity: 1; }
.mobile-drawer.open .panel { transform: translateX(0); }
.mobile-drawer a.drawer-link { display: flex; align-items: center; gap: 12px; padding: 14px 6px; color: #e2e8f0; font-weight: 600; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.mobile-drawer a.drawer-link i { color: #f87171; width: 20px; }
.mobile-drawer a.drawer-link[aria-current="page"] { color: #f87171; }

/* FAQ accordion */
.faq-item .faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-item.open .faq-a { max-height: 240px; }
.faq-item .faq-icon { transition: transform .3s ease; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

/* Back to top */
.back-to-top { position: fixed; right: 18px; bottom: 24px; z-index: 45; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 9999px; background: #dc2626; color: #fff; box-shadow: 0 10px 25px rgba(220,38,38,.4); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .3s ease, transform .3s ease; }
.back-to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* Mobile app-style bottom bar (5 buttons) */
.app-bar { display: none; }
@media (max-width: 767px) {
    body { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
    .app-bar {
        position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 55;
        display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; height: 64px; padding: 0 4px 9px;
        border-radius: 22px; background: rgba(15, 23, 42, .82); border: 1px solid rgba(255,255,255,.08);
        box-shadow: 0 16px 40px rgba(0,0,0,.35);
        -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
    }
    .app-bar a { display: grid; justify-items: center; gap: 3px; font-size: .64rem; font-weight: 600; color: #94a3b8; }
    .app-bar a i { font-size: 1.05rem; }
    .app-bar a[aria-current="page"] { color: #f87171; }
    .app-bar .app-call { color: #fff; }
    .app-call-btn { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto -24px; border-radius: 9999px; background: linear-gradient(135deg,#ef4444,#b91c1c); box-shadow: 0 10px 24px rgba(239,68,68,.5), 0 0 0 5px rgba(15,23,42,.9); }
    .app-call-btn i { font-size: 1.15rem; color: #fff; }
    .back-to-top.show { bottom: calc(92px + env(safe-area-inset-bottom)); }
    .page-hero { padding-top: 112px; padding-bottom: 40px; }
}

@media (prefers-reduced-motion: reduce) {
    .orb { animation: none; }
    .reveal { transition: none; opacity: 1; transform: none; }
}

/* Product brand pills (text-only compatibility list) */
.brand-pill { display: inline-block; font-size: .75rem; font-weight: 600; line-height: 1; color: #334155; background: #f1f5f9; border: 1px solid #e2e8f0; padding: .4rem .65rem; border-radius: 9999px; }
