/* ==========================================================================
   FAMEDIA — seksi khusus beranda (dimuat hanya di halaman "/").
   Token warna/spasi berasal dari app.css.
   ========================================================================== */

.home-section { padding-block: calc(var(--fm-stack) * 1.75); }
.home-section-title { margin: 0 0 1rem; font-size: clamp(1.15rem, 1rem + .7vw, 1.45rem); }
.home-section-sub { margin: -.5rem 0 1.25rem; color: var(--fm-muted); }
.responsive-picture { display: contents; }
.responsive-picture img { object-position: var(--image-position-mobile, center center); }

/* Tombol besar beranda */
.cta-primary, .cta-outline { display: inline-flex; flex: 0 0 auto; align-items: center; white-space: nowrap; justify-content: center; gap: .55rem; min-height: 50px; padding: 0 1.6rem; border: 1px solid transparent; border-radius: 999px; font-weight: 600; transition: transform .2s ease, background .2s ease, color .2s ease; }
.cta-primary { color: #fcf1d0; background: var(--fm-primary-600); }
.cta-primary:hover { color: #fcf1d0; background: var(--fm-primary-700); transform: translateY(-2px); }
.cta-outline { color: #fff; border-color: rgba(255, 255, 255, .85); }
.cta-outline:hover { color: var(--fm-primary-700); background: #fff; transform: translateY(-2px); }
.cta-outline.is-soft { color: var(--fm-primary-700); border-color: var(--fm-primary); background: #fff; }
.cta-outline.is-soft:hover { color: #fff; background: var(--fm-primary-600); }

/* Hero */
.home-hero { position: relative; overflow: hidden; color: var(--fm-ink-strong); background: linear-gradient(118deg, #fcf1d0 0%, #fcf1d0 58%, #22396f 150%); }
.home-hero::before { content: ""; position: absolute; top: -180px; right: 8%; display: none; width: 430px; height: 430px; border: 2px dashed rgba(255, 255, 255, .55); border-radius: 50%; }
.home-hero .container { position: relative; z-index: 1; }
.home-hero-grid { display: grid; align-items: center; gap: 1rem; }
.home-hero-copy { padding: 2.25rem 0 2rem; text-align: center; }
.home-eyebrow { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .75rem; font-size: .8rem; font-weight: 600; }
.home-title { margin: 0; color: var(--fm-ink-strong); font-size: clamp(1.75rem, 1.2rem + 3vw, 3.2rem); line-height: 1.15; letter-spacing: -.035em; }
.home-copy { max-width: 600px; margin: .9rem auto 0; color: var(--fm-ink); font-size: clamp(.95rem, .9rem + .3vw, 1.08rem); }
.home-hero .cta-outline { color: var(--fm-primary-700); border-color: var(--fm-primary-700); }
.home-hero .cta-outline:hover { color: #fff; background: var(--fm-primary-700); }
.home-hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem; margin-top: 1.5rem; }
.hero-visual { position: relative; display: none; min-height: 400px; }
.hero-presenter { position: absolute; right: 120px; bottom: 0; z-index: 3; width: 300px; filter: drop-shadow(0 16px 18px rgba(22, 55, 75, .2)); }
.hero-device { position: absolute; right: 8px; bottom: 36px; z-index: 4; width: 180px; height: 300px; padding: 10px; border: 5px solid #e8edf2; border-radius: 30px; background: #fff; box-shadow: 0 20px 35px rgba(15, 58, 75, .27); transform: rotate(-5deg); }
.hero-device-screen { height: 100%; overflow: hidden; border-radius: 19px; background: #f5fafb; }
.device-top { display: flex; align-items: center; gap: 6px; height: 40px; padding: 7px 9px; border-bottom: 1px solid #e7eef0; background: #fff; }
.device-logo { --size: 22px; color: var(--fm-primary-600); }
.device-search { height: 8px; flex: 1; border-radius: 20px; background: #edf0f2; }
.device-banner { margin: 10px; padding: 12px 9px; border-radius: 9px; color: #fcf1d0; background: linear-gradient(135deg, #0d1c42, #22396f); font-size: 10px; font-weight: 700; line-height: 1.35; }
.device-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0 10px; }
.device-card { height: 80px; padding: 7px; border-radius: 7px; background: #fff; box-shadow: 0 3px 8px rgba(52, 64, 84, .09); }
.device-card::before { content: ""; display: block; height: 48px; border-radius: 5px; background: linear-gradient(145deg, #010736, #22396f); }
.device-card:nth-child(2)::before { background: linear-gradient(145deg, #0d1c42, #fcf1d0); }
.device-card:nth-child(3)::before { background: linear-gradient(145deg, #22396f, #fcf1d0); }
.device-card:nth-child(4)::before { background: linear-gradient(145deg, #010736, #0d1c42); }
/* Gambar layar unggahan superadmin (hero & portal); menggantikan ilustrasi bawaan. */
.device-shot { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.hero-chip { position: absolute; z-index: 5; display: grid; width: 46px; height: 46px; place-items: center; border-radius: 14px; background: #fff; color: var(--fm-primary-600); font-size: 1.25rem; box-shadow: 0 14px 26px -12px rgba(1, 7, 54, .45); }
.hero-chip.is-1 { top: 120px; right: 380px; }
.hero-chip.is-2 { top: 40px; right: 0; color: #079455; }
.hero-chip.is-3 { right: 190px; bottom: 120px; width: 40px; height: 40px; border-radius: 12px; background: var(--fm-primary-600); color: #fcf1d0; font-size: 1rem; }
.hero-dot { position: absolute; z-index: 2; border-radius: 50%; box-shadow: inset -6px -6px 8px rgba(0, 0, 0, .08); }
.hero-dot.is-1 { top: 90px; right: 400px; width: 34px; height: 34px; background: #22396f; }
.hero-dot.is-2 { top: 200px; right: 440px; width: 56px; height: 56px; background: #0d1c42; }
.hero-dot.is-3 { right: 80px; bottom: 22px; width: 30px; height: 30px; background: #fcf1d0; }

/* Keunggulan */
.benefit-strip { background: #fcf1d0; }
.benefit-grid { display: grid; gap: 0; }
.benefit-item { display: flex; align-items: center; gap: .9rem; padding: 1rem 0; }
.benefit-item + .benefit-item { border-top: 1px solid rgba(34, 57, 111, .18); }
.benefit-icon { display: grid; width: 46px; height: 46px; flex: 0 0 46px; place-items: center; border-radius: 50%; background: #fff; color: var(--fm-primary-600); font-size: 1.25rem; }
.benefit-item h2 { margin: 0 0 .15rem; font-size: .95rem; }
.benefit-item p { margin: 0; color: var(--fm-muted); font-size: .82rem; line-height: 1.5; }
.benefit-slider-controls { display: none; }

/* Showcase portal */
.portal-showcase { background: #fff; text-align: center; }
.portal-showcase h2 { margin: 0; font-size: clamp(1.4rem, 1.1rem + 1.6vw, 2.6rem); line-height: 1.3; }
.portal-showcase h2 span { display: block; color: var(--fm-primary-600); }
.portal-showcase p { margin: .9rem 0 1.4rem; font-size: 1rem; font-weight: 500; color: var(--fm-ink-strong); }
.portal-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem; }
.portal-stage { position: relative; display: none; min-height: 340px; }
.portal-orbit { position: absolute; top: 0; left: 50%; width: 320px; height: 320px; border: 2px dashed #98a2b3; border-radius: 50%; transform: translateX(-50%); }
.portal-phone { position: absolute; top: 42px; left: calc(50% - 118px); width: 140px; height: 270px; padding: 8px; border: 5px solid #28323f; border-radius: 26px; background: #fff; box-shadow: 0 18px 32px rgba(40, 50, 63, .18); transform: rotate(-9deg); }
.portal-phone.is-second { left: calc(50% + 8px); z-index: 2; transform: rotate(7deg); }
.portal-phone-screen { height: 100%; overflow: hidden; border-radius: 15px; background: #f5f7f8; }
.portal-phone-head { height: 34px; border-bottom: 1px solid #e8eaed; background: #fff; }
.portal-phone-cover { height: 95px; margin: 10px; border-radius: 7px; background: linear-gradient(145deg, #010736, #22396f); }
.portal-phone.is-second .portal-phone-cover { height: 160px; background: linear-gradient(145deg, #fff, #eef3f5); }
.portal-phone-lines { margin: 0 10px; }
.portal-phone-lines span { display: block; height: 6px; margin-bottom: 7px; border-radius: 10px; background: #dde3e7; }
.portal-phone-lines span:nth-child(2) { width: 75%; }
.portal-phone-lines span:nth-child(3) { width: 55%; background: var(--fm-primary); }

/* Paket bundle */
.bundle-shell { position: relative; overflow: hidden; border-radius: var(--fm-radius-lg); padding: 1.5rem var(--fm-card-pad) 1rem; background: linear-gradient(120deg, #010736 0%, #0d1c42 55%, #22396f 100%); }
.bundle-grid-wrap { display: grid; gap: 1rem; }
.bundle-left { position: relative; color: #fcf1d0; }
.bundle-script { font-size: 2.2rem; font-style: italic; font-weight: 700; line-height: .95; text-shadow: 0 3px 10px rgba(1, 7, 54, .35); }
.bundle-premium { color: #fcf1d0; font-size: 2.2rem; font-weight: 700; line-height: 1; text-shadow: 0 3px 0 #22396f; }
.bundle-subtitle { max-width: 280px; margin: .6rem 0 0; font-size: .85rem; }
.bundle-presenter { display: none; position: absolute; right: 0; bottom: -60px; width: 200px; height: 300px; object-fit: contain; }
.h-track { display: flex; gap: .85rem; overflow-x: auto; padding: 1.25rem 1rem 2.25rem; scroll-padding-inline: 1rem; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.h-track::-webkit-scrollbar { display: none; }
.h-track > * { scroll-snap-align: start; }
.bundle-card { flex: 0 0 210px; overflow: hidden; border-radius: 12px; background: #fff; box-shadow: 0 14px 28px rgba(1, 7, 54, .22); }
.bundle-card-head { position: relative; display: flex; min-height: 84px; align-items: flex-end; overflow: hidden; padding: 12px 14px; color: #fcf1d0; background: linear-gradient(135deg, #010736, #22396f); }
.bundle-card-head::before { content: ""; position: absolute; top: -35px; right: -30px; width: 100px; height: 100px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.bundle-card:nth-child(even) .bundle-card-head { background: linear-gradient(135deg, #0d1c42, #22396f); }
.bundle-card-head h3 { position: relative; margin: 0; color: #fcf1d0; font-size: 1.15rem; line-height: 1.1; }
.bundle-card-body { padding: 12px 14px 14px; }
.chip { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 99px; background: #fcf1d0; color: var(--fm-primary-700); font-size: .68rem; font-weight: 600; }
.price-label { display: block; margin-top: .5rem; color: var(--fm-muted); font-size: .7rem; }
.price-old { margin-right: 4px; color: #98a2b3; font-size: .72rem; text-decoration: line-through; }
.price-discount { padding: 1px 5px; border-radius: 4px; background: #dcfae6; color: #079455; font-size: .68rem; font-weight: 700; }
.price-now { display: block; color: #010736; font-size: 1rem; font-weight: 700; }
.bundle-price-before { display: flex; align-items: center; gap: 4px; }
.bundle-detail { display: flex; min-height: 44px; align-items: center; justify-content: center; gap: .45rem; margin-top: .75rem; padding: 0 1rem; border-radius: 12px; background: var(--fm-primary); color: #fcf1d0; font-size: .85rem; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.bundle-detail:hover { background: var(--fm-primary-600); color: #fff; }
.track-footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .4rem; font-size: .75rem; }
.bundle-shell .track-footer { color: #fcf1d0; }
.slider-swipe-cue { display: none; align-items: center; gap: .35rem; white-space: nowrap; }
.track-dots { display: flex; min-width: 0; flex: 1 1 auto; align-items: center; justify-content: center; gap: 5px; }
.track-dot { width: 7px; height: 7px; flex: 0 0 7px; padding: 0; border: 0; border-radius: 999px; background: #a7b0c4; transition: width .2s ease, background .2s ease; }
.track-dot.is-active { width: 20px; flex-basis: 20px; background: #22396f; }
.bundle-shell .track-dot { background: rgba(252, 241, 208, .42); }
.bundle-shell .track-dot.is-active { background: #fcf1d0; }
[data-carousel-controls][hidden] { display: none !important; }
.track-nav { display: flex; gap: 6px; }
.track-nav button { display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 50%; background: #eceff1; color: #113d49; }
.bundle-shell .track-nav button { background: rgba(255, 255, 255, .86); }
.track-nav button:last-child { background: var(--fm-primary-600); color: #fff; }
.bundle-shell .track-nav button:last-child { background: var(--fm-primary-700); color: #fff; }

/* Katalog buku */
.search-note { display: flex; align-items: center; gap: .75rem; margin-top: 1.5rem; padding: .85rem 1rem; border: 1px solid #e5d7ad; border-radius: var(--fm-radius); background: var(--fm-primary-50); }
.search-note > i { color: var(--fm-primary-600); font-size: 1.2rem; }
.search-note span { display: block; color: var(--fm-muted); font-size: .8rem; }
.catalog-promo { position: relative; flex: 0 0 170px; overflow: hidden; border-radius: 12px; background: var(--fm-gradient); }
.catalog-promo img { width: 100%; height: 100%; min-height: 290px; object-fit: cover; }
.catalog-promo::after { display: none; }
.catalog-promo-label { position: absolute; inset: 14px 12px auto; z-index: 2; color: #fff; font-size: 1.05rem; overflow-wrap: anywhere; font-style: italic; font-weight: 700; line-height: 1.05; text-transform: uppercase; text-shadow: 0 2px 6px rgba(47, 51, 42, .4); }
.catalog-promo-label span { color: #fcf1d0; }
.catalog-layout { display: grid; gap: 1rem; }
.catalog-books { min-width: 0; }
.book-card { position: relative; flex: 0 0 150px; overflow: hidden; border: 1px solid #eceff1; border-radius: 12px; background: #fff; }
.book-cover { aspect-ratio: 3 / 4; overflow: hidden; background: #f3f5f6; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.book-card:hover .book-cover img { transform: scale(1.03); }
.book-body { padding: 10px 10px 12px; }
.book-title { margin: 0 0 2px; min-height: 2.9em; font-size: .8rem; font-weight: 600; line-height: 1.45; color: var(--fm-ink-strong); }
.book-author { margin-bottom: .35rem; overflow: hidden; color: #98a2b3; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.book-action { position: absolute; right: 8px; bottom: 10px; display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #f2f4f7; color: #667085; }
.book-action:hover { background: var(--fm-primary-50); color: var(--fm-primary-700); }

/* Program */
.program-section { background: #f7f8fc; }
.program-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; }
.program-head h2 { margin: 0 0 .2rem; font-size: clamp(1.2rem, 1.05rem + .7vw, 1.55rem); }
.program-head p { margin: 0; color: var(--fm-muted); }
.program-grid { display: grid; gap: .7rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.program-card { overflow: hidden; border: 1px solid var(--fm-line); border-radius: var(--fm-radius-lg); background: #fff; box-shadow: var(--fm-shadow-sm); }
.program-card-image { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--fm-gradient); }
.program-card-image img { width: 100%; height: 100%; object-fit: cover; }
.program-type { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .92); color: #13444e; font-size: .7rem; font-weight: 600; }
.program-card-body { padding: 1rem; }
.program-card-body h3 { margin: 0 0 .5rem; font-size: .98rem; line-height: 1.45; }
.program-meta { display: flex; align-items: center; gap: .4rem; margin-bottom: .75rem; color: var(--fm-muted); font-size: .78rem; }
.program-link { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600; }
.program-empty { grid-column: 1 / -1; }

/* Ajakan penulis & langkah */
.writer-cta { position: relative; overflow: hidden; color: #fff; background: linear-gradient(112deg, #010736 0%, #0d1c42 52%, #22396f 100%); }
.writer-banner { display: grid; gap: 1rem; margin-bottom: 2rem; padding: 1.25rem; border-radius: var(--fm-radius-lg); background: rgba(255, 255, 255, .97); color: var(--fm-ink); box-shadow: 0 12px 30px rgba(18, 91, 112, .13); }
.writer-banner > .cta-primary { justify-self: start; } /* lebar tombol tetap; hanya posisinya yang pindah ke bawah teks di ponsel */
.writer-banner h2 { margin: 0 0 .2rem; font-size: 1.2rem; }
.writer-banner p { margin: 0; color: var(--fm-muted); font-size: .88rem; }
.how-heading { margin-bottom: 1.5rem; text-align: center; }
.how-heading h2 { margin: 0 0 .3rem; color: #fff; font-size: clamp(1.2rem, 1.05rem + .8vw, 1.6rem); }
.how-heading p { margin: 0; color: rgba(255, 255, 255, .85); font-size: .88rem; }
.how-grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
.how-step { display: flex; gap: .85rem; }
.how-step-icon { position: relative; display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, .16); color: #fff; font-size: 1.35rem; }
.how-step-number { position: absolute; top: -8px; left: -8px; display: grid; width: 21px; height: 21px; place-items: center; border: 2px solid #fff; border-radius: 50%; background: var(--fm-accent); color: #263846; font-size: .62rem; font-weight: 700; }
.how-step h3 { margin: 0 0 .2rem; color: #fff; font-size: .92rem; }
.how-step p { margin: 0; color: rgba(255, 255, 255, .85); font-size: .8rem; line-height: 1.55; }
.how-action { margin-top: 1.75rem; text-align: center; }

@media (min-width: 576px) {
    .how-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .program-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .book-card { flex-basis: 170px; }
    .catalog-promo { flex-basis: 200px; }
    .catalog-promo img { min-height: 320px; }
}

@media (min-width: 768px) {
    .responsive-picture img { object-position: var(--image-position-tablet, center center); }
    .benefit-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
    .benefit-item { padding: 1.5rem 0; }
    .benefit-item + .benefit-item { border-top: 0; }
    .writer-banner { grid-template-columns: 1fr auto; align-items: center; padding: 1.5rem 2rem; }
    .bundle-shell { padding: 2.25rem 2.5rem 1.25rem; }
    .bundle-script, .bundle-premium { font-size: 2.9rem; }
    .bundle-card { flex-basis: 220px; }
}

@media (min-width: 992px) {
    .responsive-picture img { object-position: var(--image-position-desktop, center center); }
    .home-hero-grid { grid-template-columns: 7fr 5fr; }
    .home-hero-copy { padding: 3rem 0; text-align: left; }
    .home-copy { margin-left: 0; }
    .home-hero-actions, .portal-actions { justify-content: flex-start; }
    .hero-visual, .home-hero::before { display: block; }
    .catalog-promo-label { font-size: 1.4rem; }
    .portal-showcase { text-align: left; }
    .portal-grid { display: grid; grid-template-columns: 5fr 7fr; align-items: center; gap: 3rem; }
    .portal-stage { display: block; }
    .bundle-shell { min-height: 470px; padding: 0; }
    .bundle-grid-wrap { min-height: 470px; grid-template-columns: minmax(360px, 4fr) minmax(0, 7fr); gap: 0; }
    .bundle-left { min-height: 470px; overflow: hidden; padding: 3.25rem 2rem 0; }
    .bundle-script, .bundle-premium { position: relative; z-index: 2; }
    .bundle-script { font-size: clamp(3rem, 3.8vw, 4.2rem); line-height: .8; }
    .bundle-premium { font-size: clamp(2.7rem, 3.5vw, 3.9rem); line-height: 1; }
    .bundle-subtitle { position: relative; z-index: 2; max-width: 320px; color: rgba(252, 241, 208, .84); }
    .bundle-presenter {
        right: auto;
        bottom: -265px;
        left: 50%;
        display: block;
        width: 430px;
        height: 645px;
        max-width: none;
        object-fit: contain;
        transform: translateX(-50%);
        filter: drop-shadow(0 16px 20px rgba(1, 7, 54, .32));
    }
    .bundle-packages { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: 0 1.15rem; }
    .bundle-track { flex: 0 0 auto; align-items: stretch; padding: 3.9rem .35rem 1.5rem; scroll-padding-inline: .35rem; }
    .bundle-card { min-height: 346px; flex-basis: 258px; border-radius: 15px; }
    .bundle-card-head { min-height: 108px; padding: 16px 18px; }
    .bundle-card-head h3 { font-size: 1.35rem; }
    .bundle-card-body { display: flex; min-height: 238px; align-items: flex-start; flex-direction: column; padding: 15px 18px 17px; }
    .bundle-card-body .chip { align-self: flex-start; }
    /* Kolom flex ber-align-items:flex-start membuat tombol menyusut selebar teks;
       align-self:stretch menjaganya tetap selebar kartu seperti di ponsel. */
    .bundle-card-body .bundle-detail { align-self: stretch; margin-top: auto; }
    .bundle-card-body .price-now { font-size: 1.1rem; }
    .bundle-packages .track-footer { margin: 0; padding: 0 .35rem 1.25rem; }
    .program-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .how-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .book-card { flex-basis: 185px; }
    .catalog-promo { flex-basis: 225px; }
    .catalog-promo img { min-height: 345px; }
}

/* Penyesuaian khusus smartphone sesuai susunan visual beranda. */
@media (max-width: 767.98px) {
    .benefit-grid {
        display: flex;
        gap: .75rem;
        overflow-x: auto;
        padding-block: .85rem 1rem;
        scroll-padding-inline: var(--fm-container-pad);
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .benefit-grid::-webkit-scrollbar { display: none; }
    .benefit-item {
        flex: 0 0 min(82vw, 310px);
        padding: .9rem;
        border-radius: 14px;
        background: rgba(255, 255, 255, .58);
        scroll-snap-align: start;
    }
    .benefit-item + .benefit-item { border-top: 0; }
    .benefit-slider-controls {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .75rem;
        padding-bottom: .8rem;
        color: var(--fm-primary-700);
        font-size: .7rem;
        font-weight: 600;
    }
    .benefit-slider-controls .slider-swipe-cue { display: inline-flex; }
    .benefit-slider-controls .track-dots { justify-content: flex-end; }

    .bundle-shell { padding: 0; }
    .bundle-grid-wrap { gap: 0; }
    .bundle-left {
        min-height: 300px;
        overflow: hidden;
        padding: 1.65rem 1rem 0;
        border-bottom: 1px solid rgba(252, 241, 208, .32);
        text-align: center;
    }
    .bundle-script {
        position: relative;
        z-index: 2;
        font-size: 2.7rem;
        line-height: .85;
    }
    .bundle-premium {
        position: relative;
        z-index: 2;
        font-size: 2.55rem;
        line-height: 1;
    }
    .bundle-subtitle { display: none; }
    .bundle-presenter {
        right: auto;
        bottom: -393px;
        left: 50%;
        display: block;
        width: 430px;
        height: 645px;
        max-width: none;
        object-fit: contain;
        transform: translateX(-50%);
        filter: drop-shadow(0 14px 18px rgba(1, 7, 54, .32));
    }
    .bundle-packages { padding: 1rem .7rem .75rem; }
    .bundle-card { box-shadow: 0 10px 20px -5px rgba(1, 7, 54, .32); }
    .track-footer .slider-swipe-cue { display: inline-flex; }
    .track-footer .track-count { display: none; }

    .program-grid { gap: .65rem; }
    .program-card { border-radius: 12px; }
    .program-type { top: 6px; left: 6px; padding: 2px 6px; font-size: .56rem; }
    .program-card-body { padding: .65rem; }
    .program-card-body h3 { margin-bottom: .35rem; font-size: .76rem; line-height: 1.35; }
    .program-meta { gap: .25rem; margin-bottom: .45rem; font-size: .62rem; line-height: 1.35; }
    .program-link { gap: .25rem; font-size: .68rem; }

    .catalog-layout { gap: 1rem; }
    .catalog-promo {
        width: 100%;
        min-width: 0;
        min-height: 0;
        flex-basis: auto;
    }
    .catalog-promo img {
        display: block;
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 3 / 2;
        object-fit: cover;
    }
    .catalog-promo-label {
        inset: 18px auto auto 18px;
        max-width: 48%;
        font-size: clamp(1.25rem, 6vw, 1.75rem);
    }
}

/* Motion ringan: reveal sekali, lalu mikro-interaksi pada elemen utama. */
html.reveal-ready [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .62s ease var(--reveal-delay, 0ms), transform .62s cubic-bezier(.2, .7, .25, 1) var(--reveal-delay, 0ms);
}
html.reveal-ready [data-reveal="left"] { transform: translateX(-18px); }
html.reveal-ready [data-reveal="right"] { transform: translateX(18px); }
html.reveal-ready [data-reveal="fade"] { transform: scale(.985); }
html.reveal-ready [data-reveal].is-revealed { opacity: 1; transform: none; }

.program-card, .book-card, .catalog-promo { transition: transform .22s ease, box-shadow .22s ease; }
.program-card:hover, html.reveal-ready .program-card[data-reveal].is-revealed:hover { box-shadow: 0 18px 34px -24px rgba(1, 7, 54, .48); transform: translateY(-4px); }
.book-card:hover { box-shadow: 0 16px 30px -22px rgba(1, 7, 54, .5); transform: translateY(-3px); }
.catalog-promo:hover { box-shadow: 0 18px 35px -25px rgba(1, 7, 54, .55); transform: translateY(-2px); }
.program-card-image img, .catalog-promo-image { transition: transform .45s ease; }
.program-card:hover .program-card-image img, .catalog-promo:hover .catalog-promo-image { transform: scale(1.025); }

@media (min-width: 992px) {
    .hero-presenter { animation: home-presenter-breathe 6.5s ease-in-out infinite; }
    .hero-device { animation: home-device-float 5.5s ease-in-out infinite; }
    .hero-dot.is-1 { animation: home-dot-float 4.8s ease-in-out infinite; }
    .hero-dot.is-2 { animation: home-dot-float 6.2s ease-in-out -1.5s infinite reverse; }
    .portal-phone { animation: portal-phone-left 6s ease-in-out infinite; }
    .portal-phone.is-second { animation: portal-phone-right 6.6s ease-in-out -1s infinite; }
}

@keyframes home-presenter-breathe {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes home-device-float {
    0%, 100% { transform: rotate(-5deg) translateY(0); }
    50% { transform: rotate(-3.5deg) translateY(-8px); }
}
@keyframes home-dot-float {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(4px, -8px, 0); }
}
@keyframes portal-phone-left {
    0%, 100% { transform: rotate(-9deg) translateY(0); }
    50% { transform: rotate(-7deg) translateY(-6px); }
}
@keyframes portal-phone-right {
    0%, 100% { transform: rotate(7deg) translateY(0); }
    50% { transform: rotate(5deg) translateY(-8px); }
}

/* Ikon animasi: hanya transform/opacity (diproses GPU, tanpa JS & tanpa aset tambahan).
   Jeda bertingkat dari --i membuat ikon bergerak bergantian, bukan serempak. */
.home-eyebrow > i { color: var(--fm-primary); font-size: .95rem; animation: home-twinkle 3s ease-in-out infinite; }
.benefit-icon { position: relative; }
.benefit-icon::after { content: ""; position: absolute; inset: 0; border: 2px solid rgba(34, 57, 111, .38); border-radius: 50%; opacity: 0; animation: home-ring 3s ease-out calc(var(--i, 0) * .9s) infinite; }
.benefit-icon > i { animation: home-bob 3s ease-in-out calc(var(--i, 0) * .9s) infinite; }
.how-step-icon > i { animation: home-pop 4.8s ease-in-out calc(var(--i, 0) * .7s) infinite; }
.how-step-number { animation: home-ping 4.8s ease-in-out calc(var(--i, 0) * .7s) infinite; }
.home-hero .cta-primary > .bi-arrow-right { animation: home-nudge 1.8s ease-in-out infinite; }
.cta-primary > i, .cta-outline > i, .bundle-detail > i, .program-link > i { transition: transform .2s ease; }
.cta-primary:hover > i, .cta-outline:hover > i, .bundle-detail:hover > i, .program-link:hover > i { transform: translateX(3px); }
.slider-swipe-cue > i { animation: home-swipe 2.4s ease-in-out infinite; }
.bottom-nav .is-primary i { position: relative; }
.bottom-nav .is-primary i::after { content: ""; position: absolute; inset: -3px; border: 2px solid var(--fm-primary); border-radius: 50%; opacity: 0; animation: home-ring 2.6s ease-out 1s infinite; }
.hero-chip { animation: home-chip 5s ease-in-out infinite; }
.hero-chip.is-2 { animation-duration: 4.4s; animation-delay: -1.2s; }
.hero-chip.is-3 { animation-duration: 5.6s; animation-delay: -2.4s; }
.hero-chip > i { animation: home-pop 5s ease-in-out infinite; }
.hero-chip.is-2 > i { animation-delay: 1.6s; }
.hero-chip.is-3 > i { animation-name: home-ring-bell; animation-delay: 3.2s; }

@keyframes home-twinkle {
    0%, 100% { opacity: 1; transform: scale(1) rotate(0); }
    50% { opacity: .7; transform: scale(1.2) rotate(14deg); }
}
@keyframes home-ring {
    0% { opacity: .6; transform: scale(1); }
    70%, 100% { opacity: 0; transform: scale(1.5); }
}
@keyframes home-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
@keyframes home-pop {
    0%, 20%, 100% { transform: none; }
    8% { transform: translateY(-5px) scale(1.14); }
    14% { transform: translateY(0) scale(.96); }
}
@keyframes home-ping {
    0%, 20%, 100% { transform: none; }
    8% { transform: scale(1.25); }
}
@keyframes home-nudge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}
@keyframes home-swipe {
    0%, 100% { transform: translateX(0) rotate(0); }
    50% { transform: translateX(6px) rotate(-10deg); }
}
@keyframes home-chip {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-10px) rotate(3deg); }
}
@keyframes home-ring-bell {
    0%, 16%, 100% { transform: rotate(0); }
    4% { transform: rotate(16deg); }
    8% { transform: rotate(-14deg); }
    12% { transform: rotate(8deg); }
}

@media (prefers-reduced-motion: reduce) {
    html.reveal-ready [data-reveal], html.reveal-ready [data-reveal].is-revealed {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hero-presenter, .hero-device, .hero-dot, .portal-phone,
    .hero-chip, .hero-chip > i, .home-eyebrow > i, .benefit-icon > i, .benefit-icon::after,
    .how-step-icon > i, .how-step-number, .home-hero .cta-primary > .bi-arrow-right,
    .slider-swipe-cue > i, .bottom-nav .is-primary i::after { animation: none !important; }
    .program-card, .book-card, .catalog-promo, .program-card-image img, .catalog-promo-image { transition: none; }
    .program-card:hover, html.reveal-ready .program-card[data-reveal].is-revealed:hover, .book-card:hover, .catalog-promo:hover { transform: none; }
}

@media (min-width: 768px) {
    .catalog-layout {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
    }
    .catalog-promo { min-width: 0; }
    .catalog-promo img {
        display: block;
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 7;
    }
}

@media (min-width: 992px) {
    .catalog-layout {
        grid-template-columns: minmax(270px, 320px) minmax(0, 1fr);
        align-items: start;
    }
    .catalog-promo { min-width: 0; }
    .catalog-promo img {
        height: auto;
        min-height: 0;
        aspect-ratio: 210 / 297;
    }
}

/* Tablet: 3 kolom keunggulan terlalu sempit untuk ikon + teks berdampingan;
   ikon dipindah ke atas teks (posisi berubah, ukuran tetap). */
@media (min-width: 768px) and (max-width: 991.98px) {
    .benefit-item { flex-direction: column; align-items: flex-start; gap: .6rem; }
}
