/* Extracted from the production hero pair before composition migration.
 * Keep selectors and cascade order intact: they are the visual compatibility contract. */

/* Legacy hero style block 1. */
.dx-block-code > .dx-block-content {
  margin:0!important;
  padding:0!important;
  display:flex!important;
  flex-direction:column!important;
  height:100%!important;
}
.dx-block-code + .dx-block-overlay {
  display:none!important;
}
/* base state: fully opaque */
#heroWord {
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
}
/* hero primary: remove any theme hover overlay */
#heroExplore.dx-button-element--primary,
#heroExplore.dx-button-element--primary:hover{
  filter: none !important;
}
#heroExplore.dx-button-element--primary:hover::before{
  content: none !important;      /* kill transparent overlay */
}

/* while typing: slightly faded */
#heroWord.typing-complete {
  opacity: 0.75;
}

/* on hover at any time: slightly faded */
#heroWord:not(.typing-complete):hover,
#heroWord.typing-complete:hover {
  opacity: 0.75;
}


  /* carousel nav buttons */

.carousel-nav {
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  background:rgba(0,0,0,0.4);
  border-radius:50%;
  width:3rem;
  height:3rem;
  cursor:pointer;
  z-index:2;
}
.carousel-nav.prev { left:calc(-3rem - var(--space-3,1rem)); }
.carousel-nav.next { right:calc(-3rem - var(--space-3,1rem)); }
.dot {
  width:.75rem;
  height:.75rem;
  border-radius:50%;
  background:rgba(0,0,0,.3);
  cursor:pointer;
  transition:background var(--ease,.3s);
}
.dot.active { background:#232323; }
.carousel-card {
  display:grid;
  grid-template-columns:1fr 1fr;
  grid-template-rows:auto auto auto auto;
  gap:var(--space-3,1rem);
  background:rgba(0,0,0,0.6);
  border:1px solid rgba(0,0,0,0.2);
  border-radius:4px;
  padding:var(--space-4,1.5rem);
  box-shadow:var(--shadow-md,0 8px 24px rgba(0,0,0,0.12));
  backdrop-filter:blur(8px) saturate(180%) contrast(1.1) brightness(1.06);
  width:100%;
  max-width:none;
  box-sizing:border-box;
}

.meta-badges { display:flex;gap:var(--space-1,0.5rem);flex-wrap:nowrap;overflow:hidden;justify-content:flex-start; }
.meta-badges .badge { white-space:nowrap; }
.carousel-title { margin:0;font:1rem var(--font-heading,'Typefesse',sans-serif);text-transform:none; }
.carousel-title a { color:inherit!important;text-decoration:none!important;transition:filter .25s; }
.carousel-title a:hover { filter:brightness(1.12)!important; }
.carousel-card, .dex-sidebar { -webkit-backdrop-filter:none!important; backdrop-filter:none!important; }
/* Ensure Safari paints the YouTube iframe correctly */
#dexCombined .carousel-video{
  grid-column: 1 / -1;      /* span both columns */
  width: 100%;
  aspect-ratio: 16 / 9;     /* works in Safari 15+ */
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}
#dexCombined .carousel-video iframe{
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
#dexCombined .carousel-video{ will-change: transform; transform: translateZ(0); }

/* Legacy hero style block 2. */
/* one rule for all browsers, very small and safe */
#dexCombined .carousel-video { aspect-ratio:16/9; }
#dexCombined .carousel-video iframe{
  position:absolute; inset:0; width:100%; height:100%; border:0;
  transform: translateZ(0); -webkit-transform: translateZ(0);
}

/* Legacy hero style block 3. */
/* --- Layout: 1 column on mobile, 2 columns on web --- */

