/* ============================================================
   ELEGANT UI LAYER — efek halus untuk teks, ikon, tombol & kartu.
   Non-destruktif: hanya transisi/aksen visual, tidak mengubah layout
   atau alur kerja fitur yang sudah ada.
   ============================================================ */

:root {
    --elegant-ease: cubic-bezier(.22, 1, .36, 1);
    --elegant-glow: 0 14px 38px rgba(15, 23, 42, .14);
}

html { -webkit-text-size-adjust: 100%; }

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    animation: elegantPageIn .42s var(--elegant-ease) both;
}

h1, h2, h3, h4, h5 {
    letter-spacing: -.022em;
    text-wrap: balance;
}

p, li { text-wrap: pretty; }

::selection {
    background: rgba(249, 115, 22, .24);
    color: inherit;
}

/* Scrollbar tipis & elegan (WebKit + Firefox) */
* { scrollbar-width: thin; scrollbar-color: rgba(148, 163, 184, .55) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(148,163,184,.65), rgba(100,116,139,.55));
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(100,116,139,.8); background-clip: padding-box; }

/* Fokus keyboard tetap jelas, tetapi halus */
:where(button, a, input, select, textarea, [role="button"]):focus-visible {
    outline: 2px solid rgba(249, 115, 22, .65);
    outline-offset: 2px;
    border-radius: 10px;
}

/* ---------- Tombol: lift + glow + ikon hidup ---------- */
:where(
    button, .btn, .btn-primary, .btn-ghost, .btn-history, .btn-logout,
    .mh-btn, .nav-auth-btn, .hs-btn, .co-qbtn, .co-apply, .st-btn-buy,
    .st-btn-submit-order, .st-btn-back, .st-btn-see-all, .st-btn-ghost
) {
    transition:
        transform .24s var(--elegant-ease),
        box-shadow .3s var(--elegant-ease),
        filter .24s var(--elegant-ease),
        background-color .24s ease,
        border-color .24s ease,
        color .24s ease !important;
    will-change: transform;
}

:where(
    button, .btn, .btn-primary, .btn-ghost, .btn-history, .btn-logout,
    .mh-btn, .nav-auth-btn, .hs-btn, .co-qbtn, .co-apply, .st-btn-buy,
    .st-btn-submit-order, .st-btn-back, .st-btn-see-all, .st-btn-ghost
):not(:disabled):hover {
    transform: translateY(-2px);
    filter: saturate(1.06);
}

:where(
    button, .btn, .btn-primary, .btn-ghost, .btn-history, .btn-logout,
    .mh-btn, .nav-auth-btn, .hs-btn, .co-qbtn, .co-apply, .st-btn-buy,
    .st-btn-submit-order, .st-btn-back, .st-btn-see-all, .st-btn-ghost
):not(:disabled):active {
    transform: translateY(0) scale(.982);
    transition-duration: .08s !important;
}

:where(button, .btn, .btn-primary, .btn-ghost, .mh-btn, .btn-history, .st-btn-buy, .st-btn-submit-order) i,
:where(button, .btn, .btn-primary, .btn-ghost, .mh-btn, .btn-history, .st-btn-buy, .st-btn-submit-order) .fa,
:where(button, .btn, .btn-primary, .btn-ghost, .mh-btn, .btn-history, .st-btn-buy, .st-btn-submit-order) .fas,
:where(button, .btn, .btn-primary, .btn-ghost, .mh-btn, .btn-history, .st-btn-buy, .st-btn-submit-order) .far,
:where(button, .btn, .btn-primary, .btn-ghost, .mh-btn, .btn-history, .st-btn-buy, .st-btn-submit-order) .fab {
    transition: transform .3s var(--elegant-ease), filter .3s var(--elegant-ease);
}

:where(button, .btn, .btn-primary, .btn-ghost, .mh-btn, .btn-history, .st-btn-buy, .st-btn-submit-order):hover i,
:where(button, .btn, .btn-primary, .btn-ghost, .mh-btn, .btn-history, .st-btn-buy, .st-btn-submit-order):hover .fa,
:where(button, .btn, .btn-primary, .btn-ghost, .mh-btn, .btn-history, .st-btn-buy, .st-btn-submit-order):hover .fas {
    transform: scale(1.14) rotate(-3deg);
    filter: drop-shadow(0 2px 6px rgba(249,115,22,.35));
}

