/* ============================================================
   projects.css — Public Projects (portfolio) listing + detail.
   Extends site.css. Graphite + brass editorial system.
   Tokens reused: --bg --surface --ink --muted --brass --rule
   ============================================================ */

/* ===== Page intro header ===== */
.proj-head { padding: 64px 0 0; background: var(--bg); }
.proj-head .eyebrow { margin-bottom: .4rem; }
.proj-head .display-head { margin-bottom: .6rem; }
.proj-head .proj-lede { color: var(--muted); max-width: 640px; font-size: 1.02rem; }
.proj-count { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: 1.5px; }

/* ===== Filter bar ===== */
.proj-filter { background: var(--surface); border: 1px solid var(--rule); padding: 1.25rem 1.25rem .9rem; margin: 1.6rem 0 0; }
.proj-filter .form-label { font-size: .72rem; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 600; color: var(--muted); margin-bottom: .3rem; }
.proj-filter .form-select,
.proj-filter .form-control {
    border-radius: 0; border-color: var(--rule); font-size: .9rem; padding: .5rem .7rem;
    background-color: #fff;
}
.proj-filter .form-select:focus,
.proj-filter .form-control:focus { border-color: var(--brass); box-shadow: 0 0 0 .15rem rgba(0,174,239,.18); }
.proj-filter-actions { display: flex; gap: .6rem; }
.proj-filter-actions .btn { flex: 1 1 auto; }
.btn-brass { background: var(--brass); color: #fff; border: 1px solid var(--brass); border-radius: 0; font-weight: 600; }
.btn-brass:hover { background: var(--brass-dark); border-color: var(--brass-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); border-radius: 0; }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

/* Active taxonomy chip (arrived via /style/ or /type/) */
.proj-active-tax { display: inline-flex; align-items: center; gap: .5rem; background: var(--ink); color: #fff; font-size: .78rem; padding: .4rem .8rem; letter-spacing: .4px; }
.proj-active-tax a { color: rgba(255,255,255,.75); display: inline-flex; }
.proj-active-tax a:hover { color: #fff; }

/* ===== Listing grid ===== */
.proj-grid { background: var(--bg); }
.pc-card { position: relative; }
.pc-status { position: absolute; top: 1rem; right: 1rem; font-size: .65rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; border-radius: 0; padding: .35rem .6rem; }

/* Empty state */
.proj-empty { text-align: center; padding: 4rem 1rem; }
.proj-empty i { font-size: 2.6rem; color: var(--brass); }
.proj-empty h4 { margin-top: 1rem; }
.proj-empty p { color: var(--muted); }

/* ===== Pagination (square, editorial) ===== */
.proj-pagination { display: flex; justify-content: center; gap: .4rem; flex-wrap: wrap; margin-top: 3.5rem; list-style: none; padding: 0; }
.proj-pagination a, .proj-pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 42px; height: 42px; padding: 0 .6rem;
    border: 1px solid var(--rule); color: var(--ink); font-size: .9rem; background: var(--surface);
}
.proj-pagination a:hover { border-color: var(--brass); color: var(--brass); }
.proj-pagination .active span { background: var(--ink); color: #fff; border-color: var(--ink); }
.proj-pagination .disabled span { color: #c9c2b6; }

/* ============================================================
   DETAIL PAGE
   ============================================================ */

/* Breadcrumb */
.proj-crumb { background: var(--surface); border-bottom: 1px solid var(--rule); padding: 1rem 0; font-size: .85rem; }
.proj-crumb a { color: var(--muted); }
.proj-crumb a:hover { color: var(--brass); }
.proj-crumb .sep { color: var(--rule); margin: 0 .5rem; }
.proj-crumb .current { color: var(--ink); }

/* Hero */
.proj-hero { padding: 2.5rem 0 0; background: var(--bg); }
.proj-hero-tags { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .6rem; }
.proj-hero-tags span { font-size: .72rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }
.proj-hero-tags span:not(:last-child)::after { content: "·"; margin-left: .6rem; color: var(--brass); }
.proj-title { font-size: clamp(2rem, 4vw, 3.2rem); margin: 0 0 .5rem; }
.proj-sub { color: var(--muted); font-size: 1.05rem; max-width: 720px; }
.proj-hero-meta { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 1rem; color: var(--muted); font-size: .92rem; }
.proj-hero-meta i { color: var(--brass); margin-right: .4rem; }
.proj-hero-meta .badge { border-radius: 0; font-weight: 600; letter-spacing: .4px; }

/* Cover + gallery */
.proj-cover { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #e8e3dc; margin-top: 1.6rem; cursor: zoom-in; }
.proj-cover img { width: 100%; height: 100%; object-fit: cover; }
.proj-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-top: .8rem; }
.proj-thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #e8e3dc; cursor: zoom-in; border: 0; padding: 0; }
.proj-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.proj-thumb:hover img { transform: scale(1.06); }
.proj-thumb .more-overlay { position: absolute; inset: 0; background: rgba(31,41,55,.6); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 1.6rem; }

/* Generic detail section heading */
.proj-section { padding: 64px 0; }
.proj-section.alt { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.proj-section-head { margin-bottom: 2rem; }
.proj-section-head .eyebrow { display: block; margin-bottom: .4rem; }
.proj-section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0; }
.proj-section-head .brass-rule { margin: 1rem 0 0; }

/* ===== Before / After compare ===== */
.section-ba-list { background: var(--bg); }
.ba-compare { margin: 0 0 2.5rem; }
.ba-compare:last-child { margin-bottom: 0; }
.ba-room { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); margin-bottom: .6rem; }
:lang(bn) .ba-room { font-family: var(--bengali); }
.ba-stage {
    position: relative; aspect-ratio: 16/9; overflow: hidden;
    background: #e8e3dc; user-select: none; -webkit-user-select: none;
    touch-action: pan-y;
}
.ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-clip { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--x, 50%)) 0 0); }
.ba-clip .ba-before { width: 100%; height: 100%; }

