/* ============================================================================
   Profile Completion Journey
   - Brand gold: #E8BA00 / #DBB105. BEM `.pj-*`.
   - The card blends into the hero (it replaces the hero title): no card chrome,
     just a whisper of a gold wash. The road runs 0%→100% left-to-right in BOTH
     locales (the track is forced LTR); only the surrounding chrome follows dir.
   - The claim sheet (`.pj-sheet`) and the navbar gift (`.pj-gift-pill` /
     `.pj-gift-drawer`) live globally so the reward can be claimed from any page.
   ========================================================================== */

:root {
    --pj-gold: #E8BA00;
    --pj-gold-deep: #DBB105;
    --pj-gold-soft: #FDE68A;
    --pj-ink: #1F2937;
    --pj-muted: #6B7280;
}

/* ── Card: blends into the hero, no panel chrome ────────────────────────── */
.pj-card {
    /* sizing knobs — overridden per breakpoint */
    --pj-gauge: 122px;
    --pj-road-h: 96px;
    --pj-car-w: 150px;
    --pj-flag-w: 120px;
    --pj-gift-w: 80px;
    --pj-pin-w: 28px;
    --pj-dot: 13px;

    position: relative;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: 4px 8px 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(232, 186, 0, 0.045) 160%);
    border-radius: 0 0 18px 18px;
    filter: drop-shadow(1px 4px 10px rgba(0, 0, 0, 0.06));
    font-family: 'Rubik', 'Tajawal', sans-serif;
}

/* ── Top region: copy column + gauge, side by side ──────────────────────── */
.pj-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 3vw, 34px);
    margin-bottom: 6px;
}

.pj-copy {
    flex: 0 1 460px;
    min-width: 0;
    text-align: center;
}
.pj-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
}
.pj-title__icon { width: 22px; height: 22px; flex: 0 0 auto; }
.pj-title__text {
    font-size: 15px;
    font-weight: 600;
    color: var(--pj-ink);
}
.pj-copy__headline {
    margin: 0 0 4px;
    font-size: clamp(18px, 2.4vw, 24px);
    font-weight: 700;
    color: var(--pj-gold);
    line-height: 1.25;
}
.pj-copy__subtext {
    margin: 0 auto;
    font-size: clamp(18px, 2vw, 32px);
    font-size: clamp(12px, 1.5vw, 14px);
    color: var(--pj-muted);
    line-height: 1.5;
}

/* ── Gauge (dynamic ring + bolt + %) ────────────────────────────────────── */
.pj-gauge {
    position: relative;
    width: var(--pj-gauge);
    height: var(--pj-gauge);
    flex: 0 0 auto;
}
.pj-gauge__svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    display: block;
}
.pj-gauge__track { fill: none; stroke: #F2ECD6; stroke-width: 6; }
.pj-gauge__arc {
    fill: none;
    stroke: var(--pj-gold);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset .9s cubic-bezier(.22, 1, .36, 1);
}
.pj-gauge__center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.05;
    text-align: center;
}
.pj-gauge__bolt { width: 13px; height: auto; margin-bottom: 3px; }
.pj-gauge__label { font-size: 10px; color: var(--pj-muted); }
.pj-gauge__pct {
    /* exact Figma token */
    margin: 1px 0;
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 17px;
    line-height: 20px;
    text-align: center;
    color: var(--pj-gold-deep);
}
.pj-gauge__strength {
    font-size: 9.5px;
    font-weight: 600;
    color: var(--pj-gold);
}

/* ── Track (always LTR) ─────────────────────────────────────────────────── */
.pj-track { direction: ltr; }
.pj-track__road {
    position: relative;
    height: var(--pj-road-h);
}
.pj-track__road-img {
    position: absolute;
    left: 0;
    bottom: 6px;
    width: 100%;
    height: auto;
}

/* milestone dots sit on the road notches */
.pj-track__dot {
    position: absolute;
    bottom: 0px;
    width: var(--pj-dot);
    height: var(--pj-dot);
    border-radius: 50%;
    background: #D9D2BC;
    transform: translateX(-50%);
    z-index: 2;
    transition: background .4s ease;
}
.pj-track__dot.is-done { background: var(--pj-gold); }

