/* ============================================================
   Portofolio Interaktif — device frames + block renderer
   ============================================================ */
.pf-hero { padding-block: clamp(2rem,5vw,3.5rem); }

/* Tabs / segmented control */
.pf-tabs {
  display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center;
  background: var(--c-surface-2); padding: .4rem; border-radius: 999px;
  border: 1px solid var(--c-border); width: fit-content; max-width: 100%; margin: 0 auto 2rem;
}
.pf-tab {
  border: none; background: transparent; cursor: pointer; font: inherit; font-weight: 700; font-size: .88rem;
  color: var(--c-text-soft); padding: .55rem 1.1rem; border-radius: 999px; transition: .2s var(--ease); white-space: nowrap;
}
.pf-tab:hover { color: var(--c-text); }
.pf-tab.active { background: var(--accent, var(--c-primary)); color: #fff; box-shadow: var(--shadow-sm); }

/* Stage */
.pf-stage {
  display: flex; gap: clamp(1rem, 4vw, 3rem); align-items: flex-start; justify-content: center; flex-wrap: wrap;
}

/* ---------- Desktop frame ---------- */
.device-desktop {
  flex: 1 1 560px; max-width: 680px; min-width: 0;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 16px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.dd-chrome { height: 38px; background: var(--c-surface-2); display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid var(--c-border); }
.dd-dot { width: 11px; height: 11px; border-radius: 50%; }
.dd-url { margin-left: 10px; flex: 1; background: var(--c-bg); border-radius: 8px; height: 22px; display: flex; align-items: center; padding: 0 10px; font-size: .72rem; color: var(--c-muted); overflow: hidden; white-space: nowrap; }
.dd-appbar { display: flex; align-items: center; gap: 1rem; padding: .8rem 1.1rem; border-bottom: 1px solid var(--c-border); background: var(--c-surface); }
.dd-logo { font-weight: 800; color: var(--accent); display: flex; align-items: center; gap: .4rem; font-size: .95rem; }
.dd-nav { display: flex; gap: .3rem; margin-left: auto; flex-wrap: wrap; }
.dd-nav button { border: none; background: transparent; font: inherit; font-size: .8rem; font-weight: 600; color: var(--c-text-soft); padding: .35rem .7rem; border-radius: 8px; cursor: pointer; }
.dd-nav button.active { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }

/* ---------- Phone frame ---------- */
.device-phone {
  flex: 0 0 300px; width: 300px; max-width: 86vw;
  background: #0b0d14; border-radius: 38px; padding: 12px; box-shadow: var(--shadow-lg); position: relative;
}
.dp-screen-wrap { background: var(--c-surface); border-radius: 28px; overflow: hidden; position: relative; }
.dp-notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 110px; height: 22px; background: #0b0d14; border-radius: 0 0 14px 14px; z-index: 3; }
.dp-statusbar { height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; font-size: .68rem; font-weight: 700; color: var(--c-text); }
.dp-appbar { padding: .5rem 1rem .7rem; border-bottom: 1px solid var(--c-border); font-weight: 800; color: var(--accent); font-size: .95rem; }
.dp-tabbar { display: flex; border-top: 1px solid var(--c-border); background: var(--c-surface); }
.dp-tabbar button { flex: 1; border: none; background: transparent; cursor: pointer; padding: .55rem .2rem; font-size: .62rem; font-weight: 600; color: var(--c-muted); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.dp-tabbar button.active { color: var(--accent); }
.dp-tabbar button .ic { font-size: 1.05rem; }

/* ---------- Screen scroll area ---------- */
.pf-screen { padding: .9rem; display: flex; flex-direction: column; gap: .8rem; overflow-y: auto; }
.device-desktop .pf-screen { height: 460px; }
.device-phone .pf-screen { height: 460px; }
.pf-screen::-webkit-scrollbar { width: 6px; }
.pf-screen::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 6px; }

.pf-fade { animation: pfFade .35s var(--ease); }
@keyframes pfFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Blocks ---------- */
.blk-h { }
.blk-h h4 { font-size: 1rem; }
.blk-h p { font-size: .8rem; margin-top: 2px; }

.blk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px,1fr)); gap: .5rem; }
.blk-stat { background: var(--c-surface-2); border-radius: 12px; padding: .6rem .7rem; }
.blk-stat b { display: block; font-size: 1.1rem; color: var(--accent); }
.blk-stat span { font-size: .68rem; color: var(--c-muted); }

.blk-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); font-weight: 700; }

.blk-list { display: flex; flex-direction: column; gap: .4rem; }
.blk-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; background: var(--c-surface-2); border-radius: 10px; padding: .55rem .7rem; }
.blk-row .l b { font-size: .82rem; display: block; }
.blk-row .l span { font-size: .68rem; color: var(--c-muted); }
.blk-row .r { font-size: .8rem; font-weight: 700; text-align: right; white-space: nowrap; }

.blk-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: .5rem; }
.device-phone .blk-cards { grid-template-columns: repeat(2,1fr); }
.blk-card { background: var(--c-surface-2); border-radius: 12px; padding: .7rem; border: 1px solid transparent; transition: .15s; cursor: pointer; }
.blk-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.blk-card .ic { font-size: 1.4rem; }
.blk-card b { display: block; font-size: .8rem; margin-top: .3rem; }
.blk-card span { font-size: .68rem; color: var(--c-muted); }
.blk-card .foot { color: var(--accent); font-weight: 800; font-size: .8rem; margin-top: .25rem; }

