/**
 * specs-slider.css - Specs presentation & slider styles
 *
 * Desktop and normal tablets keep the established four-card grid.
 * Constrained portrait/landscape views reuse the same four cards on one
 * continuous horizontal rail; document scroll remains the only playhead.
 */

html.spiral-scenes #specs.chapter {
  padding-inline: 0;
  overflow: hidden;
}

html.spiral-scenes #specs > .gs-container {
  width: 100%;
  max-width: none;
  height: var(--spec-height);
  min-height: 0;
  overflow: visible;
  transform: none !important;
}

html.spiral-scenes #specs .specs-slider-track {
  display: flex;
  width: max-content;
  height: 100%;
  gap: var(--spec-gap, 32px);
  margin: 0;
  padding: 0 var(--gutter);
  align-items: center;
  will-change: transform;
}

html.spiral-scenes #specs .specs-slider-track > .gs-work-card {
  display: grid;
  flex: none;
  width: var(--spec-width);
  max-width: var(--spec-width);
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--spec-image) auto;
  gap: var(--spec-card-gap, 12px);
  align-content: start;
}

html.spiral-scenes #specs .gs-work-image-wrapper {
  position: relative;
  width: var(--spec-image);
  height: var(--spec-image);
  min-height: 0;
  margin: 0;
  aspect-ratio: 1;
  background: transparent;
  justify-self: start;
  overflow: hidden;
  opacity: 1 !important;
  filter: none !important;
  transition: none !important;
  animation: none !important;
}

html.spiral-scenes #specs .gs-work-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  aspect-ratio: 1;
  opacity: 1 !important;
  filter: none !important;
  transition: none !important;
  animation: none !important;
  visibility: visible !important;
}

html.spiral-scenes #specs .gs-work-content {
  min-width: 0;
  margin: 0;
  height: auto;
  overflow: visible;
}

html.spiral-scenes #specs [data-scene-copy] {
  filter: none !important;
  opacity: 1 !important;
}

html.spiral-scenes #specs .gs-work-title {
  margin: 0 0 8px;
  font-size: clamp(19px, 1.8vw, 26px);
  line-height: 1.2;
}

html.spiral-scenes #specs .gs-work-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

html.spiral-scenes #specs .spec-caption-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

html.spiral-scenes #specs .spec-caption-group {
  display: grid;
  align-content: start;
  min-width: 0;
}

html.spiral-scenes #specs .spec-caption-group :is(strong, span) {
  display: block;
  overflow-wrap: anywhere;
}

html.spiral-scenes #specs .spec-caption-group strong {
  color: var(--foreground);
  font-weight: 600;
}

html.spiral-scenes #specs[data-spec-layout="grid"] .spec-caption-groups {
  grid-template-rows: var(--spec-rows);
}

/* Short/wide responsive presentation */
html.spiral-scenes #specs[data-spec-layout="side"] .specs-slider-track {
  align-items: center;
  gap: var(--spec-gap, 32px);
}

html.spiral-scenes #specs[data-spec-layout="side"] .gs-work-card {
  --spec-rhythm: 16px;
  width: var(--spec-width);
  max-width: var(--spec-width);
  grid-template-columns: var(--spec-image) max-content;
  grid-template-rows: auto;
  align-items: center;
  justify-content: center;
  column-gap: var(--spec-rhythm);
}

html.spiral-scenes #specs[data-spec-layout="side"] .gs-work-image-wrapper {
  justify-self: end;
}

html.spiral-scenes #specs[data-spec-layout="side"] .gs-work-content {
  width: max-content;
  max-width: var(--spec-side-copy-max, 600px);
  align-self: center;
}

html.spiral-scenes #specs[data-spec-layout="side"] .gs-work-title {
  margin: 0 0 8px;
}

html.spiral-scenes #specs[data-spec-layout="side"] .spec-caption-groups {
  grid-template-columns: repeat(3, max-content);
  column-gap: 14px;
  row-gap: 0;
  align-items: start;
  justify-content: start;
}

html.spiral-scenes #specs[data-spec-layout="side"] .spec-caption-group {
  width: max-content;
  max-width: var(--spec-side-col-max, 190px);
  row-gap: 0;
}

html.spiral-scenes #specs[data-spec-layout="side"] .gs-work-text {
  font-size: clamp(10px, 1.18vw, 12px);
  line-height: 1.35;
}

/* Portrait/constrained slide presentation */
html.spiral-scenes #specs[data-spec-layout="slide"] .specs-slider-track {
  align-items: center;
}

html.spiral-scenes #specs[data-spec-layout="slide"] .gs-work-card {
  height: var(--spec-card-height);
  grid-template-rows: var(--spec-image) var(--spec-copy-height);
  row-gap: var(--spec-card-gap, 12px);
  align-content: center;
}

html.spiral-scenes #specs[data-spec-layout="slide"] .gs-work-image-wrapper {
  justify-self: center;
}

html.spiral-scenes #specs[data-spec-layout="slide"] .gs-work-content {
  height: var(--spec-copy-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}

html.spiral-scenes #specs[data-spec-layout="slide"] .gs-work-title {
  margin: var(--spec-title-margin-top, 10px) 0
    var(--spec-title-margin-bottom, 10px);
  display: flex;
  align-items: center;
  justify-content: center;
}

html.spiral-scenes #specs[data-spec-layout="slide"] .spec-caption-groups {
  display: flex;
  flex-direction: column;
  row-gap: var(--spec-slide-group-gap, 6px);
  justify-content: flex-start;
  align-items: center;
  width: 100%;
}

html.spiral-scenes #specs[data-spec-layout="slide"] .spec-caption-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 2px;
}

html.spiral-scenes #specs[data-spec-layout="slide"] .gs-work-text {
  font-size: 13px;
  line-height: 1.25;
}

@media (max-width: 520px) and (orientation: portrait) {
  html.spiral-scenes #specs[data-spec-layout="slide"] .gs-work-title {
    margin: var(--spec-title-margin-top, 8px) 0
      var(--spec-title-margin-bottom, 8px);
  }

  html.spiral-scenes #specs[data-spec-layout="slide"] .gs-work-text {
    font-size: 12px;
    line-height: 1.2;
  }

  html.spiral-scenes #specs[data-spec-layout="slide"] .spec-caption-groups {
    row-gap: var(--spec-slide-group-gap, 5px);
  }

  html.spiral-scenes #specs[data-spec-layout="slide"] .spec-caption-group {
    row-gap: 1px;
  }
}
