/* Workshop project page — three-column layout */

body.workshop-page {
  font-family: var(--font-body);
  color: #000;
  background-color: var(--site-bg-base, #f2f2f2);
}

body.workshop-page .site-bg-effects {
  z-index: 1;
}

.workshop-main {
  /* Match homepage 3-column proportions (site-home-layout.css) */
  --site-home-side-min: clamp(160px, 17vw, 19vw);
  --site-home-left-min: var(--site-home-side-min);
  --site-home-right-min: var(--site-home-side-min);
  --site-home-page-padding-x: clamp(1.25rem, 3vw, 3.75rem);

  position: relative;
  z-index: 2;
  padding: 15px var(--site-home-page-padding-x) clamp(4rem, 8vw, 6rem);
}

.workshop-layout {
  display: grid;
  grid-template-columns:
    minmax(var(--site-home-left-min), 18fr)
    minmax(0, 64fr)
    minmax(var(--site-home-right-min), 18fr);
  column-gap: clamp(1.25rem, 2.5vw, 2.75rem);
  align-items: start;
}

.workshop-layout__info {
  grid-column: 1;
  padding-top: clamp(4.5rem, 10vh, 6rem);
  padding-left: max(0px, calc(60px - var(--site-home-page-padding-x)));
}

.workshop-layout__gallery {
  grid-column: 2;
  padding-top: clamp(4.5rem, 10vh, 6rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.workshop-hero {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(40vh, 26rem);
  object-fit: cover;
  margin: 0;
}

.workshop-layout__schedules {
  grid-column: 3;
  padding-top: clamp(4.5rem, 10vh, 6rem);
}

.workshop-copy__title {
  font-family: var(--font-title);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}

.workshop-copy__meta {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  font-size: 0.92rem;
  line-height: 1.55;
}

.workshop-copy__meta li + li {
  margin-top: 0.15rem;
}

.workshop-copy__body {
  font-size: clamp(0.6875rem, 0.82vw, 0.8125rem);
  line-height: 1.45;
}

.workshop-copy__body p {
  margin: 0 0 1rem;
  max-width: none;
  text-align: justify;
  hyphens: auto;
}

.workshop-copy__body p:last-child {
  margin-bottom: 0;
}

.workshop-copy__body :is(h1, h2, h3, h4) {
  font-family: var(--font-title);
  font-weight: 400;
  line-height: 1.2;
  margin: 1.5rem 0 0.75rem;
}

.workshop-copy__body h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.workshop-copy__body h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
}

.workshop-copy__body h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.workshop-copy__body h4 {
  font-size: 1rem;
}

.workshop-copy__body :is(h5, h6) {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 1.25rem 0 0.65rem;
}

/* In-article choreography menu (sidebar-style name + { 01 }) */
.workshop-choreography-menu {
  margin: 1.25rem 0 0;
  max-width: 16rem;
}

.workshop-choreography-menu__heading {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.55rem;
  padding: 0 0 0.35rem;
  border-bottom: 1px solid #000;
}

.workshop-choreography-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.workshop-choreography-menu__row {
  margin: 0;
  padding: 0;
}

.workshop-choreography-menu__item {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 0.75rem;
  align-items: baseline;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.workshop-choreography-menu__item:hover .workshop-choreography-menu__title,
.workshop-choreography-menu__item:focus-visible .workshop-choreography-menu__title {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.workshop-choreography-menu__title {
  font-family: var(--font-title);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.workshop-choreography-menu__number {
  font-family: neue-montreal, Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  line-height: 1.25;
  white-space: nowrap;
  text-align: right;
}

.workshop-schedule {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.workshop-layout__schedules .workshop-schedule:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.workshop-schedule__title {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.85rem;
}

.workshop-schedule__item + .workshop-schedule__item {
  margin-top: 0.85rem;
}

.workshop-schedule__date {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.82rem;
  margin: 0 0 0.15rem;
}

.workshop-schedule__location,
.workshop-schedule__detail {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.45;
  opacity: 0.78;
}

.workshop-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 0;
}

.workshop-gallery__item {
  margin: 0;
}

.workshop-gallery__img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

@media (max-width: 960px) {
  .workshop-main {
    --site-home-page-padding-x: 1rem;
    padding: 15px var(--site-home-page-padding-x) 3.5rem;
    overflow-x: clip;
  }

  .workshop-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
  }

  /* Flatten so mobile can order: title → hero → text → gallery → schedules */
  .workshop-layout__info,
  .workshop-layout__gallery {
    display: contents;
  }

  .workshop-layout__text,
  .workshop-layout__schedules {
    min-width: 0;
    max-width: 100%;
  }

  .workshop-layout__schedules {
    padding-left: 0;
    padding-top: 0;
  }

  .workshop-copy__title {
    order: 1;
    margin-top: clamp(4rem, 12vh, 5.5rem);
    margin-bottom: 1rem;
    font-size: clamp(1.65rem, 8vw, 2.35rem);
    overflow-wrap: anywhere;
  }

  .workshop-hero {
    order: 2;
    width: 100%;
    max-height: min(36vh, 20rem);
    margin-top: 0;
  }

  .workshop-layout__text {
    order: 3;
    padding-top: 1.25rem;
  }

  .workshop-gallery {
    order: 4;
    margin-top: 1.75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .workshop-layout__schedules {
    order: 5;
    margin-top: 2rem;
  }

  .workshop-copy__body {
    font-size: 0.875rem;
    line-height: 1.5;
  }
}

@media (max-width: 640px) {
  .workshop-copy__title {
    margin-top: clamp(4.25rem, 12vh, 5.5rem);
  }

  .workshop-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .workshop-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/*
 * Desktop: compact choreography blobs stage directly under the workshop
 * text + Workshop Choreography menu (left column). Hidden on smaller
 * viewports so mobile workshop layout stays menu/popup-only.
 */
.workshop-choreography-stage {
  display: none;
}

@media (min-width: 1001px) {
  .workshop-choreography-stage {
    display: block;
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: min(100%, 18rem);
    margin: 0.85rem 0 0;
    padding: 0;
  }

  .workshop-choreography-stage .site-home-projects__mode-toggle {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    z-index: 3;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    margin: 0 0 0.45rem;
    pointer-events: auto;
  }

  .workshop-choreography-stage .site-home-projects__grid {
    position: relative;
    inset: auto;
    width: 100%;
    height: clamp(18rem, 32vh, 22rem);
    min-height: clamp(18rem, 32vh, 22rem);
    margin: 0;
    overflow: visible;
    pointer-events: auto;
    z-index: 2;
  }

  /* Keep metaballs in-column — do not promote to full-viewport drag layer. */
  .workshop-choreography-stage.site-home-projects--3d .site-home-projects__grid,
  .workshop-choreography-stage.site-home-projects--embedded.site-home-projects--3d
    .site-home-projects__grid {
    position: relative;
    inset: auto;
    left: auto;
    right: auto;
    width: 100%;
    height: clamp(18rem, 32vh, 22rem);
    min-height: clamp(18rem, 32vh, 22rem);
    pointer-events: auto;
    z-index: 2;
  }

  .workshop-choreography-stage.site-home-projects--3d .site-home-projects__tile {
    --site-tile-glow-scale: 1;
  }

  .workshop-choreography-stage .site-home-projects__number {
    font-size: 7px;
  }

  .workshop-choreography-stage .site-home-projects__title {
    font-size: 11px;
  }

  .workshop-choreography-stage.site-home-projects--3d .site-home-projects__number,
  .workshop-choreography-stage.site-home-projects--3d .site-home-projects__title {
    color: #fff;
  }

  /* Menu ↔ blob hover sync (mirrors choreography sidebar behavior) */
  body.workshop-page.site-has-project-hover .workshop-choreography-menu__item {
    opacity: 0.16;
  }

  body.workshop-page.site-has-project-hover
    .workshop-choreography-menu__item.is-active {
    opacity: 1;
  }
}

/* Shared home-layout nav/footer chrome (matches home / choreography) */
body.workshop-page .site-home-layout__nav {
  position: fixed;
  top: 15px;
  right: 60px;
  z-index: 1000;
  margin: 0;
  align-self: auto;
}

body.workshop-page .site-home-layout__footer {
  position: fixed;
  right: 60px;
  bottom: 15px;
  z-index: 10;
  margin-top: 0;
  align-self: auto;
}

@media (min-width: 751px) and (max-width: 1000px) {
  body.workshop-page .site-home-layout__nav,
  body.workshop-page .site-home-layout__footer {
    right: 30.71875px;
  }
}

@media (max-width: 750px) {
  body.workshop-page .site-home-layout__nav {
    left: auto;
    right: 12.384px;
    top: 8px;
    width: auto;
    max-width: none;
    justify-content: flex-end;
    align-items: center;
    gap: 0;
    overflow: visible;
  }

  body.workshop-page .site-home-layout__nav-toggle {
    display: inline-flex;
  }

  /* Panel chrome lives in site-home-layout.css (full-page typographic overlay) */

  body.workshop-page .site-home-layout__footer {
    position: static;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: auto;
    max-width: none;
    gap: 0.65rem 0.95rem;
    padding: 0 12.384px 1.5rem;
  }

  body.workshop-page .site-home-layout__footer-link {
    font-size: clamp(0.75rem, 3.4vw, 0.875rem);
    padding: 0.35rem 0;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
  }

  body.workshop-page .chimaerarium-header {
    width: 4.25rem;
    max-width: min(28vw, 4.25rem);
  }

  body.workshop-page .chimaerarium-header .site-header-mark,
  body.workshop-page .chimaerarium-header__link--mark-only {
    width: 4.25rem;
    max-width: 100%;
  }
}

/*
 * Desktop: keep workshop content under the frosted veil (same see-through
 * feel as choreography blobs). Only tuck elevated chrome below the overlay
 * so header/nav/footer do not poke through above z-index 40.
 */
@media (min-width: 901px) {
  body.workshop-page.choreography-popups-open .chimaerarium-header,
  body.workshop-page.choreography-popups-open .site-home-layout__nav,
  body.workshop-page.choreography-popups-open .site-home-layout__footer {
    z-index: 1;
  }
}

/*
 * Mobile: hide workshop chrome for full-page part view (matches choreography
 * hiding .site-home-main when popups are open).
 */
@media (max-width: 900px) {
  body.workshop-page.choreography-popups-open .workshop-main,
  body.workshop-page.choreography-popups-open .chimaerarium-header,
  body.workshop-page.choreography-popups-open .site-home-layout__nav,
  body.workshop-page.choreography-popups-open .site-home-layout__footer {
    display: none !important;
  }

  body.workshop-page.choreography-popups-open .choreography-popups.is-open {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    height: auto;
    z-index: 2;
    pointer-events: auto;
    background: transparent;
  }
}
