/* Keep the restored visual treatment compatible with the local motion runtime. */

html {
  scroll-padding-block-start: calc(var(--header) + 8px);
}

[hidden] {
  display: none !important;
}

.story-progress span {
  transform: scaleY(var(--story-progress, 0));
  transform-origin: center top;
  will-change: auto;
}

.nav-toggle {
  min-inline-size: 44px;
  min-block-size: 44px;
}

.primary-nav,
.primary-nav.is-open {
  clip-path: none;
  transition: opacity 220ms ease, visibility 220ms;
}

.primary-nav .nav-panel {
  align-content: safe center;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.primary-nav.is-open .nav-panel {
  transition-delay: 0s;
}

.primary-nav.is-open {
  transition: opacity 220ms ease;
}

.primary-nav .nav-links a[aria-current="location"] {
  color: #fff;
  background: linear-gradient(90deg, transparent, rgba(229, 9, 20, .08));
}

.primary-nav .nav-links a[aria-current="location"] span {
  color: var(--coral);
}

.primary-nav .nav-links a[aria-current="location"]::after {
  opacity: 1;
  transform: rotate(-45deg) scale(1);
}

.primary-nav :is(.nav-links a, .mobile-nav-action):focus-visible {
  outline-offset: -4px;
}

.primary-nav .mobile-nav-action {
  clip-path: none;
  border-radius: 10px;
}

.primary-nav .mobile-nav-action:hover,
.header-cta:hover,
.button:not(.button-ghost):hover {
  background: var(--red-ink) !important;
}

.no-js .site-header {
  position: relative;
  height: auto;
  padding-block: 10px 16px;
}

.no-js .header-inner {
  grid-template-columns: 1fr auto;
}

.no-js .nav-toggle,
.no-js .header-chapter,
.no-js .nav-panel-heading,
.no-js .primary-nav .nav-links a span {
  display: none;
}

.no-js .primary-nav {
  position: relative;
  padding: 12px 0 0;
  background: transparent;
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
}

.no-js .primary-nav::before {
  display: none;
}

.no-js .nav-panel {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "links" "action";
  gap: 12px;
  height: auto;
  padding-block: 0;
  border: 0;
  transform: none;
  opacity: 1;
}

.no-js .nav-links {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}

.no-js .primary-nav .nav-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px;
}

.no-js .primary-nav .nav-links a strong {
  font-size: 1rem;
}

.no-js .hero-layout {
  padding-block-start: 28px;
}

.hero-copy,
.hero-media,
.use-tabs,
.challenge-tabs,
.use-panels,
.challenge-reader {
  min-inline-size: 0;
}

.hero h1 strong {
  white-space: normal;
}

.problem-prompts p {
  display: block;
}

.problem-prompts p::before {
  padding: 0;
}

/* The grid is present before GSAP loads and defines its animation destinations. */
.transformation,
.no-js .transformation {
  height: auto;
  min-height: 0;
  padding-block: clamp(88px, 10vw, 150px);
}

.transformation-sticky {
  position: relative;
  inset-block-start: auto;
  height: auto;
  min-height: 0;
  overflow: visible;
}

.transformation-layout {
  padding-block: 0;
}

.transform-stage,
.no-js .transform-stage {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: center;
  gap: clamp(8px, 1.2vw, 20px);
  height: auto;
  min-height: 0;
  min-width: 0;
  padding: 74px 7% 36px;
  direction: ltr;
}

.library-shell {
  inset: 16px 4%;
  opacity: 1;
  transform: none;
}

.library-top {
  color: var(--v3-muted-dark);
}

.video-tile,
.no-js .video-tile {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
}

.video-tile i {
  top: 32%;
}

.no-js :is(.use-tabs, .challenge-tabs) {
  display: none;
}

.no-js :is(.uses-explorer, .challenge-explorer) {
  grid-template-columns: minmax(0, 1fr);
}

:is(.use-tabs, .challenge-tabs) button:focus-visible {
  outline-offset: -4px;
}

.journey-ribbon-wrap {
  height: auto;
  aspect-ratio: 6;
}

.journey-cinema:not(.is-route-live) .journey-traveler {
  visibility: hidden;
}

.journey-cinema:not(.is-route-live) .journey-station circle:last-child {
  fill: var(--red-hot);
  opacity: 1;
}

