/* Guest homepage — dark app UI. Loaded after fund-theme.css */

html:has(body.page-home) {
    background: #07090b;
}

body.page-home,
body.page-home:not(.dark-mode),
body.dark-mode.page-home {
    --hm-bg: #07090b;
    --hm-card: #14181d;
    --hm-card-2: #1c2229;
    --hm-text: #f4f5f7;
    --hm-mute: #9aa3ad;
    --hm-line: rgba(255, 255, 255, 0.08);
    --hm-gold: #e2c36a;
    --hm-frame-bg: linear-gradient(180deg, rgba(226, 195, 106, 0.1), transparent 58%), #12161b;
    --hm-frame-shadow: inset 0 0 0 1px rgba(226, 195, 106, 0.22), 0 0 16px rgba(226, 195, 106, 0.12), 0 8px 18px rgba(0, 0, 0, 0.2);
    --hm-font: "Cairo", "Segoe UI", sans-serif;
    --hm-display: "El Messiri", "Cairo", sans-serif;
    --hm-kufi: "Reem Kufi", "Cairo", sans-serif;
    background: var(--hm-bg) !important;
    background-image: radial-gradient(80% 42% at 50% -8%, rgba(226, 195, 106, 0.1), transparent 52%) !important;
    color: var(--hm-text) !important;
    font-family: var(--hm-font);
}

.hm-hero,
.hm-shell {
    width: 100%;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.1rem;
    padding-right: 1.1rem;
}

.hm-hero {
    position: relative;
    display: flow-root !important;
    flex-shrink: 0;
    overflow: hidden;
    padding-top: 1.35rem;
    padding-bottom: 1.7rem;
}

.hm-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.hm-orbs i {
    position: absolute;
    border-radius: 50%;
    filter: blur(18px);
    opacity: 0.55;
    animation: hm-orb 9s ease-in-out infinite;
}

.hm-orbs i:nth-child(1) {
    width: 140px;
    height: 140px;
    top: -28px;
    right: -18px;
    background: rgba(226, 195, 106, 0.16);
}

.hm-orbs i:nth-child(2) {
    width: 90px;
    height: 90px;
    top: 38%;
    left: -22px;
    background: rgba(230, 0, 0, 0.1);
    animation-delay: -3s;
}

.hm-orbs i:nth-child(3) {
    width: 70px;
    height: 70px;
    bottom: 8%;
    right: 22%;
    background: rgba(120, 170, 255, 0.1);
    animation-delay: -6s;
}

@keyframes hm-orb {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(8px, -10px, 0) scale(1.08); }
}

.hm-top {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.hm-top,
.hm-kicker,
.hm-hero h1,
.hm-title-line,
.hm-lead,
.hm-quick,
.hm-steps,
.hm-hero-actions {
    position: relative;
    z-index: 1;
}

.hm-seal {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid rgba(226, 195, 106, 0.5);
    box-shadow: inset 0 0 0 4px rgba(226, 195, 106, 0.1);
    background: radial-gradient(circle at 35% 30%, rgba(226, 195, 106, 0.16), transparent 55%);
    color: var(--hm-gold);
    font-family: var(--hm-kufi);
    font-size: 1.05rem;
    font-weight: 700;
    animation: hm-seal-pulse 4.8s ease-in-out infinite;
}

.hm-hello {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.hm-hello strong {
    font-family: var(--hm-display);
    font-size: 1.12rem;
    font-weight: 700;
    color: #fff;
}

.hm-hello time {
    color: var(--hm-mute);
    font-size: 0.78rem;
    font-weight: 500;
}

.hm-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.55rem;
    color: var(--hm-gold);
    font-family: var(--hm-kufi);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    background: none;
    padding: 0;
    border-radius: 0;
}

.hm-kicker::before {
    content: "";
    width: 7px;
    height: 7px;
    transform: rotate(45deg);
    border: 1px solid var(--hm-gold);
    box-shadow: 0 0 10px rgba(226, 195, 106, 0.35);
}

.hm-hero h1 {
    position: relative !important;
    display: block !important;
    margin: 0 0 0.55rem;
    font-family: var(--hm-display);
    font-size: clamp(1.75rem, 7.2vw, 2.3rem);
    font-weight: 700;
    line-height: 1.5;
    color: #f6ecd0 !important;
    -webkit-text-fill-color: #f6ecd0;
}

.hm-title-line {
    display: block;
    width: 56px;
    height: 2px;
    margin: 0 0 0.85rem 0;
    margin-inline-end: auto;
    background: linear-gradient(to left, var(--hm-gold), transparent);
    border-radius: 2px;
}

.hm-lead {
    margin: 0 0 1.1rem;
    color: var(--hm-mute) !important;
    -webkit-text-fill-color: var(--hm-mute);
    font-size: 0.94rem;
    line-height: 1.85;
    font-weight: 400;
}

.hm-quick {
    position: relative;
    overflow: visible;
    margin-bottom: 0.85rem;
    padding: 0.85rem 0.9rem 0.7rem;
    border-radius: 18px;
    background: rgba(20, 24, 29, 0.88);
    border: 1px solid rgba(226, 195, 106, 0.18);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.hm-quick[data-flip="2"] {
    animation: hm-kind-border 5.6s ease-in-out infinite;
}

@keyframes hm-kind-border {
    0%, 42% { border-color: rgba(226, 195, 106, 0.18); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22); }
    50%, 92% { border-color: rgba(230, 0, 0, 0.34); box-shadow: 0 10px 28px rgba(230, 0, 0, 0.08); }
    100% { border-color: rgba(226, 195, 106, 0.18); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22); }
}