/* Mobile (≤768px): stack */
@media (max-width: 900px){
  /* make the two sides stack */
  #dexCombined{
    flex-direction: column !important;
    gap: 4px !important;
  }
  #dexHeroSide,
  #dexFeaturedSide{
    flex: auto !important;
    width: 100% !important;
  }

  /* carousel card: single-column grid on small screens */
  .carousel-card{
    grid-template-columns: 1fr !important;
  }
  /* ensure video spans full width in the single-column grid */
  #dexCombined .carousel-video{
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }
/* carousel frame must be a clean vertical flow (title -> badges -> video -> indicators) */
  #carousel-frame {
    margin: 4px !important;
    padding: 4px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
        padding-left: 0 !important;
    justify-content: flex-start !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
  }

  /* remove extra card paddings that created space under the iframe */
  .carousel-card {
    margin: 0 !important;
    padding-top: 12px !important;
    padding-bottom: 0 !important;
    gap: 0.5rem !important; /* keep a tiny internal gap for visual breathing, reduce if you want zero */
    box-sizing: border-box !important;
  }

  /* ensure the video takes full width and doesn't leave stray space at bottom */
  #dexCombined .carousel-video{
    grid-column: 1 / -1 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  .carousel-video iframe{
    display:block;
    width:100%;
    height:100%;
    border:0;
    margin:0;
    padding:0;
  }
  /* keep nav buttons inside the frame on narrow viewports */
  .carousel-nav{
    width: 2.25rem;
    height: 2.25rem;
  }
  .carousel-nav.prev{ left: -3.35rem !important; }
  .carousel-nav.next{ right: -3.35rem !important; }
}

/* Web (≥769px): explicit 2-column just to be clear */
@media (min-width: 769px){
  #dexCombined{ flex-direction: row !important; }
}

@media (max-width: 900px){
  /* Let #dexCombined collapse naturally */
  #dexCombined {
    height: auto !important;
    min-height: 0 !important;
  }

  /* Force legacysite's wrapper to shrink as well */
  .dx-block-code > .dx-block-content {
    height: auto !important;
    min-height: 0 !important;
  }
}

/* Legacy hero style block 4. */
/*───────────────────────────────────────────────────────────*/
  /* Glassmorphic Sidebar & Carousel Styles (from dex_css.css) */
  :root {
    --space-0_5: 0.125rem;
    --space-1:   0.25rem;
    --space-2:   0.5rem;
    --space-3:   1rem;
    --space-4:   1.5rem;
    --space-5:   2rem;
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --shadow-light: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-md:    0 8px 24px rgba(0,0,0,0.12);
    --font-heading: 'Typefesse', sans-serif;
    --font-body:    'Courier New', monospace;
    --dex-bg:       rgba(255,255,255,0.15);
    --dex-text:     #fff;
    --dex-accent:   #ff1910;
    --ease:         0.3s ease-out;
  }

  .dex-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-5);
    background: var(--dex-bg);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    color: var(--dex-text);
    font-family: var(--font-body);
    height: 100%;
    box-sizing: border-box;
  }

  .dex-header {
    text-align: left;
    margin-bottom:0 !important;
  }

  .meta-badges {
  dislay: flex;
  gap: var(--sace-1);
  flex-wrap: nowrap;
  overflow: hidden;
  justify-content: flex-start !important;
  }
  .dex-header h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.5rem,4vw,2rem);
    text-transform: uppercase;
  }
.carousel-card {
padding-bottom: 0 !important;
}
.carousel-card .lead-text {
margin-bottom: 0 !important;
}
.carousel-indicators {
margin-bottom: 0 !important;
justify-content: center !important;
padding-bottom: 0 !important;
}
.carousel-card .carousel-title {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: clamp(.5rem, 4vw, 1.3rem) !important;
width: 100% !important;
}
#dexCombined a#heroExplore:hover, #dexCombined a#heroSignup:hover, #dexCombined a#heroExplore:focus, #dexCombined a#heroSignup:focus {
text-decoration: none !important;
border-bottom: none !important;
}

  .dex-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  /*───────────────────────────────────────────────────────────*/
  /* Carousel Layout & Glassmorphic Card (from dex_catalog.css) */
  .carousel-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    align-items: center;
    height: 100%;
  }
  .carousel-frame {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #232323;
    border: 1.2px solid rgba(0,0,0,0.15);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #232323;
    z-index: 2;
  }
  .carousel-nav.prev { left: calc(-2.86rem - var(--space-3));background: rgba(0,0,0,0.25) }  /* pinned to middle card :contentReference[oaicite:4]{index=4} */
  .carousel-nav.next { right: calc(-2.86rem - var(--space-3)); background: rgba(0,0,0,0.25) }

