/* STM hero and production steps: a single photograph followed by editorial tiles. */
@media (min-width: 701px) {
  body[data-page="stm"] .page-hero-stm { background: #f8f4e9; }
  body[data-page="stm"] .page-hero-stm .page-hero-picture {
    position: absolute; inset: 0; z-index: -2; display: block;
  }
  body[data-page="stm"] .page-hero-stm .page-hero-image {
    position: absolute; inset: 0; display: block; width: 100%; height: 100%;
    max-width: none; object-fit: cover; object-position: center 55%;
    -webkit-mask-image: none; mask-image: none;
  }
  body[data-page="stm"] .page-hero-stm::before {
    background: linear-gradient(90deg,rgba(248,244,233,.83),rgba(248,244,233,.62) 20%,rgba(248,244,233,.22) 39%,transparent 55%);
  }
  body[data-page="stm"] .page-hero-stm .page-hero-copy { width: min(590px,43%); }
}

.stm-workflow {
  width: calc(100% - 24px);
  margin: var(--studio-gap) auto;
}
.stm-workflow-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 28px;
  align-items: end;
  margin-bottom: clamp(20px,2.2vw,30px);
}
.stm-workflow-head h2 {
  max-width: 22ch;
  margin: 0;
  color: #005461;
  font-size: clamp(2.45rem,3.5vw,3.75rem);
  line-height: 1.06;
}
.stm-workflow-head h2 span { color: #bf5925; }
.stm-workflow-switch {
  display: flex;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(0,84,97,.12);
  border-radius: 999px;
  background: rgba(237,231,218,.86);
}
.stm-workflow-switch button {
  min-height: 48px;
  padding: 10px 20px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: #315d62;
  font: inherit;
  font-size: clamp(.89rem,1vw,1rem);
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease,color .2s ease,box-shadow .2s ease;
}
.stm-workflow-switch button[aria-pressed="true"] {
  background: #005661;
  color: #fffaf1;
  box-shadow: 0 5px 13px rgba(0,71,80,.15);
}
.stm-workflow-switch button:focus-visible { outline: 3px solid #d6672b; outline-offset: 3px; }
.stm-workflow-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  grid-template-rows: repeat(2,minmax(220px,15vw));
  gap: clamp(11px,1.3vw,18px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.stm-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: clamp(21px,2vw,32px);
  overflow: hidden;
  border-radius: clamp(23px,2.2vw,36px);
  color: #005461;
  transition: transform .25s ease,box-shadow .25s ease;
}
.stm-tile:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(38,52,48,.11); }
.stm-tile-01 {
  grid-column: span 2;
  color: #fffaf1;
  background: radial-gradient(circle at 88% 80%,rgba(255,255,255,.13),transparent 37%),linear-gradient(145deg,#0b707a,#005461 67%,#00424e);
}
.stm-tile-02 { background: linear-gradient(142deg,#fbe6d3,#f2d6bf); }
.stm-tile-03 {
  background: linear-gradient(0deg,rgba(255,253,249,.96),rgba(255,253,249,.78) 40%,rgba(255,253,249,.24) 76%,transparent 100%),url('assets/stm-technologist-v1.jpg') center 24% / cover no-repeat;
}
.stm-tile-04 {
  background: linear-gradient(0deg,rgba(255,253,249,.97),rgba(255,253,249,.8) 40%,rgba(255,253,249,.26) 76%,transparent 100%),url('assets/stm-packaging-designer-v1.jpg') center 23% / cover no-repeat;
  border: 0;
}
.stm-tile-04 .stm-tile-number { color: #fff; text-shadow: 0 1px 4px rgba(0,57,63,.72); }
.stm-tile-03 .stm-tile-number { color: #fff; text-shadow: 0 1px 4px rgba(0,57,63,.72); }
.stm-tile-05 { color: #fffaf1; background: linear-gradient(142deg,#c87548,#a94f2d); }
.stm-tile-06 {
  grid-column: span 2;
  background: linear-gradient(90deg,rgba(248,242,232,.97),rgba(248,242,232,.89) 34%,rgba(248,242,232,.48) 64%,rgba(248,242,232,.04) 100%),url('assets/stm-finished-range-v1.jpg') center center / cover no-repeat;
}
.stm-tile-06 > div { max-width: 44%; }
.stm-tile-03 h3,.stm-tile-03 p,.stm-tile-04 h3,.stm-tile-04 p,.stm-tile-06 h3,.stm-tile-06 p {
  text-shadow: 0 1px 8px rgba(255,250,241,.92);
}
.stm-tile-number {
  position: relative;
  z-index: 1;
  display: block;
  width: max-content;
  height: auto;
  border: 0;
  border-radius: 0;
  background: none;
  font-family: inherit;
  font-size: clamp(2rem,2.5vw,2.65rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -.04em;
  color: #b95427;
}
.stm-tile-01 .stm-tile-number,.stm-tile-05 .stm-tile-number { color: #fffaf1; }
.stm-tile > div { position: relative; z-index: 1; min-height: 112px; margin-top: auto; transform: translateY(14px); }
.stm-tile h3 {
  max-width: 24ch;
  min-height: 1.6em;
  margin: 0 0 5px;
  color: inherit;
  font-size: clamp(1.35rem,1.8vw,1.75rem);
  line-height: 1.1;
}
.stm-tile p {
  max-width: 30ch;
  margin: 0;
  color: inherit;
  font-size: clamp(.94rem,1.06vw,1.04rem);
  line-height: 1.36;
  opacity: .91;
}
.stm-tile-01 p,.stm-tile-06 p { max-width: 32ch; }
.stm-tile-icon {
  position: absolute;
  z-index: 0;
  top: 12px;
  right: 8px;
  width: clamp(190px,18vw,250px);
  height: clamp(190px,18vw,250px);
  fill: none;
  stroke: currentColor;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .16;
  pointer-events: none;
}
.stm-tile-01 .stm-tile-icon,.stm-tile-05 .stm-tile-icon { color: #fffaf1; }
.stm-tile-03 .stm-tile-icon,.stm-tile-04 .stm-tile-icon,.stm-tile-06 .stm-tile-icon { display: none; }
.stm-workflow-finish {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: clamp(20px,2vw,28px);
  padding-top: 0;
  border-top: 0;
}
.stm-workflow-finish strong { color: #005461; font-size: clamp(1.22rem,1.7vw,1.85rem); line-height: 1.18; }
.stm-workflow-finish .button { flex: none; }

@media (max-width: 1100px) {
  .stm-workflow-head { grid-template-columns: 1fr; gap: 19px; }
  .stm-workflow-switch { justify-self: start; }
  .stm-workflow-grid { grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: none; }
  .stm-tile { min-height: 220px; }
  .stm-tile-01,.stm-tile-06 { grid-column: span 2; min-height: 255px; }
}
@media (max-width: 600px) {
  .stm-workflow-head h2 { font-size: clamp(2.1rem,8vw,2.75rem); }
  .stm-workflow-switch { width: 100%; }
  .stm-workflow-switch button { flex: 1; min-height: 45px; padding: 8px 6px; font-size: .85rem; }
  .stm-workflow-grid { gap: 9px; }
  .stm-tile { min-height: 237px; padding: 17px; border-radius: 24px; }
  .stm-tile-01,.stm-tile-06 { min-height: 240px; }
  .stm-tile-06 > div { max-width: 47%; }
  .stm-tile > div { min-height: 118px; transform: translateY(9px); }
  .stm-tile h3 { font-size: clamp(1.1rem,4.8vw,1.35rem); }
  .stm-tile p { font-size: clamp(.79rem,3.25vw,.91rem); line-height: 1.3; }
  .stm-tile-number { font-size: 1.7rem; }
  .stm-tile-03 { background-image: linear-gradient(0deg,rgba(255,253,249,.97),rgba(255,253,249,.82) 43%,rgba(255,253,249,.25) 76%,transparent),url('assets/stm-technologist-v1.jpg'); }
  .stm-tile-04 { background-image: linear-gradient(0deg,rgba(255,253,249,.98),rgba(255,253,249,.84) 43%,rgba(255,253,249,.27) 76%,transparent),url('assets/stm-packaging-designer-v1.jpg'); }
  .stm-tile-icon { top: 9px; right: 0; width: 160px; height: 160px; opacity: .16; }
  .stm-workflow-finish { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 370px) {
  .stm-workflow-grid { grid-template-columns: 1fr; }
  .stm-tile,.stm-tile-01,.stm-tile-06 { grid-column: 1; min-height: 190px; }
}
@media (prefers-reduced-motion: reduce) {
  .stm-tile,.stm-workflow-switch button { transition: none; }
}