/* car + pin take their left% inline (current / next milestone) */
.pj-car {
    position: absolute;
    bottom: 14px;
    width: var(--pj-car-w);
    height: auto;
    transform: translateX(-50%);
    transition: left 1s cubic-bezier(.22, 1, .36, 1);
    z-index: 4;
    filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .18));
}
.pj-track__pin {
    position: absolute;
    bottom: 30px;
    width: var(--pj-pin-w);
    height: auto;
    transform: translateX(-50%);
    z-index: 3;
    animation: pj-bob 1.8s ease-in-out infinite;
}
@keyframes pj-bob {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-4px); }
}
.pj-track__flag {
    position: absolute;
    bottom: 34px;
    left: 91%;
    width: var(--pj-flag-w);
    height: auto;
    transform: translateX(-50%);
    z-index: 2;
}

/* the goal gift at the finish (only while in progress) */
.pj-gift {
    position: absolute;
    bottom: 6px;
    left: 91.5%;
    width: var(--pj-gift-w);
    height: auto;
    transform: translateX(-50%);
    z-index: 3;
    transition: transform .2s ease;
}
.pj-gift--goal { display: block; line-height: 0; }
.pj-gift:hover { transform: translateX(-50%) translateY(-3px) scale(1.04); }
.pj-gift__img { width: 100%; height: auto; display: block; }
.pj-gift__pulse {
    position: absolute;
    left: 50%;
    bottom: 30%;
    width: 70%;
    height: 70%;
    transform: translate(-50%, 50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 186, 0, .4) 0%, rgba(232, 186, 0, 0) 70%);
    animation: pj-pulse 1.8s ease-out infinite;
    z-index: -1;
}
@keyframes pj-pulse {
    0% { transform: translate(-50%, 50%) scale(.6); opacity: .9; }
    100% { transform: translate(-50%, 50%) scale(1.5); opacity: 0; }
}

/* milestone tick labels (left% aligned to road notches) */
.pj-track__labels {
    position: relative;
    height: 16px;
    margin-top: 2px;
}
.pj-track__label {
    position: absolute;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 600;
    color: #B7B7B7;
}
.pj-track__label.is-done { color: var(--pj-gold-deep); }

/* ── Hero padding shrinks while the journey occupies the title slot ─────── */
.hero.hero--journey { padding-top: 96px; }
@media (max-width: 768px) {
    .hero.hero--journey { padding-top: 74px; }
}

/* ── Responsive: scale the road furniture ───────────────────────────────── */
@media (max-width: 900px) {
    .pj-card {
        --pj-gauge: 112px;
        --pj-road-h: 84px;
        --pj-car-w: 124px;
        --pj-flag-w: 100px;
        --pj-gift-w: 66px;
        --pj-pin-w: 24px;
    }
}
@media (max-width: 600px) {
    .pj-card {
        --pj-gauge: 96px;
        --pj-road-h: 60px;
        --pj-car-w: 82px;
        --pj-flag-w: 62px;
        --pj-gift-w: 46px;
        --pj-pin-w: 18px;
        --pj-dot: 6px;
        padding: 2px 4px 8px;
    }
    .pj-main { gap: 10px; }
    .pj-title__icon { width: 18px; height: 18px; }
    .pj-title__text { font-size: 13px; }
    .pj-gauge__pct { font-size: 15px; }
    .pj-track__label { font-size: 9.5px; }
    .pj-car { bottom: 10px; }
    .pj-track__flag { bottom: 22px; }
    .pj-track__pin { bottom: 20px; }
}
@media (max-width: 380px) {
    .pj-card {
        --pj-car-w: 70px;
        --pj-flag-w: 52px;
        --pj-gift-w: 40px;
        --pj-road-h: 54px;
    }
    .pj-copy__subtext { display: none; }
}

/* ============================================================================
   Navbar gift entry point
   ========================================================================== */
