/* ========================================
   HOME PAGE - CreTopup
   Scoped to .home. Palette, fonts and the shared
   .cr-tag / .cr-cut shapes live in theme.css.
   ======================================== */

.home {
    --home-gutter: 20px;
    --home-card: #191444;
}

.home-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--home-gutter);
}

/* ========================================
   HERO SLIDER (full width, 24:9-ish banner)
   ======================================== */

.home-hero {
    width: 100%;
}

.home-hero-frame {
    position: relative;
    aspect-ratio: 4267 / 1667;
    overflow: hidden;
    background:
        radial-gradient(60% 90% at 50% 50%, rgba(242, 183, 63, 0.18), transparent 70%),
        linear-gradient(135deg, var(--cr-navy) 0%, var(--cr-bg-2) 100%);
    border-bottom: 4px solid var(--cr-gold);
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.home-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.home-hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.home-hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
}

/* Default slide (no active sliders): logo centered on the frame background */
.home-hero-slide--default {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5% 12%;
}

.home-hero-slide--default img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
}

.home-hero-nav {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 44px;
    height: 44px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: rgba(11, 9, 32, 0.55);
    color: var(--cr-gold-2);
    font-size: 16px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.25s ease, background 0.25s ease;
}

.home-hero-frame:hover .home-hero-nav,
.home-hero-nav:focus-visible {
    opacity: 1;
}

.home-hero-nav:hover {
    background: var(--cr-gold);
    color: var(--cr-navy);
}

.home-hero-nav--prev { left: 20px; }
.home-hero-nav--next { right: 20px; }

.home-hero-dots {
    position: absolute;
    left: 50%;
    bottom: 14px;
    z-index: 5;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.home-hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: none;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.5);
    transform: rotate(45deg);
    cursor: pointer;
    transition: background 0.3s ease;
}

.home-hero-dot.is-active {
    background: var(--cr-gold);
}

/* ========================================
   PRODUCTS
   ======================================== */

.home-products {
    margin-top: 40px;
}

.home-title {
    font-family: var(--cr-font-head);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
    color: #fff;
}

.home-title span {
    color: var(--cr-gold);
}

.home-lead {
    color: var(--cr-muted);
    font-size: 15px;
    line-height: 1.75;
}

.home-lead strong {
    color: #fff;
}

.home-games {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
    margin-top: 28px;
}

.home-game {
    position: relative;
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: var(--home-card);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-game:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 0 2px var(--cr-gold);
}

.home-game-media {
    aspect-ratio: 4 / 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16%;
    background:
        radial-gradient(80% 60% at 50% 35%, rgba(242, 183, 63, 0.16), transparent 70%),
        linear-gradient(180deg, var(--cr-navy-2) 0%, var(--home-card) 100%);
}

.home-game-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.home-game:hover .home-game-media img {
    transform: scale(1.08);
}

/* Gold name bar with a slanted top edge */
.home-game-name {
    position: relative;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px 8px;
    background: var(--cr-gold-grad);
}

.home-game-name::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 12px;
    background: var(--cr-gold-grad);
    clip-path: polygon(0 100%, 0 40%, 30% 40%, 38% 0, 100% 0, 100% 100%);
}

.home-game-name h3 {
    font-family: var(--cr-font-head);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    color: var(--cr-navy);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   QUICK LINKS
   ======================================== */

.home-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 48px;
}

.home-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--cr-navy);
    border-left: 4px solid var(--cr-gold);
    transition: background 0.25s ease;
}

.home-link:hover {
    background: var(--cr-navy-2);
}

.home-link-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #fff;
    color: var(--cr-navy);
    font-size: 19px;
}

.home-link-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.home-link-text strong {
    font-family: var(--cr-font-head);
    font-size: 16px;
    font-weight: 700;
    color: var(--cr-gold-2);
}

.home-link-text small {
    font-size: 12px;
    color: var(--cr-muted);
}

/* ========================================
   PAYMENT METHODS (full-width band)
   ======================================== */

.home-payment {
    margin-top: 80px;
    border-bottom: 4px solid var(--cr-gold);
}

.home-payment-band {
    position: relative;
    padding: 44px var(--home-gutter) 28px;
    background: var(--cr-navy);
    text-align: center;
}

.home-payment-tag {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -50%);
    font-size: 24px;
    white-space: nowrap;
}

.home-payment-band p {
    max-width: 860px;
    margin: 0 auto;
    color: var(--cr-muted);
    font-size: 17px;
    line-height: 1.6;
}

