/* Product Showcase — standalone visual layer. Not shared with rhlift.css. */

:root {
  --sc-bg: #0b0b0d;
  --sc-fg-light: #f5f5f7;
  --sc-fg-dark: #1d1d1f;
  --sc-accent: #8a5cf6;
  --sc-max-w: 1400px;
  --sc-gap: clamp(1.5rem, 4vw, 4rem);
}

* { box-sizing: border-box; }

.sc-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html { scroll-behavior: smooth; }

body.showcase-body {
  margin: 0;
  background: var(--sc-bg);
  color: var(--sc-fg-light);
  font-family: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.showcase { display: flex; flex-direction: column; }

.sc-eyebrow {
  margin: 0 0 0.5em;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.75;
}

.sc-heading {
  margin: 0 0 0.3em;
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.sc-heading--sm { font-size: clamp(1.8rem, 4vw, 3.2rem); }

.sc-body {
  margin: 0.6em 0 0;
  font-size: clamp(1rem, 1.4vw, 1.3rem);
  line-height: 1.5;
  max-width: 46ch;
  opacity: 0.9;
}

.sc-cta {
  display: inline-block;
  margin-top: 1.6em;
  padding: 0.75em 1.8em;
  border-radius: 999px;
  background: var(--sc-fg-light);
  color: #111;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.sc-cta:hover { transform: translateY(-2px); opacity: 0.9; }

.sc-theme-dark .sc-cta {
  background: var(--sc-fg-dark);
  color: var(--sc-fg-light);
}

/* --- reveal-on-scroll --- */
.sc-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.sc-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .sc-reveal { opacity: 1; transform: none; transition: none; }
}

/* --- header / banner shared media+text module --- */
.sc-header,
.sc-banner {
  position: relative;
  display: flex;
  overflow: hidden;
}

.sc-header { min-height: 100vh; }
.sc-banner { min-height: 78vh; }

.sc-module__media-wrap {
  position: absolute;
  inset: 0;
}

.sc-module__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sc-carousel {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.sc-carousel .sc-carousel__item--hidden {
  display: none;
}

.sc-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sc-carousel__arrow--prev { left: 1rem; }
.sc-carousel__arrow--next { right: 1rem; }

.sc-carousel__count {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.sc-module__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.05) 40%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
}

.sc-theme-dark .sc-module__overlay {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.05) 40%, rgba(255, 255, 255, 0.25) 100%);
}

/* Banner: strong directional shadow (dark on the text side, fading to clear) instead of the header's even top/bottom scrim. */
.sc-banner .sc-module__overlay {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.6) 32%, rgba(0, 0, 0, 0) 62%);
}

.sc-banner.sc-text-pos-top_right .sc-module__overlay,
.sc-banner.sc-text-pos-bottom_right .sc-module__overlay {
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.6) 32%, rgba(0, 0, 0, 0) 62%);
}

.sc-module__text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: clamp(2rem, 6vw, 5rem);
  color: var(--sc-fg-light);
}

.sc-theme-dark .sc-module__text { color: var(--sc-fg-dark); }

/* text position grid: top/center/bottom x left/center/right */
.sc-text-pos-top_left .sc-module__text { justify-content: flex-start; align-items: flex-start; text-align: left; }
.sc-text-pos-top_center .sc-module__text { justify-content: flex-start; align-items: center; text-align: center; }
.sc-text-pos-top_right .sc-module__text { justify-content: flex-start; align-items: flex-end; text-align: right; }
.sc-text-pos-center .sc-module__text { justify-content: center; align-items: center; text-align: center; }
.sc-text-pos-bottom_left .sc-module__text { justify-content: flex-end; align-items: flex-start; text-align: left; }
.sc-text-pos-bottom_center .sc-module__text { justify-content: flex-end; align-items: center; text-align: center; }
.sc-text-pos-bottom_right .sc-module__text { justify-content: flex-end; align-items: flex-end; text-align: right; }

/* --- slideshow --- */
.sc-slideshow {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.sc-slideshow__head {
  padding: 0 clamp(1.5rem, 6vw, 5rem);
  margin-bottom: 2rem;
  text-align: center;
}

.sc-slideshow__track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 clamp(1.5rem, 6vw, 5rem) 1rem;
  -webkit-overflow-scrolling: touch;
}

.sc-slideshow__item {
  flex: 0 0 min(80vw, 640px);
  scroll-snap-align: center;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #151517;
}

.sc-slideshow__media {
  width: 100%;
  height: min(70vh, 640px);
  object-fit: cover;
  display: block;
}

.sc-slideshow__caption {
  padding: 0.9rem 1.1rem;
  font-size: 0.95rem;
  opacity: 0.75;
}

/* --- picture + text --- */
.sc-picture-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--sc-gap);
  padding: 50px clamp(1.5rem, 6vw, 5rem);
  max-width: var(--sc-max-w);
  margin: 0 auto;
}