.pj-gift-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    padding: 6px;
    border: 1px solid #F4E6B0;
    border-radius: 14px;
    background: linear-gradient(180deg, #FFFBEC 0%, #FFF6D6 100%);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(232, 186, 0, .18);
    transition: transform .18s ease, box-shadow .18s ease;
}
.pj-gift-pill:hover { transform: translateY(-2px); box-shadow: 0 7px 16px rgba(232, 186, 0, .28); }
.pj-gift-pill:active { transform: translateY(0); }
.pj-gift-pill__img { width: 28px; height: 28px; display: block; position: relative; z-index: 2; }
.pj-gift-pill__pulse {
    position: absolute;
    inset: -3px;
    border-radius: 16px;
    box-shadow: 0 0 0 0 rgba(232, 186, 0, .5);
    animation: pj-ring 1.8s ease-out infinite;
    z-index: 1;
}
@keyframes pj-ring {
    0% { box-shadow: 0 0 0 0 rgba(232, 186, 0, .5); }
    70% { box-shadow: 0 0 0 10px rgba(232, 186, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(232, 186, 0, 0); }
}

/* drawer (burger menu) variant — full-width CTA */
.pj-gift-drawer {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 4px 0 10px;
    padding: 12px 14px;
    border: 1px solid #F4E6B0;
    border-radius: 14px;
    background: linear-gradient(135deg, #FFFBEC 0%, #FFF1C2 100%);
    cursor: pointer;
    text-align: start;
    box-shadow: 0 4px 12px rgba(232, 186, 0, .15);
}
.pj-gift-drawer__icon { position: relative; width: 34px; height: 34px; flex: 0 0 auto; }
.pj-gift-drawer__icon img { width: 100%; height: 100%; display: block; position: relative; z-index: 2; }
.pj-gift-drawer__pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(232, 186, 0, .5);
    animation: pj-ring 1.8s ease-out infinite;
}
.pj-gift-drawer__text {
    flex: 1 1 auto;
    font-family: 'Rubik', 'Tajawal', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #7A6200;
}
.pj-gift-drawer__badge {
    flex: 0 0 auto;
    min-width: 26px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--pj-gold);
    color: #4A3B00;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

/* ============================================================================
   Claim sheet — centered card on desktop, bottom sheet on phones
   ========================================================================== */
.pj-sheet {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pj-sheet[hidden] { display: none; }
.pj-sheet__overlay {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, .55);
    backdrop-filter: blur(2px);
    animation: pj-fade .2s ease;
}
.pj-sheet__panel {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 16px;
    background: #fff;
    border-radius: 24px;
    padding: 30px 26px 26px;
    text-align: center;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
    animation: pj-pop .3s cubic-bezier(.22, 1, .36, 1);
    overflow: hidden;
}
.pj-sheet__grip { display: none; }
.pj-sheet__x {
    position: absolute;
    top: 12px;
    inset-inline-end: 16px;
    border: 0;
    background: none;
    font-size: 26px;
    line-height: 1;
    color: #9CA3AF;
    cursor: pointer;
    z-index: 3;
}
.pj-sheet__view[hidden] { display: none; }
.pj-sheet__art {
    position: relative;
    height: 188px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}
.pj-sheet__coin {
    width: 150px;
    height: auto;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 8px 18px rgba(232, 186, 0, .35));
    animation: pj-coin-in .5s cubic-bezier(.22, 1, .36, 1);
}
.pj-sheet__confetti {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    z-index: 1;
}
.pj-sheet__confetti.is-on { animation: pj-confetti 1s ease-out; }
.pj-sheet__title {
    margin: 6px 0 8px;
    font-family: 'Rubik', 'Tajawal', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--pj-ink);
}
.pj-sheet__text {
    margin: 0 auto 22px;
    max-width: 320px;
    font-size: 14px;
    color: var(--pj-muted);
    line-height: 1.6;
}
.pj-sheet__text strong { color: var(--pj-gold-deep); }
.pj-sheet__actions { display: flex; flex-direction: column; gap: 12px; }
.pj-sheet__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    border: 0;
    border-radius: 14px;
    font-family: 'Rubik', 'Tajawal', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: filter .15s, transform .1s, background .15s;
}
.pj-sheet__btn--primary {
    background: linear-gradient(180deg, var(--pj-gold-soft) 0%, var(--pj-gold) 100%);
    color: #4A3B00;
    box-shadow: 0 8px 18px rgba(232, 186, 0, .3);
}
.pj-sheet__btn--primary:hover { filter: brightness(1.04); }
.pj-sheet__btn--primary:active { transform: translateY(1px); }
.pj-sheet__btn--primary[disabled] { opacity: .65; cursor: default; }
.pj-sheet__btn--ghost {
    height: 48px;
    background: #fff;
    border: 1.5px solid #E9E2C6;
    color: var(--pj-muted);
}
.pj-sheet__btn--ghost:hover { color: var(--pj-ink); border-color: #D9D0AE; }

@keyframes pj-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pj-pop { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pj-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes pj-coin-in { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes pj-confetti { 0% { opacity: 0; transform: scale(.9); } 25% { opacity: 1; } 100% { opacity: 1; transform: scale(1); } }

/* phones → bottom sheet */
@media (max-width: 600px) {
    .pj-sheet { align-items: flex-end; }
    .pj-sheet__panel {
        max-width: none;
        margin: 0;
        width: 100%;
        min-height: 52vh;
        border-radius: 26px 26px 0 0;
        padding: 22px 22px calc(26px + env(safe-area-inset-bottom));
        animation: pj-slide-up .32s cubic-bezier(.22, 1, .36, 1);
    }
    .pj-sheet__grip {
        display: block;
        width: 42px;
        height: 5px;
        margin: 0 auto 14px;
        border-radius: 999px;
        background: #E5E0CC;
    }
    .pj-sheet__art { height: 168px; }
    .pj-sheet__coin { width: 132px; }
}

/* ── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .pj-gauge__arc, .pj-car { transition: none; }
    .pj-gift__pulse, .pj-track__pin, .pj-gift-pill__pulse, .pj-gift-drawer__pulse,
    .pj-sheet__coin, .pj-sheet__confetti.is-on, .pj-sheet__overlay, .pj-sheet__panel { animation: none; }
}

/* ============================================================================
   Home card: "what's missing" hover tooltip (nudge toward the reward)
   ========================================================================== */
.pj-gauge { cursor: help; }
.pj-missing {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    width: max-content;
    max-width: 240px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #F1E4B8;
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(17, 24, 39, .16);
    text-align: start;
    direction: inherit;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 20;
}
.pj-gauge:hover .pj-missing,
.pj-gauge:focus-within .pj-missing {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.pj-missing::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-bottom-color: #fff;
}
.pj-missing__title {
    display: block;
    margin-bottom: 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--pj-gold-deep);
}
.pj-missing__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.pj-missing__list li {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--pj-ink);
}
.pj-missing__list li::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1.5px solid var(--pj-gold);
    flex: 0 0 auto;
}
.pj-missing__list li.is-more { color: var(--pj-muted); font-weight: 600; }
.pj-missing__list li.is-more::before { border: none; }

/* ============================================================================
   Profile completion banner: reward note (the 100% payoff, folded in)
   Sits inside .pf-complete-banner__body, under the flashing jump-to-field chips.
   ========================================================================== */
.pf-complete-banner__reward {
    margin-top: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px dashed rgba(232, 186, 0, 0.65);
}
.pf-complete-banner__reward-head {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pf-complete-banner__reward-icon {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
}
.pf-complete-banner__reward-text {
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.35;
    color: #7A6200;
}
.pf-complete-banner__reward-sub {
    display: block;
    margin-top: 9px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #9A7A00;
    opacity: 0.9;
}
.pf-complete-banner__reward-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
/* Keep the reward note gold and positive even inside the critical (red) banner. */
.pf-complete-banner.is-critical .pf-complete-banner__reward {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(232, 186, 0, 0.7);
}
.pf-complete-banner.is-critical .pf-complete-banner__reward-text { color: #7A6200; }