.carousel-nav.prev:hover, .carousel-nav.next:hover {background: rgba(0,0,0,0.5); transition: opacity 0.2s ease-in-out !important;}
  .carousel-indicators {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
  }
  .dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: rgba(0,0,0,0.3);
    cursor: pointer;
    transition: background var(--ease);
  }
  .dot.active { background: #232323; }  /* selected indicator white :contentReference[oaicite:5]{index=5} */

  .carousel-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto auto;
    gap: var(--space-3);
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(8px) saturate(180%) contrast(1.1) brightness(1.06);
    width: 100%;
    max-width: 80rem;
  }
  .carousel-title {
    grid-column: 1 / -1;
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    text-transform: uppercase;
    text-align: left;
    color: #fff;
  }
  .meta-badges {
    grid-column: 1 / -1;
    display: flex;
    gap: var(--space-1);
    justify-content: center;
  }
  .badge {
    background: rgba(255,255,255,0.2);
    padding: var(--space-0_5) var(--space-1);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    color: #fff;
  }
  .carousel-video {
    grid-column: 1 / -1;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius-md);
    overflow: hidden;
  }
  .carousel-video iframe {
    width: 100%;
    height: 100%;
    border: 0;
  }
  .lead-text {
    grid-column: 1 / -1;
    margin: 0;
    color: #fff;
    font-family: var(--font-body);
  }
  .cta-btn {
    grid-column: 1 / -1;
    width: 100%;  /* match iframe width :contentReference[oaicite:6]{index=6} */
    justify-self: center;
  }

/* ===========================================================================
 * Season 3 "Human Credits" hero (season3-human-credits module)
 * Code-owned styling + choreography. All selectors are scoped under .dx-s3 so
 * the route-only stylesheet never leaks across header-slot soft navigation.
 * ======================================================================== */