.hm-quick::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.08) 50%, transparent 65%);
    transform: translateX(-130%);
    animation: hm-sheen 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes hm-sheen {
    0%, 62% { transform: translateX(-130%); }
    100% { transform: translateX(130%); }
}

.hm-quick-scene {
    position: relative;
    min-height: 52px;
}

.hm-quick-card {
    position: relative;
    height: 52px;
}

.hm-quick:has(.hm-copy:hover),
.hm-quick:has(.hm-copy:hover) .hm-quick-face,
.hm-quick:has(.hm-copy:hover) .hm-quick-dots i {
    animation-play-state: paused;
}

.hm-quick-face {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    transform-origin: center;
}

.hm-quick[data-flip="2"] .hm-quick-face:nth-child(1) {
    animation: hm-face-a 5.6s ease-in-out infinite;
}

.hm-quick[data-flip="2"] .hm-quick-face:nth-child(2) {
    animation: hm-face-b 5.6s ease-in-out infinite;
}

@keyframes hm-face-a {
    0%, 40% { opacity: 1; visibility: visible; transform: scaleY(1); z-index: 2; pointer-events: auto; }
    46%, 94% { opacity: 0; visibility: hidden; transform: scaleY(0.08); z-index: 0; pointer-events: none; }
    100% { opacity: 1; visibility: visible; transform: scaleY(1); z-index: 2; pointer-events: auto; }
}

@keyframes hm-face-b {
    0%, 40% { opacity: 0; visibility: hidden; transform: scaleY(0.08); z-index: 0; pointer-events: none; }
    46%, 94% { opacity: 1; visibility: visible; transform: scaleY(1); z-index: 2; pointer-events: auto; }
    100% { opacity: 0; visibility: hidden; transform: scaleY(0.08); z-index: 0; pointer-events: none; }
}

.hm-quick-face .hm-copy {
    margin-inline-start: auto;
}

.hm-quick-ico-wrap {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    padding: 3px;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 16px rgba(0, 0, 0, 0.25);
}

.hm-quick-face[data-kind="vodafone"] .hm-quick-ico-wrap {
    box-shadow: 0 0 0 1px rgba(230, 0, 0, 0.28), 0 8px 16px rgba(230, 0, 0, 0.12);
}

.hm-quick-ico {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    background: #fff;
}

.hm-quick-name {
    display: block;
    color: var(--hm-gold);
    font-family: var(--hm-kufi);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.12rem;
    line-height: 1.3;
}

.hm-quick-face[data-kind="vodafone"] .hm-quick-name {
    color: #ff8a8a;
}

.hm-quick strong {
    display: block;
    color: #fff;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
}

.hm-quick-dots {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 0.55rem;
}

.hm-quick-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
}

.hm-quick[data-flip="2"] .hm-quick-dots i:nth-child(1) {
    animation: hm-dot-a 5.6s ease-in-out infinite;
}

.hm-quick[data-flip="2"] .hm-quick-dots i:nth-child(2) {
    animation: hm-dot-b 5.6s ease-in-out infinite;
}

.hm-quick:has(.hm-copy:hover) .hm-quick-dots i {
    animation-play-state: paused;
}

@keyframes hm-dot-a {
    0%, 42% { width: 16px; border-radius: 99px; background: var(--hm-gold); }
    50%, 92% { width: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); }
    100% { width: 16px; border-radius: 99px; background: var(--hm-gold); }
}

@keyframes hm-dot-b {
    0%, 42% { width: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); }
    50%, 92% { width: 16px; border-radius: 99px; background: var(--hm-gold); }
    100% { width: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); }
}