.home-payment-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding-top: 32px;
    padding-bottom: 32px;
}

.home-payment-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 64px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--cr-navy-line);
    font-family: var(--cr-font-head);
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.home-payment-item i {
    font-size: 22px;
    color: var(--cr-gold);
}

/* qris.png is a white logo on transparent, so it sits on the dark tile */
.home-payment-item--qris img {
    max-height: 36px;
    width: auto;
}

/* ========================================
   WHY US
   ======================================== */

.home-why {
    position: relative;
    overflow: hidden;
    padding: 64px 0 80px;
    text-align: center;
}

/* Halftone dot decoration on the right */
.home-why::before {
    content: '';
    position: absolute;
    top: 0;
    right: -40px;
    width: 280px;
    height: 360px;
    background-image: radial-gradient(circle, rgba(242, 183, 63, 0.45) 2.5px, transparent 3px);
    background-size: 16px 16px;
    -webkit-mask-image: radial-gradient(circle at 80% 40%, #000 0%, transparent 70%);
    mask-image: radial-gradient(circle at 80% 40%, #000 0%, transparent 70%);
    pointer-events: none;
}

.home-why .home-container {
    position: relative;
}

.home-brand-tag {
    font-size: 30px;
}

.home-why-tagline {
    margin: 14px 0 28px;
    font-size: 17px;
    color: var(--cr-muted);
}

.home-why-tagline strong {
    color: #fff;
}

.home-why-tag {
    font-size: 22px;
    margin-bottom: 18px;
}

.home-why .home-lead {
    max-width: 860px;
    margin: 0 auto;
}

/* Navy card with a thick gold frame, listing the features */
.home-features {
    margin-top: 40px;
    padding: 12px 40px;
    text-align: left;
    background: var(--cr-navy);
    border: 6px solid var(--cr-gold);
    border-radius: 12px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.45);
}

.home-feature {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 22px 0;
}

.home-feature + .home-feature {
    border-top: 1px solid var(--cr-navy-line);
}

.home-feature-icon {
    flex-shrink: 0;
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #fff;
    color: var(--cr-navy);
    font-size: 28px;
}

.home-feature h3 {
    font-family: var(--cr-font-pixel);
    font-size: 18px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--cr-gold-2);
    margin-bottom: 4px;
}

.home-feature p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--cr-muted);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1200px) {
    .home-games {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .home-games {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }

    .home-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .home {
        --home-gutter: 16px;
    }

    .home-hero-frame {
        border-bottom-width: 3px;
    }

    .home-hero-nav {
        display: none;
    }

    .home-products {
        margin-top: 28px;
    }

    .home-title {
        font-size: 24px;
    }

    .home-lead {
        font-size: 13px;
    }

    .home-games {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin-top: 20px;
    }

    .home-game-name {
        min-height: 42px;
        padding: 8px 4px 6px;
    }

    .home-game-name h3 {
        font-size: 12px;
    }

    .home-links {
        gap: 10px;
        margin-top: 32px;
    }

    .home-link {
        padding: 10px 12px;
        gap: 10px;
    }

    .home-link-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .home-link-text strong {
        font-size: 14px;
    }

    .home-link-text small {
        font-size: 11px;
    }

    .home-payment {
        margin-top: 60px;
    }

    .home-payment-tag {
        font-size: 18px;
    }

    .home-payment-band p {
        font-size: 14px;
    }

    .home-payment-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .home-payment-item {
        min-height: 52px;
        font-size: 14px;
    }

    .home-why {
        padding: 48px 0 56px;
    }

    .home-why::before {
        width: 160px;
        height: 220px;
    }

    .home-brand-tag {
        font-size: 22px;
    }

    .home-why-tagline {
        font-size: 14px;
    }

    .home-why-tag {
        font-size: 15px;
        padding: 8px 14px;
    }

    .home-features {
        margin-top: 28px;
        padding: 4px 16px;
        border-width: 4px;
    }

    .home-feature {
        gap: 14px;
        padding: 16px 0;
        align-items: flex-start;
    }

    .home-feature-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
        border-radius: 10px;
    }

    .home-feature h3 {
        font-size: 14px;
    }

    .home-feature p {
        font-size: 12px;
    }
}

@media (max-width: 380px) {
    .home-links {
        grid-template-columns: 1fr;
    }

    .home-why-tag {
        white-space: normal;
    }
}

@media (max-width: 340px) {
    .home-games {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .home *,
    .home *::before,
    .home *::after {
        transition: none !important;
    }
}