.ba-tag { position: absolute; top: 1rem; font-size: .68rem; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; padding: .32rem .65rem; color: #fff; z-index: 3; }
.ba-tag-before { left: 1rem; background: rgba(31,41,55,.85); }
.ba-tag-after { right: 1rem; background: var(--brass); }

.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--x, 50%); width: 0; transform: translateX(-50%); z-index: 4; pointer-events: none; }
.ba-handle-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; transform: translateX(-50%); background: #fff; box-shadow: 0 0 0 1px rgba(31,41,55,.15); }
.ba-handle-grip {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 44px; height: 44px; border-radius: 50%;
    background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(31,41,55,.28); font-size: 1.1rem;
}
.ba-dragging .ba-handle-grip { box-shadow: 0 4px 22px rgba(0,174,239,.5); color: var(--brass); }

/* The range input overlays the stage; thumb is the real drag target on touch. */
.ba-range {
    position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
    -webkit-appearance: none; appearance: none; background: transparent; cursor: ew-resize;
    z-index: 5; touch-action: none; opacity: 0;
}
.ba-range:focus-visible { opacity: 1; outline: none; }
.ba-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 48px; height: 100%; background: transparent; cursor: ew-resize; }
.ba-range::-moz-range-thumb { width: 48px; height: 100%; background: transparent; border: 0; cursor: ew-resize; }
.ba-range::-moz-range-track { background: transparent; }

/* ===== Case-study narrative ===== */
.proj-narrative { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.case-block { margin-bottom: 2.4rem; }
.case-block:last-child { margin-bottom: 0; }
.case-block .case-label { font-size: .72rem; text-transform: uppercase; letter-spacing: 2px; font-weight: 600; color: var(--brass); display: block; margin-bottom: .5rem; }
.case-block h3 { font-size: 1.5rem; margin: 0 0 .6rem; }
.case-block .case-body { color: var(--ink); font-size: 1.05rem; line-height: 1.8; }
.case-block .case-body p:last-child { margin-bottom: 0; }
.case-lede { font-family: var(--serif); font-size: 1.5rem; line-height: 1.5; color: var(--ink); }
:lang(bn) .case-lede { font-family: var(--bengali); font-size: 1.25rem; }

/* ===== Specs / facts strip ===== */
.proj-specs { background: var(--bg); }
.spec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.spec-cell { background: var(--surface); padding: 1.3rem 1.2rem; }
.spec-cell .spec-k { font-size: .7rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); display: block; margin-bottom: .35rem; }
.spec-cell .spec-v { font-family: var(--serif); font-size: 1.25rem; color: var(--ink); line-height: 1.2; }
:lang(bn) .spec-cell .spec-v { font-family: var(--bengali); font-size: 1.05rem; }
.spec-cell .spec-v .badge { font-family: var(--sans); border-radius: 0; font-size: .8rem; }