@media (min-width: 1101px) {
  .hero-layout {
    grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  }
}

@media (max-width: 960px) {
  .primary-nav .nav-panel {
    align-content: start;
  }

  .journey-ribbon-wrap {
    inset: 0 5px 0 auto;
    width: 54px;
    height: auto;
    aspect-ratio: auto;
  }
}

@media (max-width: 700px) {
  .transform-stage,
  .no-js .transform-stage {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 68px 6% 25px;
  }

  .video-tile b {
    top: 8px;
    right: 8px;
  }

  .journey-ribbon-wrap {
    inset-inline-start: 0;
    inset-inline-end: auto;
    width: 46px;
  }
}

@media (max-width: 380px) {
  .journey-panel {
    grid-template-columns: minmax(0, 1fr) 68px;
    column-gap: 8px;
  }

  .journey-visual,
  .journey-icon-svg {
    width: 68px;
  }

  .journey-copy {
    padding-inline-start: 8px;
  }
}

/* Opening scene — a quieter navigation frame and a readable channel-to-library composition. */
.site-header .header-inner {
  border-color: rgba(249, 228, 235, .17);
  background: #141015;
  box-shadow: 0 12px 28px rgba(24, 8, 15, .25);
}

.site-header.is-scrolled .header-inner {
  background: #120e13;
  box-shadow: 0 10px 24px rgba(24, 8, 15, .28);
}

.site-header .header-inner::after,
.site-header .primary-nav::before {
  display: none;
}

