/* The long scroll exists only after a renderer and motion driver are available. */
#voice-story.engineering-story {
  --engineering-progress: 0;
  position: relative;
  padding-top: 0;
  padding-bottom: 0;
  padding-inline: var(--gutter);
  height: auto;
  color: #f5f2f1;
  background: #120f0d;
  overflow: clip;
  isolation: isolate;
}
.engineering-story::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 32% 44%, #75483213, transparent 59%), linear-gradient(125deg, #ffffff02, transparent 45%);
}
.engineering-sticky {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 65px 0 38px;
}
.engineering-story .voice-top { flex-shrink: 0; padding-bottom: 22px; border-bottom-color: #ece5e11b; }
.engineering-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 35px; margin: 32px 0 6px; flex-shrink: 0; }
.engineering-heading h2 { font-size: clamp(40px, 4.25vw, 64px); font-weight: 450; line-height: 1.08; letter-spacing: -.052em; margin: 0; }
.engineering-heading .muted-light { color: #94837a; }
.engineering-heading > p { font-size: 12px; line-height: 1.8; color: #a7978f; max-width: 245px; margin: 0 0 4px; }
.engineering-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, .86fr); align-items: center; gap: clamp(24px, 4vw, 64px); flex: 1; min-height: 530px; }
.engineering-visual { position: relative; min-width: 0; width: 100%; height: 550px; overflow: hidden; isolation: isolate; }
.engineering-visual::before { content: ''; position: absolute; width: 85%; height: 65%; left: 6%; top: 17%; background: radial-gradient(ellipse, #ba775616, #70463105 48%, transparent 70%); pointer-events: none; }
.engineering-visual::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, #120f0d 0%, #120f0d00 10%, #120f0d00 94%, #120f0d 100%); pointer-events: none; z-index: 3; }
.engineering-fallback { position: absolute; width: 100%; height: 100%; object-fit: contain; inset: 0; opacity: 1; }
.engineering-fallback img { width: 100%; height: 100%; object-fit: contain; }
#engineering-canvas-mount { position: absolute; inset: 0; z-index: 2; opacity: 0; }
#engineering-canvas-mount canvas { display: block; width: 100%; height: 100%; outline: none; }
.scene-loaded #engineering-canvas-mount { opacity: 1; }
.scene-loaded .engineering-fallback { opacity: 0; visibility: hidden; }
.engineering-detail { position: relative; padding: 0 0 20px; min-width: 0; }
.engineering-story .voice-tabs { gap: clamp(14px, 1.8vw, 30px); margin-bottom: 30px; border-bottom-color: #eee8e524; }
.engineering-story .voice-tabs button { font-size: 12px; padding: 15px 0; color: #98857c; }
.engineering-story .voice-tabs button span { color: #786156; font-size: 9px; margin-right: 7px; }
.engineering-story .voice-tabs button.is-active { color: #faf7f6; }
.engineering-story .voice-tabs button.is-active span { color: #c8b4aa; }
.engineering-story .voice-tabs button::after { background: #c8b3a8; height: 2px; box-shadow: 0 0 13px #e38a5e40; }
.engineering-story .voice-step-copy { min-height: 176px; }
.engineering-step-label { display: block; margin-bottom: 14px; color: #947363; font: 8px/1.5 monospace; letter-spacing: .12em; }
.engineering-story .voice-step-copy h3 { font-size: clamp(22px, 1.8vw, 29px); font-weight: 450; line-height: 1.28; letter-spacing: -.04em; max-width: 320px; margin-bottom: 18px; }
.engineering-story .voice-step-copy p { font-size: 12px; line-height: 1.95; color: #ac9b93; max-width: 335px; }
.engineering-detail > .text-link { font-size: 11px; margin-top: 25px; gap: 20px; color: #ddd6d3; }
.engineering-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid #ece5e118; padding-top: 20px; flex-shrink: 0; color: #877369; font: 9px/1.5 monospace; letter-spacing: .08em; text-transform: uppercase; }
.engineering-footer [data-scene-progress] { display: flex; align-items: center; gap: 15px; font-variant-numeric: tabular-nums; color: #c5a899; }
.engineering-footer [data-scene-progress]::before { content: ''; display: block; width: 80px; height: 1px; background: linear-gradient(90deg, #ccb8ae calc(var(--engineering-progress) * 100%), #54433a calc(var(--engineering-progress) * 100%)); }
.engineering-scroll-hint { display: none; }
@media (min-width: 1001px) and (prefers-reduced-motion: no-preference) {
  #voice-story.engineering-story.scene-enhanced { height: 340svh; }
  .scene-enhanced .engineering-sticky { position: sticky; top: 0; height: 100svh; min-height: 760px; padding-top: 96px; padding-bottom: 24px; }
  .scene-enhanced .engineering-layout { min-height: 0; }
  .scene-enhanced .engineering-visual { height: 100%; min-height: 430px; }
  .scene-enhanced .engineering-scroll-hint { display: inline-flex; align-items: center; gap: 12px; }
.scene-enhanced .engineering-scroll-hint > span { font: 15px/1 Manrope, Arial, sans-serif; color: #caa998; }
}
@media (min-width: 1001px) and (min-height: 880px) {
  .scene-enhanced .engineering-visual { min-height: 500px; }
}
@media (min-width: 1001px) and (max-height: 820px) {
  .scene-enhanced .engineering-sticky { padding-top: 90px; }
  .scene-enhanced .engineering-heading { margin-top: 23px; }
  .scene-enhanced .engineering-heading h2 { font-size: 45px; }
  .scene-enhanced .voice-top { padding-bottom: 15px; }
  .scene-enhanced .engineering-footer { padding-top: 15px; }
}
@media (max-width: 1180px) and (min-width: 1001px) {
  .engineering-layout { grid-template-columns: minmax(0, 1.6fr) minmax(260px, .95fr); gap: 24px; }
  .engineering-story .voice-tabs { gap: 15px; }
  .engineering-story .voice-tabs button { font-size: 11px; }
}
@media (max-width: 1000px) {
  .engineering-sticky { padding-top: 50px; padding-bottom: 34px; }
  .engineering-story .voice-top { padding-bottom: 21px; }
  .engineering-heading { margin: 36px 0 12px; align-items: flex-end; gap: 25px; }
  .engineering-heading h2 { font-size: clamp(38px, 5.7vw, 55px); }
  .engineering-heading > p { font-size: 11px; max-width: 200px; }
  .engineering-layout { grid-template-columns: 1fr; gap: 5px; min-height: 0; }
  .engineering-visual { height: clamp(350px, 57vw, 480px); max-width: 760px; margin-inline: auto; }
  .engineering-detail { width: 100%; max-width: 650px; margin-inline: auto; padding-bottom: 36px; }
  .engineering-story .voice-tabs { gap: 35px; margin-bottom: 25px; }
  .engineering-story .voice-step-copy { min-height: 125px; }
  .engineering-story .voice-step-copy h3 { max-width: none; font-size: 25px; margin-bottom: 15px; }
  .engineering-story .voice-step-copy p { max-width: 570px; font-size: 12px; }
  .engineering-detail > .text-link { margin-top: 18px; }
  .engineering-footer { padding-top: 17px; font-size: 8px; }
}
@media (max-width: 600px) {
  .engineering-sticky { padding-top: 40px; }
  .engineering-heading { display: block; margin: 32px 0 0; }
  .engineering-heading h2 { font-size: clamp(35px, 8.6vw, 49px); }
  .engineering-heading > p { font-size: 11px; line-height: 1.85; max-width: 300px; margin: 20px 0 0; }
  .engineering-heading > p br { display: none; }
  .engineering-visual { height: 350px; margin: -6px 0 0; }
  .engineering-story .voice-tabs { gap: 26px; }
  .engineering-story .voice-tabs button { font-size: 11px; }
  .engineering-story .voice-tabs button span { font-size: 8px; margin-right: 6px; }
  .engineering-story .voice-step-copy { min-height: 150px; }
  .engineering-story .voice-step-copy h3 { font-size: 24px; }
  .engineering-story .voice-step-copy p { font-size: 12px; }
  .engineering-detail { padding-bottom: 27px; }
  .engineering-footer { gap: 13px; letter-spacing: .03em; }
  .engineering-footer [data-scene-progress]::before { width: 45px; }
  .engineering-footer-note { max-width: 170px; text-align: right; }
  .engineering-story .concept-label { max-width: 115px; font-size: 8px; }
}
/* The phone journey adds only 120svh to a single screen-sized stage. */
@media (max-width: 800px) {
  .engineering-heading { display: block; margin: 22px 0 4px; }
  .engineering-heading h2 { font-size: 36px; }
  .engineering-heading > p { max-width: none; margin: 10px 0 0; font-size: 11px; line-height: 1.6; }
  .engineering-heading > p br { display: none; }
  .engineering-visual { height: clamp(220px, calc(57.7svh - 207px), 280px); margin: 0 auto; }
  .engineering-story .voice-tabs { justify-content: space-between; gap: 12px; margin-bottom: 8px; }
  .engineering-story .voice-tabs button { min-height: 44px; font-size: 11px; padding: 13px 0; }
  .engineering-story .voice-tabs button span { font-size: 8px; margin-right: 5px; }
  .engineering-step-label { margin-bottom: 6px; }
  .engineering-story .voice-step-copy { min-height: 136px; }
  .engineering-story .voice-step-copy h3 { font-size: 21px; line-height: 1.15; margin: 0 0 8px; }
  .engineering-story .voice-step-copy p { font-size: 11px; line-height: 1.65; margin: 0; max-width: none; }
  .engineering-detail { padding-bottom: 16px; }
  .engineering-detail > .text-link { min-height: 44px; margin-top: 8px; padding-bottom: 5px; }
}
@media (max-width: 800px) and (min-height: 700px) and (prefers-reduced-motion: no-preference) {
  #voice-story.engineering-story.scene-enhanced { height: calc(220svh - 64px); }
  .scene-enhanced .engineering-sticky { position: sticky; top: 64px; height: calc(100svh - 64px); min-height: 0; padding: 8px 0; }
  .scene-enhanced .voice-top { padding-bottom: 8px; }
  .scene-enhanced .engineering-heading { margin: 12px 0 0; }
  .scene-enhanced .engineering-heading > p { display: none; }
  .scene-enhanced .engineering-layout { flex: 0 0 auto; gap: 0; }
  .scene-enhanced .engineering-detail { padding-bottom: 8px; }
  .scene-enhanced .engineering-footer { margin-top: auto; padding-top: 8px; font-size: 7px; }
  .scene-enhanced .engineering-scroll-hint { display: inline-flex; gap: 6px; }
  .scene-enhanced .engineering-footer-note { display: none; }
}
@media (max-width: 800px) and (min-height: 700px) and (max-height: 800px) and (prefers-reduced-motion: no-preference) {
  .scene-enhanced .engineering-step-label, .scene-enhanced .engineering-footer { display: none; }
  .scene-enhanced .voice-step-copy { min-height: 116px; }
}
@media (prefers-reduced-motion: reduce) {
  .engineering-story .voice-tabs button::after { transition: none; }
  #voice-story.engineering-story { height: auto; }
  .engineering-sticky { position: relative; height: auto; }
}