.blk-banner { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000)); color: #fff; border-radius: 14px; padding: .9rem 1rem; }
.blk-banner b { font-size: .95rem; }
.blk-banner p { color: rgba(255,255,255,.85); font-size: .74rem; margin: 2px 0 .6rem; }
.blk-banner button { background: #fff; color: var(--accent); border: none; border-radius: 999px; padding: .45rem .9rem; font-weight: 800; font-size: .76rem; cursor: pointer; }

.blk-form { display: flex; flex-direction: column; gap: .45rem; }
.blk-form input { width: 100%; padding: .55rem .7rem; border: 1px solid var(--c-border); border-radius: 9px; background: var(--c-surface); font-size: .8rem; color: var(--c-text); }
.blk-form button { background: var(--accent); color: #fff; border: none; border-radius: 9px; padding: .6rem; font-weight: 700; font-size: .82rem; cursor: pointer; }

.blk-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.blk-chip { background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: 999px; padding: .35rem .75rem; font-size: .74rem; font-weight: 600; cursor: pointer; transition: .15s; }
.blk-chip:hover { border-color: var(--accent); color: var(--accent); }

.blk-table { width: 100%; border-collapse: collapse; font-size: .74rem; }
.blk-table th { text-align: left; color: var(--c-muted); font-weight: 700; padding: .4rem .5rem; border-bottom: 1px solid var(--c-border); font-size: .68rem; text-transform: uppercase; }
.blk-table td { padding: .45rem .5rem; border-bottom: 1px solid var(--c-border); }

.tag { font-size: .6rem; font-weight: 800; padding: .15rem .45rem; border-radius: 999px; text-transform: uppercase; }
.tag.done,.tag.paid,.tag.ontrack { background: rgba(16,185,129,.15); color: #10b981; }
.tag.pending,.tag.delay { background: rgba(245,158,11,.18); color: #f59e0b; }

/* ---------- Blok baru ---------- */
.blk-ic { width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent); font-size: 1.05rem; }

.blk-hero { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #6d28d9)); color: #fff; border-radius: 16px; padding: 1.1rem; }
.blk-hero-badge { display: inline-block; background: rgba(255,255,255,.22); color: #fff; font-size: .62rem; font-weight: 800; padding: .2rem .6rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .5rem; }
.blk-hero b { font-size: 1.1rem; line-height: 1.25; display: block; }
.blk-hero p { color: rgba(255,255,255,.85); font-size: .78rem; margin: .3rem 0 .7rem; }
.blk-hero button { background: #fff; color: var(--accent); border: none; border-radius: 999px; padding: .5rem 1rem; font-weight: 800; font-size: .78rem; cursor: pointer; }

.blk-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px,1fr)); gap: .5rem; }
.device-phone .blk-gallery { grid-template-columns: repeat(3,1fr); }
.blk-tile { aspect-ratio: 1/1; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) calc(18% + var(--i,0)*6%), var(--c-surface-2)), var(--c-surface-2)); position: relative; overflow: hidden; }
.blk-tile .tile-ic { font-size: 1.5rem; }
.blk-tile .tile-label { font-size: .62rem; font-weight: 700; color: var(--c-text-soft); text-align: center; padding: 0 4px; }

.blk-progress { display: flex; flex-direction: column; gap: .65rem; }
.prog-head { display: flex; justify-content: space-between; font-size: .78rem; margin-bottom: .25rem; }
.prog-head b { color: var(--accent); }
.prog-bar { height: 8px; background: var(--c-surface-2); border-radius: 999px; overflow: hidden; }
.prog-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #06b6d4)); transition: width .6s var(--ease); }

.blk-timeline { position: relative; padding-left: 6px; }
.tl-item { display: flex; gap: .7rem; padding-bottom: .8rem; position: relative; }
.tl-item:not(:last-child) .tl-dot::after { content: ''; position: absolute; top: 14px; left: 5px; width: 2px; height: calc(100% - 6px); background: var(--c-border); }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--c-border); background: var(--c-surface); flex-shrink: 0; margin-top: 2px; position: relative; }
.tl-item.done .tl-dot { background: var(--accent); border-color: var(--accent); }
.tl-body b { font-size: .82rem; display: block; }
.tl-body span { font-size: .7rem; color: var(--c-muted); }

.blk-reviews { display: flex; flex-direction: column; gap: .6rem; }
.rev { background: var(--c-surface-2); border-radius: 12px; padding: .7rem; }
.rev-top { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.rev-av { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .8rem; }
.rev-top b { font-size: .78rem; }
.rev-stars { color: #f59e0b; font-size: .72rem; letter-spacing: 1px; }
.rev p { font-size: .76rem; }

.blk-profile { display: flex; align-items: center; gap: .8rem; background: var(--c-surface-2); border-radius: 14px; padding: .8rem; }
.prof-av { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #06b6d4); color: #fff; display: grid; place-items: center; font-size: 1.4rem; font-weight: 800; flex-shrink: 0; }
.prof-info b { font-size: .95rem; display: block; }
.prof-info span { font-size: .72rem; display: block; color: var(--c-text-soft); }

.blk-chat { display: flex; flex-direction: column; gap: .4rem; }
.bubble { max-width: 80%; padding: .5rem .75rem; border-radius: 14px; font-size: .78rem; line-height: 1.4; }
.bubble.them { background: var(--c-surface-2); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.me { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }

.blk-chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }

.blk-note { font-size: .72rem; color: var(--c-muted); background: var(--c-surface-2); border: 1px dashed var(--c-border); border-radius: 10px; padding: .5rem .7rem; }

/* labels under devices */
.pf-devlabel { text-align: center; margin-top: .8rem; font-size: .78rem; font-weight: 700; color: var(--c-muted); }

@media (max-width: 720px) {
  .device-desktop { flex-basis: 100%; }
  .device-desktop .pf-screen, .device-phone .pf-screen { height: 400px; }
}