@keyframes hm-seal-pulse {
    0%, 100% { box-shadow: inset 0 0 0 4px rgba(226, 195, 106, 0.1); }
    50% { box-shadow: inset 0 0 0 4px rgba(226, 195, 106, 0.22), 0 0 18px rgba(226, 195, 106, 0.16); }
}

.hm-steps {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.4rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.hm-steps::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(226, 195, 106, 0.35), transparent);
}

.hm-steps li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 36px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--hm-mute);
    font-size: 0.75rem;
    font-weight: 600;
}

.hm-steps b {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(226, 195, 106, 0.16);
    color: var(--hm-gold);
    font-size: 0.68rem;
}

.hm-hero-actions {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 0.55rem;
}

.hm-hero-actions:not(:has(.hm-cta-ghost)),
.hm-hero-actions:not(:has(.hm-cta)) {
    grid-template-columns: 1fr;
}

.hm-cta,
.hm-cta-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0.65rem 0.9rem;
    border-radius: 14px;
    font-family: var(--hm-display);
    font-weight: 700;
    text-decoration: none;
}

.hm-cta {
    position: relative;
    overflow: hidden;
    background: var(--hm-gold);
    color: #1a1408 !important;
}

.hm-cta::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.38) 50%, transparent 70%);
    transform: translateX(-130%);
    animation: hm-sheen 5.5s ease-in-out infinite;
    pointer-events: none;
}

.hm-cta-ghost {
    background: var(--hm-card);
    color: #fff !important;
    border: 1px solid var(--hm-line);
}

.hm-cta:active,
.hm-cta-ghost:active,
.hm-row:active,
.hm-pay-go:active {
    transform: scale(0.985);
}

.hm-shell {
    display: flex;
    flex-direction: column;
    gap: 1.85rem;
    padding-top: 0.15rem;
    padding-bottom: 2.4rem;
}

.hm-section h2 {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 0.75rem;
    color: #fff !important;
    font-family: var(--hm-display);
    font-size: 1.18rem;
    font-weight: 700;
    border: 0;
    padding: 0;
}

.hm-section h2::before {
    content: "";
    width: 18px;
    height: 1.5px;
    background: var(--hm-gold);
    flex: 0 0 auto;
}

.hm-list,
.hm-news {
    background: var(--hm-card);
    border: 1px solid var(--hm-line);
    border-radius: 20px;
    overflow: hidden;
}

.hm-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 66px;
    padding: 0.9rem 1rem;
    color: var(--hm-text);
    text-decoration: none;
    border-bottom: 1px solid var(--hm-line);
}

.hm-row:last-child { border-bottom: 0; }
.hm-row:hover { background: var(--hm-card-2); }
.hm-row:hover .hm-ico { color: #f0d78a; }

button.hm-row {
    width: 100%;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
    text-align: inherit;
}

.hm-install-card {
    margin: 0;
}

.hm-install-cta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    min-height: 72px;
    padding: 0.95rem 1rem;
    border: 1.5px solid rgba(226, 195, 106, 0.45);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(226, 195, 106, 0.14), rgba(226, 195, 106, 0.04)), #14181d;
    color: #f4f5f7;
    font: inherit;
    cursor: pointer;
    text-align: inherit;
}

.hm-install-cta strong {
    display: block;
    color: #f6ecd0;
    font-size: 0.98rem;
}

.hm-install-cta small {
    display: block;
    margin-top: 0.2rem;
    color: #cbb98a;
    font-size: 0.75rem;
    line-height: 1.55;
}

@media (display-mode: standalone) {
    .hm-install,
    .hm-install-card,
    .header-install-btn { display: none !important; }
}

.hm-ico {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #2a323c, #1c232b);
    color: var(--hm-gold);
    flex: 0 0 auto;
}

.hm-row-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}

.hm-row strong {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
}

.hm-row small {
    color: var(--hm-mute);
    font-size: 0.75rem;
}

.hm-chev {
    color: #6d7680;
    font-size: 0.72rem;
}

.hm-pay-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.hm-pay {
    position: relative;
    overflow: hidden;
    background: var(--hm-card);
    border: 1px solid var(--hm-line);
    border-radius: 22px;
    padding: 1.05rem 1rem 1.05rem;
}

.hm-pay::before {
    content: "";
    position: absolute;
    top: -40px;
    left: -30px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(226, 195, 106, 0.12), transparent 68%);
    pointer-events: none;
}

.hm-pay[data-kind="vodafone"] {
    border-color: rgba(230, 0, 0, 0.16);
}

.hm-pay[data-kind="vodafone"]::before {
    background: radial-gradient(circle, rgba(230, 0, 0, 0.12), transparent 68%);
}

.hm-pay-top {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 0.85rem;
    align-items: start;
    margin-bottom: 0.9rem;
}

