/* ============================================================================
   detail.css — project detail view styles.  OWNED by the "detail view" agent.
   Dark, cinematic, editorial. Vanilla; morph + carousel driven by detail.js.
   ========================================================================== */
#detail-root:empty{ display:none; }

/* ---- scroll lock while open (page behind is fixed) ---- */
body.detail-lock{ overflow:hidden; }

/* dim + push the running ring behind the panel */
body.detail-open .viewport{ filter:brightness(.42) blur(3px); transition:filter .5s cubic-bezier(.25,.46,.45,.94); }

/* ---- scrim ---- */
.detail-scrim{ position:fixed; inset:0; z-index:100; background:#000000cc;
  -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); cursor:pointer; }

/* ---- glass token (shared by close + carousel nav) ---- */
.glass{ border:0; color:#fff; cursor:pointer; background:#000000bf;
  -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px);
  box-shadow:0 0 0 1px #ffffff33 inset;
  transition:box-shadow .3s cubic-bezier(.25,.46,.45,.94), opacity .3s cubic-bezier(.25,.46,.45,.94), transform .3s cubic-bezier(.25,.46,.45,.94); }
.glass:hover{ box-shadow:0 0 13px #b2b2b2 inset; }
.glass:focus-visible{ outline:0; box-shadow:0 0 0 1px #fff inset, 0 0 13px #b2b2b2 inset; }

/* ---- close (top-right) ---- */
.detail-close{ position:fixed; top:20px; right:24px; z-index:103;
  width:38px; height:38px; border-radius:6px;
  display:flex; align-items:center; justify-content:center; }
.detail-close svg{ display:block; }

/* ---- panel host: flex-centers the panel so the panel's own transform is free
   for the FLIP morph (resting transform = none, clean math in detail.js) ---- */
#detail-root{ position:fixed; inset:0; z-index:101; display:flex;
  align-items:center; justify-content:center; pointer-events:none; }
#detail-root .detail-scrim,
#detail-root .detail-close,
#detail-root .detail-panel{ pointer-events:auto; }

/* ---- panel ---- */
.detail-panel{ position:relative; z-index:101;
  width:min(1180px,94vw); height:min(760px,88vh);
  display:grid; grid-template-columns:1.45fr 1fr; gap:0; overflow:hidden;
  background:#0c0c0c; border-radius:6px;
  box-shadow:0 0 0 1px #ffffff1f inset, 0 60px 140px -40px #000, 0 0 0 1px #000; }
.detail-panel:focus{ outline:0; }

/* ============================ MEDIA / CAROUSEL ============================ */
.dt-media{ position:relative; background:#000; display:flex; flex-direction:column;
  min-width:0; min-height:0; }
.dt-carousel{ position:relative; flex:1 1 auto; overflow:hidden; min-height:0;
  touch-action:pan-y; }
.dt-track{ display:flex; height:100%; width:100%; will-change:transform;
  transform:translate3d(0,0,0); }
.dt-slide{ position:relative; flex:0 0 100%; width:100%; height:100%;
  background:#0a0a0a; overflow:hidden; }
.dt-slide img{ position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; display:block; -webkit-user-select:none; user-select:none;
  opacity:0; transition:opacity .6s cubic-bezier(.25,.46,.45,.94); }
.dt-slide img[src]{ opacity:1; }
/* no selection / native image-drag in the carousel — so the swipe isn't hijacked */
.dt-media, .dt-carousel, .dt-track, .dt-slide, .dt-slide img{ -webkit-user-select:none; user-select:none; -webkit-user-drag:none; }
/* subtle cinematic vignette on the media */
.dt-carousel::after{ content:""; position:absolute; inset:0; pointer-events:none;
  box-shadow:0 0 120px 20px #000 inset; opacity:.5; }

/* ---- carousel nav arrows ---- */
.dt-nav{ position:absolute; top:50%; transform:translateY(-50%); z-index:4;
  width:42px; height:42px; border-radius:6px;
  display:flex; align-items:center; justify-content:center; }
.dt-nav:hover{ transform:translateY(-50%); }        /* keep vertical centering on hover */
.dt-prev{ left:16px; }
.dt-next{ right:16px; }
.dt-nav svg{ display:block; }

/* ---- dots ---- */
.dt-dots{ position:absolute; left:0; right:0; bottom:16px; z-index:4;
  display:flex; gap:8px; justify-content:center; align-items:center; }
.dt-dot{ width:7px; height:7px; padding:0; border:0; border-radius:50%; cursor:pointer;
  background:#ffffff44; box-shadow:0 0 0 1px #00000055;
  transition:background .3s cubic-bezier(.25,.46,.45,.94), width .3s cubic-bezier(.25,.46,.45,.94); }
.dt-dot:hover{ background:#ffffff88; }
.dt-dot.is-active{ background:#fff; width:20px; border-radius:4px; }
.dt-dot:focus-visible{ outline:0; box-shadow:0 0 0 2px #fff; }

/* ============================ META / INFO ============================ */
.dt-info{ position:relative; display:flex; flex-direction:column;
  padding:52px 44px 0; min-width:0; }
.dt-info-scroll{ flex:1 1 auto; overflow:auto; padding-bottom:64px;
  scrollbar-width:thin; scrollbar-color:#ffffff33 transparent; }
.dt-info-scroll::-webkit-scrollbar{ width:6px; }
.dt-info-scroll::-webkit-scrollbar-thumb{ background:#ffffff22; border-radius:6px; }

.dt-eyebrow{ display:block; font-size:11px; font-weight:600; letter-spacing:.14em;
  text-transform:uppercase; color:#fff; opacity:.5; }
.dt-title{ font-size:clamp(30px,3.4vw,46px); font-weight:600; line-height:1.02;
  letter-spacing:-.01em; margin:14px 0 0; }
.dt-tagline{ font-size:17px; font-weight:500; line-height:1.35; opacity:.72;
  margin:14px 0 26px; max-width:34ch; }

.dt-label{ display:block; font-size:10px; font-weight:600; letter-spacing:.12em;
  text-transform:uppercase; opacity:.42; margin-bottom:5px; }

.dt-medium{ padding:20px 0; border-top:1px solid #ffffff14;
  font-size:14px; font-weight:500; }
.dt-medium span:last-child{ opacity:.9; }

.dt-desc{ font-size:14px; font-weight:500; line-height:1.62; opacity:.82;
  padding:22px 0; border-top:1px solid #ffffff14; max-width:46ch; }

.dt-credits{ display:grid; grid-template-columns:1fr 1fr; gap:20px 24px;
  padding:22px 0 8px; border-top:1px solid #ffffff14; }
.dt-credit span:last-child{ font-size:13px; font-weight:500; opacity:.9; }
.dt-link{ font-size:13px; font-weight:500; color:#fff; text-decoration:none; word-break:break-all;
  box-shadow:inset 0 -1px 0 #ffffff44; transition:box-shadow .3s cubic-bezier(.25,.46,.45,.94); }
.dt-link:hover{ box-shadow:inset 0 -1px 0 #fff; }

/* ---- editorial index, pinned bottom of the info column ---- */
.dt-index{ position:absolute; left:44px; bottom:26px; z-index:2;
  font-size:12px; font-weight:600; letter-spacing:.16em; opacity:.4;
  pointer-events:none;
  background:linear-gradient(transparent, #0c0c0c 55%); padding-top:18px; }

/* ============================ RESPONSIVE ============================ */
@media (max-width:800px){
  .detail-panel{ grid-template-columns:1fr; grid-template-rows:minmax(0,52%) minmax(0,48%);
    width:94vw; height:90vh; }
  .dt-info{ padding:30px 26px 0; }
  .dt-index{ left:26px; bottom:20px; }
  .dt-tagline{ margin-bottom:20px; }
  .dt-credits{ grid-template-columns:1fr 1fr; }
  .detail-close{ top:14px; right:16px; }
}
@media (max-width:460px){
  .dt-credits{ grid-template-columns:1fr; gap:14px; }
  .dt-nav{ width:36px; height:36px; }
}

/* ============================ REDUCED MOTION ============================ */
@media (prefers-reduced-motion: reduce){
  body.detail-open .viewport{ transition:none; }
  .dt-track{ transition:none !important; }
  .dt-slide img{ transition:none; }
  .glass{ transition:box-shadow .2s linear, opacity .2s linear; }
}
