/* ==========================================================================
   BERANDA — BANNER BERITA: HP 3D + HOLOGRAM (tosca, simpel)
   Taruh di public/css/public-home-holo.css
   ========================================================================== */

.hmh {
    --tosca: #14b8bd;
    --tosca-dark: #0f9ea3;
    --tosca-soft: #e6f7f8;
    --ink: #141b28;

    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: 24px;
    background: linear-gradient(160deg, #ffffff 0%, #f2fbfb 60%, #e6f7f8 100%);
    box-shadow: 0 10px 30px rgba(20, 27, 40, .08);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 16px;
    padding: 40px 48px;
    min-height: 460px;
}

/* lantai grid tipis */
.hmh::before {
    content: '';
    position: absolute;
    left: -30%; right: -30%; bottom: -12%;
    height: 55%;
    background-image:
        linear-gradient(rgba(20, 184, 189, .16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 184, 189, .16) 1px, transparent 1px);
    background-size: 44px 44px;
    transform: perspective(420px) rotateX(68deg);
    transform-origin: top center;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 60%);
            mask-image: linear-gradient(to bottom, transparent, #000 60%);
    z-index: -1;
    pointer-events: none;
}

/* glow lembut */
.hmh::after {
    content: '';
    position: absolute;
    width: 420px; height: 420px;
    right: 6%; top: 4%;
    background: radial-gradient(circle, rgba(20, 184, 189, .16), transparent 65%);
    z-index: -1;
    pointer-events: none;
}

/* ---------- teks kiri ---------- */
.hmh-copy { position: relative; min-height: 240px; }

.hmh-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--tosca-dark);
    background: rgba(20, 184, 189, .12);
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.hmh-texts { position: relative; }

.hmh-text {
    position: absolute;
    inset: 0 0 auto 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .45s ease, transform .45s ease;
    pointer-events: none;
}

/* teks aktif ikut alur supaya tinggi kontainer pas */
.hmh-text.is-active {
    position: relative;
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.hmh-date {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--tosca-dark);
    margin-bottom: 8px;
}

.hmh-title {
    font-size: clamp(24px, 3.2vw, 36px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--ink);
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hmh-title a { color: inherit; text-decoration: none; }
.hmh-title a:hover { color: var(--tosca-dark); }

.hmh-excerpt {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(20, 27, 40, .68);
    margin: 0 0 22px;
    max-width: 440px;
}

.hmh-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--tosca);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 22px;
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(20, 184, 189, .3);
    transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.hmh-btn:hover {
    background: var(--tosca-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(20, 184, 189, .35);
}

.hmh-btn i { transition: transform .15s ease; }
.hmh-btn:hover i { transform: translateX(3px); }

.hmh-dots {
    display: flex;
    gap: 6px;
    margin-top: 26px;
}

.hmh-dot {
    width: 8px; height: 8px;
    border: none;
    padding: 0;
    border-radius: 999px;
    background: rgba(20, 184, 189, .3);
    cursor: pointer;
    transition: width .25s, background .25s;
}

.hmh-dot.is-active { width: 26px; background: var(--tosca); }

/* ---------- panggung 3D ---------- */
.hmh-stage {
    position: relative;
    height: 450px;
    perspective: 1100px;
}

.hmh-rig {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transform: scale(var(--hmh-scale, 1)) rotateY(var(--hmh-ry, 0deg)) rotateX(var(--hmh-rx, 0deg));
    transition: transform .4s ease-out;
}

.hmh-phone {
    position: absolute;
    left: 50%;
    bottom: 26px;
    width: 170px;
    height: 340px;
    margin-left: -85px;
    padding: 8px;
    border-radius: 30px;
    background: linear-gradient(145deg, #ffffff, #dfe7ea);
    transform-origin: bottom center;
    transform: rotateX(58deg);
    box-shadow:
        0 0 0 1px rgba(20, 27, 40, .08),
        0 18px 30px rgba(20, 27, 40, .12);
}

.hmh-phone-screen {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 23px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 40%, #b9f1f2 0%, #14b8bd 55%, #0f9ea3 100%);
}

.hmh-phone-screen::before {
    content: '';
    position: absolute;
    top: 8px; left: 50%;
    width: 50px; height: 11px;
    margin-left: -25px;
    border-radius: 10px;
    background: rgba(20, 27, 40, .85);
}

.hmh-shadow {
    position: absolute;
    left: 50%;
    bottom: 12px;
    width: 230px;
    height: 32px;
    margin-left: -115px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(20, 27, 40, .14), transparent 70%);
}

.hmh-beam {
    position: absolute;
    left: 50%;
    bottom: 118px;
    width: 340px;
    height: 200px;
    margin-left: -170px;
    background: linear-gradient(to top, rgba(20, 184, 189, .32), rgba(20, 184, 189, .06) 75%, transparent);
    clip-path: polygon(39% 100%, 61% 100%, 100% 0, 0 0);
    pointer-events: none;
}

.hmh-particles {
    position: absolute;
    left: 50%;
    bottom: 118px;
    width: 180px;
    height: 200px;
    margin-left: -90px;
    pointer-events: none;
}

.hmh-particles span {
    position: absolute;
    bottom: 0;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--tosca);
    opacity: 0;
    animation: hmh-rise 4s ease-in infinite;
}

