/* =======================================================
   PORTFOLIO — halaman Portfolio (gabungan arsip): search, filter client,
   filter kategori, grid kartu, dan modal detail project (.pd-*).
   Dirender oleh assets/js/portfolio.js.
   ============================================================ */

/* ---------- Search ---------- */
.pf-search {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 24px; height: var(--control-h);
  margin-bottom: 32px; color: var(--gray-400); background: var(--white);
  transition: border-color .4s ease, box-shadow .4s ease;
}
.pf-search:focus-within { border-color: var(--purple-600); box-shadow: 0 0 0 4px rgba(123,47,181,.08); }
.pf-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 500 15px 'Inter', sans-serif; color: var(--ink); }

/* ---------- Layout ---------- */
.pf-body { display: grid; grid-template-columns: 230px 1fr; gap: 48px; align-items: start; }
.pf-filter { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 24px; }
.pf-client { display: flex; flex-direction: column; gap: 8px; }
.pf-client span, .pf-count { font-size: 12px; font-weight: 600; color: var(--gray-500); }
.pf-client select {
  appearance: none; -webkit-appearance: none; width: 100%;
  padding: 12px 32px 12px 16px; border-radius: var(--r-sm); border: 1px solid var(--line);
  font: 500 14px 'Inter', sans-serif; color: var(--ink); cursor: pointer;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%237b2fb5' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.pf-client select:focus { outline: none; border-color: var(--purple-600); }
.pf-cats { display: flex; flex-direction: column; gap: 4px; }
.pf-cat {
  text-align: left; padding: 12px 16px; border-radius: var(--r-sm);
  font-size: 14.5px; font-weight: 500; color: var(--gray-500);
  transition: background .4s ease, color .4s ease;
}
.pf-cat:hover { background: var(--lav-50); color: var(--ink); }
.pf-cat.active { background: var(--lav-100); color: var(--purple-700); font-weight: 600; }
.pf-count { margin-bottom: 16px; }

/* ---------- Grid ---------- */
.pf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
.pf-card { display: flex; flex-direction: column; gap: 16px; }
.pf-thumb { aspect-ratio: 16/10; border-radius: var(--r-md); overflow: hidden; background: var(--lav-100); }
.pf-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.pf-card:hover .pf-thumb img { transform: scale(1.04); }
.pf-meta h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.2px; line-height: 1.3; }
.pf-meta p { margin-top: 4px; font-size: 14px; color: var(--gray-400); }

/* ---------- Modal ---------- */
body.modal-open { overflow: hidden; }
.pd-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15,15,18,.45); backdrop-filter: blur(6px);
  display: flex; justify-content: center; align-items: flex-start;
  padding: max(24px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px));
  overflow-y: auto;
}
.pd-modal {
  width: min(1080px, 100%); background: var(--white); border-radius: var(--r-lg);
  overflow: hidden; animation: pdIn .35s cubic-bezier(.2,.7,.2,1);
}
@keyframes pdIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.pd-bar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 16px 16px 32px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14px;
}
.pd-close { width: 38px; height: var(--control-h); border-radius: 50%; display: grid; place-items: center; background: var(--lav-100); color: var(--ink); flex-shrink: 0; }
.pd-close:hover { background: var(--ink); color: var(--white); }
.pd-body > * { padding-left: 48px; padding-right: 48px; }