.dx-s3 {
  --dx-s3-ink: #f6f7fb;
  --dx-s3-muted: rgba(246, 247, 251, 0.62);
  --dx-s3-stage-a: #16181d;
  --dx-s3-stage-b: #1d2129;
  --dx-s3-pipe-a: #ff3c3c;
  --dx-s3-pipe-b: #ff9d32;
  --dx-s3-live: #2fceff;
  --dx-s3-paper: #f7f7f2;
  --dx-s3-paper-ink: #15171c;
  --dx-s3-card-min: 12rem;
  --dx-s3-gap: 0.9rem;
  display: block;
  width: 100%;
  box-sizing: border-box;
  color: var(--dx-s3-ink);
}
.dx-s3__stage {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  padding: clamp(1.75rem, 4vw, 3.5rem);
  border-radius: 6px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(60rem 36rem at 78% -8%, rgba(255, 60, 60, 0.18), transparent 60%),
    radial-gradient(48rem 32rem at 8% 4%, rgba(47, 206, 255, 0.16), transparent 62%),
    linear-gradient(155deg, var(--dx-s3-stage-a), var(--dx-s3-stage-b));
}
/* Paper surface preset: light stage, dark display ink. */
.dx-s3[data-surface="paper"] {
  --dx-s3-ink: #15171c;
  --dx-s3-muted: rgba(21, 23, 28, 0.6);
}
.dx-s3[data-surface="paper"] .dx-s3__stage {
  background:
    radial-gradient(60rem 36rem at 78% -8%, rgba(255, 60, 60, 0.12), transparent 60%),
    radial-gradient(48rem 32rem at 8% 4%, rgba(47, 206, 255, 0.12), transparent 62%),
    linear-gradient(155deg, #fbfbf7, #eef0ee);
}
/* Density presets tune card scale + rhythm. */
.dx-s3[data-density="calm"]    { --dx-s3-card-min: 14rem; --dx-s3-gap: 1.1rem; }
.dx-s3[data-density="dense"]   { --dx-s3-card-min: 9.5rem; --dx-s3-gap: 0.65rem; }

.dx-s3__intro { max-width: 46rem; }
.dx-s3__kicker {
  margin: 0 0 0.75rem;
  font: 700 0.78rem/1.2 var(--font-body, "Courier Prime", monospace);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--dx-s3-live);
}
.dx-s3__headline {
  margin: 0;
  font: 800 clamp(2.4rem, 6.5vw, 4.6rem)/1.02 var(--font-heading, "Typefesse", sans-serif);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--dx-s3-ink);
}
.dx-s3__body {
  margin: 1rem 0 0;
  max-width: 38rem;
  font: 400 clamp(1rem, 1.6vw, 1.2rem)/1.5 var(--font-body, sans-serif);
  color: var(--dx-s3-muted);
}
.dx-s3__cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1.6rem;
}
.dx-s3__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5ch;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font: 700 0.95rem/1 var(--font-body, sans-serif);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--dx-s3-pipe-a), var(--dx-s3-pipe-b));
  box-shadow: 0 10px 30px rgba(255, 80, 40, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.dx-s3__cta:hover,
.dx-s3__cta:focus-visible { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(255, 80, 40, 0.36); }
.dx-s3__cta[data-mode="active"] { background: linear-gradient(135deg, var(--dx-s3-live), #3da9ff); box-shadow: 0 10px 30px rgba(47, 169, 255, 0.3); }
.dx-s3__cta-state {
  font: 600 0.8rem/1.3 var(--font-body, monospace);
  color: var(--dx-s3-live);
}

/* --- Pipeline rail: SUBMIT -> ... -> OPEN TO EVERYONE --- */
.dx-s3-pipeline {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  align-items: center;
  margin: clamp(1.75rem, 4vw, 2.75rem) 0 0;
  padding: 0;
  list-style: none;
}
.dx-s3-pipeline::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0.45rem;
  height: 2px;
  background: linear-gradient(90deg, var(--dx-s3-pipe-a), var(--dx-s3-pipe-b), var(--dx-s3-live));
  opacity: 0.4;
  z-index: 0;
}
.dx-s3-pipeline__step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1 1 auto;
  min-width: 7rem;
}
.dx-s3-pipeline__dot {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--dx-s3-pipe-a);
  box-shadow: 0 0 0 4px rgba(255, 60, 60, 0.16);
}
.dx-s3-pipeline__step:last-child .dx-s3-pipeline__dot {
  background: var(--dx-s3-live);
  box-shadow: 0 0 0 4px rgba(47, 206, 255, 0.18);
}
.dx-s3-pipeline__label {
  font: 700 0.72rem/1.2 var(--font-body, monospace);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dx-s3-muted);
}