.js .site-header .header-inner {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.site-header .brand {
  justify-self: start;
}

.site-header .header-actions {
  justify-self: end;
}

.header-chapter {
  min-width: 0;
}

.header-chapter strong {
  color: #f7eaf1;
}

.site-header .primary-nav {
  background: radial-gradient(ellipse at 92% 90%, #250d14, transparent 55%), #100d12;
}

.site-header .nav-panel-heading p {
  color: #cbbbc5;
}

.site-header .primary-nav .nav-links a span {
  color: #bca8b5;
}

.site-header .primary-nav .nav-links a:is(:hover, [aria-current="location"]) span {
  color: var(--coral);
}

.hero {
  background: radial-gradient(ellipse at 28% 61%, #2f101a 0%, #190e15 38%, #0c090e 72%);
}

.hero::before {
  opacity: .48;
}

.hero-depth {
  opacity: .65;
}

.hero .ambient-glow {
  opacity: .35;
}

.hero-copy {
  container-type: inline-size;
}

.hero h1 {
  max-width: none;
  font-size: clamp(2.8rem, 5.1vw, 5rem);
  line-height: 1.08;
  letter-spacing: -.028em;
  text-wrap: balance;
}

.hero h1 strong {
  width: fit-content;
  margin-top: 8px;
  color: #ff5967;
  font-size: .84em;
}

.hero h1 strong::after {
  bottom: -10px;
  width: min(27%, 96px);
  height: 2px;
  border-radius: 2px;
  background: #e74555;
}

.hero-summary {
  grid-template-columns: 1fr;
  gap: 7px;
  max-width: 59ch;
  margin-top: clamp(23px, 2.65vw, 38px);
  padding-top: clamp(15px, 1.6vw, 23px);
  border-color: rgba(249, 228, 235, .15);
}

.hero-summary p {
  color: #cfbec8;
  font-size: clamp(.97rem, 1.2vw, 1.08rem);
  line-height: 1.75;
}

.hero-summary .hero-context {
  color: #f7eaf1;
}

.hero-actions {
  flex-wrap: wrap;
  margin-top: clamp(17px, 2vw, 28px);
}

.hero-actions .button {
  min-width: 0;
}

.hero-media {
  container-type: inline-size;
  border-block: 0;
  contain: layout;
  transform-style: flat;
}

.hero-media::before {
  content: none;
}

.hero-media::after {
  bottom: 5%;
  max-width: 62%;
  opacity: .48;
}

.hero .source-channel,
.hero .library-screen,
.hero .deck-layer {
  border-color: rgba(246, 213, 226, .2);
  box-shadow: none;
}

.hero .source-channel {
  top: 12%;
  left: 4%;
  width: 57%;
  background: linear-gradient(150deg, #2d232b, #18131b 73%);
}

.hero .library-deck {
  right: 4%;
  bottom: 11%;
  width: 64%;
}

.hero .library-screen {
  background: linear-gradient(150deg, #2d212c, #19141c 75%);
}

.hero .library-thumbs i {
  background: linear-gradient(180deg, transparent, rgba(31, 17, 25, .45));
}

.hero .hero-label {
  color: #f7eaf1;
  border-color: rgba(246, 213, 226, .23);
  background: #251a23;
  box-shadow: none;
}

.hero .hero-label-source {
  top: 7%;
  left: 11%;
}

.hero .hero-label-library {
  top: 28%;
  right: 6%;
}

@supports (width: 1cqi) {
  .hero .hero-label-library {
    top: auto;
    bottom: calc(11% + 40cqi - 4px);
  }
}

.hero .hero-frame {
  border-color: rgba(246, 213, 226, .24);
  background: linear-gradient(145deg, #352630, #211923);
  box-shadow: 0 7px 17px rgba(26, 9, 17, .32);
}

.hero .hero-frame::after {
  background: linear-gradient(145deg, #942435, #421823);
}

.hero .transfer-path-shadow {
  stroke: rgba(229, 69, 85, .1);
  stroke-width: 16;
}

.hero .transfer-path-line {
  stroke-width: 4;
  stroke-dasharray: 6 8;
}

.hero .hero-plinth {
  background: radial-gradient(ellipse, rgba(190, 30, 53, .16), transparent 68%);
  opacity: .8;
}

.hero .hero-plinth i {
  border-color: rgba(232, 67, 85, .28);
}

.hero .scene-cue {
  color: #d9c7d1;
  min-height: 44px;
}

@media (min-width: 961px) {
  .hero,
  .hero-layout {
    min-height: 100svh;
  }

  .hero-layout {
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    grid-template-rows: auto;
    gap: clamp(27px, 4vw, 70px);
    padding-top: calc(var(--header) + 29px);
    padding-bottom: 76px;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 12.6cqi, 5rem);
  }

  .hero-media {
    width: 100%;
    height: clamp(392px, 64svh, 645px);
    min-height: 0;
  }

  .hero .hero-frame {
    width: clamp(80px, 8.1vw, 124px);
  }
}

@media (max-width: 960px) {
  .site-header .header-inner {
    border-radius: 14px;
  }

  .hero-layout {
    grid-template-rows: auto auto;
    gap: clamp(26px, 4.5vw, 39px);
    padding-top: calc(var(--header) + 32px);
    padding-bottom: 52px;
  }

  .hero-copy {
    width: min(100%, 700px);
    justify-self: center;
  }

  .hero h1 {
    font-size: clamp(2.75rem, 8.7vw, 4.65rem);
  }

  .hero-media {
    width: min(100%, 700px);
    height: clamp(310px, 57vw, 448px);
    min-height: 0;
  }
}

@media (max-width: 700px) {
  .header-chapter {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .header-chapter strong {
    display: block;
    max-width: clamp(66px, 21vw, 102px);
    overflow: hidden;
    font-size: .76rem;
    text-overflow: ellipsis;
  }

  .header-chapter-track {
    display: none;
  }

  .hero-layout {
    min-height: auto;
    gap: 24px;
    padding-top: calc(var(--header) + 29px);
    padding-bottom: 36px;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 10.9vw, 3.65rem);
  }

  .hero h1 strong {
    margin-top: 6px;
  }

  .hero-summary p {
    font-size: .94rem;
    line-height: 1.65;
  }

  .hero-actions {
    min-width: 0;
  }

  .hero-media {
    flex: none;
    height: clamp(255px, 70vw, 385px);
    overflow: visible;
  }

  .hero .hero-label {
    min-height: 27px;
    padding: 4px 6px;
    gap: 4px;
    font-size: .65rem;
  }

  .hero .hero-label-source {
    top: 5%;
  }

  .hero .hero-label-library {
    right: 5%;
  }

  .hero .hero-frame {
    width: clamp(49px, 17vw, 73px);
  }
}

@media (max-width: 360px) {
  .site-header .brand {
    padding-inline: 3px;
  }

  .site-header .brand-picture {
    width: 92px;
  }

  .header-chapter strong {
    max-width: 49px;
  }

  .hero-actions .button {
    padding-inline: 8px;
    font-size: .79rem;
  }
}