.proj-materials { margin-top: 2.2rem; }
.proj-materials h4 { font-size: 1.2rem; margin-bottom: .6rem; }
.proj-materials .case-body { color: var(--ink); line-height: 1.8; }

.feature-chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.feature-chip { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--rule); background: var(--surface); padding: .5rem .85rem; font-size: .9rem; color: var(--ink); }
.feature-chip i { color: var(--brass); }

/* ===== Lead designer card ===== */
.proj-designer { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.designer-card { display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; }
.designer-photo { width: 110px; height: 110px; flex: 0 0 auto; object-fit: cover; border-radius: 50%; }
.designer-photo.placeholder { background: var(--bg); display: flex; align-items: center; justify-content: center; color: var(--brass); font-size: 2rem; }
.designer-info { flex: 1 1 280px; }
.designer-info .d-name { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); margin: 0; }
:lang(bn) .designer-info .d-name { font-family: var(--bengali); }
.designer-info .d-role { color: var(--brass); font-size: .85rem; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 600; margin: .2rem 0 .6rem; }
.designer-info .d-bio { color: var(--muted); font-size: .96rem; margin: 0 0 .8rem; }
.designer-links { display: flex; gap: .6rem; flex-wrap: wrap; }
.designer-links a { width: 40px; height: 40px; border: 1px solid var(--rule); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.designer-links a:hover { background: var(--brass); border-color: var(--brass); color: #fff; }

/* ===== Media (video + tour) ===== */
.proj-media { background: var(--bg); }
.media-frame { position: relative; aspect-ratio: 16/9; background: var(--ink); overflow: hidden; }
.media-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-label { font-size: .72rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--brass); font-weight: 600; margin-bottom: .6rem; display: block; }

/* ===== Testimonials on detail ===== */
.proj-testimonials { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

/* ===== Related ===== */
.proj-related { background: var(--bg); }

/* ===== CTA row ===== */
.proj-cta { background: var(--dark); color: #fff; padding: 64px 0; }
.proj-cta .eyebrow { color: var(--brass); }
.proj-cta h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.3rem); margin: .4rem 0 1.4rem; }
.proj-cta-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.proj-cta-actions .btn { display: inline-flex; align-items: center; gap: .5rem; }

/* ===== Lightbox ===== */
.proj-lightbox { position: fixed; inset: 0; z-index: 1080; background: rgba(17,24,39,.94); display: none; align-items: center; justify-content: center; padding: 3rem 1.2rem; }
.proj-lightbox.open { display: flex; }
.proj-lightbox img { max-width: 100%; max-height: 90vh; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.proj-lightbox .lb-close,
.proj-lightbox .lb-prev,
.proj-lightbox .lb-next {
    position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0;
    width: 50px; height: 50px; display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; cursor: pointer; transition: background .2s ease;
}
.proj-lightbox .lb-close:hover,
.proj-lightbox .lb-prev:hover,
.proj-lightbox .lb-next:hover { background: var(--brass); }
.proj-lightbox .lb-close { top: 1.2rem; right: 1.2rem; }
.proj-lightbox .lb-prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.proj-lightbox .lb-next { right: 1.2rem; top: 50%; transform: translateY(-50%); }
.proj-lightbox .lb-caption { position: absolute; bottom: 1.4rem; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.85); font-size: .9rem; padding: 0 1rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
    .proj-section { padding: 48px 0; }
    .spec-grid { grid-template-columns: repeat(2, 1fr); }
    .proj-gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767.98px) {
    .proj-head { padding: 40px 0 0; }
    .proj-gallery { grid-template-columns: repeat(2, 1fr); }
    .proj-cta-actions .btn { width: 100%; }
    .designer-card { gap: 1rem; }
    .ba-stage { aspect-ratio: 4/3; }
    .ba-handle-grip { width: 38px; height: 38px; font-size: 1rem; }
}
@media (max-width: 480px) {
    .spec-grid { grid-template-columns: 1fr 1fr; }
    .proj-filter { padding: 1rem .9rem .7rem; }
}