.hmh-particles span:nth-child(1) { left: 40%; animation-delay: 0s; }
.hmh-particles span:nth-child(2) { left: 58%; animation-delay: .8s; }
.hmh-particles span:nth-child(3) { left: 28%; animation-delay: 1.6s; }
.hmh-particles span:nth-child(4) { left: 68%; animation-delay: 2.4s; }
.hmh-particles span:nth-child(5) { left: 48%; animation-delay: 3.2s; }

/* layar hologram (foto berita) */
.hmh-holo {
    position: absolute;
    left: 50%;
    bottom: 214px;
    width: 340px;
    margin-left: -170px;
    animation: hmh-float 5s ease-in-out infinite;
}

.hmh-holo-frame {
    position: relative;
    aspect-ratio: 16/10;
    border-radius: 16px;
    padding: 8px;
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(20, 184, 189, .35);
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
    box-shadow: 0 14px 30px rgba(15, 158, 163, .2);
    overflow: hidden;
}

/* garis cahaya pelan */
.hmh-holo-frame::after {
    content: '';
    position: absolute;
    left: 0; right: 0; top: -40%;
    height: 40%;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, .45), transparent);
    animation: hmh-sweep 4s linear infinite;
    pointer-events: none;
    z-index: 3;
}

.hmh-shot {
    position: absolute;
    inset: 8px;
    display: block;
    border-radius: 10px;
    overflow: hidden;
    opacity: 0;
    transform: scale(.97);
    transition: opacity .5s ease, transform .5s ease;
    pointer-events: none;
    background: var(--tosca-soft);
}

.hmh-shot.is-active {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.hmh-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- animasi ---------- */
@keyframes hmh-float { 50% { transform: translateY(-8px); } }
@keyframes hmh-sweep { from { top: -40%; } to { top: 120%; } }
@keyframes hmh-rise {
    0%   { transform: translateY(0); opacity: 0; }
    20%  { opacity: .8; }
    100% { transform: translateY(-180px); opacity: 0; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .hmh {
        grid-template-columns: 1fr;
        padding: 30px 20px 18px;
        text-align: center;
        min-height: 0;
    }
    .hmh-copy { min-height: 0; }
    .hmh-excerpt { margin-left: auto; margin-right: auto; }
    .hmh-dots { justify-content: center; }
    .hmh-stage { height: 360px; order: -1; }
    .hmh-rig { --hmh-scale: .78; transform-origin: bottom center; }
}

@media (max-width: 400px) {
    .hmh-stage { height: 320px; }
    .hmh-rig { --hmh-scale: .7; }
}

@media (prefers-reduced-motion: reduce) {
    .hmh *, .hmh *::after { animation: none !important; }
}