/* ---------- Kartu: angkat lembut + bayangan hangat ---------- */
:where(.st-card, .testi-card, .how-card, .cta-card, .st-section-card, .card, .stat-card, .product-card) {
    transition:
        transform .35s var(--elegant-ease),
        box-shadow .35s var(--elegant-ease),
        border-color .35s ease,
        background-color .35s ease !important;
}

:where(.st-card, .testi-card, .how-card, .cta-card, .st-section-card, .card, .stat-card, .product-card):hover {
    transform: translateY(-4px);
    box-shadow: var(--elegant-glow);
}

:where(.st-card, .testi-card, .product-card) img {
    transition: transform .55s var(--elegant-ease), filter .4s ease;
}
:where(.st-card, .testi-card, .product-card):hover img {
    transform: scale(1.045);
    filter: saturate(1.05) contrast(1.02);
}

/* Ikon dekoratif berdenyut sangat halus */
.how-icon, .benefit-icon, .feature-icon, .st-card-tag i, .how-card > i {
    transition: transform .35s var(--elegant-ease), filter .35s ease;
}
.how-card:hover .how-icon, .benefit-card:hover .benefit-icon,
.feature-card:hover .feature-icon, .st-card:hover .st-card-tag i {
    transform: translateY(-2px) scale(1.12) rotate(-4deg);
    filter: drop-shadow(0 4px 10px rgba(249,115,22,.28));
}

/* ---------- Teks brand / judul: gradien lembut + kilau ---------- */
.hero-title span, .hero-glass h1 span,
.text-gradient, .section-title span, .st-section-title span {
    background-image: linear-gradient(100deg, #f97316 0%, #fb923c 28%, #fbbf24 48%, #f97316 72%, #ea580c 100%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: elegantShimmer 7s linear infinite;
}

.hero-glass h1, .hero-title, .brand, .footer-logo, .st-section-title {
    text-shadow: 0 2px 18px rgba(15, 23, 42, .10);
}

/* Harga & angka penting: sedikit lebih "hidup" */
.price-tag, .st-price-real, .st-price-main, .co-total .v, .stat-value, .stat-num {
    transition: text-shadow .3s ease, transform .3s var(--elegant-ease);
}
.price-tag:hover, .st-price-real:hover, .st-price-main:hover {
    text-shadow: 0 0 18px rgba(249, 115, 22, .35);
}

/* Badge / chip */
.st-card-tag, .badge, .mh-btn, .price-tag {
    transition: transform .25s var(--elegant-ease), box-shadow .25s ease, filter .25s ease;
}
.st-card-tag:hover, .badge:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

/* Link footer / nav: garis bawah animasi */
:where(.footer a, .nav-link, .hs-link) {
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 1.5px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size .3s var(--elegant-ease), color .25s ease;
}
:where(.footer a, .nav-link, .hs-link):hover {
    background-size: 100% 1.5px;
}

/* Input: transisi fokus lembut */
input, select, textarea {
    transition: border-color .22s ease, box-shadow .22s ease, background-color .22s ease;
}
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(249, 115, 22, .12);
}

/* Loading skeleton shimmer (bila ada) */
.skeleton, .loading-skeleton, .shimmer {
    background: linear-gradient(100deg, rgba(148,163,184,.16) 20%, rgba(255,255,255,.32) 45%, rgba(148,163,184,.16) 70%);
    background-size: 220% 100%;
    animation: elegantSkeleton 1.35s linear infinite;
}

@keyframes elegantPageIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes elegantShimmer {
    to { background-position: -220% center; }
}
@keyframes elegantSkeleton {
    from { background-position: 120% 0; }
    to { background-position: -120% 0; }
}

/* Hormati preferensi pengguna (kecualikan running text ticker & marquee agar tetap bergerak) */
@media (prefers-reduced-motion: reduce) {
    *:not(.ticker-inner):not(.marquee-track):not(.tick-i), *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    :where(.st-card, .card, .stat-card, button, .btn):hover { transform: none; }
}
