/*
  [INPUT]: Control Map and OEM/ODM process scene markup, story active state, and process-step focus state from the OEM controller
  [OUTPUT]: Legacy three-decision Control Map styling plus a responsive nine-step connected-arrow process with a guarded tablet rail and one shared detail panel
  [POS]: Isolated visual layer for fominte-oem-story's sixth scene; base deck and Routes styling remain in sibling files
  [PROTOCOL]: Change this header, then inspect the section CLAUDE.md and root maps
*/
.fominte-oem-story__scene--control {
  align-items: center;
  background: #101415;
}

.fominte-oem-story__scene--control::before,
.fominte-oem-story__scene--control::after {
  position: absolute;
  z-index: 1;
  height: 1px;
  background: rgb(199 125 84 / 56%);
  content: "";
  pointer-events: none;
}

.fominte-oem-story__scene--control::before {
  top: 26%;
  right: 0;
  width: 38%;
}

.fominte-oem-story__scene--control::after {
  bottom: 24%;
  left: 0;
  width: 24%;
}

.fominte-oem-story__control-map {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(calc(100% - 80px), 1440px);
  min-height: var(--oem-height);
  margin: 0 auto;
  flex-direction: column;
  justify-content: center;
  padding: clamp(108px, 13vh, 140px) 0 clamp(42px, 6vh, 74px);
}

.fominte-oem-story__control-heading {
  max-width: 760px;
}

.fominte-oem-story__control-heading h2 {
  max-width: 720px;
}

.fominte-oem-story__control-heading p {
  max-width: 600px;
  margin-top: 20px;
  color: rgb(245 243 238 / 78%);
  font-size: 16px;
  line-height: 1.45;
}

/* Legacy Control Map remains available until an instance explicitly selects the process presentation. */
.fominte-oem-story__control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 62px;
  border-top: 1px solid var(--oem-line);
  border-bottom: 1px solid var(--oem-line);
  opacity: .18;
  transform: translate3d(0, 24px, 0);
  transition: opacity 480ms ease, transform 700ms cubic-bezier(.2, .75, .2, 1);
}

.fominte-oem-story__scene--control.is-active .fominte-oem-story__control-grid {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 280ms;
}

