@import url('/consent.css');

.work-cover {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 12px 12px 46px;
  overflow: hidden;
  background: #e9e9e9;
  border: 1px solid var(--line);
  color: var(--ink);
}
.work-cover img { display: block; width: 100%; height: 100%; object-fit: contain; }
.work-cover:hover { border-color: #8a8a8a; }
.work-preview { position: relative; }
.work-cover video {
  position: absolute;
  inset: 12px 12px 46px;
  display: block;
  width: calc(100% - 24px);
  height: calc(100% - 58px);
  object-fit: contain;
  background: #e9e9e9;
  opacity: 0;
}
.work-preview[data-preview-loaded] video { opacity: 1; }
.work-playback {
  position: absolute;
  right: 12px;
  top: 12px;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #b8b8b8;
  background: rgb(248 248 248 / .96);
  color: var(--ink);
  font-size: .75rem;
}
.work-card .work-film-caption { margin: 10px 0 0; font-size: .75rem; line-height: 1.5; }
.work-count {
  position: absolute;
  inset: auto 16px 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: .8125rem;
}
.work-card .work-location { margin: 20px 0 8px; font-size: .8125rem; }
.work-card h3 { margin-top: 0; }
.work-status { font-size: .75rem; color: #606060; }
.work-card .work-status { margin: 0 0 15px; font-size: .75rem; }
.work-card .text-action { margin-top: 4px; font-size: .8125rem; }
.founder-portrait {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--line);
}
dialog.project-dialog {
  max-width: 1060px;
  max-height: 92svh;
  padding: 28px;
  overscroll-behavior: contain;
}
.project-dialog .dialog-top { top: -28px; margin-bottom: 22px; }
.project-dialog .dialog-top .eyebrow { margin: 0; }
.project-heading { margin-bottom: 26px; }
.project-heading .work-status { margin: 0 0 8px; }
.project-heading h2 { font-size: clamp(1.65rem, 3vw, 2.4rem); margin: 0; }
.project-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; }
.project-gallery, .project-description { min-width: 0; }
.gallery-figure { margin: 0; }
.gallery-stage {
  height: min(53svh, 500px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ededed;
  border: 1px solid var(--line);
}
.gallery-stage img, .gallery-stage video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.gallery-error { padding: 24px; font-size: .9375rem; text-align: center; }
.gallery-figure figcaption { min-height: 3.2em; margin-top: 12px; color: var(--muted); font-size: .875rem; }
.gallery-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 14px; }
.gallery-controls button {
  min-height: 44px;
  min-width: 48px;
  background: transparent;
  border: 1px solid #b8b8b8;
  color: var(--ink);
  font-size: 1.15rem;
}
.gallery-controls button:hover { background: #e9e9e9; }
.gallery-controls span { font-size: .8125rem; color: var(--muted); text-align: center; }
.gallery-thumbnails {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 4px 12px;
  scrollbar-width: thin;
}
.gallery-thumbnail {
  position: relative;
  flex: 0 0 62px;
  height: 70px;
  padding: 3px;
  border: 1px solid #d0d0d0;
  background: #ececec;
  color: var(--ink);
}
.gallery-thumbnail img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbnail[aria-pressed="true"] { border: 2px solid #424242; padding: 2px; }
.gallery-thumbnail span { position: absolute; inset: auto 0 0; background: #f5f5f5; font-size: .625rem; line-height: 1.7; }
.gallery-original { display: inline-block; padding-block: 12px; min-height: 44px; font-size: .8125rem; text-underline-offset: 3px; }
.gallery-note { margin: 12px 0 0; font-size: .8125rem; line-height: 1.55; color: var(--muted); }
.project-description > p { margin-top: 0; font-size: .9375rem; line-height: 1.65; color: #565656; }
.project-description details { margin: 20px 0; border-bottom: 1px solid var(--line); }
.project-description summary { padding: 16px 0; font-size: .9375rem; }
.project-description ul { padding-left: 20px; font-size: .9375rem; line-height: 1.6; color: #565656; }
.project-description li { margin-bottom: 9px; }
.project-description h3 { font-size: 1.1rem; margin: 22px 0 12px; }
.project-description .text-action { margin-top: 10px; font-size: .8125rem; }
@media (max-width: 760px) {
  .portfolio-grid { grid-template-columns: 1fr; gap: 38px; }
  .work-card:first-child { grid-column: auto; }
  .work-cover { aspect-ratio: 5 / 4; max-height: 390px; }
  .work-card h3 { font-size: 1.3rem; }
  .work-card > p { max-width: none; }
  .founder-portrait { max-width: 260px; }
  dialog.project-dialog { width: calc(100% - 20px); padding: 18px; }
  .project-dialog .dialog-top { top: -18px; gap: 12px; margin-bottom: 18px; }
  .project-dialog .dialog-top .eyebrow { font-size: .625rem; letter-spacing: .08em; }
  .project-heading { margin-bottom: 20px; }
  .project-layout { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .gallery-stage { height: min(52svh, 460px); }
  .gallery-figure figcaption { min-height: 0; }
}