/* --- Assemble word (decorative; real heading lives in .dx-s3__headline) --- */
.dx-s3-assemble {
  margin: clamp(1.5rem, 4vw, 2.5rem) 0 0;
  text-align: center;
}
.dx-s3-assemble__word {
  display: inline-flex;
  gap: 0.05em;
  font: 800 clamp(3rem, 14vw, 9rem)/1 var(--font-heading, "Typefesse", sans-serif);
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--dx-s3-pipe-a), var(--dx-s3-pipe-b) 55%, var(--dx-s3-live));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* --- Contributor field --- */
.dx-s3__field {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--dx-s3-card-min), 1fr));
  gap: var(--dx-s3-gap);
  margin: clamp(1.5rem, 4vw, 2.5rem) 0 0;
}
.dx-s3-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 6.5rem;
  padding: 0.85rem 0.95rem;
  border-radius: 5px;
  text-decoration: none;
  background: var(--dx-s3-paper);
  color: var(--dx-s3-paper-ink);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s cubic-bezier(.22,.8,.24,1), box-shadow 0.22s ease;
}
.dx-s3-card__tag {
  font: 700 0.6rem/1.2 var(--font-body, monospace);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dx-s3-pipe-a);
}
.dx-s3-card--profile .dx-s3-card__tag { color: #1d8fb8; }
.dx-s3-card__avatar {
  width: 2.2rem; height: 2.2rem;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(0,0,0,0.08);
}
.dx-s3-card__name { font: 700 1rem/1.2 var(--font-heading, sans-serif); }
.dx-s3-card__role { font: 500 0.8rem/1.3 var(--font-body, monospace); color: rgba(21,23,28,0.66); }
.dx-s3-card__lookup { margin-top: auto; font: 500 0.72rem/1.2 var(--font-body, monospace); color: rgba(21,23,28,0.5); }
a.dx-s3-card:hover,
a.dx-s3-card:focus-visible { transform: translateY(-4px) scale(1.02); box-shadow: 0 14px 30px rgba(0,0,0,0.3); }
.dx-s3-card--opening {
  background: rgba(246, 247, 251, 0.05);
  color: var(--dx-s3-muted);
  border: 1px dashed rgba(246, 247, 251, 0.22);
  box-shadow: none;
}
.dx-s3-card--opening .dx-s3-card__tag { color: var(--dx-s3-live); }
.dx-s3-card--opening .dx-s3-card__name { color: var(--dx-s3-ink); opacity: 0.7; }
.dx-s3-card.is-own { outline: 2px solid var(--dx-s3-live); outline-offset: 2px; }

/* --- Choreography: gated by JS class toggles, off by default & when static --- */
.dx-s3 .dx-s3-pipeline__dot { transition: transform 0.3s ease; }
.dx-s3.is-playing .dx-s3-pipeline::after {
  content: "";
  position: absolute;
  top: 0.2rem;
  left: 0;
  width: 1.4rem; height: 1.4rem;
  margin-left: -0.7rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,157,50,0.95), rgba(255,60,60,0));
  z-index: 2;
  animation: dx-s3-travel 3.6s linear infinite;
}
.dx-s3.is-playing .dx-s3-pipeline__dot { animation: dx-s3-pulse 2.4s ease-in-out infinite; }
.dx-s3.is-playing .dx-s3-pipeline__step:nth-child(2) .dx-s3-pipeline__dot { animation-delay: 0.3s; }
.dx-s3.is-playing .dx-s3-pipeline__step:nth-child(3) .dx-s3-pipeline__dot { animation-delay: 0.6s; }
.dx-s3.is-playing .dx-s3-pipeline__step:nth-child(4) .dx-s3-pipeline__dot { animation-delay: 0.9s; }
.dx-s3.is-playing .dx-s3-pipeline__step:nth-child(5) .dx-s3-pipeline__dot { animation-delay: 1.2s; }

.dx-s3.has-played .dx-s3-assemble__char {
  display: inline-block;
  animation: dx-s3-settle 0.6s cubic-bezier(.22,.8,.24,1) both;
  animation-delay: calc(var(--dx-s3-char-i, 0) * 90ms);
}
.dx-s3.has-played .dx-s3-card {
  animation: dx-s3-card-in 0.5s cubic-bezier(.22,.8,.24,1) both;
  animation-delay: calc(420ms + var(--dx-s3-card-i, 0) * 35ms);
}
.dx-s3-card--enter { animation: dx-s3-card-in 0.45s cubic-bezier(.22,.8,.24,1) both; }

@keyframes dx-s3-travel { from { left: 0; } to { left: 100%; } }
@keyframes dx-s3-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.45); } }
@keyframes dx-s3-settle { from { opacity: 0; transform: translateY(0.6em) rotate(-6deg); } to { opacity: 1; transform: none; } }
@keyframes dx-s3-card-in { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }

/* Static composition (motion=quiet or reduced motion): everything at rest. */
.dx-s3.is-static .dx-s3-assemble__char,
.dx-s3.is-static .dx-s3-card { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .dx-s3 .dx-s3-assemble__char,
  .dx-s3 .dx-s3-card,
  .dx-s3 .dx-s3-pipeline__dot,
  .dx-s3 .dx-s3-pipeline::after { animation: none !important; }
}

@media (max-width: 640px) {
  .dx-s3__field { --dx-s3-card-min: 8.5rem; }
  .dx-s3-pipeline { gap: 0.5rem 0.9rem; }
  .dx-s3-pipeline__step { min-width: 5.5rem; }
}