.fominte-oem-story__control-item {
  min-width: 0;
  min-height: 238px;
  padding: 28px 28px 24px;
  border: 0;
  border-left: 1px solid var(--oem-line);
  background: transparent;
  color: var(--oem-white);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.fominte-oem-story__control-item:first-child {
  border-left: 0;
}

.fominte-oem-story__control-item:focus-visible {
  outline: 1px solid var(--oem-copper);
  outline-offset: -1px;
}

.fominte-oem-story__control-no {
  display: block;
  color: #efb393;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.fominte-oem-story__control-title {
  display: block;
  margin-top: 54px;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.1;
}

.fominte-oem-story__control-detail {
  display: block;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  color: var(--oem-muted);
  font-size: 13px;
  line-height: 1.45;
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition: max-height 360ms cubic-bezier(.2, .75, .2, 1), margin 360ms cubic-bezier(.2, .75, .2, 1), opacity 280ms ease, transform 360ms cubic-bezier(.2, .75, .2, 1);
}

.fominte-oem-story__control-item:hover .fominte-oem-story__control-detail,
.fominte-oem-story__control-item:focus-visible .fominte-oem-story__control-detail,
.fominte-oem-story__control-item.is-open .fominte-oem-story__control-detail {
  max-height: 88px;
  margin-top: 18px;
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Nine-step OEM/ODM arrow process. */
.fominte-oem-story__control-map--process {
  --fominte-process-copper: #d79b78;
  --fominte-process-olive: #98a16f;
  --fominte-process-jade: #6f9a8a;
  --fominte-process-slate: #7795a3;
  --fominte-process-graphite: #8b9294;
}

.fominte-oem-story__process-flow {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  align-items: stretch;
  margin-top: clamp(34px, 6vh, 56px);
  opacity: .18;
  transform: translate3d(0, 24px, 0);
  transition: opacity 480ms ease, transform 700ms cubic-bezier(.2, .75, .2, 1);
}

.fominte-oem-story__scene--control.is-active .fominte-oem-story__process-flow {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 220ms;
}

.fominte-oem-story__process-step {
  --fominte-process-tone: var(--fominte-process-copper);
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  min-height: clamp(142px, 20vh, 184px);
  padding: 20px 15px 20px 27px;
  align-items: flex-start;
  gap: 22px;
  border: 0;
  background: #15191a;
  clip-path: polygon(0 0, calc(100% - 17px) 0, 100% 50%, calc(100% - 17px) 100%, 0 100%, 17px 50%);
  color: var(--oem-white);
  cursor: pointer;
  flex-direction: column;
  font: inherit;
  justify-content: space-between;
  text-align: left;
  transition: background-color 220ms ease, transform 220ms cubic-bezier(.2, .75, .2, 1), z-index 0ms linear 220ms;
}

.fominte-oem-story__process-step[data-process-tone="copper"] {
  --fominte-process-tone: var(--fominte-process-copper);
}

.fominte-oem-story__process-step[data-process-tone="olive"] {
  --fominte-process-tone: var(--fominte-process-olive);
}

.fominte-oem-story__process-step[data-process-tone="jade"] {
  --fominte-process-tone: var(--fominte-process-jade);
}

.fominte-oem-story__process-step[data-process-tone="slate"] {
  --fominte-process-tone: var(--fominte-process-slate);
}

.fominte-oem-story__process-step[data-process-tone="graphite"] {
  --fominte-process-tone: var(--fominte-process-graphite);
}

.fominte-oem-story__process-step:first-child {
  padding-left: 18px;
  clip-path: polygon(0 0, calc(100% - 17px) 0, 100% 50%, calc(100% - 17px) 100%, 0 100%);
}

.fominte-oem-story__process-step:last-child {
  padding-right: 18px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 17px 50%);
}

.fominte-oem-story__process-step + .fominte-oem-story__process-step {
  margin-left: -17px;
}

.fominte-oem-story__process-step::before {
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 3px;
  background: var(--fominte-process-tone);
  content: "";
  opacity: .72;
  transition: height 220ms ease, opacity 220ms ease;
}

.fominte-oem-story__process-step:first-child::before {
  left: 0;
}

.fominte-oem-story__process-step:last-child::before {
  right: 0;
}

.fominte-oem-story__process-step.is-active {
  z-index: 4;
  background: #242b2c;
  transform: translateY(-6px);
  transition-delay: 0ms;
}

.fominte-oem-story__process-step.is-active::before {
  height: 5px;
  opacity: 1;
}

@media (hover: hover) and (min-width: 901px) {
  .fominte-oem-story__process-step:hover {
    z-index: 3;
    background: #202627;
    transform: translateY(-4px);
    transition-delay: 0ms;
  }

  .fominte-oem-story__process-step:hover::before {
    height: 5px;
    opacity: 1;
  }
}

.fominte-oem-story__process-step:focus-visible {
  z-index: 5;
  outline: 2px solid var(--fominte-process-tone);
  outline-offset: -3px;
}

.fominte-oem-story__process-step-number {
  display: block;
  color: var(--fominte-process-tone);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.fominte-oem-story__process-step-title {
  display: block;
  max-width: 118px;
  color: var(--oem-white);
  font-size: clamp(13px, 1.18vw, 17px);
  font-weight: 500;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.fominte-oem-story__process-panel {
  --fominte-process-panel-tone: var(--fominte-process-copper);
  display: grid;
  min-height: 88px;
  margin-top: 20px;
  padding-top: 20px;
  grid-template-columns: 72px minmax(0, 680px);
  column-gap: 20px;
  border-top: 1px solid var(--oem-line);
  opacity: .18;
  transform: translate3d(0, 14px, 0);
  transition: opacity 360ms ease, transform 520ms cubic-bezier(.2, .75, .2, 1), border-color 180ms ease;
}

.fominte-oem-story__scene--control.is-active .fominte-oem-story__process-panel {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 360ms;
}

.fominte-oem-story__process-panel-number {
  display: block;
  padding-top: 2px;
  color: var(--fominte-process-panel-tone);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.fominte-oem-story__process-panel h3 {
  color: var(--oem-white);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.18;
}

.fominte-oem-story__process-panel p {
  max-width: 650px;
  margin-top: 8px;
  color: var(--oem-muted);
  font-size: 14px;
  line-height: 1.45;
}

@media (min-width: 901px) and (max-width: 1439px) {
  .fominte-oem-story__control-map--process {
    width: min(calc(100% - 64px), 1120px);
  }

  .fominte-oem-story__process-flow {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 7px 17px 12px 0;
    scroll-snap-type: x mandatory;
    scrollbar-color: var(--oem-copper) transparent;
    scrollbar-width: thin;
  }

  .fominte-oem-story__process-step {
    min-width: 172px;
    min-height: 154px;
    flex: 0 0 172px;
    scroll-snap-align: start;
  }

  .fominte-oem-story__process-step-title {
    max-width: 130px;
    font-size: 16px;
  }
}

@media (min-width: 901px) and (max-height: 820px) {
  .fominte-oem-story__control-map--process {
    padding-top: max(84px, 11vh);
    padding-bottom: 32px;
  }

  .fominte-oem-story__control-map--process .fominte-oem-story__control-heading h2 {
    font-size: clamp(46px, 5vw, 56px);
  }

  .fominte-oem-story__control-map--process .fominte-oem-story__control-heading p {
    margin-top: 14px;
    font-size: 14px;
  }

  .fominte-oem-story__process-flow {
    margin-top: 26px;
  }

  .fominte-oem-story__process-step {
    min-height: 126px;
    padding-top: 15px;
    padding-bottom: 15px;
    gap: 14px;
  }

  .fominte-oem-story__process-panel {
    min-height: 68px;
    margin-top: 14px;
    padding-top: 14px;
  }

  .fominte-oem-story__process-panel h3 {
    font-size: 20px;
  }

  .fominte-oem-story__process-panel p {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fominte-oem-story__control-grid,
  .fominte-oem-story__control-detail,
  .fominte-oem-story__process-flow,
  .fominte-oem-story__process-step,
  .fominte-oem-story__process-step::before,
  .fominte-oem-story__process-panel {
    transition: none;
  }
}

@media (max-width: 900px) {
  .fominte-oem-story__scene--control {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .fominte-oem-story__scene--control::before,
  .fominte-oem-story__scene--control::after {
    display: none;
  }

  .fominte-oem-story__control-map {
    width: min(calc(100% - 56px), 620px);
    min-height: 0;
    padding: 110px 0 70px;
  }

  .fominte-oem-story__control-heading p {
    font-size: 15px;
  }

  .fominte-oem-story__control-grid {
    grid-template-columns: 1fr;
    margin-top: 38px;
    opacity: 1;
    transform: none;
  }

  .fominte-oem-story__control-item,
  .fominte-oem-story__control-item:first-child {
    min-height: 0;
    padding: 24px 0;
    border-top: 1px solid var(--oem-line);
    border-left: 0;
  }

  .fominte-oem-story__control-item:first-child {
    border-top: 0;
  }

  .fominte-oem-story__control-title {
    margin-top: 20px;
  }

  .fominte-oem-story__control-map--process {
    padding-bottom: calc(160px + env(safe-area-inset-bottom, 0px));
  }

  .fominte-oem-story__process-flow {
    display: flex;
    overflow: visible;
    margin-top: 38px;
    padding: 0;
    flex-direction: column;
    scroll-snap-type: none;
    opacity: 1;
    transform: none;
  }

  .fominte-oem-story__process-step,
  .fominte-oem-story__process-step:first-child,
  .fominte-oem-story__process-step:last-child {
    min-width: 0;
    min-height: 88px;
    padding: 14px 20px 26px;
    flex-basis: auto;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), 50% 100%, 0 calc(100% - 16px));
  }

  .fominte-oem-story__process-step + .fominte-oem-story__process-step {
    margin-top: -14px;
    margin-left: 0;
    padding-top: 28px;
  }

  .fominte-oem-story__process-step::before,
  .fominte-oem-story__process-step:first-child::before,
  .fominte-oem-story__process-step:last-child::before {
    right: 0;
    left: 0;
  }

  .fominte-oem-story__process-step.is-active {
    transform: translateX(4px);
  }

  .fominte-oem-story__process-step-title {
    max-width: none;
    font-size: 18px;
  }

  .fominte-oem-story__process-panel {
    min-height: 0;
    margin-top: 28px;
    padding-top: 22px;
    grid-template-columns: 56px minmax(0, 1fr);
    column-gap: 14px;
    opacity: 1;
    transform: none;
  }

  .fominte-oem-story__process-panel h3 {
    font-size: 22px;
  }

  .fominte-oem-story__process-panel p {
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .fominte-oem-story__control-map {
    width: calc(100% - 40px);
    padding: 96px 0 112px;
  }

  .fominte-oem-story__process-step,
  .fominte-oem-story__process-step:first-child,
  .fominte-oem-story__process-step:last-child {
    min-height: 82px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .fominte-oem-story__process-step + .fominte-oem-story__process-step {
    padding-top: 26px;
  }

  .fominte-oem-story__control-map--process {
    padding-bottom: calc(160px + env(safe-area-inset-bottom, 0px));
  }

  .fominte-oem-story__process-step-title {
    font-size: 17px;
  }

  .fominte-oem-story__process-panel {
    grid-template-columns: 48px minmax(0, 1fr);
  }
}