/* ---------- Detail project ---------- */
.pd-overview { background: var(--lav-50); padding-top: 48px; padding-bottom: 48px; }
.pd-headline { margin: 16px 0 32px; font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; max-width: 820px; text-wrap: balance; }
.pd-ov-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.pd-stats { display: flex; flex-direction: column; gap: 12px; }
.pd-stat { background: var(--white); border-radius: var(--r-md); padding: 16px 24px; display: flex; flex-direction: column; gap: 4px; }
.pd-stat strong { font-family: 'Inter Tight', sans-serif; font-size: 19px; font-weight: 600; }
.pd-stat span { font-size: 13px; color: var(--gray-400); }
.pd-quote { background: var(--white); border-radius: var(--r-md); padding: 24px; display: flex; flex-direction: column; gap: 24px; justify-content: space-between; }
.pd-logo { max-width: 120px; max-height: 48px; object-fit: contain; object-position: left; }
.pd-quote blockquote { font-family: 'Inter Tight', sans-serif; font-style: italic; font-size: 16px; line-height: 1.5; color: var(--ink-soft); }
.pd-quote figcaption { display: flex; align-items: center; gap: 12px; }
.pd-quote figcaption b { display: block; font-size: 14px; }
.pd-quote figcaption small { display: block; font-size: 12.5px; color: var(--gray-400); }
.pd-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--purple-grad); color: var(--white); font-size: 13px; font-weight: 700; flex-shrink: 0; }
img.pd-avatar { object-fit: cover; background: var(--lav-100); }
.pd-hero { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; padding: 0 !important; }
.pd-about, .pd-cs { display: grid; grid-template-columns: .7fr 1.3fr; gap: 48px; padding-top: 64px; padding-bottom: 64px; }
.pd-text { font-size: 16px; line-height: 1.7; color: var(--ink-soft); }
.pd-rows { margin-top: 24px; }
.pd-rows div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.pd-rows dt { font-size: 14px; font-weight: 600; color: var(--gray-400); }
.pd-rows dd { font-size: 15px; }
.pd-gallery { display: flex; flex-direction: column; gap: 16px; padding-bottom: 24px; }
.pd-gallery .eyebrow { text-align: center; margin-bottom: 8px; }
.pd-gallery img { width: 100%; border-radius: var(--r-md); }
.pd-cs { border-top: 1px solid var(--line); }
.pd-solutions { margin-top: 12px; }
.pd-solutions details { border-bottom: 1px solid var(--line); }
.pd-solutions details:first-child { border-top: 1px solid var(--line); }
.pd-solutions summary { display: flex; gap: 16px; align-items: center; padding: 24px 0; cursor: pointer; list-style: none; font-weight: 700; font-size: 16px; }
.pd-solutions summary::-webkit-details-marker { display: none; }
.pd-num { font-family: 'Inter Tight', sans-serif; font-weight: 600; font-size: 18px; color: var(--gray-300); width: 30px; }
.pd-solutions details[open] .pd-num { color: var(--purple-600); }
.pd-solutions details p { padding: 0 0 24px 48px; font-size: 15.5px; line-height: 1.65; color: var(--gray-500); }