.sc-picture-text--image_right { direction: rtl; }
.sc-picture-text--image_right > * { direction: ltr; }

.sc-picture-text__media { border-radius: 20px; overflow: hidden; }
.sc-picture-text__media-el { width: 100%; height: auto; display: block; }

.sc-picture-text__text { color: var(--sc-fg-light); }
.sc-theme-dark .sc-picture-text__text { color: var(--sc-fg-dark); }

@media (max-width: 860px) {
  .sc-picture-text { grid-template-columns: 1fr; }
  .sc-picture-text--image_right { direction: ltr; }
}

/* light-theme (picture_text / slideshow) sections sit on a light background */
.sc-theme-dark.sc-picture-text,
.sc-theme-dark.sc-slideshow {
  background: var(--sc-fg-light);
}

/* --- showcases index (fixed tessellating tile grid, page assignment randomized) --- */
.sc-index {
  padding: clamp(1.5rem, 4vw, 3rem);
}

.sc-index__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: clamp(90px, 11vw, 140px);
  gap: clamp(0.6rem, 1.6vw, 1.25rem);
  max-width: var(--sc-max-w);
  margin: 0 auto;
}

.sc-index__tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  color: var(--sc-fg-light);
  text-decoration: none;
  background: #151517;
  /* Desktop position comes from the fixed, hand-verified tessellating
     pattern in showcase_views.py (INDEX_TILE_PATTERN), passed in per-tile
     as CSS custom properties. Mobile/tablet breakpoints below override
     these with plain classes, which win on cascade order. */
  grid-column: var(--sc-col-start, auto) / span var(--sc-col-span, 1);
  grid-row: var(--sc-row-start, auto) / span var(--sc-row-span, 1);
}

.sc-index__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 1s ease;
}

.sc-index__media--active {
  opacity: 1;
  z-index: 1;
}

.sc-index__tile:hover .sc-index__media--active {
  transform: scale(1.03);
}

.sc-index__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.1) 55%, rgba(0, 0, 0, 0.6) 100%);
  pointer-events: none;
}

.sc-index__text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: clamp(1rem, 2.4vw, 2rem);
}

.sc-index__title {
  margin: 0 0 0.25em;
  font-size: clamp(1.1rem, 1.8vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.sc-index__tagline {
  margin: 0 0 0.4em;
  opacity: 0.85;
  font-size: clamp(0.9rem, 1.1vw, 1rem);
}

.sc-index__description {
  margin: 0 0 0.8em;
  max-width: 46ch;
  opacity: 0.75;
  font-size: 0.88rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sc-index__cta {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Small tiles show only the title — no room for tagline/description/CTA. */
.sc-index__tile--small .sc-index__title {
  margin: 0;
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
}

.sc-index__tile--small .sc-index__text {
  padding: clamp(0.75rem, 2vw, 1.25rem);
}

.sc-index__empty {
  text-align: center;
  color: var(--sc-fg-light);
  opacity: 0.6;
  padding: 4rem 0;
}

@media (max-width: 860px) {
  /* The desktop fixed-position pattern is 6 columns wide and doesn't map to
     a 4-column grid, so tablet falls back to plain auto-flow. dense avoids
     the worst gaps, though (as on desktop) it can't fill a hole shape no
     tile matches — acceptable here since this is a narrower, denser layout. */
  .sc-index__grid { grid-template-columns: repeat(4, 1fr); grid-auto-flow: dense; }
  .sc-index__tile--big-rectangle { grid-column: span 4; grid-row: span 2; }
  .sc-index__tile--big-square { grid-column: span 2; grid-row: span 2; }
  .sc-index__tile--medium-rectangle { grid-column: span 4; grid-row: span 1; }
  .sc-index__tile--small-rectangle { grid-column: span 2; grid-row: span 1; }
  .sc-index__tile--small-square { grid-column: span 1; grid-row: span 1; }
}

/* Phones: no fixed row height — each shape keeps its own proportions via
   aspect-ratio and the grid packs them tightly using the full screen width. */
@media (max-width: 600px) {
  .sc-index__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
  }

  .sc-index__tile--big-rectangle,
  .sc-index__tile--medium-rectangle {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .sc-index__tile--big-rectangle { aspect-ratio: 16 / 10; }
  .sc-index__tile--medium-rectangle { aspect-ratio: 16 / 7; }

  .sc-index__tile--big-square,
  .sc-index__tile--small-rectangle,
  .sc-index__tile--small-square {
    grid-column: span 1;
    grid-row: auto;
  }
  .sc-index__tile--big-square { aspect-ratio: 1 / 1; }
  .sc-index__tile--small-rectangle { aspect-ratio: 4 / 3; }
  .sc-index__tile--small-square { aspect-ratio: 1 / 1.15; }
}
