/* /motion: 40 named text effects. Mobile-first; ink + one purple on paper. */

.pm {
    --pm-paper: #F4F2EC;
    --pm-ink: #091717;
    --pm-purple: #824182;
    --pm-purple-soft: rgba(130, 65, 130, 0.12);
    --pm-dim: rgba(9, 23, 23, 0.62);
    --pm-border: rgba(9, 23, 23, 0.12);
    --pm-card: #FFFFFF;
    background: var(--pm-paper);
    color: var(--pm-ink);
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    padding-bottom: 72px;
}

.pm *,
.pm *::before,
.pm *::after {
    box-sizing: border-box;
}

.pm-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Hero */
.pm-hero {
    padding: 40px 0 28px;
    display: grid;
    gap: 28px;
    align-items: center;
}

.pm-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pm-purple);
    margin: 0 0 12px;
}

.pm-hero h1 {
    font-size: clamp(34px, 7vw, 60px);
    line-height: 1.04;
    letter-spacing: -0.02em;
    font-weight: 800;
    margin: 0;
}

.pm-hero h1 span {
    color: var(--pm-purple);
}

.pm-lede {
    font-size: 18px;
    line-height: 1.55;
    color: var(--pm-dim);
    margin: 16px 0 0;
    max-width: 560px;
}

.pm-lede strong {
    color: var(--pm-ink);
}

.pm-hero__demo {
    background: var(--pm-card);
    border: 1px solid var(--pm-border);
    border-radius: 24px;
    padding: 10px;
    box-shadow: 0 18px 40px -24px rgba(9, 23, 23, 0.35);
}

.pm-hero__demo .pm-stage {
    aspect-ratio: 4 / 3;
    border-radius: 16px;
}

/* Effect cards */
.pm-grid {
    display: grid;
    gap: 16px;
}

.pm-card {
    background: var(--pm-card);
    border: 1px solid var(--pm-border);
    border-radius: 20px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pm-card:hover {
    border-color: rgba(130, 65, 130, 0.45);
    box-shadow: 0 10px 24px -18px rgba(9, 23, 23, 0.4);
}

.pm-card:focus-visible {
    outline: none;
    border-color: var(--pm-purple);
    box-shadow: 0 0 0 3px var(--pm-purple-soft);
}

.pm-stage {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--pm-paper);
    border-radius: 14px;
    cursor: pointer;
    color: var(--pm-ink);
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    font-weight: 800;
    user-select: none;
    -webkit-user-select: none;
    isolation: isolate;
}

.pm-stage--missing::after {
    content: "Demo tak dapat dimuatkan";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--pm-dim);
}

/* Runtime helpers (U.line / U.chars / U.canvas) */
.pm-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.pm-line {
    font-weight: 800;
    line-height: 1;
    white-space: pre;
    letter-spacing: -0.01em;
}

.pm-ch {
    display: inline-block;
    white-space: pre;
}

.pm-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.pm-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 6px 4px 8px;
}

.pm-num {
    font-size: 13px;
    font-weight: 800;
    color: var(--pm-purple);
    font-variant-numeric: tabular-nums;
}

.pm-card h3 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0;
    flex: 1;
    min-width: 0;
}

.pm-copy {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--pm-ink);
    border-radius: 10px;
    padding: 7px 10px;
    transition: background 0.15s;
}

.pm-card:hover .pm-copy {
    background: var(--pm-purple);
}

.pm-card.is-copied .pm-copy {
    background: #047857;
}

.pm-copy svg {
    width: 14px;
    height: 14px;
}

/* Course, credit */
.pm-course {
    margin-top: 48px;
    background: var(--pm-ink);
    color: #fff;
    border-radius: 24px;
    padding: 28px 22px;
    display: grid;
    gap: 14px;
}

.pm-course h2 {
    font-size: clamp(24px, 4vw, 32px);
    line-height: 1.15;
    font-weight: 800;
    margin: 0;
}

.pm-course p {
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.78);
}

.pm-course a {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 16px;
    color: var(--pm-ink);
    background: #fff;
    border-radius: 14px;
    padding: 13px 18px;
    text-decoration: none;
}

.pm-course a:hover {
    background: #EBD8EB;
}

@media (min-width: 720px) {
    .pm-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (min-width: 960px) {
    .pm-hero {
        grid-template-columns: 1.1fr 1fr;
        padding: 64px 0 40px;
        gap: 48px;
    }

    .pm-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pm-course {
        grid-template-columns: 1fr auto;
        align-items: center;
        padding: 36px 40px;
    }

    .pm-course a {
        justify-self: end;
    }
}