@media (max-width: 980px) {
  .pf-body { grid-template-columns: 1fr; gap: 24px; }
  .pf-filter { position: static; }
  .pf-cats { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .pf-cat { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 16px; font-size: 13.5px; }
  .pf-client { max-width: 320px; }
  .pd-body > * { padding-left: 32px; padding-right: 32px; }
  .pd-ov-grid, .pd-about, .pd-cs { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 640px) {
  .pf-grid { grid-template-columns: 1fr; gap: 32px; }
  .pf-client { max-width: none; }
  .pd-overlay { padding: max(12px, env(safe-area-inset-top, 0px)) 8px 12px; }
  .pd-modal { border-radius: var(--r-lg); }
  .pd-body > * { padding-left: 16px; padding-right: 16px; }
  .pd-headline { font-size: var(--fs-h3); letter-spacing: -0.015em }
  .pd-rows div { grid-template-columns: 1fr; gap: 4px; }
  .pd-solutions details p { padding-left: 0; }
}

/* Halaman Portfolio (13 Nov 2026): filter jadi tab di atas (seperti Tools), grid 3 kolom memakai lebar penuh.
   Kolom filter kiri 230px hanya berisi 3 pilihan dan memakan seperempat halaman. */
.pf-body--top { grid-template-columns: 1fr; gap: 16px; }
.pf-body--top .pf-filter { position: static; }
.pf-body--top .pf-cats { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.pf-body--top .pf-cat { display: inline-flex; align-items: center; height: var(--control-h); padding: 0 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.pf-body--top .pf-cat:hover { border-color: var(--ink); background: var(--white); color: var(--ink); }
.pf-body--top .pf-cat.active { background: var(--ink); border-color: var(--ink); color: var(--white); }
.pf-body--top .pf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 980px) { .pf-body--top .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .pf-body--top .pf-grid { grid-template-columns: 1fr; }
  .pf-body--top .pf-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .pf-body--top .pf-cat { flex-shrink: 0; font-size: 13px; }
}

/* Halaman detail /portfolio/<slug>/ (13 Nov 2026): isi sama dengan modal lama, tampil sebagai halaman. */
.pf-page { padding-top: 112px; padding-bottom: 96px; }
.pf-back a { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.pf-back a:hover { color: var(--ink); }
.pf-page-head { margin: 24px 0 32px; max-width: 820px; }
.pf-page-title { margin: 0; font: 600 var(--fs-h2)/1.1 'Inter Tight', sans-serif; letter-spacing: -0.02em; color: var(--ink); }
.pf-page-sub { margin: 12px 0 0; font-size: 16px; color: var(--text-2); }
.pf-page-cover { margin: 0 0 48px; border-radius: var(--r-lg); overflow: hidden; background: var(--lav-50); }
.pf-page-cover img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.pf-page-body > * { padding-left: 0; padding-right: 0; }

.pd-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pf-page-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--border); }
.pf-page-cta h2 { margin: 0; font: 600 var(--fs-h4)/1.3 'Inter Tight', sans-serif; letter-spacing: -0.01em; color: var(--ink); }
@media (max-width: 640px) {
  .pf-page { padding-top: 96px; padding-bottom: 64px; }
  .pf-page-title { font-size: var(--fs-h2); letter-spacing: -0.02em; }
  .pf-page-body .pd-overview { padding: 24px; }
}

/* Galeri studi kasus /portfolio/ (13 Nov 2026): judul tengah, tab kategori tengah, grid 3 kolom kartu bergaris. */
.cs-hero { padding: 144px 0 32px; text-align: center; }
.cs-eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.cs-hero h1 { margin: 0 auto; max-width: 820px; font: 600 var(--fs-h1)/1.05 'Inter Tight', sans-serif; letter-spacing: -0.025em; color: var(--ink); }
.cs-hero p:last-child { margin: 16px auto 0; max-width: 560px; font-size: 16px; line-height: 1.6; color: var(--text-2); }
.cs-section { padding-top: 8px; }
.cs-tabs { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 32px; }
.cs-tabs .pf-cat { display: inline-flex; align-items: center; height: var(--control-h); padding: 0 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); font-size: 14px; font-weight: 500; color: var(--text-1); }
.cs-tabs .pf-cat:hover { border-color: var(--ink); background: var(--white); color: var(--ink); }
.cs-tabs .pf-cat.active { background: var(--ink); border-color: var(--ink); color: var(--white); }
.cs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cs-card { display: flex; flex-direction: column; gap: 16px; padding: 12px 12px 20px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--white); color: var(--ink); transition: border-color var(--ease), background var(--ease); }
.cs-card:hover { border-color: var(--border-brand); background: var(--lav-50); }
.cs-thumb { aspect-ratio: 16 / 11; border-radius: var(--r-sm); overflow: hidden; background: var(--lav-100); }
.cs-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.22,.8,.22,1); }
.cs-card:hover .cs-thumb img { transform: scale(1.03); }
.cs-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 0 4px; }
.cs-meta b { font-size: 14px; font-weight: 600; }
.cs-year { margin-left: auto; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cs-foot { display: flex; align-items: flex-start; gap: 16px; padding: 0 4px; }
.cs-foot p { flex: 1; margin: 0; font: 600 var(--fs-h5)/1.4 'Inter Tight', sans-serif; letter-spacing: -0.005em; }
.cs-go { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border: 1px solid var(--border-strong); border-radius: var(--r-sm); transition: background var(--ease), color var(--ease), border-color var(--ease); }
.cs-go svg { width: 14px; height: 14px; }
.cs-card:hover .cs-go { background: var(--ink); border-color: var(--ink); color: var(--white); }
@media (max-width: 980px) { .cs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .cs-hero { padding: 112px 0 24px; }
  .cs-grid { grid-template-columns: 1fr; }
  .cs-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .cs-tabs .pf-cat { flex-shrink: 0; font-size: 13px; }
}

/* Detail project: ringkasan = hero halaman (tanpa kotak pembungkus), kartu di dalamnya diberi latar sedikit lebih gelap. */
.pf-page-body .pd-overview { padding: 24px 0 48px; background: none; border-radius: 0; }
.pf-page-body .pd-headline { margin: 16px 0 40px; max-width: 900px; font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -0.02em; }
.pf-page-body .pd-stat, .pf-page-body .pd-quote { background: var(--surface-2); border: 1px solid var(--border); }

/* Detail project (revisi 13 Nov 2026 malam): ringkasan = section hero selebar layar (latar --surface-2),
   kartu di dalamnya putih bergaris, label Ringkasan, paragraf ringkasan, baris layanan di bawah. */
.pf-page { padding-top: 0; }
.pf-hero { position: relative; padding: 120px 0 48px; margin-bottom: 48px; background: var(--surface-2); box-shadow: 0 0 0 100vmax var(--surface-2); clip-path: inset(0 -100vmax); }
.pf-hero .pf-page-body .pd-overview { padding: 24px 0 0; background: none; }
.pf-hero .pd-stat, .pf-hero .pd-quote { background: var(--white); border: 1px solid var(--border); }
.pd-eyebrow { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.pd-tags .pd-eyebrow + .tag-main { margin-left: 8px; }
.pd-lead { margin: -16px 0 32px; max-width: 720px; font-size: 16px; line-height: 1.6; color: var(--text-1); }
.pd-services { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 32px 0 0; padding: 20px 0 0; border-top: 1px solid var(--border); }
.pd-services li { position: relative; padding-left: 14px; font-size: 13.5px; color: var(--text-2); }
.pd-services li::before { content: ''; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--purple-600); opacity: .6; }
@media (max-width: 640px) { .pf-hero { padding-top: 104px; } }
