/**
 * MagionPay — shared premium UI effects
 * Purple #7B2CBF + Olive #F97316
 */

:root {
    --fx-purple: #7B2CBF;
    --fx-purple-dark: #5A189A;
    --fx-orange: #F97316;
    --fx-orange-light: #FB923C;
    --fx-glass: rgba(255, 255, 255, 0.72);
    --fx-glass-dark: rgba(12, 12, 15, 0.55);
    --fx-radius: 20px;
}

/* ── Animated mesh background ── */
.mesh-bg {
    position: relative;
    overflow: hidden;
}

.mesh-bg::before,
.mesh-bg::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

.mesh-bg::before {
    width: min(520px, 80vw);
    height: min(520px, 80vw);
    top: -120px;
    left: -80px;
    background: radial-gradient(circle, rgba(123, 44, 191, 0.35) 0%, transparent 70%);
    animation: meshFloatA 18s ease-in-out infinite;
}

.mesh-bg::after {
    width: min(420px, 70vw);
    height: min(420px, 70vw);
    bottom: -100px;
    right: -60px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.22) 0%, transparent 70%);
    animation: meshFloatB 22s ease-in-out infinite;
}

.mesh-bg > * {
    position: relative;
    z-index: 1;
}

@keyframes meshFloatA {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, 20px) scale(1.05); }
}

@keyframes meshFloatB {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-24px, -16px) scale(1.08); }
}

/* ── Floating orbs (hero) ── */
.hero-orbs {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.45;
}

.hero-orb-1 {
    width: 280px;
    height: 280px;
    top: 12%;
    right: 8%;
    background: rgba(123, 44, 191, 0.35);
    animation: orbDrift1 14s ease-in-out infinite;
}

.hero-orb-2 {
    width: 200px;
    height: 200px;
    bottom: 18%;
    left: 55%;
    background: rgba(249, 115, 22, 0.28);
    animation: orbDrift2 18s ease-in-out infinite;
}

@keyframes orbDrift1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, 30px); }
}

@keyframes orbDrift2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(24px, -20px); }
}

/* ── Ken Burns on hero slides ── */
.carousel-slide.active {
    animation: kenBurns 12s ease-out forwards;
}

@keyframes kenBurns {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

/* ── Glass panels ── */
.glass-panel {
    background: var(--fx-glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 24px 60px rgba(12, 12, 15, 0.1);
}

.glass-panel-dark {
    background: var(--fx-glass-dark);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(123, 44, 191, 0.28);
    box-shadow:
        0 28px 64px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ── Card hover lift + glow ── */
.fx-card {
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.fx-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 28px 56px rgba(12, 12, 15, 0.14),
        0 0 0 1px rgba(123, 44, 191, 0.12),
        0 0 32px rgba(123, 44, 191, 0.08);
    border-color: rgba(123, 44, 191, 0.22) !important;
}

.fx-card-glow-orange:hover {
    box-shadow:
        0 28px 56px rgba(12, 12, 15, 0.14),
        0 0 28px rgba(249, 115, 22, 0.14);
}

/* ── Shimmer button ── */
.btn-shimmer {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn-shimmer::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 80%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(255, 255, 255, 0.28) 45%,
        transparent 100%
    );
    transform: skewX(-18deg);
    transition: left 0.55s ease;
}

.btn-shimmer:hover::after {
    left: 140%;
}

/* ── Animated nav link underline ── */
.nav-link-fx {
    position: relative;
    text-decoration: none;
}

.nav-link-fx::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--fx-purple), var(--fx-orange));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav-link-fx:hover::after {
    transform: scaleX(1);
}

/* ── Scroll reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* ── Trust strip ── */
.trust-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px 32px;
    padding: 28px 24px;
    border-radius: var(--fx-radius);
    background: linear-gradient(135deg, rgba(123, 44, 191, 0.06), rgba(249, 115, 22, 0.06));
    border: 1px solid rgba(123, 44, 191, 0.12);
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e1e28;
}

.trust-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3edff, #FFF4E6);
    font-size: 1rem;
}

/* ── Pillars (Por que MagionPay) ── */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.pillar-card {
    padding: 32px 26px;
    border-radius: var(--fx-radius);
    background: var(--white, #fff);
    border: 1px solid #e8e4f0;
    text-align: center;
}

.pillar-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #7B2CBF, #F97316);
    color: #fff;
    box-shadow: 0 12px 28px rgba(123, 44, 191, 0.22);
}

.pillar-card h3 {
    font-family: "Outfit", sans-serif;
    font-size: 1.15rem;
    margin: 0 0 8px;
    color: #1e1e28;
}

.pillar-card p {
    margin: 0;
    color: #5c5c6e;
    font-size: 0.92rem;
    line-height: 1.55;
}

/* ── FAQ accordion ── */
.faq-list {
    display: grid;
    gap: 12px;
    max-width: 760px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid #e8e4f0;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-item.is-open {
    border-color: rgba(123, 44, 191, 0.35);
    box-shadow: 0 12px 32px rgba(123, 44, 191, 0.1);
}

.faq-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: #1e1e28;
    text-align: left;
    cursor: pointer;
}

.faq-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.28s ease;
}

.faq-item.is-open .faq-panel {
    grid-template-rows: 1fr;
}

.faq-panel-inner {
    overflow: hidden;
}

.faq-panel-content {
    padding: 0 22px 18px;
    color: #5c5c6e;
    font-size: 0.92rem;
    line-height: 1.6;
}

/* ── Auth page layout ── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    position: relative;
    overflow: hidden;
    background: #090909;
}

.auth-page-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.22;
    filter: blur(2px);
}

.auth-page-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(123, 44, 191, 0.32) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 90%, rgba(249, 115, 22, 0.18) 0%, transparent 50%),
        linear-gradient(180deg, rgba(9, 9, 9, 0.75) 0%, rgba(9, 9, 9, 0.92) 100%);
}

.auth-card {
    width: 100%;
    max-width: 460px;
    padding: 32px 28px;
    border-radius: 22px;
    position: relative;
    z-index: 2;
}

.auth-card-wide {
    max-width: 540px;
}

.auth-input:focus {
    border-color: var(--fx-purple) !important;
    box-shadow: 0 0 0 3px rgba(123, 44, 191, 0.22) !important;
}

.auth-alert {
    animation: authAlertIn 0.35s ease;
}

@keyframes authAlertIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Footer rich ── */
.footer-rich {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 32px;
    text-align: left;
    padding-bottom: 32px;
    border-bottom: 1px solid #e8e4f0;
    margin-bottom: 24px;
}

.footer-col h4 {
    font-family: "Outfit", sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #1e1e28;
    margin: 0 0 14px;
}

.footer-col a {
    display: block;
    color: #5c5c6e;
    text-decoration: none;
    font-size: 0.88rem;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--fx-purple);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .mesh-bg::before,
    .mesh-bg::after,
    .hero-orb,
    .carousel-slide.active,
    .reveal,
    .btn-shimmer::after {
        animation: none !important;
        transition: none !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 960px) {
    .pillars-grid {
        grid-template-columns: 1fr;
    }

    .footer-rich {
        grid-template-columns: 1fr;
        text-align: center;
    }
}