.hm-pay-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
    color: var(--hm-gold);
    font-family: var(--hm-kufi);
    font-size: 0.78rem;
    font-weight: 600;
}

.hm-pay[data-kind="vodafone"] .hm-pay-badge {
    color: #ff8a8a;
}

.hm-pay-badge img {
    width: 22px;
    height: 22px;
    object-fit: cover;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.hm-pay h3 {
    margin: 0 0 0.3rem;
    color: #fff !important;
    font-family: var(--hm-display);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.5;
}

.hm-pay-top small {
    color: var(--hm-mute);
    font-size: 0.75rem;
}

.hm-qr img {
    display: block;
    width: 86px;
    height: 86px;
    object-fit: cover;
    border-radius: 14px;
    background: #fff;
}

.hm-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.55rem;
    padding: 0.75rem 0.8rem;
    border-radius: 14px;
    background: #0c1014;
}

.hm-field span {
    display: block;
    color: var(--hm-mute);
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 0.18rem;
}

.hm-field strong {
    display: block;
    color: #fff;
    font-size: 0.98rem;
    font-weight: 800;
    overflow-wrap: anywhere;
    letter-spacing: 0.01em;
}

.hm-copy {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0.3rem 0.8rem;
    border: 0;
    border-radius: 999px;
    background: #232a32;
    color: #fff;
    font-weight: 700;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.hm-copy.is-copied {
    background: #1f3d2c;
    color: #8ee0a8;
}

.hm-pay-go {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 0.35rem;
    border-radius: 14px;
    background: var(--hm-gold);
    color: #1a1408 !important;
    font-weight: 800;
    text-decoration: none;
}

.hm-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
}

.hm-stat.is-featured { order: -1; }

.hm-stat {
    background: var(--hm-card);
    border: 1px solid var(--hm-line);
    border-radius: 18px;
    padding: 0.95rem 0.85rem 1rem;
}

.hm-stat.is-featured {
    grid-column: 1 / -1;
    background: linear-gradient(180deg, #1a1f26, #14181d);
    padding: 1.1rem 1rem 1.15rem;
}

.hm-stats .hm-stat:last-child:not(.is-featured) {
    grid-column: 1 / -1;
}

.hm-stat span {
    display: block;
    color: var(--hm-mute);
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.hm-stat strong {
    display: block;
    color: #fff;
    font-size: 1.18rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}

.hm-stat.is-featured strong {
    color: var(--hm-gold);
    font-family: var(--hm-display);
    font-size: 2rem;
    letter-spacing: 0;
    text-shadow: 0 0 24px rgba(226, 195, 106, 0.18);
}

.hm-stat em {
    display: block;
    margin-top: 0.3rem;
    color: var(--hm-mute);
    font-style: normal;
    font-size: 0.7rem;
}

.hm-news-item {
    padding: 1rem 1rem 1.05rem;
    border-bottom: 1px solid var(--hm-line);
}

.hm-news-item:last-child { border-bottom: 0; }

.hm-news-item time {
    display: block;
    color: var(--hm-gold);
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.hm-news-item h3 {
    margin: 0 0 0.4rem;
    color: #fff !important;
    font-family: var(--hm-display);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.65;
}

.hm-news-item.is-quote {
    background:
        linear-gradient(180deg, rgba(226, 195, 106, 0.08), transparent 42%),
        transparent;
}

.hm-news-item.is-quote h3::before {
    content: "“";
    display: block;
    color: var(--hm-gold);
    font-size: 1.8rem;
    line-height: 0.8;
    margin-bottom: 0.35rem;
}

.hm-news-item p {
    margin: 0;
    color: var(--hm-mute) !important;
    font-size: 0.88rem;
    line-height: 1.75;
}

body.page-home::after {
    content: "";
    display: block;
    height: 8.2rem;
    pointer-events: none;
}

@media (min-width: 768px) {
    .hm-hero,
    .hm-shell {
        max-width: 520px;
        padding-left: 1.2rem;
        padding-right: 1.2rem;
    }
    .hm-hero { padding-top: 2rem; }
}

@media (max-width: 360px) {
    .hm-hero-actions {
        grid-template-columns: 1fr;
    }
    .hm-pay-top {
        grid-template-columns: 76px 1fr;
    }
    .hm-qr img {
        width: 76px;
        height: 76px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hm-orbs i,
    .hm-seal,
    .hm-quick::after,
    .hm-cta::after,
    .hm-quick[data-flip="2"],
    .hm-quick[data-flip="2"] .hm-quick-face,
    .hm-quick-dots i {
        animation: none;
    }
    .hm-quick-face:nth-child(2) {
        display: none;
    }
}
