/* Psikologi Tasawuf / Motion & Interaction Polish
   Readable editorial motion; no animations required to understand the page.
   Dynamic cache restores reuse nodes and do not replay reveals. */

:root{--pt-motion-ease:cubic-bezier(.22,1,.36,1);--pt-gold:#b39567}

/* The transparent hero header becomes a compact glass navigation on scroll. */
.pt-header.is-scrolled{
    position:fixed;top:0;left:0;right:0;width:100%;
    background:rgba(25,29,26,.91);backdrop-filter:blur(18px);
    box-shadow:0 5px 24px #11150f2a;
    animation:pt-header-in .32s var(--pt-motion-ease) both
}
.pt-header.is-scrolled .pt-header-inner{min-height:65px}
.pt-header.is-scrolled .pt-brand strong{font-size:21px}
.pt-header.is-scrolled .pt-brand>span{font-size:11px}
.pt-header.is-scrolled .pt-search-panel,.pt-header.is-scrolled .pt-menu-panel{top:calc(100% + 5px)}
@keyframes pt-header-in{from{transform:translateY(-100%)}to{transform:translateY(0)}}
.pt-inner .pt-reading-sidebar-content{top:83px}
.pt-inner .pt-reading-prose h2,.pt-inner .pt-reading-prose h3,.pt-inner .pt-reading-prose h4{scroll-margin-top:96px}

/* Section and card reveal: hidden only when JS has confirmed the element is below the viewport. */
.pt-motion-pending{opacity:0;transform:translate3d(0,20px,0)}
.pt-motion-arrive{animation:pt-soft-enter 650ms var(--pt-motion-ease) both;animation-delay:var(--pt-motion-delay,0ms)}
@keyframes pt-soft-enter{
    0%{opacity:0;transform:translate3d(0,20px,0);filter:blur(1px)}
    100%{opacity:1;transform:translate3d(0,0,0);filter:blur(0)}
}
.pt-route-appear{animation:pt-route-enter 250ms ease-out both}
@keyframes pt-route-enter{from{opacity:.85}to{opacity:1}}

/* Subtle depth follows the reader, not the cursor. Restrained on large screens. */
@media (min-width:900px) and (hover:hover) and (prefers-reduced-motion:no-preference){
    .pt-hero-image,.pt-inner-hero-image{
        transform:translate3d(0,var(--pt-hero-depth,0px),0) scale(1.075);
        transform-origin:center;
        will-change:transform
    }
}

/* Tactile editorial details. Preserve the original visual reference. */
@media (hover:hover) and (pointer:fine){
    .pt-hero-cta svg,.pt-outline-button,.pt-dark-button,.pt-book-cta span,.pt-story-read span{
        transition:transform .28s var(--pt-motion-ease)
    }
    .pt-hero-cta:hover svg,.pt-dark-button:hover span,.pt-story-card:hover .pt-story-read span,
    .pt-book-card:hover .pt-book-cta span{transform:translate3d(4px,-2px,0)}
    .pt-category{transition:background-color .26s,border-color .26s,color .26s,box-shadow .28s var(--pt-motion-ease)}
    .pt-category:hover{box-shadow:inset 0 -3px 0 #b39567}
    .pt-category:hover svg{transform:translateY(-3px) scale(1.065)}
    .pt-about-card:hover .pt-about-overlay{background:linear-gradient(0deg,rgba(0,0,0,.94),rgba(0,0,0,.08) 80%)}
    .pt-post-card h3 a,.pt-story-card h3 a,.pt-related-card strong{transition:color .2s}
    .pt-post-card:hover h3 a,.pt-story-card:hover h3 a,.pt-related-card:hover strong{color:#987348}
    .pt-library-card:hover .pt-library-description h3{color:#95754d}
    .pt-profile-side-card nav a:hover span{transform:translateX(3px)}
    .pt-profile-side-card nav a span{transition:transform .2s}
}

/* Clear keyboard accessibility. No focus-trap in the content itself. */
.pt-home a:focus-visible,.pt-home button:focus-visible,
.pt-home input:focus-visible,.pt-inner .pt-category-chip:focus-visible{
    outline:2px solid #d8b984;outline-offset:3px
}

/* Live search suggestions, rendered from the published articles API. */
.pt-live-search{position:relative}
.pt-search-panel .pt-live-search{position:relative}
.pt-suggest{
    position:absolute;z-index:108;top:calc(100% + 7px);left:0;right:0;
    max-height:min(350px,60vh);overflow-y:auto;
    border:1px solid #e8e2d5;border-radius:10px;
    box-shadow:0 17px 45px #1d1a161e;background:#fff;color:#2b2d29;
    animation:pt-suggest-in .18s var(--pt-motion-ease) both;
    scrollbar-width:thin
}
.pt-search-panel form>.pt-suggest{display:block;width:100%;gap:0}
.pt-archive-search{position:relative;overflow:visible}
.pt-archive-search:focus-within{z-index:16}
.pt-suggest-title{
    padding:14px 15px 9px;font-size:9px;font-weight:800;
    color:#a18a69;letter-spacing:.115em
}
.pt-suggest-list{list-style:none;margin:0;padding:0 7px 8px}
.pt-suggest-item{margin:0;padding:0;border-top:1px solid #f2f0eb}
.pt-suggest-item:first-child{border-top:0}
.pt-suggest-link{
    display:flex;align-items:center;gap:12px;
    padding:9px 8px;border-radius:6px;min-height:60px;
    transition:background .18s
}
.pt-suggest-link:hover,.pt-suggest-link:focus-visible{background:#f6f2e9;color:#242a23}
.pt-suggest-thumb{
    flex:0 0 43px;width:43px;height:43px;border-radius:6px;
    background:linear-gradient(130deg,#f2ead9,#dcd2bd);
    color:#b29262;font-size:23px;display:grid;place-items:center;
    overflow:hidden
}
.pt-suggest-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.pt-suggest-copy{min-width:0;flex:1;display:flex;flex-direction:column;gap:3px}
.pt-suggest-copy strong{font-size:12px;font-weight:700;line-height:1.4;color:#262a25}
.pt-suggest-copy small{
    font-size:10px;color:#7e8179;line-height:1.35;
    overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical
}
.pt-suggest-arrow{color:#a88b62;font-size:17px;line-height:1}
.pt-suggest-empty,.pt-suggest-loading{padding:18px 15px;margin:0;font-size:12px;color:#747b71}
@keyframes pt-suggest-in{from{opacity:0;transform:translateY(-7px)}to{opacity:1;transform:translateY(0)}}

/* Article reading progress and active TOC state. */
.pt-reading-progress{
    position:fixed;z-index:110;left:0;right:0;top:0;
    height:3px;pointer-events:none;opacity:0;transition:opacity .2s
}
.pt-reading-progress.is-active{opacity:1}
.pt-reading-progress span{
    display:block;width:100%;height:100%;
    background:linear-gradient(90deg,#997448,#e1bd81);
    transform-origin:left center;
    transform:scaleX(var(--pt-reading-progress,0));
    transition:transform 90ms linear;
    box-shadow:0 1px 8px #b2916490
}
.pt-reading-sidebar #articleToc>a.pt-toc-active{
    color:#997748;font-weight:800;
    text-decoration:none;position:relative
}
.pt-reading-sidebar #articleToc>a.pt-toc-active::before{
    content:"";position:absolute;left:-17px;top:0;bottom:0;
    width:2px;background:#ad8d5f;border-radius:3px
}

/* Small back-to-top shortcut, only after meaningful scrolling. */
.pt-back-to-top{
    position:fixed;z-index:71;right:clamp(14px,2.6vw,35px);bottom:26px;
    width:45px;height:45px;border:1px solid #efe0be77;border-radius:50%;
    background:rgba(37,40,36,.95);color:#f8f1df;
    font-size:23px;line-height:1;display:grid;place-items:center;
    box-shadow:0 8px 26px #181a1430;
    opacity:0;transform:translateY(12px);pointer-events:none;
    transition:opacity .25s,transform .28s var(--pt-motion-ease),background .2s;
    backdrop-filter:blur(8px)
}
.pt-back-to-top.is-visible{opacity:1;transform:translateY(0);pointer-events:auto}
.pt-back-to-top:hover{background:#856a43;transform:translateY(-3px)}

/* Reading preferences: functional controls, not decorative buttons. */
.pt-reader-column{min-width:0}
.pt-reader-toolbar{
    display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;
    gap:12px;min-height:66px;padding:11px 0;margin:0 0 26px;
    border-top:1px solid #e8e1d6;border-bottom:1px solid #eeeae1
}
.pt-reader-caption{font-size:10px;font-weight:800;letter-spacing:.11em;color:#9c815d}
.pt-reader-controls{display:flex;align-items:center;justify-content:flex-end;gap:5px;min-width:0}
.pt-reader-controls>button{
    display:inline-flex;align-items:center;justify-content:center;
    min-width:44px;min-height:44px;padding:5px 8px;
    border:1px solid #e6dfd1;border-radius:6px;background:#faf8f3;
    color:#524737;font-size:13px;font-weight:800;cursor:pointer;
    transition:background .2s,color .2s,border-color .2s
}
.pt-reader-controls>button:hover:not(:disabled){background:#efe7d8;border-color:#d7c39e}
.pt-reader-controls>button:disabled{opacity:.35;cursor:not-allowed}
.pt-reader-size-label{min-width:36px;text-align:center;font-size:11px;font-weight:700;color:#81755e}
.pt-reader-separator{width:1px;height:25px;background:#e8e2d8;margin:0 6px}
.pt-reader-controls>.pt-reader-theme{gap:6px;min-width:117px;padding:7px 10px;font-size:11px;white-space:nowrap}
.pt-reader-theme [aria-hidden]{font-size:18px;line-height:1}
.pt-inner .pt-reader-column .pt-reading-prose{
    font-size:var(--pt-reader-font-size,17px);
    transition:background-color .28s,color .28s
}
.pt-reader-column.pt-reader-night{
    background:#242b27;color:#f2f0e9;padding:0 24px 25px;
    border-radius:10px;transition:background-color .28s
}
.pt-reader-night .pt-reader-toolbar{border-color:#4b554c}
.pt-reader-night .pt-reader-caption{color:#e4c8a1}
.pt-reader-night .pt-reader-controls>button{background:#39433b;border-color:#566154;color:#f0f0e9}
.pt-reader-night .pt-reader-controls>button:hover:not(:disabled){background:#4b5c4d}
.pt-reader-night .pt-reader-size-label{color:#f2e1c6}
.pt-reader-night .pt-reader-separator{background:#5f6b60}
.pt-inner .pt-reader-night .pt-reading-prose{color:#e6e9e1}
.pt-inner .pt-reader-night .pt-reading-prose h2,
.pt-inner .pt-reader-night .pt-reading-prose h3,
.pt-inner .pt-reader-night .pt-reading-prose h4{color:#fff!important}
.pt-inner .pt-reader-night .pt-reading-prose a{color:#f2c586}
.pt-inner .pt-reader-night .pt-reading-prose blockquote{
    background:#36443a;color:#efe3cb;border-color:#d2b583
}
.pt-inner .pt-reader-night .pt-reading-prose hr{border-color:#566256}
.pt-inner .pt-reader-night .pt-reading-prose pre{background:#38423a;color:#f2eee5}
.pt-inner .pt-reader-night .pt-reading-prose th,
.pt-inner .pt-reader-night .pt-reading-prose td{border-color:#59645a}

@media(max-width:800px){
    /* Mobile/article TOC is in normal flow; the desktop sticky offset must
       not push it over the reading controls on smaller screens. */
    .pt-inner .pt-reading-sidebar-content{top:auto}
}
@media(max-width:559px){
    .pt-inner .pt-breadcrumb a{min-width:44px;justify-content:center}
    .pt-section-heading>a{display:inline-flex;align-items:center;min-height:44px}
    .pt-post-text h3 a{display:inline-flex;align-items:flex-start;min-height:44px}
    .pt-suggest{max-height:min(300px,54vh)}
    .pt-suggest-thumb{width:39px;height:39px;flex-basis:39px}
    .pt-suggest-copy strong{font-size:11px}
    .pt-suggest-link{min-height:58px}
    .pt-back-to-top{right:14px;bottom:16px;width:44px;height:44px}
    .pt-reader-toolbar{align-items:flex-start;gap:8px;margin-bottom:19px}
    .pt-reader-caption{flex-basis:100%}
    .pt-reader-controls{width:100%;justify-content:space-between}
    .pt-reader-column.pt-reader-night{padding:0 15px 19px}
    .pt-reader-controls>.pt-reader-theme{min-width:105px}
    .pt-motion-pending{transform:translate3d(0,12px,0)}
}
@media(prefers-reduced-motion:reduce){
    .pt-motion-pending{opacity:1;transform:none}
    .pt-motion-arrive,.pt-route-appear,.pt-suggest{animation:none!important}
    .pt-reading-progress span{transition:none}
    .pt-inner .pt-reader-column .pt-reading-prose,.pt-reader-column.pt-reader-night{transition:none}
    .pt-back-to-top,.pt-category,.pt-hero-cta svg{transition:none!important}
    .pt-hero-image,.pt-inner-hero-image{transform:none!important;will-change:auto!important}
    .pt-header.is-scrolled{animation:none!important}
}
